Feb 16, 2016, 12:39 PM
1 Posts

Looking for help populating a dojo data grid based on the select document

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 9.0.1
  • Role: Developer
  • Tags: XPages,dojo grid
  • Replies: 2

I have two REST controls that populate two enhanced dojo data grids.  One is populated with companies, the other I would like populated with the contacts of the selected company.  I am able to select a company and display the UNID of that document in a field on the xpage.  I am having difficulty filtering the contact grid based on that UNID.  What is the best way to do that?  Below is what I have tried

Populate the ParentID field with the selected doc UNID using (CSJS):

       var grid = arguments[0].grid;

       var index = arguments[0].rowIndex;

       var item = grid.getItem(index).attributes;

       XSP.getElementById("#{id:ParentID}").innerHTML = item.companyLink;


Retrieve the UNID from Parent ID and use in the keys parameter of the contact REST control using (SSJS):



It looks like the contact grid is refreshing when a company doc is selected, however all the contacts for all companies appear in the contact grid no matter what company is selected.


Feb 23, 2016, 12:09 AM
453 Posts
An Idea

I have not used the dojodatagrid but if I understand your problem I think you could do it pretty easily with a couple nested repeat controls. 

Mar 5, 2016, 5:35 AM
38 Posts
category Filter

If you are using the viewItemFileService in the REST control of the Ext Lib, you may set the category Filter with the ParenUNID

If empty it will return everything