Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Sathya Narayanan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Sathya Narayanan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have changed the display name
Thanks for the reply
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic