This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Apr 25, 2013, 12:34 PM
17 Posts

DataTable repeat limit based on screen resolution

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer,Administrator
  • Tags:
  • Replies: 1
Hi,

How do I compute the repeat limit for a data table based on the resolution of the screen?

document.body.clientHeight only seems to work for CCJS so can't use this for the computed value.

I have tried to put CSJS for onClientLoad and tried to use document.getElementById('#{id:dataTable1}  to set the value but to no avail.

Any ideas on how to do this? 
 
  
Feb 1, 2014, 7:13 PM
3 Posts
Set sessionscope in the onclient load

in Onclient Load event of the xpage or custom control(better)

if(screen.width>1024){

var temp="#{javascript:sessionScope.noOfRows='20'}";

}

else{

var temp="#{javascript:sessionScope.noOfRows='40'}"

}

I did not check this code. Please verify before use in production


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal