This content has been marked as final.
Show 7 replies
-
1. Re: h:selectOneMenu's valueChangeListener is invoked on submit of a page
ilya_shaikovsky Feb 18, 2010 8:31 AM (in response to leelavathic)add a break point to listener method and check oldValue and newValue from event. -
2. Re: h:selectOneMenu's valueChangeListener is invoked on submit of a page
ilya_shaikovsky Feb 18, 2010 8:33 AM (in response to leelavathic)b.t.w. change occurs when you changing the value in select and control lost focus - so using your code you should realise that in case when you changing the select value and hitting the button - two requests will be sent. from the select and from button. -
3. Re: h:selectOneMenu's valueChangeListener is invoked on submit of a page
leelavathic Feb 18, 2010 8:44 AM (in response to ilya_shaikovsky)Hi Ilya,
Thanks for your response.
In this case am not changing the select one menu value at all.
Rather am just clicking the command button.
-
4. Re: h:selectOneMenu's valueChangeListener is invoked on submit of a page
ilya_shaikovsky Feb 18, 2010 9:01 AM (in response to leelavathic)so you checked values from event? -
5. Re: h:selectOneMenu's valueChangeListener is invoked on submit of a page
leelavathic Feb 18, 2010 9:07 AM (in response to ilya_shaikovsky)yes,
the new value is ENABLED
old value is null
-
6. Re: h:selectOneMenu's valueChangeListener is invoked on submit of a page
ilya_shaikovsky Feb 18, 2010 9:22 AM (in response to leelavathic)This JSF component has no null state. So it's selects the first option by default. But your status property is null. so after the submit component values old and new are not identical and that's why it sends value change event. Check without any richfaces components and the result will be the same. So define some initial value and you will get the event only when it will be actually changed.
-
7. Re: h:selectOneMenu's valueChangeListener is invoked on submit of a page
leelavathic Feb 19, 2010 6:55 AM (in response to ilya_shaikovsky)Hi Ilya
It worked after setting the default value.
Thanks a lot for your support.
Regards
Leela