wood burning stoves 2.0*
The moose likes Struts and the fly likes html:options tag and String array Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html:options tag and String array" Watch "html:options tag and String array" New topic
Author

html:options tag and String array

Kelly Crotty
Greenhorn

Joined: Oct 03, 2002
Posts: 1
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
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
use List or ArrayList instead of Array of String... because <htmlptions> and <htmlptionsCollection> tag are getting bean of Collection classes.
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

7 years is a long time guys and please DontWakeTheZombies !


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Ranveer K Kumar
Ranch Hand

Joined: Sep 13, 2009
Posts: 64
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

Joined: Feb 19, 2008
Posts: 2902
    
    1

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: html:options tag and String array