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 h:dataTable header is scorlling with the data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "h:dataTable header is scorlling with the data" Watch "h:dataTable header is scorlling with the data" New topic
Author

h:dataTable header is scorlling with the data

Raghunath Kb
Greenhorn

Joined: Oct 08, 2012
Posts: 1
Datatable header is scrolling with the data.

Previously my project was running in WAS6.1 and we were using JSF1.1(JSP files). Below is the code structure. The header was not scorlling at that time.

We have migrated from JSF1.1 to JSF1.2 (JSP file to Xhtml files) for WAS6.1 to WAS8.0 Migration. But here the header also scrolling with the data. Please give your suggestion on this.

<t:htmlTag value="div" id="divElem">
<h:dataTable>
<h:column>
<f:facet name="header">
Column name1
</f:facet>
column data1
<h:column>
<h:column>
<f:facet name="header">
Column name2
</f:facet>
column data2
<h:column>
</h:dataTable>
</t:htmlTag>
JavaScript:
in page:
var tablesize = document.getElementById('datatable_id:resultsize')
if (tablesize > 0 && document.body.scrollHeight > window.screen.availHeight){
var calcHeight=Math.ceil(screen.height*41 / 100);
applyScroll(calcHeight);

external js
-------------
function applyScroll(userheight,page){
var divElem = document.getElementById(page+':divElem');
divElem.style.overflow = "auto";
divElem.style.width="100%";
divElem.style.height = userheight;
}
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: h:dataTable header is scorlling with the data