You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Michael Häger <mm...@gmx.de> on 2004/10/08 11:56:52 UTC
Contiunuations with forms doesn't work - fields stay empty
Hallo,
I am trying to do the following:
After filling out an easy form, I want to use continuations to save all
the data entered. I did it like in the cocoon tutorial. The problem is
that when I load an old continuation, all the fields stay empty. None of
the values that I have entered, are shown again. The cocoon samples in
the section "/samples/block/forms" have the same problem like my one.
I would be glad if anyone could show me a way to use continuations with
cForms.
Thanks
Michael
Enclosed my code:
section
//flowscript
var form = new Form("documents/forms/login.xml");
form.showForm("registration-pipeline");
var model = form.getModel();
//make some test ...
if (OK) {
cocoon.sendPage("mainPage", {"model":model});
else
//reload the site again
// gave the values in model to the continuation
cocoon.sendPage("", {"model":model});
}
//forms_template
...
<ft:form-template action="#{$continuation/id}.continue" method="POST">
<ft:widget-label id="name"/>
<ft:widget id="name"/>
<br/>
.....<!-- some other fields -->
<input type="submit"/>
</ft:form-template>
...
// sitemap
<map:match pattern="registration-pipeline">
<map:generate src="forms/forms_template.xml"/>
<map:transform type="forms"/>
<map:call resource="simple-page2html">
<map:parameter name="file" value="forms/forms_template.xml"/>
</map:call>
<map:transform src="resources/forms-samples-styling.xsl"/>
<map:serialize/>
</map:match>
<map:match pattern="*.continue">
<map:call continuation="{1}"/>
</map:match>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: problem with dasl query
Posted by Guido Casper <gc...@s-und-n.de>.
Are you using Tomcat? I THINK this may be caused by wrong version of XML
libraries. Try putting Cocoon's xalan, xerces and xml-api jars into
endorsed lib directory.
HTH
Guido
Francois Jannin wrote:
> Hi all,
>
> I want to make DASL queries following the cocoon 2.1 samples and I got a
> NullPointerException in return.
>
> my sample-based query looks like :
>
> <dasl:query xmlns:dasl="http://cocoon.apache.org/webdav/dasl/1.0"
> target="webdav://localhost:8080/slide/">
> <D:searchrequest xmlns:D="DAV:">
> <D:basicsearch>
> <D:select>
> <D:allprop/>
> </D:select>
> <D:from>
> <D:scope>
> <D:href>slide</D:href>
> <D:depth>infinity</D:depth>
> </D:scope>
> </D:from>
> </D:basicsearch>
> </D:searchrequest>
> </dasl:query>
>
> And in my sitemap :
>
> <map:match pattern="DASLProp">
> <map:generate src="context://injac/queries/test-dasl.xml" />
> <map:transform type="dasl" />
> <map:serialize type="xml"/>
> </map:match>
>
> Exception message is not very explicit :
>
> org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
> org.apache.cocoon.ProcessingException: Could not read resource
> file:/E:/Java/jakarta-tomcat-5.0.28/webapps/cocoon/injac/queries/test-dasl.xml:
> java.lang.NullPointerException
>
>
> Thanks for any suggestions, i'm really stuck.
>
>
>
> ---------------------------------------------------------------------
> 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
problem with dasl query
Posted by Francois Jannin <fr...@etu.enseeiht.fr>.
Hi all,
I want to make DASL queries following the cocoon 2.1 samples and I got a
NullPointerException in return.
my sample-based query looks like :
<dasl:query xmlns:dasl="http://cocoon.apache.org/webdav/dasl/1.0"
target="webdav://localhost:8080/slide/">
<D:searchrequest xmlns:D="DAV:">
<D:basicsearch>
<D:select>
<D:allprop/>
</D:select>
<D:from>
<D:scope>
<D:href>slide</D:href>
<D:depth>infinity</D:depth>
</D:scope>
</D:from>
</D:basicsearch>
</D:searchrequest>
</dasl:query>
And in my sitemap :
<map:match pattern="DASLProp">
<map:generate src="context://injac/queries/test-dasl.xml" />
<map:transform type="dasl" />
<map:serialize type="xml"/>
</map:match>
Exception message is not very explicit :
org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
org.apache.cocoon.ProcessingException: Could not read resource
file:/E:/Java/jakarta-tomcat-5.0.28/webapps/cocoon/injac/queries/test-dasl.xml:
java.lang.NullPointerException
Thanks for any suggestions, i'm really stuck.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org