wood burning stoves 2.0*
The moose likes JSF and the fly likes Data table header issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Data table header issue" Watch "Data table header issue" New topic
Author

Data table header issue

sriram Ganapathi
Greenhorn

Joined: Dec 19, 2012
Posts: 10
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>
<hutputText value="#{child.airline}"></hutputText>
<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" >

<hutputText value="#{child.airline}"></hutputText>
<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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Data table header issue
 
Similar Threads
Problem trying to send file to browser in JSF
Trouble updating primefaces component w/ajax
<p:datatable scrollable="true"> not working
Wrong rendering of p:datatable with f:facet
Cant get my datatable to update [PRIMEFACES]