• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to use dataTable without scrolling header

 
Vinutha Reddy
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a dataTable like this where i put entire table within div,

<div style="overflow:auto;height:120px;">
<h:dataTable class="adresstable"
value="#{PatientWebGuiListBean.patientDemographs}" var="patient"
rowClasses="oddRow, evenRow" columnClasses="column" headerClass="head">
<h:column>
<f:facet name="header">
<hutputText value=" PatientName " />
</f:facet>
<hutputText value="#{patient.lastName}" />
</h:column>
<h:column>
<f:facet name="header">
<hutputText value=" Gender " />
</f:facet>
<hutputText value="#{patient.gender}" />
</h:column>
<h:column>
<f:facet name="header">
<hutputText value=" Age " />
</f:facet>
<hutputText value="#{patient.age}" />
</h:column>
<h:column>
<f:facet name="header">
<hutputText value=" Address " />
</f:facet>
<hutputText value="#{patient.address}" />
</h:column>
<h:column>
<f:facet name="header">
<hutputText value=" ContactNumber " />
</f:facet>
<hutputText value="#{patient.phone1}" />
</h:column>
<h:column>
<f:facet name="header">
<hutputText value=" Status " />
</f:facet>
<hutputText value="#{patient.status}" />
</h:column>
</h:dataTable>
</div>

This scrolls entire table, but i need to keep header as constant without scrolling. only body part should scroll.

Thanks,
Vinutha.
 
Remko Strating
Ranch Hand
Posts: 893
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the following link could help you

dataTable without scrolling header
 
Vinutha Reddy
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Remko,

Thanks for reply.
I referred the link "dataTable without scrolling header". but they are telling how to scroll horizontally. but my requirement is to scroll vertically without scrolling hearder part.

Thanks,
Vinutha.
 
Lee Mark
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
having same problem...
if you have soluition then please post it..
 
Akaine Harga
Ranch Hand
Posts: 99
Java MyEclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Consider using RichFaces, rich:extendedDataTable takes care of this with just a pare of attributes.
 
sri raman
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, try using "float " in javascript. It will work
 
Ankur Bajaj
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sri raman wrote:Hi, try using "float " in javascript. It will work


can you explain?
 
Tim Holloway
Saloon Keeper
Posts: 18304
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ankur Bajaj wrote:
sri raman wrote:Hi, try using "float " in javascript. It will work


can you explain?


Probably not. That suggestion was made about 4 years ago and there's no telling where Sri is working now or if he is still interested in JSF and the JavaRanch.

http://www.coderanch.com/how-to/java/DontWakeTheZombies
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic