Re: GWT into Spring Boot with remember-me is not working

2018-09-14 Thread Josep Llort Tella

I have also integrated GWT-SL but that not helped me to solve the issue ( 
here the link of this project in github 
https://github.com/ggeorgovassilis/gwt-sl ) 

-- 
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-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Why the GWT complier used so much memory?

2018-09-14 Thread Andrew Somerville
Good to know, I'm using Mojo's maven plugin, so that would explain the 
default of localWorkers = 4. 

On Friday, September 14, 2018 at 10:05:23 AM UTC-3, Thomas Broyer wrote:
>
>
>
> On Friday, September 14, 2018 at 2:25:44 PM UTC+2, Andrew Somerville wrote:
>>
>> To your point, regarding tuning the localWorkers parameter, I get 
>> significant speedup going from the default of 4 localWorkers down to 2. 
>> (i5-4460 Desktop CPU, 500 GB SSD and 32 GB of RAM). It doesn't matter what 
>> I set the heap limit to, the compilation appears to be memory bandwidth 
>> limited, or perhaps GC bandwidth limited. 
>>
>
> Note that from GWT's side the default for localWorkers actually is 1, it's 
> the gwt-maven-plugin(s) that use the number of CPUs of the machine as the 
> default value (and always pass an explicit -localWorkers parameter to GWT)
>

-- 
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-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: addWindowClosingHandler only working in IE

2018-09-14 Thread Frank
Indeed Thomas.

Only IE seems to be showing the message (together with its own message).

-- 
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-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Deferred Binding - Help!

2018-09-14 Thread Josselin Bardet
Hi

As far has I know (I might be wrong), the generators are executed during
the compilation of the web app. So I think you can't do that without
recompiling you app.

If you recompile your app, with all your plugins in your classpath, you can
implement a generator that will scan for Pet implementations and
instanciate a given class for exemple.

Ex (generated code):
public Pet newPet(Class clazz) {
if (clazz.getName().equals("pet.Cat") return new pet.Cat();
if (clazz.getName().equals("pet.Dog") return new pet.Dog();
return null;
}

Le ven. 14 sept. 2018 à 15:09, Matthew Bergshoeff <
matthew.bergsho...@gmail.com> a écrit :

>  Hi Everyone - I've been searching everywhere for a solution to this and
> haven't been able to resolve it. I don't think I've properly wrapped my
> head around the issue, so hoping someone could provide some guidance.
>
> I am trying to build a modular GWT application - by that I mean that there
> will be the core application, but it should support the addition of gwt
> modules ("plugins") without having to rebuild. This is being accomplished
> by updating parameters in the web.xml so that I can just stop the webapp,
> add a .jar file to the /lib directory, define the new .jar in the web.xml
> and restart the application. So far so good. The problem arises when trying
> to initialize/access the classes within the plugins.
>
> Let's imagine I had a PetStore application (classic example!). I have an
> interface called *Pet* that is implemented by some classic examples (Cat,
> Dog, Fish) in the core application. However, I want to be able to add a
> plugin for an exotic pet (Borneo Pygmy Elephant), and have the application
> (client-side) be able to load the class when a record comes up that refers
> to it. I am able to do this server-side using a URLClassLoader, but can't
> figure out how to use a Generator to instantiate all possible *Pet*
> implementations within a module.
>
> If I am going to implement a generator, should it be in the plugin or in
> the core application? I've found a few examples, but none seem to pinpoint
> exactly what I'm trying to do. Appreciate any help...
>
> --
> 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-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Deferred Binding - Help!

2018-09-14 Thread Thomas Broyer

On Friday, September 14, 2018 at 3:10:03 PM UTC+2, Matthew Bergshoeff wrote:
>
>  Hi Everyone - I've been searching everywhere for a solution to this and 
> haven't been able to resolve it. I don't think I've properly wrapped my 
> head around the issue, so hoping someone could provide some guidance.
>
> I am trying to build a modular GWT application - by that I mean that there 
> will be the core application, but it should support the addition of gwt 
> modules ("plugins") without having to rebuild. This is being accomplished 
> by updating parameters in the web.xml so that I can just stop the webapp, 
> add a .jar file to the /lib directory, define the new .jar in the web.xml 
> and restart the application. So far so good. The problem arises when trying 
> to initialize/access the classes within the plugins. 
>
> Let's imagine I had a PetStore application (classic example!). I have an 
> interface called *Pet* that is implemented by some classic examples (Cat, 
> Dog, Fish) in the core application. However, I want to be able to add a 
> plugin for an exotic pet (Borneo Pygmy Elephant), and have the application 
> (client-side) be able to load the class when a record comes up that refers 
> to it. I am able to do this server-side using a URLClassLoader, but can't 
> figure out how to use a Generator to instantiate all possible *Pet* 
> implementations within a module.
>
> If I am going to implement a generator, should it be in the plugin or in 
> the core application? I've found a few examples, but none seem to pinpoint 
> exactly what I'm trying to do. Appreciate any help...
>

What you're doing is put several totally distinct apps on a single page, 
and making them talk to each other.
Because they are totally distinct apps, their "initially-Java classes" are 
produced as different JS objects, obfuscated separately, etc.

Solutions:
 * think in terms of JS, not Java, and make the apps actually talk to each 
other (e.g. plugin "registers" into core); use JsInterop.
 * make a single app with GWT.runAsync() to split the payload, and 
configuration to enable/disable some code branches such that some 
GWT.runAsync() are never reached.

-- 
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-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Deferred Binding - Help!

2018-09-14 Thread Matthew Bergshoeff
 Hi Everyone - I've been searching everywhere for a solution to this and 
haven't been able to resolve it. I don't think I've properly wrapped my 
head around the issue, so hoping someone could provide some guidance.

I am trying to build a modular GWT application - by that I mean that there 
will be the core application, but it should support the addition of gwt 
modules ("plugins") without having to rebuild. This is being accomplished 
by updating parameters in the web.xml so that I can just stop the webapp, 
add a .jar file to the /lib directory, define the new .jar in the web.xml 
and restart the application. So far so good. The problem arises when trying 
to initialize/access the classes within the plugins. 

Let's imagine I had a PetStore application (classic example!). I have an 
interface called *Pet* that is implemented by some classic examples (Cat, 
Dog, Fish) in the core application. However, I want to be able to add a 
plugin for an exotic pet (Borneo Pygmy Elephant), and have the application 
(client-side) be able to load the class when a record comes up that refers 
to it. I am able to do this server-side using a URLClassLoader, but can't 
figure out how to use a Generator to instantiate all possible *Pet* 
implementations within a module.

If I am going to implement a generator, should it be in the plugin or in 
the core application? I've found a few examples, but none seem to pinpoint 
exactly what I'm trying to do. Appreciate any help...

-- 
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-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Why the GWT complier used so much memory?

2018-09-14 Thread Thomas Broyer


On Friday, September 14, 2018 at 2:25:44 PM UTC+2, Andrew Somerville wrote:
>
> To your point, regarding tuning the localWorkers parameter, I get 
> significant speedup going from the default of 4 localWorkers down to 2. 
> (i5-4460 Desktop CPU, 500 GB SSD and 32 GB of RAM). It doesn't matter what 
> I set the heap limit to, the compilation appears to be memory bandwidth 
> limited, or perhaps GC bandwidth limited. 
>

Note that from GWT's side the default for localWorkers actually is 1, it's 
the gwt-maven-plugin(s) that use the number of CPUs of the machine as the 
default value (and always pass an explicit -localWorkers parameter to GWT)

-- 
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-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: addWindowClosingHandler only working in IE

2018-09-14 Thread Thomas Broyer
Note that the actual message will be ignored by more and more browsers, 
which will only display a generic popup whenever the message is non-null 
(or not empty).

On Friday, September 14, 2018 at 11:03:39 AM UTC+2, Frank wrote:
>
> Okay
>
> Now I figured out how this works. You need to set a message to the event.
> Didn't figured this out reading the javadoc.
>
>
> Window.addWindowClosingHandler(event ->
> {
>if (Grid.hasUnsavedEdits()) 
> event.setMessage(I18NMessages.getMessage(5107));
> });
>
>

-- 
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-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Why the GWT complier used so much memory?

2018-09-14 Thread Andrew Somerville
To your point, regarding tuning the localWorkers parameter, I get 
significant speedup going from the default of 4 localWorkers down to 2. 
(i5-4460 Desktop CPU, 500 GB SSD and 32 GB of RAM). It doesn't matter what 
I set the heap limit to, the compilation appears to be memory bandwidth 
limited, or perhaps GC bandwidth limited. 

My times are roughly 300 s for 4 workers, 90 s for 2 and 100 s for 1. When 
compiling with 4 local workers, my system will lock up for a second here 
and there during compilation, the mouse will freeze, other applications 
will jitter. The system-wide jitter strongly suggests memory bandwidth 
saturation and poor cache performance on the part of the GWT compiler. I 
get no jitter with 2 localWorkers. 

My project code base is about 250 k lines, about 1/3-1/2 of that is front 
end GWT code. 

On Sunday, September 9, 2018 at 1:15:54 PM UTC-3, Jens wrote:
>
>
> Are there someone working on the optimization of the GWT compiler, it is 
>> too slow for us
>>
>
> No. 
>
> You can use -localWorkers parameter to adjust how many permutations should 
> be compiled in parallel. The higher the number the more memory is needed. 
> If you use -localWorkers 1 then permutations are compiled one after the 
> other which requires the least amount of memory. You can also use -Xmx JVM 
> parameter to limit the amount of heap used, although this might result in 
> more garbage collects and thus longer compile times.
>
> The only other option is to split a large app into smaller apps.
>
> -- J.
>

-- 
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-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: addWindowClosingHandler only working in IE

2018-09-14 Thread Frank
Okay

Now I figured out how this works. You need to set a message to the event.
Didn't figured this out reading the javadoc.


Window.addWindowClosingHandler(event ->
{
   if (Grid.hasUnsavedEdits()) event.setMessage(I18NMessages.getMessage(5107));
});

-- 
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-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: addWindowClosingHandler only working in IE

2018-09-14 Thread Frank
I am thinking the problem is in this below code.
But I have not idea how fix this...





Code is from com.google.gwt.user.client.Window

/**

 * Adds a {@link ResizeEvent} handler.
 *
 * @param handler the handler
 * @return returns the handler registration
 */
public static HandlerRegistration addResizeHandler(ResizeHandler handler) {
  maybeInitializeCloseHandlers();
  maybeInitializeResizeHandlers();
  return addHandler(ResizeEvent.getType(), handler);
}


private static void maybeInitializeCloseHandlers() {
  if (GWT.isClient() && !closeHandlersInitialized) {
impl.initWindowCloseHandler();
closeHandlersInitialized = true;
  }
}



I also add a bunch of Window resize handlers. And in addResizeHandler for some 
reason maybeInitializeCloseHandlers() is called.
Now when adding a closehandler closeHandlerInitialized is true And thus the 
close handler is not added





-- 
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-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


addWindowClosingHandler only working in IE

2018-09-14 Thread Frank
GWT 2.8.2

In below code neither of the Window.alerts gets triggered in Chrome, FF and 
Edge.
This does not work neither while in SuperDevMode, or when fully compiled 
and deployed.

Only works in IE



The "go" alert is displayed by all browsers so I am sure the code was 
executed...


Any ideas anyone ?
Should I detect browser closing/tab closing/navigating to another URL in 
another way in these other browsers ?

I also tried using the deprecated Window.addWindowCloseListener. This 
actually does work in Edge (while the new handlers don't work in Edge). But 
not in Chrome and FF.



Window.addWindowClosingHandler(event ->
{
   Window.alert("onWindowClosing");
});

Window.addCloseHandler(new CloseHandler()
{
   @Override public void onClose(CloseEvent event)
   {
  Window.alert("onWindowClosed");
   }
});


Window.alert("go");





-- 
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-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.