java - The command button in dialog does not update the outputText with the id given -


i have outputtext in panelgrid in fieldset id of "foo". , have dialog. there datatable in dialog , commandbutton in datatable. when select item of datatable, , after clicking commandbutton, want "foo" outputtext's value changed data in datatable in dialog. nothing seems happen. use help. in advance. below xhtml snippet. edit: method in backing bean added post.

<!-- want "foo" updated selected data in dialog's datatable -->  <p:fieldset id="groupconfigurationpanel"                          legend="#{messages['notificationgroup.title.notificationgroupconfiguration']}"                          styleclass="fieldset">                    <h:panelgrid columns="3"                               columnclasses="formlayoutlabel, formlayoutinput, formlayoutvalidator"                               rowclasses="formlayoutoddrow, formlayoutevenrow" cellpadding="0"                               cellspacing="0" width="100%">                      <h:outputtext id="offertext" value="offer" />                      <h:outputtext id="foo"                                    rendered="#{notificationgroupsupport.instance.offers!=null}" />                      <p:commandbutton value="select offer" id="selectofferbutton"                                       action="#{notificationgroupsupport.retrieveofferlist}"                                       type="submit" update=":selectofferform"                                       oncomplete="selectoffervar.show();">                      </p:commandbutton>                  </h:panelgrid>                                    </p:fieldset>    <!-- dialog -->  <!-- dialog has datatable , commandbutton in datatable supposed update outputtext -->  <p:dialog id="offerdialog" header="select offer"                widgetvar="selectoffervar" modal="true" resizable="true">            <h:form id="selectofferform">              <h:panelgrid columns="3" bgcolor="#eff5fa" cellspacing="5"                           frame="box" styleclass="center">                      <p:datatable id="offertable" var="offer" styleclass="datalist"                               value="#{notificationgroupsupport.offerlist}"                               rowkey="#{offer.offerid}"                               widgetvar="propertytablevar" paginator="true" rows="12">                      <f:facet name="header">                          <div align="center">offer list</div>                      </f:facet>                          <p:column selectionmode="single" style="width:18px" />                      <p:column sortby="#{offer.offerid}" headertext="id"                                filterby="#{offer.offerid}" filtermatchmode="contains">                          <h:outputtext value="#{offer.offerid}" />                      </p:column>                          <p:column sortby="#{offer.externalofferid}"                                headertext="external offer id"                                filterby="#{offer.externalofferid}" filtermatchmode="contains">                          <h:outputtext value="#{offer.externalofferid}" />                      </p:column>                        <p:column sortby="#{offer.description}"                                headertext="description"                                filterby="#{offer.description}" filtermatchmode="contains">                          <h:outputtext value="#{offer.description}" />                      </p:column>                          <f:facet name="footer">                          <p:commandbutton value="select" type="submit" id="nonajax"                                           actionlistener="#{notificationgroupsupport.updateoffer()}"                                           styleclass="ui-priority-primary" ajax="false" update="foo"                                           oncomplete="propertytablevar.hide();" />                      </f:facet>                      </p:datatable>                  </h:panelgrid>          </h:form>      </p:dialog>

// method commandbutton's actionlistener in backing bean. don't think issue backing bean. method called after select offer button got clicked  public void updateoffer()   {     campaignlist = new arraylist<campaign>();     lifecyclepolicylist = new arraylist<lifecyclepolicy>();      list<offer> offers = getinstance().getoffers();      (offer offer : offers) {          if ( ( offer != null ) && ( offer.getoffercampaignpairs() != null                )                 && ( offer.getoffercampaignpairs().size() > 0 ) ) {             ( offercampaignpair pair : offer.getoffercampaignpairs() ) {                 campaignlist.add( pair.getcampaign() );                 if ( pair.getprepaidlifecyclepolicy() != null ) {                     lifecyclepolicylist.add( pair.getprepaidlifecyclepolicy() );                 }                 if ( pair.getpostpaidlifecyclepolicy() != null ) {                     lifecyclepolicylist.add( pair.getpostpaidlifecyclepolicy() );                 }             }         } else if ( offer == null ) {             // todo             getinstance().setcampaigns( campaignlist );             getinstance().setoffers( offerlist );             getinstance().setlifecyclepolicies( lifecyclepolicylist );         }       }       initconstants();     } 


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -