changing the selection of a drop down list manually

I want to change the selected item of a drop down list based on the selection in a check box. I tried using the setSelected() method but it didn't work.Can anyone help me with this plz?
[200 byte] By [karim86] at [2007-11-26 9:17:25]
# 1
I think you have to store the value, setted in the checkbox ,in a session bean.Then set the selected item of the dropdown ,in the init() method using the value in the sessionbean.Unless you do this,your item that you set in dropdown will be lost after the "post" operation.
gkhn at 2007-7-6 23:45:10 > top of Java-index,Development Tools,Java Tools...
# 2
Thx :) ill try it and post my results
karim86 at 2007-7-6 23:45:10 > top of Java-index,Development Tools,Java Tools...
# 3
the problem is that i' m unable to use the setSelected(Object) method of the dropdown list. The OBJECT should be a string or what ? thanx for help
karim86 at 2007-7-6 23:45:10 > top of Java-index,Development Tools,Java Tools...
# 4

Hi,

A drop down component uses two values:

1. The real options value. This can be an object of any kind (String, Integer, etc)

2. The displayed value.

When you use the setSelected(Object), the "Object" must be the same class as the real options value (the one you used when you populated the list). It succeeds is there is a matching real options value in the list.

The Drop Down List component does not work with indexes (as Swing component does).

AG

AGurisatti at 2007-7-6 23:45:10 > top of Java-index,Development Tools,Java Tools...