Friday, August 15, 2003 01:49 PM
Instead of using the
tag use logic: iterate to loop through your collection and manually search for the item to have selected using standard html tags.
In the following example I have a listbox that list all the rooms available. The first time through the page none is specificaly selected. But when the user makes a new selection in the listbox it submits a form via the onchange event. The action it calls creates a currentRoom bean and adds it to the session.
The following code iterates through the rooms collection, checks to see if a currentRoom exists if so, it defines a varaible, then uses logic equal to see if the current room in the logic:iterate loop matches. If it does it outputs a