In the other funrction with form.showForm() I have the common problem...
function editPhisicalParams() {
var id = cocoon.parameters.id;
var form = new Form("form-definition/phisical-params.xml");
var formMap = form.asMap();
var params = dao.jdbc.selectPhisicalParams(id);
var comp_in_comps =
dao.jdbc.selectComponent_in_Composition1(params.get(0));
var repeater = form.getChild("test");
for (var i = 0; i < comp_in_comps.size()/3; i++) {
var row = repeater.addRow(i);
row.getChild("type").setValue(comp_in_comps.get(3*i));
row.getChild("amount").setValue(comp_in_comps.get(3*i+2));
row.getChild("select").setValue(false);
}
repeater.removeRow(comp_in_comps.size()/3);
formMap.put("density", params.get(1));
form.showForm("viewform-component-template");
........................................
........................................
After form.showForm() instructions aren't executable!
}
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Friday, October 10, 2008 12:58 AM
To: [email protected]
Subject: Re: flowscript doesn't reach the continuation
form.showForm("viewform-component-template.html");
Matches:
<map:match pattern="viewform-*">
<map:generate type="jx" src="pages/{1}.xml"/>
Reads the file:
pages/component-template.html.xml
Does this file exist?
solprovider
On 10/9/08, Мария Григорьева <[EMAIL PROTECTED]> wrote:
> Here... the fragment from my Sitemap:
>
> <map:match pattern="viewform-*">
> <map:generate type="jx" src="pages/{1}.xml"/>
> <map:transform type="browser-update"/>
> <map:transform type="i18n"/>
> <map:transform src="resources/forms-samples-styling.xsl"/>
> <map:select type="ajax-request">
> <map:when test="true">
> <map:serialize type="xml"/>
> </map:when>
> <map:otherwise>
> <map:transform src="resources/page-styling.xsl"/>
> <map:serialize type="html"/>
> </map:otherwise>
> </map:select>
> </map:match>
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL
> PROTECTED]
> Sent: Thursday, October 09, 2008 8:20 PM
> To: [email protected]
> Subject: Re: flowscript doesn't reach the continuation
>
> On 10/9/08, Мария Григорьева <[EMAIL PROTECTED]> wrote:
> > I'm using the flowscript to input data into the database through the form.
> > Here is my code:
> > function inputPhisicalParams() {
> > var id = cocoon.parameters.id;
> > var form = new
> > Form("form-definition/phisical-params.xml");
> > var formMap = form.asMap();
> > form.showForm("viewform-component-template.html");
> > if (formMap) throw "formMap=" + formMap;
> >
> > After form.showForm(), and "Submit" on the form – nothing happens…
> > The page just reload… And I can't get the formMap parameters.
> >
> > Please, help!!! I don't understand what's the problem.
>
> form.showForm(Match in calling XMAP)
> Probably not an HTML file.
> Or does your XMAP have a pipeline match for
> "viewform-component-template.html"?
> I use something like "myform-display" and:
> <map:match pattern="myform-display">
>
> The response will be the page created from whatever pipeline matches
> "viewform-component-template.html" in the XMAP that called your
> function.
>
> My example Flow (for Lenya but the code is mostly Cocoon) is at:
> http://solprovider.com/lenya/flowprocess
>
> HTH,
> solprovider
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]