• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

how to use dataTable without scrolling header

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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">
<h:outputText value=" PatientName " />
</f:facet>
<h:outputText value="#{patient.lastName}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value=" Gender " />
</f:facet>
<h:outputText value="#{patient.gender}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value=" Age " />
</f:facet>
<h:outputText value="#{patient.age}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value=" Address " />
</f:facet>
<h:outputText value="#{patient.address}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value=" ContactNumber " />
</f:facet>
<h:outputText value="#{patient.phone1}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value=" Status " />
</f:facet>
<h:outputText 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.
 
Ranch Hand
Posts: 893
Tomcat Server Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
having same problem...
if you have soluition then please post it..
 
Ranch Hand
Posts: 99
MyEclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Consider using RichFaces, rich:extendedDataTable takes care of this with just a pare of attributes.
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, try using "float " in javascript. It will work
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

sri raman wrote:Hi, try using "float " in javascript. It will work



can you explain?
 
Saloon Keeper
Posts: 25481
180
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

https://coderanch.com/how-to/java/DontWakeTheZombies
 
Have you no shame? Have you no decency? Have you no tiny ad?
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic