I am following line by line the setup of a custom ListView widget from the official ESRI sample code page:
Create a ListView widget—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers
...
4) Register the widget in the list.json at path/to/WAB/client/stemapp/widgets.
...
Is this list.json an error? There is NO such file inside ~client/stemapp or ~client/stemapp/widgets. Beside, do I really have to "register" the widget? In order for it to be available to WAB, I thought it simply needs to be copy/pasted into ~client/stemapp/widgets...
but after copy/pasting the same code in the settings.js and settings.html, in my case it shows like this:
The list should be populated...This is strange since I have my operational layer saved and added in the web map from https://services1.arcgis.com/4yjifSiIG17X0gW4/ArcGIS/rest/services/JoshuaTreeImages/FeatureServer/0 :
Solved! Go to Solution.
See this thread about issues with the sample code:
https://community.esri.com/thread/198771-list-view-custom-widget-for-web-app-builder
See this thread about issues with the sample code:
https://community.esri.com/thread/198771-list-view-custom-widget-for-web-app-builder
Thanks for the pointer Rob!
I will download the fixed to the code there. However, I still have to solve my question (1): what is list.json to register the widget? and (2) re: the word "Demo" to still appear in the widget name I attached (zipped). If you have any pointers for those as well please let me know...Thank you!
Francesco,
1. Yes you can ignore step 4 as you have seen there is no list.json
2. Sounds like you missed this part of step 5:
In the nls folder, update the value of the _widgetLabel variable to ListView in the strings.js files
Rob,
That is the strange part...The widget I attached to this thread has the following code included in the /nls folder...hence why I am confused on why it still shows the label "Demo"..instead of ListView...
/nls/strings.js
define({
root: ({
_widgetLabel: "ListView"
})
});
Francesco,
The widget attachment you have earlier in this thread came from the stemApp widgets folder or the Apps widget folder?
The widget I attached was copy/pasted and modified out of the "Demo" widget inside the ~client/stemapp/widget/samplewidgets. Following the tutorial instructions, I created my own copy of that folder and saved it into the .../stemapp/widgets so it becomes available to any new app that I create. I then changed the name of the folder and all widget files inside it to replace the word "demo" with "ListView", so there is nothing left with the word "demo" in my widget folder...hence my confusion.
Francesco,
What happen if you restart WAB and create a new app?
Rob,
Apparently refreshing the page did not help but restating the entire WAB did the trick! Seems like they still have some issues thought with their ListView widget...even using the zipped one provided by the ESRI employee at the end of the thread you linked at the beginning does not show all the thumbnails and title correctly...Oh well, hopefully they will fix it for good soon.