try this, <html:select property="defaultContainerType">
<html:options collection="CONTAINER_TYPES" property="id" labelProperty="name"/> </html:select> F. ----- Original Message ----- From: "Marco Mistroni" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Sent: Monday, December 15, 2003 3:00 PM Subject: html:select tag or logic:iterate > Hi all, > I am quite new to struts tag library and I need an advice. > In the HttpSession I have an object of type Collection, which stores > a list of MyObject. > MyOBject has two properties, description and id. > > Out of this Collection of MyObject I must generate a selectable list > Which displays MyObject names, (wity MyObject.id as value) > > I have tried to embed the html:select inside a logic:iterate, but my > editor (websphere studio)complaints for following code > > <html:select property="defaultContainerType" multiple="no"> > <logic:iterate collection="<%= > (Collection)session.getAttribute("CONTAINER_TYPES")%>" id="container"> > <html:option value="<bean:write name="container" > property="type"/>"> > <bean:write name="container" > property="description"/> > </html:option> > </logic:iterate> > </html:select> > > the error is 'Attribute container has no value' > > anyone has a suggestion on how to solve my problem? > > Fact is that the Collection is stored in the session, not in a > JavaBean.. > > Thanks and regards > marco > > > > > --------------------------------------------------------------------- > 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]