Hello,
I do a custom widget in WebAppBuilder and I would like to open automatically the attribute table widget to see a specific layer.
I'm able to open the attribute table widget but the issue is that I can't choose which table is visible in the widget.
For example, I would like to open the attribute table widget with "landuse_91" and not "roads" (which is visible by default). I find in the widget the object "_activeTable" which contains infos about "roads" but I don't know how to change it and refresh the attribute table widget to see "landuse_91".
Thanks a lot
Regards
Lucile
Solved! Go to Solution.
Lucile,
This is how I do it:
//Where this.attWidget is a var that equals the AT Widget
//open TrafficCams in AT widget
this.wManager.openWidget(this.attWidget);
this.attWidget._openTable().then(lang.hitch(this, function(){
var page = this.attWidget.getExistLayerTabPage('LOJIC_PublicSafety_Louisville_7908_2');
this.attWidget.tabContainer.selectChild(page);
}));
Lucile,
This is how I do it:
//Where this.attWidget is a var that equals the AT Widget
//open TrafficCams in AT widget
this.wManager.openWidget(this.attWidget);
this.attWidget._openTable().then(lang.hitch(this, function(){
var page = this.attWidget.getExistLayerTabPage('LOJIC_PublicSafety_Louisville_7908_2');
this.attWidget.tabContainer.selectChild(page);
}));
Thank you Robert, it works