Select to view content in your preferred language

Dynamically add FeatureTable to custom widget

3952
13
Jump to solution
12-17-2015 01:11 PM
AndyWright
Occasional Contributor

I'm brand spanking new to the Web AppBuilder and am trying to develop a custom widget designed like the bottom half of the image shown below.  I need a FeatureTable in the top 50% of the widget, and then a tab set with 3 tabs on the bottom half of the widget with a FeatureTable in each of the tabs.

I've been able to get the general UI design to appear in my custom widget, but I can't for the life of me get the FeatureTable objects to appear.  I have populated the tables from their corresponding feature layers, as I've seen that data in the Chrome Developer Tools console window.  I am able to get this set up and working with the Javascript API, but I'd obviously like to take advantage of all the free bells and whistles the Web AppBuilder provides.

Does anyone have a code example they can post or can anyone point me in the direction of a custom widget that has an AttributeTable in it as I haven't found one yet.  I feel like I'm overlooking something obvious and since I'm a little green with this stuff I'm sure I am.  Thanks in advance for the help.

mockup.png

0 Kudos
13 Replies
AndyWright
Occasional Contributor

Awesome!  Thanks Robert.  I'll take a look at this later this morning.  I was able to get a table to show up with your example Friday and by accessing the FeatureTable from an existing layer in the map rather than creating one from a REST endpoint I was able to get data loaded into the table, but I could no longer see the table after that.  Then when I tried to load multiple tables into my widget at once I got another error that seemed to be related to the same object (with the same id) being added multiple times, so it sounds like this id parameter might get me around that.

Thanks again, and I'll keep you posted ...

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Andy,

   Glad to help. Make sure you mark this thread as answered if you feel that your initial question as been.

0 Kudos
AndyWright
Occasional Contributor

Will do, thanks …

0 Kudos
AndyWright
Occasional Contributor

Everything is working great now.  I'm also able to load multiple tables at once without issue.  The id parameter fixed that as well.  Thanks a ton for your help and code examples Robert.  I really appreciate it.

0 Kudos