I use <p:layout> in a page,and i put a tree in "left" layoutUnit and show info of the selected node in center layoutUnit.I want update the center content.but it didn't work.My code:
Code: Select all
<h:body>
<p:layout fullPage="true">
<p:layoutUnit position="left" width="200" minWidth="200" maxWidth="300" >
<h:form>
<p:tree value="#{orgBean.root}" var="org"
selectionMode="single" selection="#{orgBean.selectedNode}"
nodeSelectListener="#{orgBean.onNodeSelect}" update="nodeInfo">
<p:treeNode>
<h:outputText value="#{org}"/>
</p:treeNode>
</p:tree>
</h:form>
</p:layoutUnit>
<p:layoutUnit position="center" gutter="1">
<h:form>
<p:outputPanel>
<p:commandButton value="add"/>
<p:commandButton value="del"/>
<p:commandButton value="edit"/>
</p:outputPanel>
<h:panelGrid id="nodeInfo" columns="2">
<h:outputText value="name:"/>
<h:inputText value="#{orgBean.org.name}" />
<h:outputText value="code:" />
<h:inputText value="#{orgBean.org.code}" />
<h:outputText value="manager" />
<h:inputText value="#{orgBean.org.manager}" />
<h:outputText value="tel:" />
<h:inputText value="#{orgBean.org.tel}" />
</h:panelGrid>
</h:form>
</p:layoutUnit>
</p:layout>
</h:body>