Widget contents not updating as changed to windget.html

1494
9
Jump to solution
06-14-2019 09:31 AM
MurugesaPandian
New Contributor II

Hi,

I am newbie to esri.

I have added the my custom widget folder in the client/widget, its available on the widget list and I can add it too on my map. But When I am started to update the Widget.html through Visual studio, but I am getting only old contents.

Thanks in advance for your answer.

1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Murugesa,

   But are you editing the Widget.html in the app folder that you added the custom widget to (i.e. [instal dir]\server\apps\[app#]\widgets\yourCustomWidget\)?

View solution in original post

9 Replies
RobertScheitlin__GISP
MVP Emeritus

Murugesa,

   Are you editing the Widget.html for the app you are working in? The client/widget folder is only for new apps that are created. When you add a widget to an app it clones the client/widget folder over to server/apps/app#/widgets folder and you then need to make your modifications there.

MurugesaPandian
New Contributor II

Thanks Robert, for you help. Soon I update the result. as of now I am seeing inside the folder server/apps, there are 2 folder with name 2 and 3.

May be I need to put the cloned and modified widget into widget folder of the 2 or 3.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Murugesa,

   You will know which app # you are working with (folder number 2 or 3) based on the url in your browser's address bar (i.e. .../webappbuilder/?id=2). You do not need to copy anything over to that folder as Web App Builder has already done that. But you do need to make all your code changes in that folder

(i.e. [instal dir]\server\apps\2\widgets\yourCustomWidget).

0 Kudos
KenBuja
MVP Esteemed Contributor

I've been using the process here to develop widgets: GitHub - Esri/generator-esri-appbuilder-js: Yeoman generator to help customize Esri's WebAppBuilder. This page also talks about copying the widget files into not only the stemapp, but each app that you have created

This process will build the framework of the widget for you and will also update the widget using Grunt as you edit it. You can specify to automatically update a specific app that contains the widget, also. I set up an app called Development that I use to do my testing. When it works properly, I can then create other apps that use the widget.

MurugesaPandian
New Contributor II

Thanks Ken,

I will follow your instruction for automating the deploy and packaging development tips.

0 Kudos
MurugesaPandian
New Contributor II

Thanks for your information. I thought I can clone it by changing the folder and name of the app in the related json configuration file, So I can get the new widget.

On top of this, I can update the widget with my own code and mark up. But Its not.

Am I same on the page with you Robert ?

0 Kudos
MurugesaPandian
New Contributor II

Create a custom in-panel widget—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developer... 

I am following the above link to create the widget. I have modified the widget.html and its not showing the updated contents.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Murugesa,

   But are you editing the Widget.html in the app folder that you added the custom widget to (i.e. [instal dir]\server\apps\[app#]\widgets\yourCustomWidget\)?

MurugesaPandian
New Contributor II

Thanks Robert,

After copying my own widget in to server/apps/2/myown and then I have updated the config.json under folder 2, I am able to see my custom widget. Thanks for your help to dive into esri API development.

0 Kudos