Select to view content in your preferred language

WAB Developer Addition - Getting Related Objects to work without having tables in Layer List?

1963
3
Jump to solution
05-03-2016 09:18 AM
IanPeebles
Frequent Contributor

I have an application and services that contain related objects.  Is there a way to have the related objects work without having the related objects as tables in the layer list?  How can I hide these tables and still have the related objects work.  I have had some end user raise concerns about the tables being visible.

Anyone have any ideas?  Here is a sample:

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Ian,

  To exclude all tables you go to the LayerList widget folder and open the LayerListView.js and comment out the getTableInfoArray portion of the postCreate function:

postCreate: function() {
      array.forEach(this.operLayerInfos.getLayerInfoArray(), function(layerInfo) {
        this.drawListNode(layerInfo, 0, this.layerListTable, true);
      }, this);

      /*array.forEach(this.operLayerInfos.getTableInfoArray(), function(layerInfo) {
        this.drawListNode(layerInfo, 0, this.tableListTable, true);
      }, this);*/
    },

View solution in original post

3 Replies
RobertScheitlin__GISP
MVP Emeritus

Ian,

  To exclude all tables you go to the LayerList widget folder and open the LayerListView.js and comment out the getTableInfoArray portion of the postCreate function:

postCreate: function() {
      array.forEach(this.operLayerInfos.getLayerInfoArray(), function(layerInfo) {
        this.drawListNode(layerInfo, 0, this.layerListTable, true);
      }, this);

      /*array.forEach(this.operLayerInfos.getTableInfoArray(), function(layerInfo) {
        this.drawListNode(layerInfo, 0, this.tableListTable, true);
      }, this);*/
    },
IanPeebles
Frequent Contributor

Robert, you are the man!  I just did commented out those line and that works!  Perfect!  Also, my related objects still works.

BTW, does WAB support related objects on related objects?

That is.. I have a feature such as a traffic pole, the traffic pole then has a mast arm as a related object.  The mast arm then has a signal head as a related object, the signal head has an LED as a related object.  Can I drill down that far to get that information from a Popup.

Thank you so much for the feedback.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Ian,

  I actually don't know the answer to that one. I have not tried.

Don't forget to mark this thread as answered by clicking on the "Correct Answer" link on the thread that answered your question.