• Post Reply Bookmark Topic Watch Topic
  • New Topic

how return Collection in accessor of ActionForm  RSS feed

Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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"/>
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.
If you believe you can tell me what to think, I believe I can tell you where to go. Go read this tiny ad!
Rocket Oven Kickstarter - from the trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!