You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Gus Delgado <gd...@oceanobjects.com> on 2002/11/12 21:06:47 UTC

html:select and collections

I declare a tag in my jsp like this
<html:select name="dataEntryForm" property="productType">
             <html:options collection="productTypes" property="value" 
labelProperty="label"/>
 </html:select>

and my action for pre population goes something like this

Collection productTypes = getProductTypes(results);
 session.setAttribute("productTypes", productTypes);

I'm getting an error saying that the productTypes bean does not exist? 
any ideas



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RES: html:select and collections

Posted by Francisco Goncalves Rodrigues <fc...@atlantico.com.br>.
Try use:
  request.setAttribute("productTypes", productTypes);
instead
  session.setAttribute("productTypes", productTypes);

Fco. Goncalves

-----Mensagem original-----
De: Gus Delgado [mailto:gdelgado@oceanobjects.com]
Enviada em: terca-feira, 12 de novembro de 2002 18:07
Para: Struts Users Mailing List
Assunto: html:select and collections


I declare a tag in my jsp like this
<html:select name="dataEntryForm" property="productType">
             <html:options collection="productTypes" property="value"
labelProperty="label"/>
 </html:select>

and my action for pre population goes something like this

Collection productTypes = getProductTypes(results);
 session.setAttribute("productTypes", productTypes);

I'm getting an error saying that the productTypes bean does not exist?
any ideas



--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>