嗨,人们:)我已经用素数创建了一个树表。在表格的其中一列中,我包含3个按钮。问题在于按钮仅适用于第一级,不适用于第二级。有谁可以帮助我吗。这是我的treeTable代码:
<h:form>
<p:treeTable value="#{processBean.treeNode}" var="node" ajax="true"
selectionMode="single" rowKey="#{node.id}">
<p:ajax event="select" listener="#{processBean.onSelect(node)}" />
<f:facet name="header">Processes View</f:facet>
<p:column headerText="Id">
<p:outputLabel value="#{node.id}" />
</p:column>
<p:column headerText="Name">
<p:outputLabel value="#{node.name}" />
</p:column>
<p:column headerText="Description">
<p:outputLabel value="#{node.description}" />
</p:column>
<p:column headerText="Created date">
<p:outputLabel value="#{node.createdDate}" />
</p:column>
<p:column headerText="Status">
<p:outputLabel value="#{node.status}" />
</p:column>
<p:column headerText="Actions" styleClass="centered-text">
<p:commandButton title="Start" ajax="true"
icon="fa fa-play Fs16 white"
action="#{processBean.startProcess(node)}">
</p:commandButton>
<p:spacer width="4%" />
<p:commandButton title="Skip" ajax="true"
icon="fa fa-step-forward Fs16 White"
actionListener="#{processBean.skipProcess(node)}">
</p:commandButton>
<p:spacer width="4%" />
<p:commandButton title="Complete" ajax="true"
icon="fa fa-stop Fs16 white"
actionListener="#{processBean.completeProcess(node)}">
</p:commandButton>
</p:column>
</p:treeTable>
</h:form>