• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

html:options tag and String array

 
Kelly Crotty
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use List or ArrayList instead of Array of String... because <htmlptions> and <htmlptionsCollection> tag are getting bean of Collection classes.
 
Sagar Rohankar
Ranch Hand
Posts: 2906
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
7 years is a long time guys and please DontWakeTheZombies !
 
Ranveer K Kumar
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sagar Rohankar wrote:7 years is a long time guys and please DontWakeTheZombies !


@Rohan

thanks for comment...yes it was old but last reply was recent..
 
Sagar Rohankar
Ranch Hand
Posts: 2906
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ranveer K Kumar wrote:@Rohan

Its a fourth time here I'm telling someone my correct name.
My name is Sagar. "Rohan" is a part of my surname, K Kumar.

Ranveer K Kumar wrote:thanks for comment...yes it was old but last reply was recent..

That's comment is for both of you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic