Hi,
I've got a problem with blur and change event handlers.
If I use the change event, the new value is not updated in the backing bean.
I post my code:
<bjsf:inputText customActionListener="#{authBean.validateUser2}" value="#{authBean.userName}>
<e:handler event="blur" type="text/javascript">
<![CDATA[
bb.bjsf.sync(this,'custom');
]]>
</e:handler>
</bjsf:inputText>
<e:handler event="blur" type="text/javascript">
<![CDATA[
bb.bjsf.sync(this,'custom');
]]>
</e:handler>
</bjsf:inputText>
and my backing bean code:
public void validateUser2(CustomActionEvent event){
System.out.println(userName) ;
}
System.out.println(userName) ;
}
this execution prints the userName typed by user, but if I register the handler as "change" instead of "blur", it prints null (or the oldest value)
Regards
David

change event
14 July, 2008 - 10:13 — andysHi David,
First of all, is there any reason to use the "change" event handler and then call the customActionListener via this event? Isn't better to use the valueChangeListener if you want to catch the changing value of the inputText?
Andys
because I need the new value
14 July, 2008 - 11:39 — Davidbecause I need the new value to be setted inmediately, but with ValueChangeListener I have to do a event.getNewValue() and a setXXX(newValue) to do this.
I noticed that with ValueChangeListener the setter methods are invoked after invoke the listener method, but with the customActionListener is the opposite, first is invoked the setter methods and then the listener.