Package com.webobjects.appserver

Examples of com.webobjects.appserver.WOActionResults


   *
   * @author mschrag
   */
  public static class AjaxResponseDelegate implements ERXAjaxResponseDelegate {
    public WOActionResults handleNullActionResults(WORequest request, WOResponse response, WOContext context) {
      WOActionResults finalActionResults = response;
      // If it's not an AjaxResponse, it's suspect ... It means it did not
      // go through an Ajax update pass, so it might be messed up
      if (!(response instanceof AjaxResponse)) {
        // This check is pretty much trickery. It turns out that when the problem
        // that we're looking for happens, you end up with a null content length, and
View Full Code Here


  }
 
  @Override
  public WOActionResults invokeAction(WORequest aRequest, WOContext aContext) {
    _alreadyInForm = context().isInForm();
    WOActionResults results = super.invokeAction(aRequest, aContext);
    // MS: see appendToResponse
    _id = null;
    return results;
  }
View Full Code Here

    return null;
  }

  public WOActionResults save() {
    // check to see if we can save before firing the action (for permissions)
    WOActionResults results = null;
    boolean canSave = canSave();
    if (canSave) {
      if (hasBinding("saveAction")) {
        results = (WOActionResults) valueForBinding("saveAction");
        canSave = canSave();
View Full Code Here

    // ignore results
    return results;
  }

  public WOActionResults cancel() {
    WOActionResults results = (WOActionResults) valueForBinding("cancelAction");
    if (!editOnly()) {
      setEditing(false);
    }
    // ignore results
    return results;
View Full Code Here

   * @param filter
   *            the filter to apply to the objects
   * @return a WOResponse of the format returned from the format() method
   */
  public WOActionResults response(ERXRestFetchSpecification<?> fetchSpec, ERXKeyFilter filter) {
    WOActionResults results;
    if (fetchSpec == null) {
      // MS: you probably meant to call response(Object, filter) in this case -- just proxy through
      results = response(format(), null, filter);
    }
    else {
View Full Code Here

   * @param throwExceptions whether or not to throw exceptions
   * @return the action results
   * @throws RuntimeException if a failure occurs
   */
  public WOActionResults performActionNamed(String actionName, boolean throwExceptions) throws RuntimeException {
    WOActionResults results = null;
   
    try {
      ERXRestTransactionRequestAdaptor transactionAdaptor = ERXRestTransactionRequestAdaptor.defaultAdaptor();
      if (transactionAdaptor.transactionsEnabled() && !transactionAdaptor.isExecutingTransaction(context(), request())) {
        if (!transactionAdaptor.willHandleRequest(context(), request())) {
View Full Code Here

   * @param actionName the name of the HTML action
   * @return the results of the action
   * @throws Exception if anything fails
   */
  protected WOActionResults performHtmlActionNamed(String actionName) throws Exception {
    WOActionResults results = null;
   
    String pageName = pageNameForAction(actionName);
    if (_NSUtilities.classWithName(pageName) != null) {
      try {
        results = pageWithName(pageName);
View Full Code Here

   * @param actionName the name of the action to perform
   * @return the results of the action
   * @throws Exception if anything fails
   */
  protected WOActionResults performRouteActionNamed(String actionName) throws Exception {
    WOActionResults results = null;
   
    String actionMethodName = actionName + WODirectAction.actionText;
        Method actionMethod = _methodForAction(actionMethodName, "");
        if (actionMethod == null) {
          actionMethod = _methodForAction(actionName, "");
View Full Code Here

   * @param actionName the name of the action that attempted to perform
   * @param t the error that occurred
   * @return an appropriate error result
   */
  protected WOActionResults performActionNamedWithError(String actionName, Throwable t) {
    WOActionResults results = null;
    Throwable meaningfulThrowble = ERXExceptionUtilities.getMeaningfulThrowable(t);
    boolean isStrictMode = ERXProperties.booleanForKeyWithDefault("ERXRest.strictMode", true);
    if (meaningfulThrowble instanceof ObjectNotAvailableException || meaningfulThrowble instanceof FileNotFoundException || meaningfulThrowble instanceof NoSuchElementException) {
      results = errorResponse(meaningfulThrowble, ERXHttpStatusCodes.NOT_FOUND);
    }
View Full Code Here

      if (allowOrigin != null) {
        _setHeaderForActionResults(allowOrigin, "Access-Control-Allow-Origin", results);
      }
    }
   
    WOActionResults processedResults = results;
    if (allowWindowNameCrossDomainTransport()) {
      String windowNameCrossDomainTransport = request().stringFormValueForKey("windowname");
      if ("true".equals(windowNameCrossDomainTransport)) {
        WOResponse response = results.generateResponse();
        String content = response.contentString();
View Full Code Here

TOP

Related Classes of com.webobjects.appserver.WOActionResults

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.