Board index JavaServer Faces General showing a table after a item is selected

showing a table after a item is selected

Components, Ajax Framework, Utilities and More.


Posts: 13
Hi, I am working on a item selection such that when the item is selected it will display a table with attribute which can be edited.
<p:tree update="attributeList" value="#{treeManagedBean.root}" var="node" selectionMode="single" selection="#{treeManagedBean.selectedNode}">
                                        <p:treeNode>
                                            <h:outputText value="#{node}" />
                                        </p:treeNode>
                                    </p:tree>     


This is the table that i wanted it to display after the item is selected, with all the attributes listed in the table and the extra outputText can be used to make amendment in the table.
   
<p:dataTable id="attributeList" var="attributes" value="#{treeManagedBean.attributesList}">
                                        <p:column>
                                            <f:facet name="header">
                                                <h:outputText value="#{attributes}" />
                                                <h:outputText value="#{treeManagedBean.input}" />
                                            </f:facet>
                                            <h:outputText />
                                        </p:column>
                                    </p:dataTable>                 


I try to make it display but it didnt work. I wonder what went wrong. Cany anyone advise? thanks! :)


Posts: 13
solved it.


Return to General