jsf - Primefaces commandButton actionListener not working inside notificationBar -


i using pf 5.2 web app. wanted use notificationbar reside data inputs , commandbutton trigger these inputs data backing bean. therefore put commandbutton inside notificationbar actionlistener not calling backing bean method. commandbutton defined id of "filterbtn".

the .xhtml page code in below:

<h:form> <p:notificationbar position="top" effect="slide" styleclass="top" widgetvar="bar" style="height:200px;">     <h:panelgrid columns="1">         <h:panelgrid id="filtergrid1" columns="4" >             <h:outputlabel id="vhclidlbl" value="#{general.vehicleid}"/>             <p:inputtext id="fmtsid" value="#{notifybean.fmtsid}" style="width:200px"/>             <h:outputlabel id="serialnolabel" value="#{general.serialno}"/>             <p:inputtext id="fserialno" value="#{notifybean.fserialno}" style="width:200px"/>             <h:outputlabel id="brandlbl" value="#{general.brand}"/>             <p:selectcheckboxmenu id="fbrand" value="#{notifybean.fbrands}" effect="slide" style="width:210px"                 appendto="@this">                  <f:selectitem itemlabel="#{general.pleaseselect}" itemvalue=""/>                   <f:selectitems value="#{notifybean.brandlist}"/>             </p:selectcheckboxmenu>             <h:outputlabel id="modellabel" value="#{general.model}"/>             <p:selectcheckboxmenu id="fmodel" value="#{notifybean.fmodels}" effect="slide" style="width:210px"                 appendto="@this">                  <f:selectitem itemlabel="#{general.pleaseselect}" itemvalue=""/>                  <f:selectitems value="#{notifybean.modellist}"/>              </p:selectcheckboxmenu>             <h:outputlabel id="provlabel" value="#{general.province}"/>             <p:selectcheckboxmenu id="fprovince" value="#{notifybean.fprovinces}" effect="slide" style="width:210px"              filter="true" filtermatchmode="startswith" appendto="@this">                  <f:selectitem itemlabel="#{general.pleaseselect}" itemvalue=""/>                   <f:selectitems value="#{notifybean.provincelist}"/>             </p:selectcheckboxmenu>             <h:outputlabel id="regionlabel" value="#{general.region}"/>             <p:selectcheckboxmenu id="fregion" value="#{notifybean.fregions}" effect="slide" style="width:210px"                 appendto="@this">                  <f:selectitem itemlabel="#{general.pleaseselect}" itemvalue=""/>                 <f:selectitems value="#{notifybean.regionlist}"/>               </p:selectcheckboxmenu>         </h:panelgrid>          <p:commandbutton id="filterbtn" value="filter" actionlistener="#{notifybean.filterbyproperties()}" icon="ui-icon-arrow-1-n"/>          <p:commandbutton value="hide" onclick="pf('bar').hide()" type="button" icon="ui-icon-arrow-1-n"/>     </h:panelgrid> </p:notificationbar> </h:form> 

i know simple use of components not working. help?

the notificationbar should not embedded in form. exchange notificationbar , form tags, form within notificationbar.

<p:notificationbar position="top" effect="slide" styleclass="top" widgetvar="bar">     <h:form>         <p:commandbutton value="yes" actionlistener="#{backingbean.ondeletebutton}" onclick="pf('bar').hide()" />         <p:commandbutton value="no" onclick="pf('bar').hide()" />     </h:form>  </p:notificationbar> 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -