I'm trying to use html ption to display an array of strings. I have previously used this tag to display options based on an ArrayList of objects - no problem there. But for some reason no options are getting displayed. Here is the code: html:select multiple="true" styleClass="input" style="width:175px" size="4" styleId="emailList" property="emailList"> <html ptions property="emailList" /> </html:select> emailList is the name of a property of the ActionForm bean. Can anyone help with this?
Lisa DeSouza
Greenhorn
Joined: Jul 21, 2009
Posts: 6
posted
0
I was struggling desperately with the same thing!!
Hope that helps!
Kelly Crotty wrote:I'm trying to use html ption to display an array of strings. I have previously used this tag to display options based on an ArrayList of objects - no problem there. But for some reason no options are getting displayed. Here is the code:
html:select multiple="true" styleClass="input" style="width:175px" size="4" styleId="emailList" property="emailList">
<html ptions property="emailList" />
</html:select>
emailList is the name of a property of the ActionForm bean.
Can anyone help with this?
Ranveer K Kumar
Ranch Hand
Joined: Sep 13, 2009
Posts: 64
posted
0
use List or ArrayList instead of Array of String... because <htmlptions> and <htmlptionsCollection> tag are getting bean of Collection classes.