Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dynamic selection in Combobox

 
hal arres
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • 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?
 
Junilu Lacar
Bartender
Pie
Posts: 7465
50
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would use the htmlptionsCollection 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
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic