• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

logic:iterate

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<html:select property="bu">
<html:options property="buchoices"/>
</html:select>

Do that and Struts will take care of the rest.
[ March 22, 2005: Message edited by: Marc Peabody ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic