File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

How to display multiple selection options

Alexey Gor

Joined: Jul 13, 2004
Posts: 27

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.
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:
subject: How to display multiple selection options
It's not a secret anymore!