Search in sources :

Example 26 with WOActionResults

use of com.webobjects.appserver.WOActionResults in project wonder-slim by undur.

the class AjaxFileUpload method uploadCanceled.

public WOActionResults uploadCanceled() {
    uploadFinished();
    WOActionResults results = (WOActionResults) valueForBinding("canceledAction");
    return results;
}
Also used : WOActionResults(com.webobjects.appserver.WOActionResults)

Example 27 with WOActionResults

use of com.webobjects.appserver.WOActionResults in project wonder-slim by undur.

the class ERXComponentRequestHandler method _dispatchWithPreparedPage.

private WOResponse _dispatchWithPreparedPage(WOComponent aPage, WOSession aSession, WOContext aContext, NSDictionary someElements) {
    WORequest aRequest = aContext.request();
    WOApplication anApplication = WOApplication.application();
    WOResponse aResponse = anApplication.createResponseInContext(aContext);
    String aSenderID = aContext.senderID();
    String oldContextID = aSession._contextIDMatchingIDs(aContext);
    aResponse.setHTTPVersion(aRequest.httpVersion());
    aResponse.setHeader("text/html", "content-type");
    aContext._setResponse(aResponse);
    if (oldContextID == null) {
        if (aSenderID != null) {
            if (aRequest._hasFormValues()) {
                anApplication.takeValuesFromRequest(aRequest, aContext);
            }
        }
        aContext._setPageChanged(false);
        if (aSenderID != null) {
            WOActionResults anActionResults = anApplication.invokeAction(aRequest, aContext);
            if ((anActionResults == null) || ((anActionResults instanceof WOComponent))) {
                WOComponent aResultComponent = (WOComponent) anActionResults;
                if ((aResultComponent != null) && (aResultComponent.context() != aContext)) {
                    aResultComponent._awakeInContext(aContext);
                }
                boolean didPageChange = false;
                if ((aResultComponent != null) && (aResultComponent != aContext._pageElement())) {
                    didPageChange = true;
                }
                aContext._setPageChanged(didPageChange);
                if (didPageChange) {
                    aContext._setPageElement(aResultComponent);
                }
            } else {
                WOResponse theResponse = anActionResults.generateResponse();
                return theResponse;
            }
        }
    } else {
        WOComponent responsePage = _restorePageForContextID(oldContextID, aSession);
        aContext._setPageElement(responsePage);
    }
    anApplication.appendToResponse(aResponse, aContext);
    return aResponse;
}
Also used : WORequest(com.webobjects.appserver.WORequest) WOActionResults(com.webobjects.appserver.WOActionResults) WOComponent(com.webobjects.appserver.WOComponent) WOResponse(com.webobjects.appserver.WOResponse) WOApplication(com.webobjects.appserver.WOApplication)

Example 28 with WOActionResults

use of com.webobjects.appserver.WOActionResults in project wonder-slim by undur.

the class WXOutlineEntry method invokeAction.

@Override
public WOActionResults invokeAction(WORequest aRequest, WOContext aContext) {
    WOActionResults returnElement;
    session().setObjectForKey(this, "_outlineEntry");
    returnElement = super.invokeAction(aRequest, aContext);
    return returnElement;
}
Also used : WOActionResults(com.webobjects.appserver.WOActionResults)

Example 29 with WOActionResults

use of com.webobjects.appserver.WOActionResults in project wonder-slim by undur.

the class ERXWOSwitchComponent method invokeAction.

@Override
public WOActionResults invokeAction(WORequest paramWORequest, WOContext paramWOContext) {
    String name = componentNameInContext(paramWOContext.component());
    String id = _elementNameInContext(name, paramWOContext);
    paramWOContext.appendElementIDComponent(id);
    WOElement localWOElement = _realComponentWithName(name, id, paramWOContext);
    WOActionResults localWOActionResults = localWOElement.invokeAction(paramWORequest, paramWOContext);
    paramWOContext.deleteLastElementIDComponent();
    return localWOActionResults;
}
Also used : WOActionResults(com.webobjects.appserver.WOActionResults) WOElement(com.webobjects.appserver.WOElement)

Example 30 with WOActionResults

use of com.webobjects.appserver.WOActionResults in project wonder-slim by undur.

the class ERXWOComponentContent method invokeAction.

@Override
public WOActionResults invokeAction(WORequest worequest, WOContext wocontext) {
    WOComponent component = wocontext.component();
    WOElement template = template(component);
    WOActionResults result;
    if (template != null) {
        wocontext._setCurrentComponent(component.parent());
        result = template.invokeAction(worequest, wocontext);
        wocontext._setCurrentComponent(component);
    } else {
        result = _defaultTemplate.invokeAction(worequest, wocontext);
    }
    return result;
}
Also used : WOActionResults(com.webobjects.appserver.WOActionResults) WOComponent(com.webobjects.appserver.WOComponent) WOElement(com.webobjects.appserver.WOElement)

Aggregations

WOActionResults (com.webobjects.appserver.WOActionResults)31 WOComponent (com.webobjects.appserver.WOComponent)11 WOResponse (com.webobjects.appserver.WOResponse)6 WOElement (com.webobjects.appserver.WOElement)2 WOApplication (com.webobjects.appserver.WOApplication)1 WOContext (com.webobjects.appserver.WOContext)1 WORequest (com.webobjects.appserver.WORequest)1 WOForm (com.webobjects.appserver._private.WOForm)1 WONoContentElement (com.webobjects.appserver._private.WONoContentElement)1 NSArray (com.webobjects.foundation.NSArray)1 NSData (com.webobjects.foundation.NSData)1 NSMutableArray (com.webobjects.foundation.NSMutableArray)1 NSMutableDictionary (com.webobjects.foundation.NSMutableDictionary)1 NSRange (com.webobjects.foundation.NSRange)1 ERXWOContext (er.extensions.appserver.ERXWOContext)1 ERXWOForm (er.extensions.components._private.ERXWOForm)1 File (java.io.File)1 FileInputStream (java.io.FileInputStream)1 FileOutputStream (java.io.FileOutputStream)1 IOException (java.io.IOException)1