Hi!

I have a valueChangeListener method which belongs to a selectOneMenu
(immediate), and the form is submitted when the value changes by using
JavaScript. In the valueChangeListener method, I modify the value of another
selectOneMenu, which also has a valueChangeListener method.

The problem is, that when the valueChangeListener method of the first
selectOneMenu is invoked, and the value of the second selectOneMenu is
modified, the valueChangeListener method of the second selectOneMenu is also
invoked, and I don't understand why. It should only be invoked when the user
changes the value.

The second invocation causes some unnecessary computations, and the main
problem is, with the wrong value. It uses the old value that it had before
the value had been changed in the first valueChangeListener method, and not
the new value created in the first valueChangeListener.

That causes that the page is redisplayed with the wrong items shown in the
table.


So why is the second valueChangeListener method invoked, and why with the
wrong "new value", which is the "old value"?

And how can that problem be solved?



Regards,

Matthias

Reply via email to