In BootStrap calling a backend bean via AJAX does not seem to work for the DateTimePicker component.
If I am wrong with my code, could anybody please help?
To my surprise also the DateTimePicker reference page of BootStrap does not work with AJAX. On the reference page (https://showcase.bootsfaces.net/forms/DateTimePicker.jsf)
the reference code
<b:form>
<b:dateTimePicker value="#{test.dataToPick}" ondtchange="ajax:test.updateTestField()" process="@this" update="@next" label="Select date:" iconAwesome="bolt" />
<b:inputText value="#{test.testField}" label="Result: " readonly="true" />
</b:form>
is also not working.
Here is my code that is not working:
<b:form>
<b:dateTimePicker value="#{listBean.editMonth}"
readonly="false"
allow-input-toggle="false"
icon-position="right"
mode="popup"
format="MMM YYYY"
side-by-side="false"
show-date="true"
show-time="false"
show-icon="true"
required="true"
viewMode="months"
locale="en"
iconSize="xs"
styleClass="datePicker"
id="monthpicker"
process="@this"
ondtchange="ajax:listTradesBean.updateMonth()"
onblur="ajax:listTradesBean.updateMonth()"/>
</b:form>
Normally I would expect that the backend code "updateMonth()" would be called. The java code snippet for the backend bean simply is:
public void updateMonth() {
System.out.println("WORKING!");
}
Other methods within this backend bean are called without problems using AJAX.