Dear GWT

606 views
Skip to first unread message

Ali Akhtar

unread,
May 11, 2016, 5:12:57 PM5/11/16
to GWT Users

Vassilis Virvilis

unread,
May 11, 2016, 5:15:39 PM5/11/16
to google-we...@googlegroups.com
Are you sure?

It doesn't do that for me. I need to restart sdm when the classpath changes but that's a rare event.

   Vassilis

On Thu, May 12, 2016 at 12:12 AM, Ali Akhtar <ali.r...@gmail.com> wrote:

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.



--
Vassilis Virvilis

Ali Akhtar

unread,
May 11, 2016, 5:17:18 PM5/11/16
to GWT Users
I'm sure. In 2.8 beta1, everytime a new class is added, or a new uiBinder file, it requires a restart in order for it to be detected and not get a weird error like $mg_1 not found

Frank

unread,
May 12, 2016, 2:30:11 AM5/12/16
to GWT Users
And I am sure that if that is the case you are doing something wrong.
I have been using GWT2.8.0beta1 from day 1 it was released and I am 100% sure I don't have to restart SDM when a class was added.

Op woensdag 11 mei 2016 23:17:18 UTC+2 schreef Ali Akhtar:

Thomas Broyer

unread,
May 12, 2016, 5:00:42 AM5/12/16
to GWT Users


On Wednesday, May 11, 2016 at 11:17:18 PM UTC+2, Ali Akhtar wrote:
I'm sure. In 2.8 beta1, everytime a new class is added, or a new uiBinder file, it requires a restart in order for it to be detected and not get a weird error like $mg_1 not found

You (or your tools) must be doing something wrong. Can you tell more about how you're launching SDM?

junaid

unread,
May 12, 2016, 6:38:16 AM5/12/16
to google-we...@googlegroups.com
After reading the above conversation it looks like this a feature in GWT 2.8 with which we can at run time add/change a class at client side ..
Is this true?

Coz I just try using GWT2.8 then running sdm , and then I just change some thing in a class  
like if before the class contains 
Window.alert("Hello");

At run time i goes to the code and change it to Window.alert("Hello world");
and then click the button which calls that class ... 
But I still get the message "Hello";

to see the "Hello world" I need to refresh the application.


So i was just wondering if there is some way for the above thing in 2.8 

Actually i have a requirement where we allow user to add/upload UI layouts at run time , 

Jrebel wont help me as it only works with java , where as GWT client in sdm is javascript.
tried dynamicUIBinder , it gives the layout at runtime but dont load any handlers etc.

So I need a way where user can upload a Java UI class(GWT composite) with the layout + Handlers. which loads at run time , without restarting the application..

Is this what GWT 2.8 is providing or is there any way i can achive the above.

Any suggestion will be really helpful .

Thanks 


--

Thomas Broyer

unread,
May 12, 2016, 7:38:44 AM5/12/16
to GWT Users


On Thursday, May 12, 2016 at 12:38:16 PM UTC+2, junaidp wrote:
After reading the above conversation it looks like this a feature in GWT 2.8 with which we can at run time add/change a class at client side ..
Is this true?

No.
 
Coz I just try using GWT2.8 then running sdm , and then I just change some thing in a class  
like if before the class contains 
Window.alert("Hello");

At run time i goes to the code and change it to Window.alert("Hello world");
and then click the button which calls that class ... 
But I still get the message "Hello";

to see the "Hello world" I need to refresh the application.

Yes, that's how SDM works. But refreshing the page in the browser is not the same thing as restarting SDM.
 
So i was just wondering if there is some way for the above thing in 2.8 

No.
 
Actually i have a requirement where we allow user to add/upload UI layouts at run time , 

Jrebel wont help me as it only works with java , where as GWT client in sdm is javascript.
tried dynamicUIBinder , it gives the layout at runtime but dont load any handlers etc.

So I need a way where user can upload a Java UI class(GWT composite) with the layout + Handlers. which loads at run time , without restarting the application..

Good luck with that, it's going to be a long and probably painful journey.
 
Is this what GWT 2.8 is providing or is there any way i can achive the above.

It's probably possible to run the GWT compiler on the server with the uploaded files to produce a small GWT app with just that code. You'd need some glue code to be able to load that small app into your "bigger" app and have them talk to each other.
But most importantly, you need to run the GWT in a sandbox to make sure uploaded files can't be used to access the server-side app or the machine (if you take care to not JavaC the classes, that'd probably be through bugs in the GWT compiler, but still)

Freddy Boucher

unread,
May 12, 2016, 8:37:59 AM5/12/16
to GWT Users
Actually i have a requirement where we allow user to add/upload UI layouts at run time , 

Jrebel wont help me as it only works with java , where as GWT client in sdm is javascript.
tried dynamicUIBinder , it gives the layout at runtime but dont load any handlers etc.

So I need a way where user can upload a Java UI class(GWT composite) with the layout + Handlers. which loads at run time , without restarting the application..

You're probably misunderstanding your requirements.

If your specs is to let your Users define custom views you should define a meta model for example in JSON. So your Users can modify this JSON and you just need to rebuild the view with this JSON.

Thomas Broyer

unread,
May 12, 2016, 9:10:45 AM5/12/16
to GWT Users
Either that or some form of scripting (that you sanitize before use, and to which you expose –by exporting them to JS– a defined set of APIs, like Google Apps Script: https://developers.google.com/apps-script/reference/ui/ )
 

Ali Akhtar

unread,
May 14, 2016, 7:32:47 PM5/14/16
to GWT Users
> You (or your tools) must be doing something wrong. Can you tell more about how you're launching SDM


I'm using IntelliJ. I have a GWT sdm run configuration in IntelliJ.

This is getting a bit ridiculous, I seem to be needing restarts even when I make changes to existing files.

E.g, I'm editing a file called FooView.java which is a uibinder view file.

As soon as I begin typing, I see this exception pop up in the SDM console:

java.nio.file.NoSuchFileException: /home/ali/foo/src/main/java/com/gevald/web/FooView.java___jb_old___
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
at sun.nio.fs.UnixException.asIOException(UnixException.java:111)
at sun.nio.fs.LinuxWatchService$Poller.implRegister(LinuxWatchService.java:246)
at sun.nio.fs.AbstractPoller.processRequests(AbstractPoller.java:260)
at sun.nio.fs.LinuxWatchService$Poller.run(LinuxWatchService.java:329)
at java.lang.Thread.run(Thread.java:745)
java.nio.file.NoSuchFileException: /home/ali/xxx/src/main/java/com/foo/web/FooView.java___jb_old___
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
at sun.nio.fs.UnixException.asIOException(UnixException.java:111)
at sun.nio.fs.LinuxWatchService$Poller.implRegister(LinuxWatchService.java:246)
at sun.nio.fs.AbstractPoller.processRequests(AbstractPoller.java:260)
at sun.nio.fs.LinuxWatchService$Poller.run(LinuxWatchService.java:329)
at java.lang.Thread.run(Thread.java:745)

When I next refresh the window, I get a compile error:

  [ERROR] Errors in 'file:/home/ali/foo/src/main/java/com/foo/web/client/nav/MemberNavigator.java'
               [ERROR] Line 47: No source code is available for type com.foo.web.FooView; did you forget to inherit a required module?

Ali Akhtar

unread,
May 14, 2016, 7:57:49 PM5/14/16
to GWT Users
Sometimes I get the following error:

 [WARN] Some stale types ([com.foo.web.nav.MemberNavigator, com.foo.web.FooView_ViewUiBinderImpl$Widgets, com.foo.web.FooView_ViewUiBinderImpl, com.foo.web.FooView, com.foo.web.FooView$ViewUiBinder, com.foo.web.FooView$1]) were not reprocessed as was expected. This is either a compiler bug or a Generator has legitimately stopped creating these types.


This is combined with:

Uncaught ReferenceError: Mg_g$ is not defined

in Chrome's console.

Seems like this is specific to uiBinder classes.






Ali Akhtar

unread,
May 14, 2016, 9:00:32 PM5/14/16
to GWT Users
Its happening for non-ui binder classes too, and i need restarts even on modification.

Thomas Broyer

unread,
May 15, 2016, 4:21:16 AM5/15/16
to GWT Users


On Sunday, May 15, 2016 at 1:32:47 AM UTC+2, Ali Akhtar wrote:
> You (or your tools) must be doing something wrong. Can you tell more about how you're launching SDM


I'm using IntelliJ. I have a GWT sdm run configuration in IntelliJ.

This is getting a bit ridiculous, I seem to be needing restarts even when I make changes to existing files.

E.g, I'm editing a file called FooView.java which is a uibinder view file.

As soon as I begin typing, I see this exception pop up in the SDM console:

java.nio.file.NoSuchFileException: /home/ali/foo/src/main/java/com/gevald/web/FooView.java___jb_old___

There are workarounds in the forum thread linked from the issue.
Reply all
Reply to author
Forward
0 new messages