Examples of WebContinuation


Examples of org.apache.cocoon.components.flow.WebContinuation

                                                                    attributes);
                    } else if (TAG_SUBMIT.equals(name)) {
                        String continuation = attributes.getValue("continuation");

                        if (continuation!=null) {
                            WebContinuation kont = (WebContinuation) ((Environment) resolver).getAttribute("kont");

                            if (kont!=null) {
                                int level = 0;

                                if (continuation.equals("back")) {
                                    level = 3;
                                }
                                AttributesImpl impl = new AttributesImpl(attributes);
                                int index = impl.getIndex("id");
                                String id = impl.getValue(index);
                                String kId = kont.getContinuation(level).getId();

                                id = kId+":"+id;
                                if (index>=0) {
                                    impl.setValue(index, id);
                                } else {
View Full Code Here

Examples of org.apache.cocoon.components.flow.WebContinuation

        this.resolverContext.put(CONTEXT_SOURCE_CACHE_KEY, new HashMap());

        // FIXME: Initialize the Velocity context. Use objectModel to pass these
        final Object bean = ((Environment) resolver).getAttribute("bean-dict");
        if (bean != null) {
            final WebContinuation kont =
                (WebContinuation) ((Environment) resolver).getAttribute("kont");
           
            // Hack? I use JXPath to determine the properties of the bean object
            final JXPathBeanInfo bi = JXPathIntrospector.getBeanInfo(bean.getClass());
            DynamicPropertyHandler h = null;
View Full Code Here

Examples of org.apache.cocoon.components.flow.WebContinuation

    public void handleContinuation(String id, List params,
                                   Environment environment)
        throws Exception
    {
        WebContinuation wk = continuationsMgr.lookupWebContinuation(id);

        if (wk == null) {
            List p = new ArrayList();
            p.add(new Interpreter.Argument("kontId", id));
            callFunction("handleInvalidContinuation", p, environment);
            return;
        }

        Context context = Context.enter();
        context.setOptimizationLevel(OPTIMIZATION_LEVEL);
        context.setGeneratingDebug(true);
        context.setCompileFunctionsWithDynamicScope(true);

        // Obtain the JS continuation object from it, and setup the
        // JSCocoon object associated in the dynamic scope of the saved
        // continuation with the environment and context objects.
        JSWebContinuation jswk = (JSWebContinuation)wk.getUserObject();
        JSCocoon cocoon = jswk.getJSCocoon();
        cocoon.setContext(manager, environment);
        final Scriptable kScope = cocoon.getParentScope();
        if (enableDebugger) {
            getDebugger().setVisible(true);
View Full Code Here

Examples of org.apache.cocoon.components.flow.WebContinuation

        throws JavaScriptException
    {
        try {
            bizData = jsobjectToObject(bizData);

            WebContinuation kont = null;

            if (cont != null) {
                kont = ((JSWebContinuation)cont).getWebContinuation();
            }
View Full Code Here

Examples of org.apache.cocoon.components.flow.WebContinuation

    ContinuationsManager contMgr
      = (ContinuationsManager)manager.lookup(ContinuationsManager.ROLE);

    Object kont = args[1];
    JSWebContinuation pjswk = (JSWebContinuation)args[2];
    WebContinuation pwk = (pjswk == null ? null : pjswk.wk);

    int ttl;

    if (args[3] == Undefined.instance)
      ttl = 0;
    else {
      Number timeToLive = (Number)args[3];
      ttl = (timeToLive == null ? 0 : timeToLive.intValue());
    }

    JSWebContinuation jswk = new JSWebContinuation();
    WebContinuation wk
      = contMgr.createWebContinuation(kont, pwk, ttl);
    wk.setUserObject(jswk);

    jswk.cocoon = cocoon;
    jswk.wk = wk;
    jswk.continuationsMgr = contMgr;
View Full Code Here

Examples of org.apache.cocoon.components.flow.WebContinuation

                }
            }
        }
        // FIX ME: When we decide proper way to pass "bean" and "kont"
        Object bean = ((Environment)resolver).getAttribute("bean-dict");
        WebContinuation kont =
            (WebContinuation)((Environment)resolver).getAttribute("kont");
        setContexts(bean, kont,
                    ObjectModelHelper.getRequest(objectModel),
                    ObjectModelHelper.getResponse(objectModel),
                    ObjectModelHelper.getContext(objectModel),
View Full Code Here

Examples of org.apache.cocoon.components.flow.WebContinuation

                        startElement.attributes.getValue(CONTINUATION);
                    int level = 0;
                    if (BACK.equals(cont)) {
                        level = 3;
                    }
                    WebContinuation wk = kont;
                    for (int i = 0; i < level; i++) {
                        wk = wk.getParentContinuation();
                        if (wk == null) {
                            throw new SAXParseException("No such continuation",
                                                        ev.location,
                                                        null);
                        }
                    }
                    String kontId = wk.getId();
                    AttributesImpl newAttrs =
                        new AttributesImpl(startElement.attributes);
                    int i = newAttrs.getIndex(ID);
                    String phase = attrs.getValue(PHASE);
                    if (phase == null) {
View Full Code Here

Examples of org.apache.cocoon.components.flow.WebContinuation

    ContinuationsManager contMgr = cocoon.getContinuationsManager();
    Object kont = args[1];
    Object pwk = args[2];

    JSWebContinuation jswk = new JSWebContinuation();
    WebContinuation wk
      = contMgr.createWebContinuation(kont, (WebContinuation)pwk);
    wk.setUserObject(jswk);

    jswk.cocoon = cocoon;
    jswk.wk = wk;
    jswk.continuationsMgr = contMgr;
View Full Code Here

Examples of org.apache.cocoon.components.flow.WebContinuation

                        startElement.attributes.getValue(CONTINUATION);
                    int level = 0;
                    if (BACK.equals(cont)) {
                        level = 3;
                    }
                    WebContinuation wk = kont;
                    for (int i = 0; i < level; i++) {
                        wk = wk.getParentContinuation();
                        if (wk == null) {
                            throw new SAXParseException("No such continuation",
                                                        ev.location,
                                                        null);
                        }
                    }
                    String kontId = wk.getId();
                    AttributesImpl newAttrs =
                        new AttributesImpl(startElement.attributes);
                    int i = newAttrs.getIndex(ID);
                    String phase = attrs.getValue(PHASE);
                    if (phase == null) {
View Full Code Here

Examples of org.apache.cocoon.components.flow.WebContinuation


    private FOM_WebContinuation forwardTo(String uri, Object bizData,
                                          Continuation continuation)
        throws Exception {
        WebContinuation wk = null;
        if (continuation != null) {
            ContinuationsManager contMgr = (ContinuationsManager)
                componentManager.lookup(ContinuationsManager.ROLE);
            wk = lastContinuation =
                contMgr.createWebContinuation(continuation,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.