• 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
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

Data table header issue

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

i am new to jsf i had rendered my dataTable columns with a condition by doing this
my columns header not coming, it is showing only data without headers. please help me on this

this is my code

<p:dataTable id="dl" border="0"
frame="lhs" rendered="#{travelRequestBean.onWardFound}"
value="#{travelRequestBean.travelRequest.travelPriorities.toArray()}"
var="child">
<f:facet name="header"> Onward Flight Details:- #{travelRequestBean.travelRequest.source} To #{travelRequestBean.travelRequest.destination} </f:facet>


<p:column style="width:10%" rendered="#{child.travelType=='O'}">
<f:facet name="header"> AirLine</f:facet>
<h:outputText value="#{child.airline}"></h:outputText>
<div class="airline_logos #{child.airline}"></div>

</p:column>
<p:column style="width:10%" rendered="#{child.travelType=='O'}">
<f:facet name="header">
Stops
</f:facet>
#{child.stops}
</p:column>

<p:column style="width:30%" rendered="#{child.travelType=='O'}">
<f:facet name="header">
Departs
</f:facet>
#{child.departureDateTime}
</p:column>

<p:column style="width:30%" rendered="#{child.travelType=='O'}">
<f:facet name="header">
Arrival
</f:facet>
#{child.arrivalDateTime}
</p:column>

<p:column style="width:10%" rendered="#{child.travelType=='O'}">
<f:facet name="header">
Duration
</f:facet>
#{child.duration}
</p:column>

<p:column style="width:10%" rendered="#{child.travelType=='0'}">
<f:facet name="header">
Price
</f:facet>
#{child.totalFare}
</p:column>
</p:dataTable>
</td>
<td style="width: 50%">
<p:dataTable id="d2" border="0"
frame="lhs" rendered="#{travelRequestBean.returnFound}"
value="#{travelRequestBean.travelRequest.travelPriorities.toArray()}"
var="child">
<f:facet name="header"> Return Flight Details:-#{travelRequestBean.travelRequest.destination} To #{travelRequestBean.travelRequest.source}</f:facet>


<p:column style="width:10%" rendered="#{child.travelType=='R'}" headerText="Air Line" >

<h:outputText value="#{child.airline}"></h:outputText>
<div class="airline_logos #{child.airline}"></div>

</p:column>
<p:column style="width:10%" rendered="#{child.travelType=='R'}">
<f:facet name="header">
Stops
</f:facet>
#{child.stops}
</p:column>

<p:column style="width:30%" rendered="#{child.travelType=='R'}">
<f:facet name="header">
Departs
</f:facet>
#{child.departureDateTime}
</p:column>

<p:column style="width:30%" rendered="#{child.travelType=='R'}">
<f:facet name="header">
Arrival
</f:facet>
#{child.arrivalDateTime}
</p:column>

<p:column style="width:10%" rendered="#{child.travelType=='R'}">
<f:facet name="header">
Duration
</f:facet>
#{child.duration}
</p:column>

<p:column style="width:10%" rendered="#{child.travelType=='R'}">
<f:facet name="header">
Price
</f:facet>
#{child.totalFare}
</p:column> </p:dataTable>


Regards,
Sriram
 
Are you here to take over the surface world? Because this tiny ad will stop you!
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic