• 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

Dynamic selection in Combobox

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I try to handle a dynamic selection in a combobox, but I got a problem.

To add the combobox to a jsp page and fill it, I use the following code


This combobox is on different pages and I want to show the previous selected item on each page, but I don't know how.
I tryed the following code, but it doesn't work:


Can anyone tell me, what I am doing wrong?
 
Sheriff
Posts: 17644
300
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would use the html:optionsCollection tag instead. It encapsulates all the logic you've written using logic:iterate to display the options and the logic to select the option that matches the current value of the "selected" property.




Originally posted by hal arres:
Hi,

I try to handle a dynamic selection in a combobox, but I got a problem.

To add the combobox to a jsp page and fill it, I use the following code


 
hal arres
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

this is the first time, I heard of optionsCollection, but it is the better way to use ComboBoxes.

Thank you Junilu Lacar

mfg
arres
 
reply
    Bookmark Topic Watch Topic
  • New Topic