0

I have a h:commandbutton in h:dataTable, and in my application have a dropdown that have ajax command to update h:dataTable. But when make update in my dataTable my commandbutton stop work.

this is my h:dataTable:

<h:dataTable value="#{viewBean.requestList}" var="o" id="request_table" class="table table-striped table-bordered table-hover" cellspacing="0" width="100%">

  (...)

   <h:column>
      <f:facet name="header">Edit</f:facet>
        <h:form>
          <div style="text-align: center">
            <h:panelGroup id="teste_button">
              <h:commandButton title="Edit" class="btn btn-info btn-sm" action="#{navigationBean.toEdit()}" rendered="#{true}">
                <span class="glyphicon glyphicon-pencil"></span>
                  <f:param name="selectedRequestID" value="#{o.id}" />
                  <f:param name="itemMenuAnterior" value="#{viewBean.itemActual}" />
               </h:commandButton>
             </h:panelGroup>

              (...)

          </div>
        </h:form>
      </h:column>
 </h:dataTable>

this is my dropdown:

<h:form>
   <h:selectOneMenu value="#{viewBean.itemActual}" id="select_filter" class="form-control">
      <f:selectItems value="#{viewBean.items}" var="itematual" itemLabel="#{itematual}"/>
      <f:ajax listener="#{viewBean.itemChange(event)}" render="request_table" onevent="functionName"/>
   </h:selectOneMenu>
</h:form>
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
user3815068
  • 191
  • 1
  • 1
  • 10
  • @BalusC I just saw jquery tagged .. while (doesn't work after ajax render) always happening with the jquery .. so I posted the link to him .. but right now jquery tag is no longer here .. so I will delete my comment .. That's it – Mohamed-Yousef Dec 08 '15 at 13:25
  • Not everyone understands how to use tags. Always look at code :) – BalusC Dec 08 '15 at 13:32
  • and if you click a second time, does it work then? Check point 8: http://stackoverflow.com/questions/7371903/using-multiple-hform-in-a-jsf-page – Kukeltje Dec 08 '15 at 14:55
  • Do you have a form in every column? Please give ids to all forms. Can't you have one form then render=":myForm:request_table" – Mahendran Ayyarsamy Kandiar Dec 08 '15 at 15:32
  • I have form only in the column for the buttons, in other columns do not have form. i try render this from, but it doesn't solve my problem. – user3815068 Dec 08 '15 at 16:01

0 Answers0