-
1. Re: RF4 rich:calendar not binding new value on AJAX change event
djnose Sep 27, 2011 10:58 AM (in response to sbalmos1)i think i did something similar. You may want to create a listener and check the value there.
I think <a4j:event> does not submit your form and so the new value is not available.
You may try something like:
<a4j:ajax event="change" render="age" execute="@this" listener="#{employeeMgmtBean.changeListener}"/>
in your bean you create a listener like that:
public void changeListener(AjaxBehaviorEvent ab) {
if (ab != null && ab.getSource() != null && ab.getSource() instanceof UICalendar) {
UICalendar calendar = (UICalendar) ab.getSource();
Date value = (Date) calendar.getValue(); // dont know if it is date or not just try
if (value != null) {
// and so on...
}
}
}i hope it helps!
-
2. Re: RF4 rich:calendar not binding new value on AJAX change event
sbalmos1 Sep 27, 2011 12:02 PM (in response to djnose)I really wish I knew why <a4j:event> does not submit the form. Actually, I'm just hoping this is another RF4 stupidity that hopefully will be fixed in 4.1 or sometime soon. Apparently creating a listener did it. The listener didn't even have to do anything. So now, I have code as follows that works:
<f:ajax event="change" listener="#{rf4KludgesBean.bindCalendarValue}" render="age"/>
in RF4KludgesBean (yes, I have a separate bean solely for RF4 workarounds):
public void bindCalendarValue() {}
And everything works. *grumble*. Thanks for the idea though.
-
3. Re: RF4 rich:calendar not binding new value on AJAX change event
akb Oct 5, 2012 2:01 AM (in response to sbalmos1)Try out
<a4j:support event="onchanged" reRender="age" />