cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jasha Joachimsthal" <>
Subject RE: pass checkbox values through sitemap
Date Tue, 12 Dec 2006 14:37:18 GMT
You could also use the request generator and make the xsl loop over it.

<map:match pattern="myrequest">
	<map:generate type="request"/>
	<map:serialize type="xml"/>

<map:match pattern="mycontent.html">
	<map:aggregate element="root">
		<map:part src="cocoon:/myrequest"/>
		<map:part src="cocoon:/mycontent"/>
	<map:transform src="mytransformer.xsl"/>
	<map:serialize type="html"/>

Jasha Joachimsthal 
Oosteinde 11 
1017 WT Amsterdam 
The Netherlands 
+31 (0)20 5224466 

-----Original Message-----
From: Derek Hohls []
Sent: dinsdag 12 december 2006 15:29
Subject: RE: pass checkbox values through sitemap

Surely there is a way to do without using the
(somewhat deprecated) XSP?

>>> "Varga, Zsombor" <> 2006/12/12 01:54 PM >>>


Why do you want to pass the request parameters to the generator?
The generator has the request object, which contains all the parameters,
and lots of other properties.
You can use either the request.getParameter(String paramName) /*it
returns a String value*/ method, or request.getParameterValues(String
paramName) /*this return a String[]*/. Or you can use the xsp taglib. 

In your example, I'd do something like this, in my generator:

String checkBoxValues = request.getParameterValues("sameName");

and in the site map:
<map:match pattern="procedures_properties.html">
  <map:generate src="mygenerator.xsp" />


> -----Original Message-----
> From: sofro [] 
> Sent: Tuesday, December 12, 2006 12:26 PM
> To: users@cocoon.apache.! org
> Subject: pass checkbox values through sitemap
> Hi,
>     I have problem how to pass checkbox values through sitemap.
> I have a XHTML form:
>     <form target="_self" method="get" action="callSomething">
>         <input type="checkbox" name="sameName" value="value1"/>
>         <input type="checkbox" name="sameName" value="value2"/>
>         <input type="checkbox" name="sameName" value="value3"/>
>         <input type="checkbox" name="sameName" value="value4"/>
>         <input type="submit" name="submit" value="Submit" />
>     </form>
> request after submit looks like this:
&g! t;     
> callSomething?sameName=value1&sameN ame=value2&sameName=value3&
> submit=Submit
> And question is how to pass those values to generator in sitemap:
> <map:match pattern="navigator/callSomething*">
>     <map:act type="request">
>         <map:parameter name="parameters" value="true"/>
>         <map:generate 
> src="http://localhost/?sameName={sameName}"/>
>         <map:call resource="check-this"/>
>     </map:act>
> </map:match>
> When I call this:
>     http://localhost/?sameName={sameName}
> id adds only first value.
> And this does not send anything.
> <map:generate src="MailScanner warning: numerical links are often malicious:">
>     <map:parameter name="use-request-parameters" 
> value="true"/> </map:generate>
> Renaming sameName parameter to sameName1, sameName2, ... is 
> not an option.
> Please help. Maybe it's a really newbie question, but I need 
> to hack an existing sitemap to support this and I don't want 
> to see Cocoon again.
> BTW I'm using Cocoon 2.
> Thanks.
> --
> View this message in context: 
> 806933.html#a7831351
> Sent from the Cocoon - Users mailing list archive at
> -----------------------------------------------------------! ----------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.ap
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

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 

CSIR Copyright, Terms and Conditions 

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 CSIR CallCentre 

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean. 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message