You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Derek Hohls <DH...@csir.co.za> on 2006/03/02 15:56:13 UTC
Generating a dynamic form from flow?
I am trying to create a form whose parts may change...
In my flow script I have:
var fooForm = new Form("model_foo");
and in the sitemap:
<map:match pattern="model_*">
<map:generate src="view/report/model_{1}.xml" type="jx"/>
<map:serialize type="xml"/>
</map:match>
But the error I get is:
org.apache.avalon.framework.CascadingException:
Could not parse form definition from file:/D:/tomcat/webapps/cocoon/projects/localdb/model_repIndicatorcause: java.io.FileNotFoundException: D:\tomcat\webapps\cocoon\projects\local\model_foo (The system cannot find the file specified)
In other words: the flow is not looking in the sitemap
to see where the form file is being created...
How do I resolve this?
Thanks
Derek
--
This message is subject to the CSIR's copyright, terms and conditions and
e-mail legal notice. Views expressed herein do not necessarily represent the
views of the CSIR.
CSIR E-mail Legal Notice
http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html
CSIR Copyright, Terms and Conditions
http://mail.csir.co.za/CSIR_Copyright.html
For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR
Legal Notice send a blank message with REQUEST LEGAL in the subject line to
HelpDesk@csir.co.za.
This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Generating a dynamic form from flow?
Posted by Leszek Gawron <lg...@mobilebox.pl>.
Jason Johnston wrote:
>>I am trying to create a form whose parts may change...
>>
>>In my flow script I have:
>>
>>var fooForm = new Form("model_foo");
>
>
> Try:
>
> var fooForm = new Form("cocoon://model_foo");
cocoon:// will be resolved with top level sitemap while cocoon:/ will
direct you to the same sitemap that handles the flowscript (which
probably is what you want in 90% of cases)
--
Leszek Gawron lgawron@mobilebox.pl
IT Manager MobileBox sp. z o.o.
+48 (61) 855 06 67 http://www.mobilebox.pl
mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Generating a dynamic form from flow?
Posted by Jason Johnston <co...@lojjic.net>.
> I am trying to create a form whose parts may change...
>
> In my flow script I have:
>
> var fooForm = new Form("model_foo");
Try:
var fooForm = new Form("cocoon://model_foo");
>
> and in the sitemap:
>
> <map:match pattern="model_*">
> <map:generate src="view/report/model_{1}.xml" type="jx"/>
> <map:serialize type="xml"/>
> </map:match>
>
> But the error I get is:
>
> org.apache.avalon.framework.CascadingException:
> Could not parse form definition from
> file:/D:/tomcat/webapps/cocoon/projects/localdb/model_repIndicatorcause:
> java.io.FileNotFoundException:
> D:\tomcat\webapps\cocoon\projects\local\model_foo (The system cannot find
> the file specified)
>
> In other words: the flow is not looking in the sitemap
> to see where the form file is being created...
>
> How do I resolve this?
>
> Thanks
> Derek
>
>
> --
> This message is subject to the CSIR's copyright, terms and conditions and
> e-mail legal notice. Views expressed herein do not necessarily represent
> the
> views of the CSIR.
>
> CSIR E-mail Legal Notice
> http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html
>
> CSIR Copyright, Terms and Conditions
> http://mail.csir.co.za/CSIR_Copyright.html
>
> For electronic copies of the CSIR Copyright, Terms and Conditions and the
> CSIR
> Legal Notice send a blank message with REQUEST LEGAL in the subject line
> to
> HelpDesk@csir.co.za.
>
>
> This message has been scanned for viruses and dangerous content by
> MailScanner,
> and is believed to be clean.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Generating a dynamic form from flow?
Posted by Leszek Gawron <lg...@mobilebox.pl>.
Derek Hohls wrote:
> I am trying to create a form whose parts may change...
>
> In my flow script I have:
>
> var fooForm = new Form("model_foo");
use var form = new Form( "cocoon:/model_foo" );
if you encounter strange errors (sometimes you might) do
var form = new Form( "cocoon:raw:/model_foo" );
the second case _won't _make any request parameters/attributes available
to the subrequest. Still you may pass parameters:
var form = new Form( "cocoon:raw:/model_foo?param=1" );
>
> and in the sitemap:
>
> <map:match pattern="model_*">
> <map:generate src="view/report/model_{1}.xml" type="jx"/>
> <map:serialize type="xml"/>
> </map:match>
>
> But the error I get is:
>
> org.apache.avalon.framework.CascadingException:
> Could not parse form definition from file:/D:/tomcat/webapps/cocoon/projects/localdb/model_repIndicatorcause: java.io.FileNotFoundException: D:\tomcat\webapps\cocoon\projects\local\model_foo (The system cannot find the file specified)
>
> In other words: the flow is not looking in the sitemap
> to see where the form file is being created...
>
> How do I resolve this?
>
> Thanks
> Derek
>
>
--
Leszek Gawron lgawron@mobilebox.pl
IT Manager MobileBox sp. z o.o.
+48 (61) 855 06 67 http://www.mobilebox.pl
mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org