You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by David Brainard <sd...@gmail.com> on 2007/11/09 14:13:37 UTC
ValueChangeListeners,.. are they working right??
Hi,
I was looking into the UIInput class and the way the valuechange event
gets generated and put in the queue.
The event gets generated the first time (when the page is submited the
first time) inspite of no change made in the input components.
In the validate() in UIInput class the previous value and submittedValue
is obtained like this:
Object previousValue = getValue();
Object submittedValue = getSubmittedValue();
when a page is submitted for the first time getValue() returns *null.
*But getSubmittedValue() returns empty string(inputtext) or the current
value(dropdown).
So a valuechange event is put in queue.
this doesnt happen the next time since the getValue() returns empty
string(inputtext).
I think this is not a correct behavior coz a value change event should
be queued only when a value is changed but here it is triggered
irrespective of the value change in the component.
p.s: i am no jsf expert. ;)
Thanks for your suggestions in advance,
David Brainard Sounthiraraj.