• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

logic:iterate

 
Achal Jalan
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In the following piece of code I am trying to select in the dropdown box the "buId" when equal to the "bu" set in the form and add the other "buchoices" to the drop down list.

"buchoices" has been initialised to {"Abc", "def", "ghi"} in the action class using the set method from the form. And "bu" has been set to "Abc" in the similar manner.

I am failing on 2 counts
1. selecting the value in the drop down when buId == bu
2. showing the rest of the list on the webpage to the user

(timeDetails is the name of the form bean which has has been declared using the usebean tag.)



Any help on how i can do this will be greatly appreciated.

Thanks a bunch
Achal Jalan
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<html:select property="bu">
<htmlptions property="buchoices"/>
</html:select>

Do that and Struts will take care of the rest.
[ March 22, 2005: Message edited by: Marc Peabody ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic