cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan Agler" <ryanag...@hotmail.com>
Subject RE: SessionTransformer: multiple select
Date Mon, 21 Oct 2002 12:42:50 GMT
Something like this should do the trick inside of an xsp.  Be sure to
declare the xsp-request logicsheet.

<items>
<xsp:logic>
String[] selectItems = <xsp-request:get-parameter-values
name="selectItem" as="array"/>;
for(int i=0; i <![CDATA[<]]> selectItems.length; i++)
{
	<item>
	<xsp:attribute
name="id"><xsp:expr>selectItems[i]</xsp:expr></xsp:attribute>
	</item>
}
</xsp:logic>
</items>

-----Original Message-----
From: Alex Romayev [mailto:aromay@sapient.com] 
Sent: Monday, October 21, 2002 5:57 AM
To: cocoon-users@xml.apache.org
Subject: SessionTransformer: multiple select

Hello,
I have a "multiple" select, which is being submitted by a form, so that
my request string looks like:
my-action?selectItem=1&selectItem=2&selectItem=3...
 
Does anyone know how I could retrieve all of the "selectItem" request
paramters?  I've tried (just to see what happens):
 
<session:getxml context="request" path="/parameter/selectItem"/>, and
this just gets the first selectItem parameter (id=1).
 
What I would like to get is:
<items>
 <item id="1"/>
 <item id="2"/>
 <item id="3"/>
</items>
 
Thanks,
-Alex

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.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