I tried using two p:ajax constructions for select element, expected, that two action events will be fired in one request, but instead see two ajaxian requests sent. Actually this could be considered "the feature", but both actions are fired on EACH ajax request! So, the following construction:
Code: Select all
<h:selectOneMenu value="#{polis.osMatrixType}" id="registryType">
<p:ajax listener="#{osagoPolisBean.drawModel}" update="osagoTable" process="osagoTable" event="change"/>
<p:ajax listener="#{osagoPolisBean.rollOsagoEndDate}" update="osagoUsagePeriod osagoPeriod" process="osagoTable" event="change"/>
</h:selectOneMenu>
Sure, I can create the separate method, which would call both methods, but I though I could avoid creation of unnecessary backing bean methods in this case. IMHO it is ok to have several action sources for one component which would result in just one request.
Thanks