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



Nov 17, 2011, 5:30 AM
2 Posts

Columnvalues

  • Category: Server Side JavaScript
  • Platform: Linux
  • Release: 8.5.1
  • Role: Developer
  • Tags:
  • Replies: 4
 Hi, I have created a xpage and added view control. Now while opening the xpage, I would like to get the current view's column values. How can I get it using serverside javascript. Please note that I need to get the values that are being displayed. i.e. If I have 100 records, I'll be displaying 10/page. When I am opening the 1st page , I just need to get the first 10 row values.
Nov 17, 2011, 2:08 PM
24 Posts
Re: Columnvalues
You can get columnvalues via standard API.
database.getView('viewname').getColumnvalues()
As to the values of the current page, you need to slice that part manually. 
The 'first' property of the viewPanel control specifies the number of the first row to be displayed.You can probably get this value via SSJS.
That would be something like, getComponent('viewPanel1').getFirst()/getProperty('first')/getAttribute('first')
Check the XPage Java API:-)
The 'rows' property defines the number of rows in each page.
All these would be enough to get what you want.
 
Nov 17, 2011, 11:32 PM
2 Posts
Re: Columnvalues
 Thank you Starrow. Will check it and let you know. Is there any pdf file for all classes in server side javascript for xpages? 
Nov 18, 2011, 2:26 AM
24 Posts
Re: Columnvalues
There are some common ssjs reference in the domino designer help. Here is the backend XPage java class reference: http://public.dhe.ibm.com/software/dw/lotus/Domino-Designer/JavaDocs/XPagesExtAPI/8.5.2/index.html
Nov 22, 2011, 3:09 PM
38 Posts
Re: Columnvalues
When you have a viewpanel has a var="entry"
you can get the value of a certain column by entry.getColumnValue("columnvalue"). The Columnvalue is the programmatically name of the column (last tab in the column properties box in a view).
A column has not to be present in the viewpanel, but should, of course, in the connecting view 

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