JSF + primefaces spiner ajax invoking other submits -


i'm using ajax in spinner call action in backing bean.

this code:

<b:panel>     <p:datatable id="orderdatatable" var="order" value="#{orderviewbean.orders}"                  widgetvar="ordersdatatable" tablestyle="table-layout: auto;">         <p:column headertext="created" filterby="#{order.creationdate}" filterstyle="display: none"                   filtermatchmode="contains">             <h:outputtext value="#{order.creationdate}"/>         </p:column>         <p:column headertext="created by" filterby="#{order.createdby}" filterstyle="display: none"                   filtermatchmode="contains">             <h:outputtext value="#{order.createdby}"/>         </p:column>     </p:datatable>      <b:panelgrid colspans="4,4,4">         <b:commandbutton action="#{orderviewbean.previouspage}" value="previous"                          look="primary" process="@this:uploadorderdatapanel" styleclass="pull-left"                          disabled="#{!orderviewbean.page.hasprevious()}" type="submit">             <p:ajax immediate="true" update=":companyordersform"/>         </b:commandbutton>         <b:row>             <div class="text-center">                 <h:outputlabel value="page"/>                 <p:spinner value="#{orderviewbean.currentpage}" size="3"                            min="#{orderviewbean.page.totalpages > 0 ? 1 : 0}"                            max="#{orderviewbean.page.totalpages}">                     <p:ajax listener="#{orderviewbean.changepageajax}"                             update="@form" process="@this" immediate="true"/>                 </p:spinner>                 <h:outputlabel value="of"/>                 <h:outputtext value="#{orderviewbean.page.totalpages}"/>             </div>         </b:row>         <b:commandbutton action="#{orderviewbean.nextpage}" value="next"                          look="primary" process="@this:uploadorderdatapanel" styleclass="pull-right"                          disabled="#{!orderviewbean.page.hasnext()}" type="submit">             <p:ajax immediate="true" update=":companyordersform"/>         </b:commandbutton>     </b:panelgrid> </b:panel> 

when put number spinner , hit enter, changepageajax invoked (this ok) , orderviewbean.previouspage (this not ok). can avoid invoking other actions?

thanks

add partialsubmit="true" attribute on relevant ajax tags.. pf documentation:

partialsubmit reduces network traffic adding partially processed components ajax request post. big pages many input components, partialsubmit extremely useful leads more lightweight requests. compare post data displayed logger difference.

see also:


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -