You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Amit Badheka <am...@direct2s.com> on 2002/10/28 06:38:36 UTC

html:option with iterate

Hi all,

I have some code like below, where I am trying to create a select list using form bean property. I am able to create it, but problem comes when I trying to put value for the option. To resolve the problem I defined to <bean:define> vars, which I am bale to use well as I am using categoryNm ,but when I put this value in value="" it gives me error
like 
"cannot resolve symbol"

  <html:select property="categories" size="1">
        <logic:iterate id="cat" name="forwardForm"  property="categories">
           <bean:define id="categoryNm" name="cat" property="value"/>
           <bean:define id="categoryId" name="cat" property="key"/>
           <html:option value="<%=categoryId%>" ><%=categoryId%><%=categoryNm%></html:option>
            -----------Here categoryId value display but in value it gives error---------------------------------
        </logic:iterate>
      </html:select>

Please help.

Amit Badheka.