Hi,

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" />
  ....
</map:match>    

Zsombor

> -----Original Message-----
> From: sofro [mailto:[EMAIL PROTECTED] 
> 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:
> 
>       
> callSomething?sameName=value1&sameName=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="http://127.0.0.1/";>
>       <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: 
> http://www.nabble.com/pass-checkbox-values-through-sitemap-tf2
> 806933.html#a7831351
> Sent from the Cocoon - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to