aspose file tools*
The moose likes Struts and the fly likes how return Collection in accessor of ActionForm Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how return Collection in accessor of ActionForm" Watch "how return Collection in accessor of ActionForm" New topic
Author

how return Collection in accessor of ActionForm

Gerald Luckenbill
Greenhorn

Joined: Nov 05, 2003
Posts: 15
I am looking for sample code on how to create a method with the signature
Collection getOptions();
and populate it with Strings that will serve as the value and property for html ptions. (I am finding this tricky since Collection is an interface rather than a class - so I just want some sample code to see how it is done)
Ultimately what I am trying to do is populate an html:select and then the options - I was told that if I have a method with the above signature then the code in the jsp would look like:
<html:select property="someProperty"> (BTW - what does this someProperty have any meaning here>
<html ptions property"options"/>
</html:select>
I want to use this approach rather than some others where I have to use separate beans, because I can use the ActionForm of this jsp to store my data for the list/menu widget.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how return Collection in accessor of ActionForm