How to make widget code refreshed in App Builder while developing it ?

1195
1
Jump to solution
03-17-2017 09:20 AM
LUCCLAUSTRES
New Contributor

I am trying to add a new custom widget in the builder (under client\stemapp\widgets). However when I update the code of my widget it does not seem to be reflected in the App Builder. For instance I had in my app a syntax error due to my bad widget code, then I changed the code and I can still see that the old widget code in use. 

Restart the App Builder does not seem to have an effect neither building a new app with the widget.

Tried to remove server/db files without success, can someone explain how to make custom widget code updates reflect in the App Builder ?

Thanks

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Luc,

   Once a widget is added to an app it is copied from the stemapp\widgets folder to the server\apps\[app#]\widgets folder so changes made to the stemapp\widgets folder after that have no affect on that app.

Here is my development workflow:

The widget/theme development work flow I use for all my work is this.

1. Copy the [install dir]\client\stemapp\widgets\samplewidgets\CustomWidgetTemplate folder to the stemapp widget folder and rename it to your custom widgets name.
2. Open the manifest.json and change the name property to the exact name of the widget folder from step one.
3. I now work on changing the icon and some basics of the widget.
4. Now I create a new app (normally the app will be named the same as my custom widgets name) and will see that my new custom widget is a choice in the widget choices.
5. Add my custom widget to the new app.
6. Now I do ALL my development in the [install dir]\server\apps\[app #]\widgets\my custom widget name folder.
7. Once I am done will my development I copy the widget folder back into the stemapp widgets folder so that new apps will use the completed widget code.

View solution in original post

1 Reply
RobertScheitlin__GISP
MVP Emeritus

Luc,

   Once a widget is added to an app it is copied from the stemapp\widgets folder to the server\apps\[app#]\widgets folder so changes made to the stemapp\widgets folder after that have no affect on that app.

Here is my development workflow:

The widget/theme development work flow I use for all my work is this.

1. Copy the [install dir]\client\stemapp\widgets\samplewidgets\CustomWidgetTemplate folder to the stemapp widget folder and rename it to your custom widgets name.
2. Open the manifest.json and change the name property to the exact name of the widget folder from step one.
3. I now work on changing the icon and some basics of the widget.
4. Now I create a new app (normally the app will be named the same as my custom widgets name) and will see that my new custom widget is a choice in the widget choices.
5. Add my custom widget to the new app.
6. Now I do ALL my development in the [install dir]\server\apps\[app #]\widgets\my custom widget name folder.
7. Once I am done will my development I copy the widget folder back into the stemapp widgets folder so that new apps will use the completed widget code.