cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anders Högqvist <hogqv...@hotmail.com>
Subject Re: urgent fp taglib problems
Date Wed, 18 Apr 2001 08:32:37 GMT
But they are doing it in the example enclosed with cocoon. There they read
from a default document and write to the same document as the form. Since
cocoon totaly ignore the fp tags there must be something else I've missed.

/Anders


----- Original Message -----
From: "simone cecchini" <simone@kiosco.org>
To: <cocoon-users@xml.apache.org>
Sent: Tuesday, April 17, 2001 5:59 PM
Subject: Re: urgent fp taglib problems


i think you can't do this. you are trying to write the same file you are
using as form handler. this might have caused some strange problems with xsp
code generation.
you should get sure you have

<?cocoon-process type="xsp"?>
<xsp:page xmlns:fp="http://apache.org/cocoon/XSP/FP/1.0"
language="java">
in your prolog

>Greetings!
>
>I have tried to make a site with a form using fp taglib, but cocoon doesn't
do anything with it. I have followed the example that was enclosed with
cocoon but I have probably missed something.
>
>In my xml file I have the following lines right after <page>:
>
><fp:resource id="target">
>    <fp:resource-file>vader.xml</fp:resource-file>
>    <fp:resource-node>page/vader</fp:resource-node>
></fp:resource>
>

you should have put <fp:resource-node>/page/vader</fp:resource-node>,
provided that 'page' is your document element

>and my form looks like this:
>
><form action="vader.xml" method="GET">
>    <input type="select">
>        <name>stad</name>
>        <option>blabla</option>
>        <fp:if-get>
>            <fp:write select="vader" to="target">
>            blabla
>            </fp:write>
>        </fp:if-get>

in this way, the writing happens every time you perform a get operation
(<fp:if-get...), even when you load the page for the first time. moreover,
if you want to write your data as the content of the 'page/vader' element,
you should simply put select="." (the selected node is already page/vader).
if you want your page look different when 'got' or posted, you can simply
put
<fp:if-get>
<normal tag for get case>
</fp:if-get>

<fp:if-post>
<normal tag for post case>
</fp:if-post>

>    </input>
>    <input type="submit" value="Hämta väder"/>
></form>
>
>In the generated html code the following lines are written:

it seems that the taglib doesn't get executed. pay attention to the prolog.
hth,
simone

><fp:resource id="target" xmlns:fp="http://apache.org/cocoon/XSP/FP/1.0">
>    <fp:resource-file>vader.xml</fp:resource-file>
>    <fp:resource-node>page/vader</fp:resource-node>
></fp:resource>
>
>and vader.xml and page/vader is shown in the browser. When I press the
submit button nothing happends. I have checked that fp is correctly
configured in cocoon.properties.
>
>Please help me on this one!
>
>/Anders Högqvist
>

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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


Mime
View raw message