This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

s:select and s:iterator question

 
Neelima Vemu
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to build a drop down box in my jsp which has some filenames fetched from DB. I am getting these names as a list into fileNamesList which has elementData like

[EmergencyNames( filename=Default_Campaign, ), EmergencyNames( filename=DelayPost_Holiday, ), EmergencyNames( filename=EDGE_or_MSP_Down, ), EmergencyNames( filename=Hi_Volume_Easypay, ), EmergencyNames( filename=Hi_Volume_Easypay_2, ), EmergencyNames( filename=InitialEmergencyWav, )

I just want to show filenames for example Default_Campaign. But instead it shows EmergencyNames( filename=Default_Campaign, in the drop down list with the code below in jsp.



Any help to let me know how to go to the next level of arraylist would be really helpful, I have tried using s:iterator in the jsp, but was not successful. I would also like to save the user selected filename into the DB from this drop down list.

Thanks for your help and time!
 
Ankit Dan
Ranch Hand
Posts: 47
Eclipse IDE Java MyEclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have a complex object in your list
like a user dto and it contains firstname and last name

you can use the listKey and listValue attribute of struts select tag
listKey is the value that ll be submitted and listValue is the attribute that ll be displayed on the list

for example my userList contains the user dto objects
and the user dto has the fields firstName and lastName and i want two selects one for first name and another for last name
so for first name:

for last name


hope this helps

Ankit
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic