0
votes

I have the next structure in my xhtml

<p:panel>
    <p:acordeonPanel>
      <p:tab>
      <h:form>
      <table>
          <tr>td><commandButton action="#{myBean.searchAnimals}"update=":form:partidos" ></td></tr>
      </table>
      </h:form>
      </p:tab>
    </p:acordeonPanel>
</p:panel>
<p:panel>
<h:form id="form">
    <p:dataTable id="partidos" value="#{myBean.foundAnimals}">
</h:form>
....

The method searchAnimals() it´s OK, it returns the Animal items, but the dataTable doesn't refresh, but in the java code (managedBean) the ArrayList contains the items. What can i do? Thanks

EDIT: I have de h: and the p: suffix correctly (i think so), the code is part of the complete code but is the fragment that doesn't work correctly. In the first panel i have a filter controls (by category, by date, etc.) and the function of the command button is call a function that execute a query on the database, this function is well because it's filling the ArrayList with the resultset (myBean.foundAnimals) but these items doens't refresh on the view (dataTable) :(

1
Its a dialect of pseudocode I don't understand. Where's the real code?Jaqen H'ghar

1 Answers

0
votes

You should use an <h:form> for both and set the render value from your commandButton to rendered=":form" to achieve rerendering the form after clicking the commandButton.