You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by JLe <my...@trashymail.com> on 2008/08/26 12:06:50 UTC
POST parameter in Sitemap
Hi Guys,
I have a form in HTML:
==============================================================================
<html>
<head>
...
</head>
<body>
...
<form method="GET" action="matchme/edit" name="GroupOfParts">
<input value="anything1" name="GroupOfParts" type="radio">anything1<br>
<input value="thing1" name="GroupOfParts" type="radio">track 1<br>
<input value="thing2 " name="GroupOfParts" type="radio">track 2<br>
<input value="Edit" type="submit">
</form>
...
<body>
</html>
===============================================================================
and I match this in the sitemap:
===============================================================================
<map:match pattern="matchme/edit">
<map:parameter name="GroupOfParts" value="{request-attr:GroupOfParts}"/>
<map:call function="edit"/>
</map:match>
===============================================================================
as you can see, I tried the request-attr thing, that I found in this
mailing-list, but I would have to enter this Componenten in the sitemap
Components. It this a SELECTOR?
===============================================================================
<map:selector name="set-request-attr"
src="org.apache.cocoon.selection.RequestAttributeSelector"/>
===============================================================================
did not work, is this request-attr thing the RequestAttributeSelector?
Or is there another way of reading a POST parameter in the Sitemap?
Regards, JLEO
--
View this message in context: http://www.nabble.com/POST-parameter-in-Sitemap-tp19158771p19158771.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: POST parameter in Sitemap
Posted by JLe <my...@trashymail.com>.
alright, got it!
I do now not read in the POST parameter in the sitemap, I read it in the
flowscript that i load, in the function edit
The code for loading the parameter is:
====================================================================
var PartEdit = cocoon.request.getParameter("GroupOfParts");
====================================================================
Thanks for help.
JLe wrote:
>
> Do I have to make the request-attr input module know to cocoon in the
> sitemap or so?
> The GroupOfParts parameter is alwas "null".
>
>
>
> Jeroen Reijn-3 wrote:
>>
>> Hi JLEO,
>>
>> the 'request-attr' component is an input module. See [1] for more
>> information. You should be able to read POST request attributes with it
>> as well. What doesn't work?
>>
>> [1]http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/components/modules/input/RequestAttributeModule.html
>>
>> Regards,
>>
>> Jeroen Reijn
>>
>>
>>
>> JLe wrote:
>>> Hi Guys,
>>>
>>> I have a form in HTML:
>>> ==============================================================================
>>> <html>
>>> <head>
>>> ...
>>> </head>
>>> <body>
>>> ...
>>> <form method="GET" action="matchme/edit" name="GroupOfParts">
>>> <input value="anything1" name="GroupOfParts"
>>> type="radio">anything1<br>
>>> <input value="thing1" name="GroupOfParts" type="radio">track 1<br>
>>> <input value="thing2 " name="GroupOfParts" type="radio">track 2<br>
>>> <input value="Edit" type="submit">
>>> </form>
>>> ...
>>> <body>
>>> </html>
>>> ===============================================================================
>>>
>>> and I match this in the sitemap:
>>>
>>> ===============================================================================
>>> <map:match pattern="matchme/edit">
>>> <map:parameter name="GroupOfParts"
>>> value="{request-attr:GroupOfParts}"/>
>>>
>>> <map:call function="edit"/>
>>> </map:match>
>>> ===============================================================================
>>>
>>> as you can see, I tried the request-attr thing, that I found in this
>>> mailing-list, but I would have to enter this Componenten in the sitemap
>>> Components. It this a SELECTOR?
>>>
>>> ===============================================================================
>>> <map:selector name="set-request-attr"
>>> src="org.apache.cocoon.selection.RequestAttributeSelector"/>
>>> ===============================================================================
>>>
>>> did not work, is this request-attr thing the RequestAttributeSelector?
>>>
>>>
>>> Or is there another way of reading a POST parameter in the Sitemap?
>>>
>>> Regards, JLEO
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
>>
>
>
--
View this message in context: http://www.nabble.com/POST-parameter-in-Sitemap-tp19158771p19161107.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: POST parameter in Sitemap
Posted by JLe <my...@trashymail.com>.
Do I have to make the request-attr input module know to cocoon in the sitemap
or so?
The GroupOfParts parameter is alwas "null".
Jeroen Reijn-3 wrote:
>
> Hi JLEO,
>
> the 'request-attr' component is an input module. See [1] for more
> information. You should be able to read POST request attributes with it
> as well. What doesn't work?
>
> [1]http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/components/modules/input/RequestAttributeModule.html
>
> Regards,
>
> Jeroen Reijn
>
>
>
> JLe wrote:
>> Hi Guys,
>>
>> I have a form in HTML:
>> ==============================================================================
>> <html>
>> <head>
>> ...
>> </head>
>> <body>
>> ...
>> <form method="GET" action="matchme/edit" name="GroupOfParts">
>> <input value="anything1" name="GroupOfParts"
>> type="radio">anything1<br>
>> <input value="thing1" name="GroupOfParts" type="radio">track 1<br>
>> <input value="thing2 " name="GroupOfParts" type="radio">track 2<br>
>> <input value="Edit" type="submit">
>> </form>
>> ...
>> <body>
>> </html>
>> ===============================================================================
>>
>> and I match this in the sitemap:
>>
>> ===============================================================================
>> <map:match pattern="matchme/edit">
>> <map:parameter name="GroupOfParts" value="{request-attr:GroupOfParts}"/>
>>
>> <map:call function="edit"/>
>> </map:match>
>> ===============================================================================
>>
>> as you can see, I tried the request-attr thing, that I found in this
>> mailing-list, but I would have to enter this Componenten in the sitemap
>> Components. It this a SELECTOR?
>>
>> ===============================================================================
>> <map:selector name="set-request-attr"
>> src="org.apache.cocoon.selection.RequestAttributeSelector"/>
>> ===============================================================================
>>
>> did not work, is this request-attr thing the RequestAttributeSelector?
>>
>>
>> Or is there another way of reading a POST parameter in the Sitemap?
>>
>> Regards, JLEO
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/POST-parameter-in-Sitemap-tp19158771p19160349.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: POST parameter in Sitemap
Posted by Jeroen Reijn <j....@onehippo.com>.
Hi JLEO,
the 'request-attr' component is an input module. See [1] for more
information. You should be able to read POST request attributes with it
as well. What doesn't work?
[1]http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/components/modules/input/RequestAttributeModule.html
Regards,
Jeroen Reijn
JLe wrote:
> Hi Guys,
>
> I have a form in HTML:
> ==============================================================================
> <html>
> <head>
> ...
> </head>
> <body>
> ...
> <form method="GET" action="matchme/edit" name="GroupOfParts">
> <input value="anything1" name="GroupOfParts" type="radio">anything1<br>
> <input value="thing1" name="GroupOfParts" type="radio">track 1<br>
> <input value="thing2 " name="GroupOfParts" type="radio">track 2<br>
> <input value="Edit" type="submit">
> </form>
> ...
> <body>
> </html>
> ===============================================================================
>
> and I match this in the sitemap:
>
> ===============================================================================
> <map:match pattern="matchme/edit">
> <map:parameter name="GroupOfParts" value="{request-attr:GroupOfParts}"/>
>
> <map:call function="edit"/>
> </map:match>
> ===============================================================================
>
> as you can see, I tried the request-attr thing, that I found in this
> mailing-list, but I would have to enter this Componenten in the sitemap
> Components. It this a SELECTOR?
>
> ===============================================================================
> <map:selector name="set-request-attr"
> src="org.apache.cocoon.selection.RequestAttributeSelector"/>
> ===============================================================================
>
> did not work, is this request-attr thing the RequestAttributeSelector?
>
>
> Or is there another way of reading a POST parameter in the Sitemap?
>
> Regards, JLEO
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: POST parameter in Sitemap
Posted by Jeroen Reijn <j....@onehippo.com>.
Martin,
thanks! For noticing the params vs attrs :-)
See [1] for the input module that can read this.
Regards,
Jeroen
[1]http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/components/modules/input/RequestParameterModule.html
Martin Heiden wrote:
> Hi!
>
> JLe schrieb:
>> ===============================================================================
>>
>> <map:match pattern="matchme/edit">
>> <map:parameter name="GroupOfParts"
>> value="{request-attr:GroupOfParts}"/>
>>
>> <map:call function="edit"/>
>> </map:match>
>> ===============================================================================
>>
>>
>
> If you POST/GET values you have to use the request-param input module.
> Request attributes can be added by Java/Flowscript after the server
> received the request. It's a different Map in the Request class.
>
> For more information read this:
>
> http://www.xyzws.com/servletfaq/what-is-the-difference-between-the-request-attribute-and-request-parameter/1
>
>
> regards
>
> Martin
>
> ---------------------------------------------------------------------
> 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: POST parameter in Sitemap
Posted by Martin Heiden <ma...@netcologne.de>.
Hi!
JLe schrieb:
> ===============================================================================
> <map:match pattern="matchme/edit">
> <map:parameter name="GroupOfParts" value="{request-attr:GroupOfParts}"/>
>
> <map:call function="edit"/>
> </map:match>
> ===============================================================================
>
If you POST/GET values you have to use the request-param input module.
Request attributes can be added by Java/Flowscript after the server
received the request. It's a different Map in the Request class.
For more information read this:
http://www.xyzws.com/servletfaq/what-is-the-difference-between-the-request-attribute-and-request-parameter/1
regards
Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org