Can't remove last selected value in add remove list component

Hi,

I've searched the forum but found no explanation to my problem. This is my problem:

I have an add-remove-list with an arraylist of Options bound to the items property. I also have an Object[] which holds the selected values. Both the items arraylist and the selected Object[] is in a session bean. So far, so good.

My problem occurs when I have added some values to the selected list and then try to remove all of them. I can remove items one by one, but when I try to remove the last one, nothing happens.

I've tried to debug the app, and all I can see is that when I try to remove the last item, no validation or value change event seems to occur!

Now, I'm new to the whole JSF thing and might be missing something here. Please enlighten me!

[789 byte] By [martas] at [2007-11-26 7:43:53]
# 1
Is this still a problem? I just tested a simple example, and it worked as expected. If it's not working for you, give more information so I can make a simple example that reproduces the problem.
vspurlin at 2007-7-6 19:53:55 > top of Java-index,Development Tools,Java Tools...
# 2
HiI am facing the same problemPlease can you help me as wellNot able to remove the vales added in the addremove widget
prasannaa_ss at 2007-7-6 19:53:55 > top of Java-index,Development Tools,Java Tools...
# 3

i have added a addremove wwideget and have pupulated with values.

Say for example on the create screen

when i go to the edit page I will be loading the previously selected values.

it works fine.

now on the edit screen when i try to remove the selected values it does not seem to remove the values.

not able to figure out what is happening.

but once it is submitted and in the same session when i try to do the same process of removing the elements from the widget.

for the second time.

i am able to see the elements are removed.

I tried to add the value xchange listener action.

Even that did not seem to work

A bit odd.

Please can you help me.

Thank you

SSP

prasannaa_ss at 2007-7-6 19:53:55 > top of Java-index,Development Tools,Java Tools...
# 4

Dear Users,

Check out the Java sun examples as they are a great source of reference and they work. If you want to do any modifications for example, have all of the input the user entered into a session variable, it will take a bit of work, but I have posted a great code reference on this site in this forum, about being able to do this.

http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/lis tbox_components.html

This will help you, trust me...

Do this tutorial and thisd will make the list box issue your having clear and at least point you in the right direction to solve it.

Dupey00_ca

Message was edited by:

dupey00_ca

dupey00_ca at 2007-7-6 19:53:55 > top of Java-index,Development Tools,Java Tools...
# 5
Does not like listbox or dropdown, addremove component does not have auto-submit on change. valueChange action is invoked only when submit via a button.
sherryz at 2007-7-6 19:53:55 > top of Java-index,Development Tools,Java Tools...