ValueChanged Event

It seems the value changed event fires only when the form is posted. I have a requirement to invoke the valuechange event when user select one item from dropdown list. Is there any way to achieve this? It works When I add the following line on jsf:

onChange="this.form.submit();"

But i am not sure if it is a good solution ....... Any help on this will be appreciated.

-TT

[398 byte] By [titona] at [2007-10-3 2:33:50]
# 1
Hello,You have to use OnChange = "submit()" to kick off the value change listener.Without JSF also, if you want to post back, then you would have done the same.
kirangunduraoa at 2007-7-14 19:32:49 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
My concern is I am not sure what will be the impact of partial post of the form(). When onChange event geting fired all the attributes of the form are not assigned to backingbean ...so I am not sure if it is a good parctise.
titona at 2007-7-14 19:32:49 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

Don't worry, you're right on track. It's different calling onChange="submit()" and clicking on the commandLink/commandButton on your form.

Could you please post the pertinent JSP form code, and the method that gets executed when the valueChangeEvent gets fired (i.e. the valueChangeListener in your managed-bean)?

From there we should be able to tell you exactly how to set up.

CowKing

PS - Keep in mind that JSF is a server-side technology and that nothing can happen until a submit takes place.

IamCowKinga at 2007-7-14 19:32:49 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...