Sunday, June 30, 2013

Re: Firing a click event on a CellTable

Hey, Chris

There are surely click event on the cells, but instead of handlers there are field updaters. You may take the example of the Clickable Cell where if you click on the cell its onBrowseEvent gets called which in turn calls the field updater. So the only thing you have to do is override the functionality of the field updater and associate it with the Column of the cell table. 

For your case i think ClickableCell can work as it is or may be you may have to override its functionality to handle Cell Preview Events.

Please revert if you find the info helpful or in case of any issues.

On Friday, 31 May 2013 11:34:10 UTC+5:30, Chris wrote:
Hello,
I am interested in using GWTTestCase to test some features of a view that extends CellTable. In my implementation, I have added a CellPreviewHandler that I would like to check by firing a click event on a cell of the CellTable.  I have tried several methods to no avail. 

My most recent attempt follows:

CellTable<Artist> cellTable = (CellTable<Artist>) view.getDataView();
NativeEvent event = Document.get().createClickEvent(0, 0, 0, 20, 30, false, false, false, false);
DomEvent.fireNativeEvent(event, cellTable);

This does not work.  The CellPreviewHandler doesn't get called.

This has also been tried:

CellTable<Artist> cellTable = (CellTable<Artist>) view.getDataView();
NativeEvent event = Document.get().createClickEvent(0, 0, 0, 0, 0, false, false, false, false);
TableCellElement element = cellTable.getRowElement(2).getCells().getItem(1);
element.dispatchEvent(event);

Same problem as the former. 

TL;DR
Does anyone have insight as to how I can simulate a click event that will fire a CellPreviewEvent on a CellTable for a desired Cell?

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

Re: IE11 user agent = Firefox

Done.

On Saturday, June 29, 2013 2:03:04 PM UTC+2, Jens wrote:
You should create an issue for it. Currently GWT only checks for "MSIE" in the user agent to identify IE browsers. This needs to be changed then.

-- J.

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

Re: gwt maven archetype - When to run Package


On Saturday, June 29, 2013 1:35:48 AM UTC+2, Kathiravan Tamilvanan wrote:
Hi,
 I am running the steps described here https://github.com/tbroyer/gwt-maven-archetypes. But the compiled client code (nocache.js) is not deployed to the server when i run the tomcat:run. I had to run the mvn package. Is there any way to automate this step. 
 I have also tried tomcat:run-war but no luck.
 This is confusing to know whether the compiled client code in the server war folder is current or not.

The steps describe how to run DevMode, so they disable GWT compilation; and tomcat:run has a bug with overlay wars: https://issues.apache.org/jira/browse/MTOMCAT-148

I haven't tried it but "mvn tomcat7:run-war" should work, if you disable the dev profile. 

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

Re: gwt-maven-archetype modular-webapp giving 404 Error


On Friday, June 28, 2013 8:19:23 PM UTC+2, Kathiravan Tamilvanan wrote:
Hmm...I am little confused about the client-only modules. I have few GWT Client modules (mainly UI widgets) and i want to include them in my project. And if i do source package, i dont have to inherit the module in the gwt.xml, Am i right?

Here's how it goes:
The gwt-lib and gwt-app packagings call gwt:generate-module in the generate-resources phase. gwt:generate-module picks all META-INF/gwt/mainModule files which should contain module names, generates an <inherit/> for each of them and merges them with whatever is in src/main/Module.gwt.xml to generate the final module whose name is given in the plugin's configuration.
gwt-lib also calls gwt:generate-module-metadata in the generate-resources phase to generate the META-INF/gwt/mainModule file.
gwt-lib also indeed packages the sources within the JAR; it's only meant for client-only code.

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

Saturday, June 29, 2013

GWT and Flex

With HTML5 becoming more and more powerful a lof of people are wondering how to integrate their (legacy)Flex apps with HTML5(Sometimes is just not possible to rewrite everything). This is how Flash4j can help you solve the problem.

http://emitrom.com/blog/flex-gwt

Find a real world demo here .

http://emitrom.github.io/Flash4j/flex-gwt/

Cheers,

Alain

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

Re: GWT plugin support for Eclipse Kepler (4.3)

Has anyone noticed if this bug still exists in the released version of Kepler?

https://code.google.com/p/google-plugin-for-eclipse/issues/detail?id=100

On Friday, June 28, 2013 2:43:10 PM UTC-7, Jens wrote:
A workmate has installed Eclipse 4.3 and currently uses GPE for Eclipse 4.2 (using the 4.2 update site). He hasn't noticed an issue yet.

-- J.

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

Re: Memory growth in GWT Compiler

Should GWT be calling System.gc() by default after each permutation compile so that the heap does not grow? (Right now it does that only with the -Dgwt.memory.usage option) 

GWT calls System.gc() multiple times in order to give you more accurate memory statistics. GWT just wants to make sure that when it prints out stats for permutation 2 that there is no garbage left in memory from permutation 1 as this would distort the statistic.

Other than that GWT should not call the garbage collector after each permutation as it only costs additional time and doesn't buy you a lot. Sure your first graph without System.gc() does not look that uniform like the second graph, but it doesn't mean that you need more memory for compilation if you dont call System.gc(). 
What your first graph does not show is that the JVM will garbage collect on its own all the garbage left in memory from the previous permutations if there is not enough space anymore in the heap. But in your example there is enough heap and thus the JVM is not forced to clean up more memory than it absolutely needs to.
Before a JVM needs to throw an OutOfMemoryException if will absolutely try everything to free up as much memory as possible. 

Try to run your compilation with 2GB heap and without memory dumping. 2GB is slightly below your highest peak in the first graph. Then compare the result to your first graph which has used 3GB heap. I would bet that compilation still works and you will see a slightly different graph at the end of the compilation because the JVM is forced to do a bit more garbage collection on its own.

-- J.

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

Re: Firing a click event on a CellTable

similar case:

import com.google.gwt.dom.client.Document;
import com.google.gwt.dom.client.NativeEvent;
import com.google.gwt.event.dom.client.ContextMenuEvent;
import com.google.gwt.event.dom.client.ContextMenuHandler;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Event;

.....

protected CellList contactList;

....

    contactList.addDomHandler(new ContextMenuHandler() {
        @Override
        public void onContextMenu(ContextMenuEvent evt) {
        evt.preventDefault();
        final NativeEvent event = evt.getNativeEvent();

        final NativeEvent newEvent = Document.get().createClickEvent(-1,
            event.getScreenX(), event.getScreenY(), event.getClientX(), event.getClientY(),
            event.getCtrlKey(), event.getAltKey(), event.getShiftKey(), event.getMetaKey());

        DOM.eventGetTarget(Event.as(event)).dispatchEvent(newEvent);
        }

    }, ContextMenuEvent.getType());

...
But :  contactList.getElement().dispatchEvent(newEvent);
instead of : DOM.eventGetTarget(Event.as(event)).dispatchEvent(newEvent);
- not working...

So, i think, you correctly create native event, but you send them to incorrect target.


пятница, 31 мая 2013 г., 12:04:10 UTC+6 пользователь Chris написал:
Hello,
I am interested in using GWTTestCase to test some features of a view that extends CellTable. In my implementation, I have added a CellPreviewHandler that I would like to check by firing a click event on a cell of the CellTable.  I have tried several methods to no avail. 

My most recent attempt follows:

CellTable<Artist> cellTable = (CellTable<Artist>) view.getDataView();
NativeEvent event = Document.get().createClickEvent(0, 0, 0, 20, 30, false, false, false, false);
DomEvent.fireNativeEvent(event, cellTable);

This does not work.  The CellPreviewHandler doesn't get called.

This has also been tried:

CellTable<Artist> cellTable = (CellTable<Artist>) view.getDataView();
NativeEvent event = Document.get().createClickEvent(0, 0, 0, 0, 0, false, false, false, false);
TableCellElement element = cellTable.getRowElement(2).getCells().getItem(1);
element.dispatchEvent(event);

Same problem as the former. 

TL;DR
Does anyone have insight as to how I can simulate a click event that will fire a CellPreviewEvent on a CellTable for a desired Cell?

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

Re: RpcTokenImplementation

RpcToken is an interface and thus GWT would generate serializers for all possible implementations of that interface (because it can not know at compile time which implementation of RpcToken will be send between client <-> server. It must support all implementations it can find on classpath).

Currently GWT only provides a single implementation (XsrfToken), so it doesn't really matter if you use this annotation or not. If you write your own implementation of RpcToken and/or GWT would provide more than one implementation, then you could use this annotation to tell GWT which implementation you actually use. 

This annotation exists pretty much for the same reason you are using concrete collection implementations like ArrayList instead of the List interface in GWT-RPC serializable classes: Reduce the amount of generated code => reduce the size of your final JavaScript code.

-- J.

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

Re: IE11 user agent = Firefox

You should create an issue for it. Currently GWT only checks for "MSIE" in the user agent to identify IE browsers. This needs to be changed then.

-- J.

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

IE11 user agent = Firefox

The IE11 (Windows 8.1 preview) user agent is

Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; Touch; rv:11.0) like Gecko

My GWT app loads the Firefox permutation!
Everything still works as expected  except the IE clipboard management ($wnd.clipboardData).
Looks like I will have to create a define-property in my *gwt.xml file.

I haven't not tested other GWT apps yet.

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

Friday, June 28, 2013

RpcTokenImplementation



Tip: To specify which RpcToken implementation GWT should generate serializers for use @RpcTokenImplementation annotation. 


I can not understand this tip. Should I use this annotation -  @RpcTokenImplementation for my POJO? Please clarify it.

Thanks,

David

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

gwt maven archetype - When to run Package

Hi,
 I am running the steps described here https://github.com/tbroyer/gwt-maven-archetypes. But the compiled client code (nocache.js) is not deployed to the server when i run the tomcat:run. I had to run the mvn package. Is there any way to automate this step. 
 I have also tried tomcat:run-war but no luck.
 This is confusing to know whether the compiled client code in the server war folder is current or not.

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

Re: GWTTestCase and CORS

It appears that older BrowserVersion identifiers have been removed from 2.11 and above and this breaks the GWTTestCase configuration code.  I think it will need a patch to make this work.

Ed


On Friday, June 28, 2013 2:23:27 PM UTC-7, emurmur wrote:
I added htmlunit 2.12 to the run configuration's classpath, but my test still fails on an origin error.

Jun 28, 2013 1:57:03 PM com.gargoylesoftware.htmlunit.javascript.StrictErrorReporter runtimeError
SEVERE: runtimeError: message=[Access to restricted URI denied] sourceName=[injected script] line=[85] lineSource=[null] lineOffset=[0]

So now I'm wondering if htmlunit is configured to emulate a non-CORS browser.  I'll look more into that;  If there are any htmlunit gurus out there that know exactly how to do that, it would be great.  Thanks.

Ed


On Friday, June 28, 2013 12:45:15 PM UTC-7, emurmur wrote:
Thank you Thomas.  It looks like htmlunit 2.11 is the first version with CORS support.  It should also have the GWT patches so I'll try your suggestion with that.  I'll also take a look at phantomjs.  Thanks again.

Ed

On Friday, June 28, 2013 1:12:18 AM UTC-7, Thomas Broyer wrote:

On Friday, June 28, 2013 2:22:36 AM UTC+2, emurmur wrote:
I'm writing a test case that involves a cross-origin call and htmlunit chokes on it.  The code works in real browsers.  Recent versions of htmlunit seem to support CORS (based on commit comments).  How do I find what version of htmlunit is bundled with GWT and is there a way to upgrade it?  Thanks.

All the dependencies can be found in http://google-web-toolkit.googlecode.com/svn/tools/ (see http://www.gwtproject.org/makinggwtbetter.html#compiling), and as you can see in https://gwt.googlesource.com/gwt/+/master/dev/build.xml, GWT currently depends on HtmlUnit 2.9 (and as you can see in http://google-web-toolkit.googlecode.com/svn/tools/lib/htmlunit/htmlunit-2.9/ it's actually a patched version).
Apparently, we could update to 2.10 with no breakage (and 2.10 includes all patches applied to the 2.9 for GWT), at least GWT compiles against 2.10 but I haven't heavily tested it (yet). I haven't tried with more recent versions.
I think you can try it out by putting HtmlUnit 2.10 (and its dependencies) before gwt-dev.jar in your classpath (i.e. without rebuilding gwt-dev).
You could also try using PhantomJS instead of HtmlUnit: https://github.com/neothemachine/gwt-phantomjs-junit-runstyle

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

Re: GWT plugin support for Eclipse Kepler (4.3)

A workmate has installed Eclipse 4.3 and currently uses GPE for Eclipse 4.2 (using the 4.2 update site). He hasn't noticed an issue yet.

-- J.

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

Re: GWT plugin support for Eclipse Kepler (4.3)

Thanks.  I have gone and created a bug on the GPE issue tracker.  https://code.google.com/p/google-plugin-for-eclipse/issues/detail?id=221

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

Re: GWTTestCase and CORS

I added htmlunit 2.12 to the run configuration's classpath, but my test still fails on an origin error.

Jun 28, 2013 1:57:03 PM com.gargoylesoftware.htmlunit.javascript.StrictErrorReporter runtimeError
SEVERE: runtimeError: message=[Access to restricted URI denied] sourceName=[injected script] line=[85] lineSource=[null] lineOffset=[0]

So now I'm wondering if htmlunit is configured to emulate a non-CORS browser.  I'll look more into that;  If there are any htmlunit gurus out there that know exactly how to do that, it would be great.  Thanks.

Ed


On Friday, June 28, 2013 12:45:15 PM UTC-7, emurmur wrote:
Thank you Thomas.  It looks like htmlunit 2.11 is the first version with CORS support.  It should also have the GWT patches so I'll try your suggestion with that.  I'll also take a look at phantomjs.  Thanks again.

Ed

On Friday, June 28, 2013 1:12:18 AM UTC-7, Thomas Broyer wrote:

On Friday, June 28, 2013 2:22:36 AM UTC+2, emurmur wrote:
I'm writing a test case that involves a cross-origin call and htmlunit chokes on it.  The code works in real browsers.  Recent versions of htmlunit seem to support CORS (based on commit comments).  How do I find what version of htmlunit is bundled with GWT and is there a way to upgrade it?  Thanks.

All the dependencies can be found in http://google-web-toolkit.googlecode.com/svn/tools/ (see http://www.gwtproject.org/makinggwtbetter.html#compiling), and as you can see in https://gwt.googlesource.com/gwt/+/master/dev/build.xml, GWT currently depends on HtmlUnit 2.9 (and as you can see in http://google-web-toolkit.googlecode.com/svn/tools/lib/htmlunit/htmlunit-2.9/ it's actually a patched version).
Apparently, we could update to 2.10 with no breakage (and 2.10 includes all patches applied to the 2.9 for GWT), at least GWT compiles against 2.10 but I haven't heavily tested it (yet). I haven't tried with more recent versions.
I think you can try it out by putting HtmlUnit 2.10 (and its dependencies) before gwt-dev.jar in your classpath (i.e. without rebuilding gwt-dev).
You could also try using PhantomJS instead of HtmlUnit: https://github.com/neothemachine/gwt-phantomjs-junit-runstyle

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

Re: GWTTestCase and CORS

Thank you Thomas.  It looks like htmlunit 2.11 is the first version with CORS support.  It should also have the GWT patches so I'll try your suggestion with that.  I'll also take a look at phantomjs.  Thanks again.

Ed

On Friday, June 28, 2013 1:12:18 AM UTC-7, Thomas Broyer wrote:

On Friday, June 28, 2013 2:22:36 AM UTC+2, emurmur wrote:
I'm writing a test case that involves a cross-origin call and htmlunit chokes on it.  The code works in real browsers.  Recent versions of htmlunit seem to support CORS (based on commit comments).  How do I find what version of htmlunit is bundled with GWT and is there a way to upgrade it?  Thanks.

All the dependencies can be found in http://google-web-toolkit.googlecode.com/svn/tools/ (see http://www.gwtproject.org/makinggwtbetter.html#compiling), and as you can see in https://gwt.googlesource.com/gwt/+/master/dev/build.xml, GWT currently depends on HtmlUnit 2.9 (and as you can see in http://google-web-toolkit.googlecode.com/svn/tools/lib/htmlunit/htmlunit-2.9/ it's actually a patched version).
Apparently, we could update to 2.10 with no breakage (and 2.10 includes all patches applied to the 2.9 for GWT), at least GWT compiles against 2.10 but I haven't heavily tested it (yet). I haven't tried with more recent versions.
I think you can try it out by putting HtmlUnit 2.10 (and its dependencies) before gwt-dev.jar in your classpath (i.e. without rebuilding gwt-dev).
You could also try using PhantomJS instead of HtmlUnit: https://github.com/neothemachine/gwt-phantomjs-junit-runstyle

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

Re: gwt-maven-archetype modular-webapp giving 404 Error

Hmm...I am little confused about the client-only modules. I have few GWT Client modules (mainly UI widgets) and i want to include them in my project. And if i do source package, i dont have to inherit the module in the gwt.xml, Am i right?

On Friday, June 28, 2013 1:02:30 AM UTC-7, Thomas Broyer wrote:


On Friday, June 28, 2013 1:35:36 AM UTC+2, Kathiravan Tamilvanan wrote:
The error was because of the port being used by another application. This all works beautifully with multiple shared components with web , client and service layer modules. 

What is right way to add third party gwt modules in the client code. Will it be more like the shared module with classifier sources dependency.

It depends whether they are "client only" modules or "shared" modules. For "client-only" I'd rather package the sources in the JAR.
For share modules that you want to reuse and/or that have themselves dependencies on other shared modules, I'd actually do a "client only" module (see the image in https://plus.google.com/113945685385052458154/posts/RDrK7ukVFqJ) to makes things easier for users of the module(s).

Thanks Thomas for the wonderful plugin.

If you're talking about the CodeHaus' gwt-maven-plugin, I didn't do much besides releasing it. Most of the work has been done by others (Nicolas De Loof, Olivier Lamy, etc.)
The new gwt-maven-plugin (currently in net.ltgt.gwt.maven in alpha) is far from done but should make things easier for everyone. Once I have a gwt:run goal ready (and ability to fork the compiler in another process), I'll update the archetypes to use it instead of the CodeHaus' gwt-maven-plugin.

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

Re: Session Listener

If you're still looking to hook into your web application's start/stop lifecycle, you can use a ServletContextListener to do so.


On Wednesday, June 26, 2013 10:44:15 AM UTC-5, Magallo wrote:
Ok, it works! Thanks!

My mistake was to think that the sessionCreated event was created when the application started. Shame on me! The sessionCreated  is called instead the first time the application interacts with the server. Another wrong assumption by me was that I thought the sessionDestroyed was called when the user closes the web page or navigate to another web site. Wrong! The sessionDestroyed is called after some time of non interaction between the client and the server, no matter if the web page is still open or has been closed. Another time shame on me! I just decided to describe that here to share my discovery.

Cheers.

On Friday, June 21, 2013 11:35:58 PM UTC+2, Valavanur Man wrote:
We resolved the issue by added session listener to web.xml under Web-inf, as described above. We created the build.xml from GWT and referred to the web.xml.
<target name="war" depends="javac, gwtc, libs">
<delete file="${war.name}" />
      <war basedir="war" destfile="${war.name}" webxml="war/WEB-INF/web.xml"  />
      <jar destfile="${war.name}" basedir="war" duplicate="preserve" />
<!-- clean up -->
<delete dir="@dot" />
</target>


We use ant to build the war file outside eclipse to build the project.

Hope this helps.

Thanks,
GWTFan

On Friday, June 21, 2013 12:40:21 AM UTC-7, Magallo wrote:
Hi Valavanur, I know your question is a little outdated, but I have the same necessity and I don't knbow how to do. I mean, I tried in my GWT Explise project, to add a Session Listener as explained by loladi but it seems it doesn't work. Obviously I alse added the <listerner> section in my web.xml file, but it seems my listener is just ignored and does not execute the code. I tried adding some brerakpoints in the sessionCreated and sessionDestroyed methods, but simply the execution never stops at these points. What am I missing?

Thanks.

On Monday, June 2, 2008 1:16:11 AM UTC+2, Valavanur Man wrote:
I would like to implement Session Listener to log the logins and
logouts. Would like to do some housekeeping upon logout.

How do I register the class implementing SessionListener in GWT. How
do I modify the WEB.xml so that it works both in Hosted mode and as
well as when I deploy the war file.

Can you provide some instructions/help.

Thanks,
GWT Fan

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

Re: Caused by: java.io.IOException: An existing connection was forcibly closed by the remote host - while writing to the csv file

Not really, any implementation is going to be highly dependant on how your backend environment is set up and what projects you can or cannot incorporate.

Here's a decent explanation of how you generally want to approach a situation like this though. 
https://devcenter.heroku.com/articles/background-jobs-queueing

On Monday, June 24, 2013 3:43:40 PM UTC-5, fedex wrote:
Can anyone please suggest how to resolve this exception. I implemented a code which writes huge data to the csv file. I don't know why the connection is getting out.



org.mortbay.jetty.EofException
org.mortbay.jetty.EofException
org.mortbay.jetty.HttpConnection$Output@f09f9a
at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:760)
at org.mortbay.jetty.AbstractGenerator$Output.flush(AbstractGenerator.java:566)
at org.mortbay.jetty.HttpConnection$Output.flush(HttpConnection.java:911)
at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:297)
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)
at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
at java.io.BufferedWriter.flush(BufferedWriter.java:254)
at com.fedex.forecast.datamart.server.util.CSVFileDownloadServlet.writeCsv(CSVFileDownloadServlet.java:180)
at com.fedex.forecast.datamart.server.util.CSVFileDownloadServlet.doPost(CSVFileDownloadServlet.java:75)
at com.fedex.forecast.datamart.server.util.CSVFileDownloadServlet.doGet(CSVFileDownloadServlet.java:38)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:829)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
Caused by: java.io.IOException: An existing connection was forcibly closed by the remote host
at sun.nio.ch.SocketDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:51)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:94)
at sun.nio.ch.IOUtil.write(IOUtil.java:51)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:450)
at org.mortbay.io.nio.ChannelEndPoint.flush(ChannelEndPoint.java:160)
at org.mortbay.io.nio.SelectChannelEndPoint.flush(SelectChannelEndPoint.java:207)
at org.mortbay.jetty.HttpGenerator.flush(HttpGenerator.java:693)
... 28 more

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

How to disable text clear when i hit "Esc" in SuggestBox

Hi All,
 
When i hit "Esc" key in suggest box what ever the text i typed is clearing. I don't want to suggestbox to clear the text, i want hide the popup menu.
 
appricate your help.
 
Thanks
Dayananda B  V

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

Re: Style GWT-Tree to a non hierarchal Layout

Well its kind of hardcoded inside Tree/TreeItem.

You can subclass TreeItem and override TreeItem.insertItem(int beforeIndex, TreeItem item) to eliminate the margin. The margin is currently set in TreeItem.insertItem() line 575.

The 3px padding seems to be set by the TreeItem as base padding and then Tree increases left/right padding depending on your TreeItem image width. See TreeItem.TreeItemImpl.initializeClonableElements(), Tree.showLeafImage(TreeItem item) and Tree.setImages(ImageAdapter images, boolean useLeafImages). Not sure if you can change this behavior to your needs without copying the whole Tree/TreeItem class into your project so you can freely modify them.


-- J.

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

Memory growth in GWT Compiler

Hi,

The following is the memory graph from JVisualVM of the GWT compiler when compiling my modules.









I was trying to understand the memory consumption at different stages of the compiler using the VM argument - -Dgwt.memory.usage.
The following is the JVisualVM graph and the console output when the compiler is run with the same.









Will print mem usage

Compiling module XXX

[CompStateBuilt]         320804120 heap,   21314504 nonheap,  342118624 total,      23.21s

[AstOnly]                       604512808 heap,   42120632 nonheap,  646633440 total,      38.71s

   Compiling 6 permutations

      Compiling permutation 0...

[makeSoycArtifactsS]  754570192 heap,   50642360 nonheap,  805212552 total,     103.22s

      Compiling permutation 1...

[makeSoycArtifactsS]  737860952 heap,   51196480 nonheap,  789057432 total,      55.79s

      Compiling permutation 2...

[makeSoycArtifactsS]  737125848 heap,   51479208 nonheap,  788605056 total,      56.86s

      Compiling permutation 3...

[makeSoycArtifactsS]  736970808 heap,   51584272 nonheap,  788555080 total,      57.11s

      Compiling permutation 4...

[makeSoycArtifactsS]  737455120 heap,   51679488 nonheap,  789134608 total,      55.08s

      Compiling permutation 5...

[makeSoycArtifactsS]  737228448 heap,   51688424 nonheap,  788916872 total,      54.64s

   Compile of permutations succeeded

Linking into xxxxxxx

   Link succeeded

   Compilation succeeded -- 498.726s


As you can see, the graph is different when run with the -Dgwt.memory.usage option. When this argument is specified,  at the end of each permutation System.gc() gets called 4 times by com.google.gwt.dev.util.Memory.maybeDumpMemory() and then prints the memory statistics in the console[makeSoycArtifactsS] . Because of these garbage collection calls, the heap size gets reduced to around 750 MB. Basically during each permutation compile, the memory goes up while building the permutation and goes to a low while printing the output.


Now, if you see the first graph, which is obtained without this option, the heap size does not come down after each permutation compile, so the overall memory required goes up for the last 2/3 permutations(There is a difference of ~450MB) .


I also looked at what is causing the memory to jump during each permutation compilation by taking a heap dump at one of the peaks and comparing it to the heapdump at the AstOnly stage. The comparison showed that most of the memory is taken up by HashMap.Entry objects which contain JMethod,JField etc.. Most of these HashMaps are referenced by com.google.gwt.dev.jjs.impl.ControlFlowAnalyzer.RescueVisitor


I have the following questions

  • Should GWT be calling System.gc() by default after each permutation compile so that the heap does not grow? (Right now it does that only with the -Dgwt.memory.usage option) 
  • The memory growth due to RescueVisitor, can this be due to including modules which are not required? Is there a way to find out the classes that are pruned by the compiler. Can there be any other optimization we can do to reduce this memory growth?
Right now there are only 20 modules in my application, that number is going to grow significantly going ahead and that's the reason we are doing this analysis to understand what can be done to reduce this memory growth.

Thanks,
Ranjith




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

Style GWT-Tree to a non hierarchal Layout

Hi together, 

I found a lot of threads to this problem but it seems there is no solution. 

But maybe somone of you have a fix for my problem. 

We use a tree for our navigation. So there ist not so much space for the hirachal layout of the tree. 

It is possible to remove this? 

With firebug I get this code:: 


So I must remove the padding with 3px 3px 3px 23px and the margin with 16px. But I can't get the point where to do this. 

Maybe somone of you can help me? 

Thanks in advance 

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

Re: Attach element to separate doc (IE)

Hi,

That is because creation of elements is done through Document.get() which always returns the document that was used to load the application.

I don't think there is a solution right now, except for just starting another GWT application in the window. It could be the same one, but with a history token to move it to the right location in the application.

David

On Fri, Jun 28, 2013 at 10:44 AM, Ulas <ulas.albayrak@gmail.com> wrote:
I recently ran into a problem that I just can't seem to solve. The problem is Internet Explorer-specific, none of the other browsers I have tried this in shows the same behavior.

What I'm trying to do is the following:
  1. Create a new window (in JSNI)
  2. Cast the new window's body element to GWT BodyElement
  3. Create a GWT LayoutPanel
  4. Attach the LayoutPanel to the newly created window's BodyElement.
When I do this in IE I get DOM Exception: HIERARCHY_REQUEST_ERR (3). I (think) this problem is due to the fact that IE doesn't allow elements created in one document to be attached to another.

Currently I'm drawing blanks on how solve this problem. Any thoughts or hints is much appreciated.

Thanks!

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

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

Attach element to separate doc (IE)

I recently ran into a problem that I just can't seem to solve. The problem is Internet Explorer-specific, none of the other browsers I have tried this in shows the same behavior.

What I'm trying to do is the following:
  1. Create a new window (in JSNI)
  2. Cast the new window's body element to GWT BodyElement
  3. Create a GWT LayoutPanel
  4. Attach the LayoutPanel to the newly created window's BodyElement.
When I do this in IE I get DOM Exception: HIERARCHY_REQUEST_ERR (3). I (think) this problem is due to the fact that IE doesn't allow elements created in one document to be attached to another.

Currently I'm drawing blanks on how solve this problem. Any thoughts or hints is much appreciated.

Thanks!

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

Re: GWTTestCase and CORS


On Friday, June 28, 2013 2:22:36 AM UTC+2, emurmur wrote:
I'm writing a test case that involves a cross-origin call and htmlunit chokes on it.  The code works in real browsers.  Recent versions of htmlunit seem to support CORS (based on commit comments).  How do I find what version of htmlunit is bundled with GWT and is there a way to upgrade it?  Thanks.

All the dependencies can be found in http://google-web-toolkit.googlecode.com/svn/tools/ (see http://www.gwtproject.org/makinggwtbetter.html#compiling), and as you can see in https://gwt.googlesource.com/gwt/+/master/dev/build.xml, GWT currently depends on HtmlUnit 2.9 (and as you can see in http://google-web-toolkit.googlecode.com/svn/tools/lib/htmlunit/htmlunit-2.9/ it's actually a patched version).
Apparently, we could update to 2.10 with no breakage (and 2.10 includes all patches applied to the 2.9 for GWT), at least GWT compiles against 2.10 but I haven't heavily tested it (yet). I haven't tried with more recent versions.
I think you can try it out by putting HtmlUnit 2.10 (and its dependencies) before gwt-dev.jar in your classpath (i.e. without rebuilding gwt-dev).
You could also try using PhantomJS instead of HtmlUnit: https://github.com/neothemachine/gwt-phantomjs-junit-runstyle

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

Re: gwt-maven-archetype modular-webapp giving 404 Error



On Friday, June 28, 2013 1:35:36 AM UTC+2, Kathiravan Tamilvanan wrote:
The error was because of the port being used by another application. This all works beautifully with multiple shared components with web , client and service layer modules. 

What is right way to add third party gwt modules in the client code. Will it be more like the shared module with classifier sources dependency.

It depends whether they are "client only" modules or "shared" modules. For "client-only" I'd rather package the sources in the JAR.
For share modules that you want to reuse and/or that have themselves dependencies on other shared modules, I'd actually do a "client only" module (see the image in https://plus.google.com/113945685385052458154/posts/RDrK7ukVFqJ) to makes things easier for users of the module(s).

Thanks Thomas for the wonderful plugin.

If you're talking about the CodeHaus' gwt-maven-plugin, I didn't do much besides releasing it. Most of the work has been done by others (Nicolas De Loof, Olivier Lamy, etc.)
The new gwt-maven-plugin (currently in net.ltgt.gwt.maven in alpha) is far from done but should make things easier for everyone. Once I have a gwt:run goal ready (and ability to fork the compiler in another process), I'll update the archetypes to use it instead of the CodeHaus' gwt-maven-plugin.

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

Thursday, June 27, 2013

Nick Cannon, demetria lovato, and 4 others have Tweets for you

     
gwt,
Here's what's trending on Twitter this week.
  gwt
     

Nick Cannon @NickCannon

NickCannon.com: it's like that time @kanyewest was on #WIldnOut and slayed... ht.ly/2xQlyk

24 Jun

The NCredible Hulk

it's like that time @kanyewest was on #WIldnOut and slayed the entire team…

Nick Cannon @NickCannon

PWD performing on the #NEWat2 stage! It's a party #powerhouse13 snapwidget.com/view/?id=48422… via @snapwidget

23 Jun

power_106's photo on SnapWidget

PWD performing on the #NEWat2 stage! It's a party #powerhouse13

demetria lovato @ddlovato

I'm now on Keek!! Come follow meeeee!!! keek.com/ddlovato keek.com/!4573cab

21 Jun

I'm now on Keek!! Come follow meeeee!

Login or sign up to view Kred details and vote on this user. Gender: Female | Age: 20 | Views:

Wild N Out Battle @WildNOutBattle

Pure Blood @KevinHart4real or New Blood @ConceitedNYC ?! Make sure to catch Wildest Moments tonight with @NickCannon pic.twitter.com/zVTzqXdfe6

25 Jun

1

Retweet

wnogirls @wnogirls

ǥ @NickCannon presents #WildNOut | Wildest Moments | TONIGHT on @MTV2 11/10c | on.mtv.com/12gJPjH #WNOgirls RT

25 Jun

1

Retweet

MTV2 @MTV2

Tonight 11/10c: @NickCannon will be introducing the new cast, plus counting down #WildNOut's #WildestMoments

25 Jun

1

Retweet

Timothy DeLaGhetto @Traphik

Tune in tonight! RT "@MTV2: Tonight 11/10c: @NickCannon will be introducing the new cast, plus counting down #WildNOut's #WildestMoments"

25 Jun

1

Retweet

Don't miss out. Stay up to date on what's happening.
Go to Twitter