File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes how to use dataTable without scrolling header Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "how to use dataTable without scrolling header " Watch "how to use dataTable without scrolling header " New topic
Author

how to use dataTable without scrolling header

Vinutha Reddy
Greenhorn

Joined: Jul 17, 2007
Posts: 2
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

Joined: Dec 28, 2006
Posts: 893
I think the following link could help you

dataTable without scrolling header


Remko (My website)
SCJP 1.5, SCWCD 1.4, SCDJWS 1.4, SCBCD 1.5, ITIL(Manager), Prince2(Practitioner), Reading/ gaining experience for SCEA,
Vinutha Reddy
Greenhorn

Joined: Jul 17, 2007
Posts: 2
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

Joined: Mar 05, 2009
Posts: 46
having same problem...
if you have soluition then please post it..
Akaine Harga
Ranch Hand

Joined: Nov 03, 2009
Posts: 79

Consider using RichFaces, rich:extendedDataTable takes care of this with just a pare of attributes.


Wanna install linux on a vacuum cleaner. Could anyone tell me which distro sucks better?
willCodeForFood("Java,PHP,C#,XML,VBS,XHTML,CSS,JavaScript,SQL"); //always looking for job opportunities in AU/NZ/US/CA/Europe :P
sri raman
Greenhorn

Joined: Dec 03, 2009
Posts: 6
Hi, try using "float " in javascript. It will work
Ankur Bajaj
Greenhorn

Joined: Apr 25, 2012
Posts: 5
sri raman wrote:Hi, try using "float " in javascript. It will work


can you explain?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16019
    
  20

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


Customer surveys are for companies who didn't pay proper attention to begin with.
 
jQuery in Action, 2nd edition
 
subject: how to use dataTable without scrolling header