PrimeFaces treeTable commandButton not invoked

bwright Source

I know this question has been asked before, but all answeres did not work or are for a VERY old version of Primefaces.

I hava a simple <p:treeTable with a commandButtion in a <p:column but the action is only executed for the root elements in the tree.

<p:treeTable var="ou" 
    value="#{oumanagement.ouTree}" 
    class="userList" 
    id="outable"
    selectionMode="single">

    <f:facet name="header">
        <h:outputText value="List of Organisational Units" />
    </f:facet>

    <p:column headerText="Organisational Unit" >
        <h:outputText value="#{ou.name}" />
    </p:column>

    <p:column>
        <p:commandButton action="#{oumanagement.remove(ou.id)}" icon="fa fa-trash-o" update=":ouform:outable :ouform:msgs" transient="true">
           <p:confirm header="Are You Sure" message="Are you sure?" icon="ui-icon-alert" />
        </p:commandButton>
     </p:column>
     <p:column>
         <p:commandButton action="#{oumanagement.viewDetails(ou.id)}" icon="fa fa-sliders" transient="true"  ajax="false"/>
      </p:column>
</p:treeTable>

The action is very simple:

public String viewDetails(int id) {
    activeOU = ouService.find(id);
    FacesContext.getCurrentInstance().getExternalContext().getFlash().put("ou", activeOU);
    return "/pages/secure/organisationManagement/details";
}

I'm using Primefaces version 5.1

Thanks for any hints and help


Updated to Primefaces 5.2 still same problem

jsfprimefaces

Answers

comments powered by Disqus