You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Мария Григорьева <ma...@gmail.com> on 2008/10/09 15:14:16 UTC
flowscript doesn't reach the continuation
Hello!
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.
Re: flowscript doesn't reach the continuation
Posted by so...@apache.org.
These two things are not like the other:
pages/component-template.html.xml
pages/comnponent-template.xml
The former is from my post. Notice the double extension.
The latter is from your post. (Misspelled, hopefully a typo)
On 10/10/08, Мария Григорьева <ma...@gmail.com> wrote:
> Yes, of course... this file exist! (pages/comnponent-template.xml)
>
> In pattern <map:match pattern="viewform-*"> ... and
> In flowscript
> form.showForm("viewform-component-template");
>
>
> -----Original Message-----
> From: solprovider@gmail.com [mailto:solprovider@gmail.com] On Behalf Of solprovider@apache.org
>
> Sent: Friday, October 10, 2008 12:58 AM
> To: users@cocoon.apache.org
> 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, Мария Григорьева <ma...@gmail.com> 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: solprovider@gmail.com [mailto:solprovider@gmail.com] On Behalf Of solprovider@apache.org
> > Sent: Thursday, October 09, 2008 8:20 PM
> > To: users@cocoon.apache.org
> > Subject: Re: flowscript doesn't reach the continuation
> >
> > On 10/9/08, Мария Григорьева <ma...@gmail.com> 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: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
RE: flowscript doesn't reach the continuation
Posted by Мария Григорьева <ma...@gmail.com>.
Yes, of course... this file exist! (pages/comnponent-template.xml)
In pattern <map:match pattern="viewform-*"> ... and
In flowscript
form.showForm("viewform-component-template");
-----Original Message-----
From: solprovider@gmail.com [mailto:solprovider@gmail.com] On Behalf Of solprovider@apache.org
Sent: Friday, October 10, 2008 12:58 AM
To: users@cocoon.apache.org
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, Мария Григорьева <ma...@gmail.com> 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: solprovider@gmail.com [mailto:solprovider@gmail.com] On Behalf Of solprovider@apache.org
> Sent: Thursday, October 09, 2008 8:20 PM
> To: users@cocoon.apache.org
> Subject: Re: flowscript doesn't reach the continuation
>
> On 10/9/08, Мария Григорьева <ma...@gmail.com> 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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
RE: flowscript doesn't reach the continuation
Posted by Мария Григорьева <ma...@gmail.com>.
I have access to this file (component-template.xml)...
But when in this form I click "ok" button to submit,
after that nothing happens.
The flowscript doesn't process any instructions after
Form.showForm();
-----Original Message-----
From: solprovider@gmail.com [mailto:solprovider@gmail.com] On Behalf Of solprovider@apache.org
Sent: Friday, October 10, 2008 12:58 AM
To: users@cocoon.apache.org
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, Мария Григорьева <ma...@gmail.com> 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: solprovider@gmail.com [mailto:solprovider@gmail.com] On Behalf Of solprovider@apache.org
> Sent: Thursday, October 09, 2008 8:20 PM
> To: users@cocoon.apache.org
> Subject: Re: flowscript doesn't reach the continuation
>
> On 10/9/08, Мария Григорьева <ma...@gmail.com> 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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: flowscript doesn't reach the continuation
Posted by Charlie Rose <cr...@MIT.EDU>.
This looks similar to the problem I am having with IE7. Just to make
sure you have ruled this out:
if you are using Internet Explorer to view a single field form, and
you type return instead of click submit the page will just reload.
Charles Rose
CogNet
MIT Press Journals
On Oct 10, 2008, at 10:53 AM, solprovider@apache.org wrote:
> form.showForm("viewform-component-template");
> looks better and may even be correct.
>
> This code is complicated by database access and form repeaters.
> Someone else may check the syntax. I would troubleshoot by logging
> often. The "print" statement logs to the Cocoon console. Examples:
> print("id=" + id);
> print("Passed selectPhisicalParams()";
> print("Passed getChild()");
> print("type=" + comp_in_comps.get(3*i));
>
> HTH,
> solprovider
>
> On 10/10/08, Мария Григорьева <ma...@gmail.com>
> wrote:
>> 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!
>>
>> }
Re: flowscript doesn't reach the continuation
Posted by so...@apache.org.
form.showForm("viewform-component-template");
looks better and may even be correct.
This code is complicated by database access and form repeaters.
Someone else may check the syntax. I would troubleshoot by logging
often. The "print" statement logs to the Cocoon console. Examples:
print("id=" + id);
print("Passed selectPhisicalParams()";
print("Passed getChild()");
print("type=" + comp_in_comps.get(3*i));
HTH,
solprovider
On 10/10/08, Мария Григорьева <ma...@gmail.com> wrote:
> 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!
>
> }
RE: flowscript doesn't reach the continuation
Posted by Мария Григорьева <ma...@gmail.com>.
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: solprovider@gmail.com [mailto:solprovider@gmail.com] On Behalf Of solprovider@apache.org
Sent: Friday, October 10, 2008 12:58 AM
To: users@cocoon.apache.org
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, Мария Григорьева <ma...@gmail.com> 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: solprovider@gmail.com [mailto:solprovider@gmail.com] On Behalf Of solprovider@apache.org
> Sent: Thursday, October 09, 2008 8:20 PM
> To: users@cocoon.apache.org
> Subject: Re: flowscript doesn't reach the continuation
>
> On 10/9/08, Мария Григорьева <ma...@gmail.com> 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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: flowscript doesn't reach the continuation
Posted by so...@apache.org.
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, Мария Григорьева <ma...@gmail.com> 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: solprovider@gmail.com [mailto:solprovider@gmail.com] On Behalf Of solprovider@apache.org
> Sent: Thursday, October 09, 2008 8:20 PM
> To: users@cocoon.apache.org
> Subject: Re: flowscript doesn't reach the continuation
>
> On 10/9/08, Мария Григорьева <ma...@gmail.com> 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
RE: flowscript doesn't reach the continuation
Posted by Мария Григорьева <ma...@gmail.com>.
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: solprovider@gmail.com [mailto:solprovider@gmail.com] On Behalf Of solprovider@apache.org
Sent: Thursday, October 09, 2008 8:20 PM
To: users@cocoon.apache.org
Subject: Re: flowscript doesn't reach the continuation
On 10/9/08, Мария Григорьева <ma...@gmail.com> 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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: flowscript doesn't reach the continuation
Posted by so...@apache.org.
On 10/9/08, Мария Григорьева <ma...@gmail.com> 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