Refresh problem


I have a problem when the application is refreshed.

In the case where I don’t use the annotation @PreserveOnRefresh. When I refreshed the application, I disconnected and the UI is again create.

In other case, if I use the annotation my application is refreshed. But I use a JavaScript plugin which is Image Cropper, and after a refresh anywhere in application, the plugin doesn’t working anymore.

I would to find a solution to the JS plugin works.


How do you add the JavaScript plugin to your application?

In Java, I created an AbstractJavaScriptComponent child class with an RPC. And in JavaScript, I created a connector.

You might have some initialization that is done only on UI creation in the init() method. This method is not called on refresh.
You can override UI.refresh() to perform what you need to do on refresh.

Please show some code (from your UI and extension) if you still have problems.