custom widget visibility problem in WAB

871
5
12-20-2018 11:49 PM
NadirHussain
Occasional Contributor II

i am new in web app builder.I try my first custom widget. Custom widget not showing updates.I add one custom widget mywidget in stemmap/widgets folder.

<div>
<div>This is my widget.</div>
</div>

the above statment visible on myWidget whien i press the widget button.After this update my code to get some code from config file

<div>
<div>This is my widget.</div>

<div>This is configurable.[${config.configText}]</div>
</div>

the second statement not showing on the widget output.i try my best to check everything.i saved the changes and reload  page many times.But out put not visible.please help how to get output. 

0 Kudos
5 Replies
RobertScheitlin__GISP
MVP Emeritus

Nadir,

  When developing a widget you start in the stemapp widgets folder but as soon as you add that widget to an app the widget folder from the stemapp widget folder is copied over to the new apps widgets folder. So in that new app you are working with it is NOT seeing the changes you make to the stemapp widgets folder any more it only sees the widget inside the apps widgets folder. For example "C:\web-appbuilder-2.9\server\apps\25\widgets\myFirstWidget"

0 Kudos
NadirHussain
Occasional Contributor II

Dear Robert,.

  I tried this from webapp builder.As well as i deploy the application.but i cant see the update.

 below image is from localhost.But there is no update.i cant understand where is the problem. waiting for your help

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Nadir,

   So it sounds like you are still missing the issue.

Your said :

After this update my code to get some code from config file

<div>
<div>This is my widget.</div>

<div>This is configurable.[${config.configText}]</div>
</div>

the second statement not showing on the widget output.

Where did you make this update in the stemapp widgets folder? If so then you will not see that change until you create a new app using that widget. Like I said before once a widge is added to an app it is copied from the client/stemapp/widgets folder into the server/apps/[app#]/widgets folder. So all further changes to the code will have to be made in that folder. 

0 Kudos
NadirHussain
Occasional Contributor II

Dear Robert

    Thanks for your help.it works.I create new application and it starts working.One thing i am still missing lets i change my widget user interface and some business logic.Then it will again not show in this app.i have to create again other application or the files or copied into the server directory and if i change some thing i can see the result in this application.

Thanks again.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Nadir,

  This is the part of my reply that you need to carefully understand:

Like I said before once a widget is added to an app it is copied from the client/stemapp/widgets folder into the server/apps/[app#]/widgets folder. So all further changes to the code will have to be made in the server/apps/[app#]/widgets.
0 Kudos