wood burning stoves 2.0*
The moose likes Struts and the fly likes How to display multiple selection options Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to display multiple selection options" Watch "How to display multiple selection options" New topic
Author

How to display multiple selection options

Alexey Gor
Greenhorn

Joined: Jul 13, 2004
Posts: 27
Hello,

Here is what I am trying to do:

There are 3 types of variables (DATABASE, USER_INPUT, CALCULATED). We have to display them to the user. there is a drop-down of types, selecting one of the options brings up variables that belong to that category. I am trying to do this in a nice clean way, but it's not coming out right. I would appreciate any help or a link.

Another small question... I am displaying a set of drop-down uptions using a Collection from ActionForm. I want there to be a blank row, the value automatically selected when the page first comes up. Do I have to put an empty string into the Collection? Thanks!

Thank You.
Vikas
Ranch Hand

Joined: Dec 16, 2004
Posts: 63
To display an empty string displayed by default, all you need to do is to set the value in the reset method of your FormBean class as follows:-

public void reset(ActionMapping mapping, HttpServletRequest request) {

yourselectpropertyname = "";
}

Thank you
Vikas Sharda
 
Don't get me started about those stupid light bulbs.
 
subject: How to display multiple selection options
 
Similar Threads
How do I run an unix script?
How to automatically change the page contents with change in drop down list option selection
drop down menus
setting the selected option in a select element
How do I run an unix script?