cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From taabpr <taa...@aster.pl>
Subject [CForms] using flowscript without continuation
Date Wed, 21 Jul 2004 13:13:20 GMT
Hi all,
I cannot/don't want to use continuation (internet ), but want to use
cforms with js scripts together.
For now I do:
In sitemap:
            <map:match pattern="calc_*">
                <!-- Here we use the HTTP method, GET or POST, to make
distinction between
       the initial form display and a form submit. In both cases the
same publishing
       pipeline will be used, which is below the selector. -->
                <map:select type="request-method">
                    <map:when test="GET">
                        <map:call function="handleForm">
                            <map:parameter name="function" value="sad"/>
                            <map:parameter name="form-definition"
value="cocoon:/sad_{1}.xml"/>
                            <map:parameter name="locale" value="{1}"/>
                        </map:call>
                    </map:when>
                    <map:when test="POST">
                        <map:act type="handle-form-submit">
                            <map:parameter name="form-definition"
value="cocoon:/sad_{1}.xml"/>
                            <map:parameter name="attribute-name"
value="sad"/>
                            <map:parameter name="formhandler"

value="org.apache.cocoon.forms.samples.Form1Handler"/>
                            <map:generate type="serverpages"
src="forms/xxx.xsp"/>
                            <map:transform type="cinclude"/>
                            <map:serialize/>
                        </map:act>
                    </map:when>


and js is:
function sad(form) {
    var model = form.getModel();
    model.commodity_code = "1111111111";
    form.locale = locale;
    cocoon.request.setAttribute("sad", form.getWidget());
    cocoon.sendPage("sad-display-pipeline_" + locale.toString());
}

sendPage does not create the continuation.

But the problem appears in any repeaters. I don't know how to handle
requests with action add-delete-row using flowscript. For this I use
standard actions from example (see the part POST), but would prefer js.
Could you tell me how to write cforms with only js scripts without
continuation (would be good the have such example also in samples)?
    Thanks,
       Tom



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message