The moose likes JSF and the fly likes Unable to display header in outer JSF datatable of a nested datatable using facet tag Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Unable to display header in outer JSF datatable of a nested datatable using facet tag" Watch "Unable to display header in outer JSF datatable of a nested datatable using facet tag" New topic
Author

Unable to display header in outer JSF datatable of a nested datatable using facet tag

Sathya Narayanan
Greenhorn

Joined: May 10, 2007
Posts: 3
Hello,

Am developing a search page which returns a result having a set of rows. I use datatable to iterate

the results.
One column in each row of the result contains another list which should expand on clicking on the

particular column and diaplay the data inside it using another inner datatable.
I use Javascript to expand and collapse the inner datatable.

The problem is that when I try using the <f:facet>to display the header in the outer datatable the

header is not displayed.
The results is displayed correctly but the header alone are not displayed in the outer datatabe.


<h:dataTable id="books" value="#{DataTab.items}" var="list">
<h:column>
<f:facet name="header">
<hutputText value="Name"></hutputText>
</f:facet>
<hutputText value="list.name"></hutputText>
</h:column>
<h:column>
<h:dataTable id="books" value="#{DataTab.items1}" var="list1">
<h:column>
<f:facet name="header">
<hutputText value="occupation"></hutputText>
</f:facet>
<hutputText value="#{list1.occupation}"></hutputText>
</h:column>
<h:column>
<f:facet name="header">
<hutputText value="location"></hutputText>
</f:facet>
<hutputText value="#{list1.location}"></hutputText>
</h:column>
</h:datatable>
</h:column>
</h:datatable>


In the above example the nested datatable is used. Here the <f:facet> with outputtext value="Name"

whcih belongs to the outer datatable header is not displayed.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13433
Welcome to JavaRanch!

We're pleased to have you here with us in the JSF forum, but there
are a few rules that need to be followed, and one is that proper names are
required. Please take a look at the
JavaRanch Naming Policy and
adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

You can change it here


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples
Sathya Narayanan
Greenhorn

Joined: May 10, 2007
Posts: 3
I have changed the display name
Thanks for the reply
 
 
subject: Unable to display header in outer JSF datatable of a nested datatable using facet tag
 
Threads others viewed
Input row select on data table does not get called
nested h:datatable question
JSF + RichFaces not able to reRender
JSF datatable doubt
Loading DB data when web app context initialized
IntelliJ Java IDE