Monthly Archives: May 2012


I was given a task to list down all controls and theirs labels along with some other attributes like style, style class, parent id, etc and prepare an Excel sheet. It was so boring and tedious task for me. This is a repetitive task in which I need to copy attributes value and paste it to the Excel sheet. I decided to automate this task and wrote this piece of code which simplifies my task drastically.

Paste above code in the script library and following code in afterPageLoad event of XPage

Now preview your XPage into the browser. A list of documents has been created in the application with form name fDoc. Create a view to display all these documents and its field values.