0

I have a hybrid Worklight app and every time I change the HTML code I have to delete the app from Admin Console, Clean from Eclipse, clear Chrome browsing data and redeploy.

How can I automatically make WL reload the HTML changes every time I redeploy a WL environment (no more remove from Console or Clean from Eclipse)?

nspeete
  • 659
  • 3
  • 10
Eusebiu Marcu
  • 320
  • 1
  • 10
  • In the preview and Mobile Browser Simulator HTML changes saved in eclipse should be available on refresh. What version of Worklight are you using? – nspeete Apr 14 '14 at 14:56

2 Answers2

1

My first response is: huh?
You are totally not supposed to do this...

Starting Worklight 6.1, after a change in any of an application's web resources (HTML, JS, CSS, images, ...), after the initial deployment of the app (Run As > Run on Worklight Development Server) you no longer even need to re-build the app.

When you preview the app via Worklight Console, all you need to do is to refresh the browser window. That's it.

You most definitely should not delete the app from Worklight Console or "Clean from Eclipse".

That said, if you are talking about previewing the "Common web resources" option in Worklight Console, what you may want to do (hopefully as a one-time action) is to:

  1. Close Eclipse
  2. Locate your temp folder (Windows, OS X)
  3. Delete the wlBuildResources folder (optionally wlPreview folder as well)
  4. Open Eclipse
  5. Re-build

Should work.

Community
  • 1
  • 1
Idan Adar
  • 44,156
  • 13
  • 50
  • 89
  • I've deleted both folders (while Eclipse was closed) and it's still not working without the Clean from Eclipse. – Eusebiu Marcu Apr 14 '14 at 16:34
  • Did you change any Eclipse settings? Does it happen in a fresh new eclipse workspace? – Idan Adar Apr 14 '14 at 16:36
  • After recreating the workspace I've noticed that Build automatically was checked. After unckecking, I got the problem described above. After checking it back, the problem disappeared and the web resources were reloaded normaly. – Eusebiu Marcu Apr 14 '14 at 17:04
  • That's the problem then... Enable it. – Idan Adar Apr 14 '14 at 17:06
1

Now that that's fixed you can click the Go/Refresh Button of the simulator to utilize the "instant preview" feature during development.

Go/Refresh Button

nspeete
  • 659
  • 3
  • 10