i cannot resolve this problem.
In my application-descriptor.xml is defined a <mainPage> in wich worklight injects all its css and js.
If i am in mainPage.html and do a location.href = "anotherPage.html" i got the error "WL is not defined", beacuse there aren't all the WL js files. I try to manual insert all the <script> tag of worklight in my anotherPage.html and it works, but i think is not a good way of do things.
The change page works only if i use jquery mobile's changePage method that is AJAX-based.
Is there a solution?
This topic has been locked.
2 replies Latest Post - 2012-11-20T12:57:17Z by SystemAdmin
Pinned topic Make WL works if i do a location.href redirect
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
IdanAdar 2700059KWB741 PostsACCEPTED ANSWER
Re: Make WL works if i do a location.href redirect2012-11-20T11:33:16Z in response to SystemAdminHi.
Worklight is a single-page application. As such what you're trying to do is not possible within the constraints of Worklight.
If you'd like to use multiple pages, you can indeed use 3rd party solutions such as jQuery Mobile.
IBM Worklight Mobile Platform