0

i had problem to show the tree in all the rows of a datatable

asked 2009-01-16 12:57:06 +0800

kondaluavula gravatar image kondaluavula
6

i am using jsf 1.2 version

<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>
<%@ taglib uri="http://www.zkoss.org/jsf/zul" prefix="z"%>
<h:dataTable id="searchResult" rows="#{searchCatalogue.currentPageVal}" width="100%"
border="1" binding="#{searchCatalogue.searchResultTable}" rowClasses="NGLRowStyle"
value="#{searchCatalogue.resultList}" var="result" columnClasses="firstColumn,secondColumn,thirdColumn" >
<h:column>
<h:outputText value="#{result.serialNo}" />
</h:column>
<h:column>
<h:selectBooleanCheckbox value="#" style="text-align:top;" binding="#{searchCatalogue.htmlSelectBooleanCheckbox}" >
<a4j:support event="onclick" action="#{searchCatalogue.selectedCatalogRecs}"/>
</h:selectBooleanCheckbox>

</h:column>
<h:column>
<f:facet name="header">
<h:outputLabel value="#{rb.Title}" />
</f:facet>
<table>
<tr>
<td>
<h:outputText value="Title: #{result.title}"/>
</td>
</tr>
<tr>
<td>
<h:outputText value="Author: #{result.author}" />
</td>
</tr>
<tr>
<td>
<z:tree apply="org.verus.ngl.web.beans.technicalprocessing.SearchCatalogue" id="holdingsTree" >
<z:treecols>
<z:treecol label=""/>
</z:treecols>
<z:treechildren>
<z:treeitem>
<z:treerow>
<z:treecell label="#{rb.holdings}" forward="onTreeOpen"> </z:treecell>
</z:treerow>
</z:treeitem>
</z:treechildren>
</z:tree>
</td>
</tr>
<tr>
<td>
<a4j:commandLink id="modify" value="#{rb.modify}" />  
<a4j:commandLink id="delete" value="#{rb.delete}" />  
<a4j:commandLink id="copy" value="#{rb.copy}" />  
</td>
</tr>
<tr>
<td>
<a4j:commandLink id="relatedRecords" value="#{rb.relatedRecords}" />
</td>
</tr>
</table>

<br>

</h:column>
</h:dataTable>


if i print 10 rows in tale can i get each row with tree ?
now i am getting only one row with tree, remaing rows does not get the tree, plz guide me

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2009-01-20 01:47:13 +0800

robbiecheng gravatar image robbiecheng
1144 2
http://robbiecheng.sys-co...

You shall use TreeModel to render the result.
please refer to http://zkoss.org/smalltalks/zkTreeModel/

/robbie

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-01-16 12:57:06 +0800

Seen: 189 times

Last updated: Jan 20 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More