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



Feb 16, 2016, 5: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;

       XSP.partialRefreshGet("#{id:contactListPanel}")

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

       getComponent("ParentID").getValue()

 

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, 5: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, 10: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


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