File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

h:dataTable header is scorlling with the data

 
Raghunath Kb
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic