• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

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

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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">
<h:outputText value="Name"></h:outputText>
</f:facet>
<h:outputText value="list.name"></h:outputText>
</h:column>
<h:column>
<h:dataTable id="books" value="#{DataTab.items1}" var="list1">
<h:column>
<f:facet name="header">
<h:outputText value="occupation"></h:outputText>
</f:facet>
<h:outputText value="#{list1.occupation}"></h:outputText>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="location"></h:outputText>
</f:facet>
<h:outputText value="#{list1.location}"></h:outputText>
</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.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have changed the display name
Thanks for the reply
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic