This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to display multiple selection options
 
Similar Threads
How to automatically change the page contents with change in drop down list option selection
setting the selected option in a select element
How do I run an unix script?
How do I run an unix script?
drop down menus