java.util.Date clientside incorrect timezone

2014-11-06 Thread Stepan
hello everyone!

I have a strange problem with dates. when i work in dev mode all is ok, but 
when i work in web mode i have problems on client side. 

i have this code on the client side(App gwt + gxt). 

private static Logger log = Logger.getLogger(DateUtils);
.
log.log(Level.INFO, to +   + from);
return (int) ((to.getTime() - from.getTime()) / MILLIS_IN_DAY);

This code write in chrome console when i  am use two dates:

Thu Nov 06 14:48:34 GMT+300 2014 DateUtils

INFO: Fri Jan 09 00:00:00 GMT+400 2015 Tue Jan 06 00:00:00 GMT+300 2015 


in Russia we have transition 26 october and  now in Moscow, we have always 
timezone GMT +3 (in the past has been the time zone GMT +4).
i am apply to java tzupdater and on server side all it is ok. problem only 
on client side in java.util.Date

-- 
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+unsubscr...@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/d/optout.


Re: Unable to use Elemental

2014-11-06 Thread Nyamath Ulla Khan
I was facing the same problem and solved by reading this link.Please follow 
this link 
*http://stackoverflow.com/questions/4550483/gwt-test-unable-to-find-sample-gwt-xml-on-your-classpath
 *

On Monday, 27 October 2014 21:42:24 UTC+5:30, Manuel Carrasco wrote:

 Have you tried to run your code in superdev-mode or compiled ?

 On Sun, Oct 26, 2014 at 9:01 PM, Steve poogle...@gmail.com javascript: 
 wrote:

 It seems i can no longer instantiate objects as i was doing before since 
 using Elemental.

 I'm getting errors on this line for some reason:

 Image imgPlay = new Image(img/Blue_Play_Button_Pressed_Down.svg);

 I tried changing it to Image imgPlay = new Image(); but got the same 
 error. This works fine when i'm not referencing Elemental.

 The DevMode console displayed the following:

 Caused by: com.google.gwt.core.client.JavaScriptException: (String) : 
 Invoking an instance method on a null instance
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at 
 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
 at 
 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
 at 
 com.google.gwt.dev.shell.ModuleSpace.createJavaScriptException(ModuleSpace.java:80)
 at 
 com.google.gwt.dev.shell.ModuleSpace.createJavaScriptException(ModuleSpace.java:64)
 at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:60)
 at 
 com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
 at 
 com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
 at 
 com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
 at 
 com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
 at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576)
 at 
 com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:304)
 at 
 com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
 at 
 com.google.gwt.user.client.impl.DOMImplStandard.initEventSystem(DOMImplStandard.java)
 at 
 com.google.gwt.user.client.impl.DOMImpl.maybeInitializeEventSystem(DOMImpl.java:181)
 at 
 com.google.gwt.user.client.impl.DOMImplStandard.sinkEvents(DOMImplStandard.java:216)
 at com.google.gwt.user.client.DOM.sinkEvents(DOM.java:1361)
 at com.google.gwt.user.client.Event$.sinkEvents(Event.java:597)
 at 
 com.google.gwt.user.client.ui.Image$UnclippedState.init(Image.java:376)
 at com.google.gwt.user.client.ui.Image.init(Image.java:510)
 at 
 com.example.elem.client.ElementalDemo.onModuleLoad(ElementalDemo.java:31)


 On Sunday, 26 October 2014 19:32:54 UTC, Jens wrote:

 Please could someone share any thoughts?


 Putting gwt-elemental.jar on class path and inheriting 
 elemental.Elemental is fine and it should work.

 When you see failed to load the module you usually see the reason in 
 the DevMode console. We can't guess reasons.

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


Re: Development Mode will not be supported in Firefox 27+

2014-11-06 Thread Jens


 I'm using IntelliJ...I'd like to hear if/how IntelliJ can do this too.


With the released IntelliJ 14 things are a bit easier.

- Create a new GWT run configuration and select User Super Dev Mode and 
at the bottom with JavaScript debugger. 
- IntelliJ will automatically generate a JavaScript debugger run 
configuration. Open that run configuration and you should see your GWT 
project directory tree. In that tree navigate to your source folder (src or 
src/main/java) and double click on the Remote URL column next to it. The 
remote URL is where IntelliJ will download source map files from so you 
should paste in something 
like http://127.0.0.1:9876/sourcemaps/module-name.

Now launch the GWT SDM run configuration which should also automatically 
launch the JavaScript Debug configuration. Chrome should now tell you that 
IntelliJ is debugging your site (you may need to install the LiveEdit 
Chrome extension) and you should be able to set break points in your Java 
code and step through the code from within IntelliJ.

Sometimes when you hit a break point the source map file isn't ready yet in 
IntelliJ (seems like a timing problem) and you see the pure JavaScript. But 
once you do the first step over IntelliJ should switch to the Java source 
by using source map information. Overall it works pretty well.

But keep in mind that fields and expressions in conditional break points 
are still all JavaScript. You are not debugging Java!

-- 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+unsubscr...@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/d/optout.


Exception thrown by XMLHttpRequest

2014-11-06 Thread Krzysztof Pater
Hi All,

I am developing an application using GWT in version 2.5.1.

Few days ago we found in our logs that there is a huge amount of exceptions 
(few per second!!!) that look as follows:

Nov 5, 2014 6:00:45 PM com.google.gwt.logging.server.
RemoteLoggingServiceUtil logOnServer
SEVERE: (NS_ERROR_NOT_INITIALIZED) : 
com.google.gwt.core.client.impl.SerializableThrowable$ThrowableWithClassName
: (NS_ERROR_NOT_INITIALIZED) : 
 at Unknown.ZHe(StackTraceCreator.java:174)
 at Unknown.WFe(StackTraceCreator.java:508)
 at Unknown.IHf(Exceptions.java:29)
 at Unknown.pIb(XMLHttpRequest.java:164)
 at Unknown.OMe(RequestBuilder.java:411)
 at Unknown.anonymous(XMLHttpRequest.java:351)
 at Unknown.gHe(Impl.java:189)
 at Unknown.jHe(Impl.java:243)
 at Unknown.anonymous(Impl.java:70)

At least in two cases the problem happened when the application was used 
from Mozilla Firefox web browser. To stop that, it was not enough to close 
the browser, but also to kill process from the Task Manager. But I am not 
sure if it couldn't be triggered also by another browser.

I also found this comment in the com.google.gwt.http.client.Request class, 
method cancel():

/*
 * There is a strange race condition that occurs on Mozilla when you 
cancel
 * a request while the response is coming in. It appears that in some 
cases
 * the onreadystatechange handler is still called after the handler 
function
 * has been deleted and during the call to XmlHttpRequest.abort(). So we
 * null the xmlHttpRequest here and that will prevent the
 * fireOnResponseReceived method from calling the callback function.
 * 
 * Setting the onreadystatechange handler to null gives us the correct
 * behavior in Mozilla but crashes IE. That is why we have chosen to 
fixed
 * this in Java by nulling out our reference to the XmlHttpRequest 
object.
 */

I don't have knowledge about how requests are working but I am wondering if 
new releases of Mozilla Firefox didn't cause that above solution doesn't 
work in some cases. 

Do you have an idea what is the source of the problem and could you please 
give us any advice how to solve this issue or maybe some workaround how to 
deal with it?

Thank you 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+unsubscr...@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/d/optout.


Re: GWT Cross Site Iframe Linker and Script Tags

2014-11-06 Thread Etienne Lacazedieu
Well, it was a Code Splitting problem.

Both SuperDevMode and DevMode works fine with the new linker.





Le mercredi 5 novembre 2014 23:21:22 UTC+1, Etienne Lacazedieu a écrit :

 Hi,

 I'm preparing a big switch (GWT2.3 to 2.6.1, which may change to 2.7.0 
 depening on the final release date), and I'm having trouble with the 
 xsiframe linker.. I have no problems with adding script tags in the HTML 
 file.

 Actually, I wrote a linker (a subclass of CrossSiteIframeLinker), which 
 outputs the list of JS files to a properties file.

 On the server side, a class reads this file to add script tags (we use 
 JSP).

 My problem is that we have a rather complex integration process, with 
 several GWT applications on the same page.


- a Container app, which creates Desktop-like UI, and exposes some JS 
native API to interact with other apps.
- several Functional apps, each one containing one or more functional 
modules. Each functional module description is injected to the 
 container 
app, which creates a launcher command. Invoking the command (done in the 
container app) triggers the creation of the functional module UI (done in 
the functional app). When this function returns, the container grabs the 
new DOM element and creates a Window UI around it.


 My problem with the XSI linker is that I cannot get it to work as it did 
 before.. 

 In my sample deployment, the container is called SampleGWTContainer, and 
 the functional app is called SampleApplication.

 I have the following error in the console : 

 $wnd.SampleApplication.runAsyncCallback2 is not a function

 The odd thing is that when I start SuperDevMode, and recompile 
 SampleApplication, it works.
 If I recompile SampleGWTContainer, I have the same error.

 I still have to try to remove the split point, to make know if it is a 
 Linker or a Code Splitting related problem..

 Any idea that might help me out? 

 Thanks a lot,

 Etienne

 Le mercredi 16 juillet 2014 11:28:33 UTC+2, Thomas Broyer a écrit :



 On Wednesday, July 16, 2014 11:06:43 AM UTC+2, gabriele.prandini wrote:

 This problem is blocking me from use superdevmode
 i have many 3th library, also gwt-ext... and gwt-ext have some script 
 tag on his gwt.xml
 so sad :-(


 As the error message says: add set-configuration-property 
 name='xsiframe.failIfScriptTag' value='FALSE'/ to your gwt.xml and put all 
 the needed script tags in your HTML host page (or inject them using 
 ScriptInjector from your onModuleLoad, deferring everything else until 
 after the scripts have been loaded)
  


 Il giorno lunedì 12 novembre 2012 17:54:58 UTC+1, Thomas Broyer ha 
 scritto:



 On Monday, November 12, 2012 4:55:58 PM UTC+1, googelybear wrote:

 I have the same error when running the code server and this limitation 
 effectively prevents me from using superdevmode, as in my case the 
 problem 
 is with an external library that I include which then uses the script 
 tag 
 in its own module xml.
 Also not being able to use script in the module xml 
 breaks encapsulation of modules, as I know have to include *all* 
 scripts from *all* libraries in *my* host page (for me that's 
 implementation details that I don't care about) .


 There's ScriptInjector 
 http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/core/client/ScriptInjector.html
  
 to encapsulate loading within the module's code.
  

 I know superdevmode is still experimental and seriously hope that this 
 will be fixed. In the meantime does anyone have an idea how to work 
 around 
 this? Besides manually patching a 3rd party library...


 In your module that enables the SuperDevMode hooks, add the 
 failIfScriptTag configuration property and add an entry-point that uses 
 ScriptInjector to load the 3rd-party scripts. The 2 entry points (from 
 your 
 app, inherited GWT module, and from the SuperDevMode-specific module) will 
 both be executed; beware though that onModuleLoad will be called *before* 
 the scripts are loaded, so your code that depends on them has to wait a 
 bit… There are a couple ways to workaround this if really needed (but it's 
 a bit more invasive for your app; that being said, xsiframe is the 
 future, and might becomes the default at some point, so better be prepared 
 –and update your 3rd-party libs–)



-- 
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+unsubscr...@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/d/optout.


Google 4.4 latest plugin update for Eclipse.

2014-11-06 Thread Michael Joyner
I've just updated to the latest version of the plugin for Eclipse and 
noticed two things:


*A*) There is now a Run as SDM for GWT enabled projects. It seems to 
work fine with source code pulled from other projects via linked folders 
which is nice.


Because of the way our Servlet is configured, it doesn't work inside of 
Jetty. So we just tell Eclipse to start the superdevmode followed up by 
running it on Tomcat and sdm is working fine.


*B*) It still only has an option for GWT 2.6.0 SDK as part of the 
downloadable SDKs?


Is this intentional? I was expecting 2.6.1 as being an option under the 
SDK list.


-Mike

--
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+unsubscr...@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/d/optout.


Re: Server Push

2014-11-06 Thread Peter Donald
Hi,

On Thu, Nov 6, 2014 at 12:07 AM, Marcel K marcel100...@gmail.com wrote:

 Which framework for Server Push do you recommend, since Atmosphere doesn't
 seem to work with GWT 2.7.0?


It sort of depends on your environment and what your underlying platform
supports. Below is a response I made to another similar question on the
mailing list.

In short if you can use latest JEE or jersey then I would recommend that
you use
* built-in web sockets (
https://github.com/realityforge/gwt-websockets-example/blob/master/src/main/java/org/realityforge/gwt/websockets/example/server/ChatServer.java
)
* addon support for EventSource/ServerSent events (
https://github.com/realityforge/gwt-eventsource-example/blob/master/src/main/java/org/realityforge/gwt/eventsource/example/server/
)
* Servlet 3 async services for long polling (
https://github.com/realityforge/gwt-webpoller-example/tree/master/src/main/java/org/realityforge/gwt/webpoller/example/server
)

We use all three in our server push apps with GWT clients.

HTH


On Fri, Oct 31, 2014 at 5:22 AM, Peter Donald pe...@realityforge.org
 wrote:

 Hi,

 We have built several systems like this where we want to push data to
 clients from the server. The client is responsible for subscribing to a
 channel possibly with filters in place. Rather than use GWT-RPC we have
 tended to move to using raw messages that are typically json blobs. We have
 used 4 basic strategies depending on the clients supported and the
 application requirements. The strategies are;

 1. WebSockets
 2. Server-Sent Events
 3. Long polling
 4. Periodic Polling

 I had a poke around and found a good stack overflow answer to this (See
 [1])

 When we faced the same issues, we ended up putting together a couple of 
 libraries
 to help with in GWT.

 * websockets: https://github.com/realityforge/gwt-websockets
 * Server-sent Events: https://github.com/realityforge/gwt-eventsource
 * Polling: https://github.com/realityforge/gwt-webpoller (Warning this
 API is not yet at 1.0 status)

 The tricky part is actually managing the channels and messages sequencing
 in each channel but we never got arounf to releasing our code for that part
 of the problem.

 HTH

 [1]
 http://stackoverflow.com/questions/11077857/what-are-long-polling-websockets-server-sent-events-sse-and-comet


-- 
Cheers,

Peter Donald

-- 
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+unsubscr...@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/d/optout.


Re: Server Push

2014-11-06 Thread Alain Ekambi
Errai is the thing you want to use :)

2014-11-06 21:08 GMT+01:00 Peter Donald pe...@realityforge.org:

 Hi,

 On Thu, Nov 6, 2014 at 12:07 AM, Marcel K marcel100...@gmail.com wrote:

 Which framework for Server Push do you recommend, since Atmosphere
 doesn't seem to work with GWT 2.7.0?


 It sort of depends on your environment and what your underlying platform
 supports. Below is a response I made to another similar question on the
 mailing list.

 In short if you can use latest JEE or jersey then I would recommend that
 you use
 * built-in web sockets (
 https://github.com/realityforge/gwt-websockets-example/blob/master/src/main/java/org/realityforge/gwt/websockets/example/server/ChatServer.java
 )
 * addon support for EventSource/ServerSent events (
 https://github.com/realityforge/gwt-eventsource-example/blob/master/src/main/java/org/realityforge/gwt/eventsource/example/server/
 )
 * Servlet 3 async services for long polling (
 https://github.com/realityforge/gwt-webpoller-example/tree/master/src/main/java/org/realityforge/gwt/webpoller/example/server
 )

 We use all three in our server push apps with GWT clients.

 HTH


 On Fri, Oct 31, 2014 at 5:22 AM, Peter Donald pe...@realityforge.org
  wrote:

 Hi,

 We have built several systems like this where we want to push data to
 clients from the server. The client is responsible for subscribing to a
 channel possibly with filters in place. Rather than use GWT-RPC we have
 tended to move to using raw messages that are typically json blobs. We have
 used 4 basic strategies depending on the clients supported and the
 application requirements. The strategies are;

 1. WebSockets
 2. Server-Sent Events
 3. Long polling
 4. Periodic Polling

 I had a poke around and found a good stack overflow answer to this (See
 [1])

 When we faced the same issues, we ended up putting together a couple of 
 libraries
 to help with in GWT.

 * websockets: https://github.com/realityforge/gwt-websockets
 * Server-sent Events: https://github.com/realityforge/gwt-eventsource
 * Polling: https://github.com/realityforge/gwt-webpoller (Warning this
 API is not yet at 1.0 status)

 The tricky part is actually managing the channels and messages sequencing
 in each channel but we never got arounf to releasing our code for that part
 of the problem.

 HTH

 [1]
 http://stackoverflow.com/questions/11077857/what-are-long-polling-websockets-server-sent-events-sse-and-comet


 --
 Cheers,

 Peter Donald

 --
 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+unsubscr...@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/d/optout.




-- 

Alain Ekambi

Co-Founder

Ahomé Innovation Technologies

http://www.ahome-it.com/ http://ahome-it.com/

-- 
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+unsubscr...@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/d/optout.


Problems upgrading Google Plugin for Eclipse

2014-11-06 Thread Thad Humphries
I haven't been able to install the Google Plugin for Eclipse 
4.4 3.8.0.v201410302155-rel-r44 update. I'm told Insufficient privileges 
to apply this update. I've no idea why. Everything in 
the /Applications/eclipse directory is owned by me, as is everything in the 
.metadata directories of my workspaces. Even after removing all *.lock 
files and restarting Eclipse, it's still not working. Any ideas? Maybe some 
file(s) I should edit or delete. (I think before I blow everything away and 
reinstall 4.4 from scratch, I'll wait for an update that includes GWT 
2.7.0.)

-- 
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+unsubscr...@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/d/optout.


Re: Google 4.4 latest plugin update for Eclipse.

2014-11-06 Thread Jens


 *B*) It still only has an option for GWT 2.6.0 SDK as part of the 
 downloadable SDKs?

 Is this intentional? I was expecting 2.6.1 as being an option under the 
 SDK list.


I think no new GWT SDK has been pushed to the update site for whatever 
reason. However you can simply download the SDK zip file from 
http://www.gwtproject.org/versions.html . Just unzip it and manually add 
the folder as SDK in the Eclipse settings. 

-- 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+unsubscr...@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/d/optout.


[gwt-contrib] Re: stylesheet ignored/not handled in SDM 2.7.0-rc1

2014-11-06 Thread Thomas Broyer
As I understand it, when the *.nocache.js injects the stylesheets, relative 
paths are resolved against the SDM host (you see the message in the 
console, so I suppose it comes from the CodeServer/SDM) rather than the 
web server host (DevMode).
Could you check the exact URLs in your browser's dev tools? Specifically 
the port (9876 vs.  with default settings)

On Wednesday, November 5, 2014 9:19:54 AM UTC+1, Christian X wrote:

 Hello,
 I wanted to test the new SDM in 2.7.0-rc1. 
 A stylesheet that I reference im my model file is not loaded, in console I 
 get the output:

 [INFO] GET /overwrite.css
 [INFO][WARN] ignored get request: /overwrite.css
 [INFO][WARN] not handled: /overwrite.css

 With gwt 2.6.1 I could use normal dev mode and everything was fine. If I 
 use GWT 2.7.0-rc1 and compile my application to a war file it also works 
 fine. Without this stylesheet I can't use devmode because everything looks 
 to different from the compiled war file.

 I use tomcat to deploy the war file and I have noServertrue/noServer 
 set im my pom.xml, see configuration below.

 I start devmode with:
 mvn gwt:run

 I use gwtbootstrap and in my overwrite.css I have a few css rules 
 (corporate identity) to overwrite the gwtbootstrap css.

 from my model file GUI.gwt.xml:

 !-- Bootstrap --
 inherits name='com.github.gwtbootstrap.
 Bootstrap'/
 inherits name='com.github.gwtbootstrap.datepicker.Datepicker'/
 inherits 
 name='com.github.gwtbootstrap.datetimepicker.Datetimepicker'/
 set-property name=bootstrap.responsiveDesign value=true/

 !-- overwrite Bootstrap --
 stylesheet src=../overwrite.css/


 the overwrite.css is placed in GUI/src/main/webapp  this is the same 
 folder where my GUI.html file is.

 configuration from my pom.xml:
 ...
 properties
 
 webappDirectory${project.build.directory}/${project.build.finalName}/webappDirectory
 /properties
 ...

 !-- GWT Maven Plugin --
 plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdgwt-maven-plugin/artifactId
 version${gwtVersion}/version
 executions
 execution
 goals
 goalcompile/goal
 goali18n/goal
 /goals
 /execution
 /executions
 configuration
 hostedWebapp${webappDirectory}/hostedWebapp
 runTargetGUI/GUI.html/runTarget
 noServertrue/noServer
 port8080/port
 debugPort8008/debugPort
 localWorkers8/localWorkers

 
 i18nMessagesBundlede.company.department.project.client.util.i18n.Translation/i18nMessagesBundle

 extraJvmArgs
 -Xmx1024M -XX:+CMSClassUnloadingEnabled 
 -XX:+UseConcMarkSweepGC -XX:MaxPermSize=256M
 /extraJvmArgs

 disableClassMetadatatrue/disableClassMetadata
 disableCastCheckingtrue/disableCastChecking

 closureCompilertrue/closureCompiler
 draftCompilefalse/draftCompile
 optimizationLevel9/optimizationLevel
 /configuration
 /plugin


-- 
You received this message because you are subscribed to the Google Groups GWT 
Contributors group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/d179fd3b-9ee0-419e-a663-bbfb99f71cc1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[gwt-contrib] Re: JSInterop assign a function/callback to a property

2014-11-06 Thread Cristian Rinaldi
@Kay-Uwe Janssen

I am doing support IndexedDB with JsInterop to do some tests, and also I 
have to assign a function:

interface IDBRequest : EventTarget {   ...*   attribute EventHandler   
onsuccess 
https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#widl-IDBRequest-onsuccess;*
   attribute EventHandler   onerror 
https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#widl-IDBRequest-onerror;
};


Use the request in JS:

request.onsuccess = function() { ... };

This can be translated as follows:

@JsType
public interface IDBRequest {
@JsProperty
public void onsuccess(Function fn);
}


@JsType
public interface IDBOpenDBRequest extends IDBRequest{}

@JsType
public interface IDBFactory {
public  IDBOpenDBRequest open(String db, int version);
}

@JsType
public interface IDBEnvironment {
@JsProperty
IDBFactory indexedDB();
}

@JsType(prototype = window)
public interface Window extends IDBEnvironment{}

And use:

IDBOpenDBRequest req = Window.Static.get().indexedDB().open(db, 1);
req.onsuccess(Function.Static.newInstance(new FunctionObject, Void() {
 @Override
 public Void f(Object changed) {
console.log(changed);
return null;
}
}));

The code here:

   - https://github.com/workingflows/gwt-jscore.git
   - https://github.com/workingflows/gwt-jquery.git
   - https://github.com/workingflows/gwt-playground.git

Cheers!!

El jueves, 6 de noviembre de 2014 04:46:08 UTC-3, Kay-Uwe Janssen escribió:

 @Cristian Rinaldi unfortunately this does not work how i need it. it still 
 assignes the object and not the javascript function.

 i think i have to wait for 2.8 to get it working. but thanks anyway :-)

 Am Mittwoch, 5. November 2014 08:28:21 UTC+1 schrieb Kay-Uwe Janssen:

 As i had no luck on Google+ yet, i'll try it here.

 First the G+ Post: 
 https://plus.google.com/116136390679208063122/posts/52kcbwwngWo


 Well I just started to work on a ChromeCast Receiver built with GWT. As 
 the Receiver API is in JS i wanted to try JSInterop over JSNI but had some 
 struggle.

 The ChromeCast Api has some properties that can be set with a function to 
 act as a callback. eg for onReady.

 castReceiverManager.onReady = function(event) {
   // do stuff
 };

 Now my question is: How can i do this with JsInterop or is it not yet 
 possible?

 as mentioned in 
 https://docs.google.com/document/d/1tir74SB-ZWrs-gQ8w-lOEV3oMY6u6lF2MmNivDEihZ4
  
 below Single Abstract Method Handling i tried something like this

 @JsType
 public interface Receiver {
   @JsProperty
   void onReady(Runnable onReady);
 }

 when trying to execute the method with this snipped i get Exception 
 caught: (TypeError) : object is not a function

 private native void test(Receiver receiver)/*-{
   receiver.onReady();
 }-*/;


 to see whats the value of onReady i did console.log(receiver) and got 
 this: (where onReady is set the way above and onSenderConnected has been 
 set the JS way inside an JSNI method.

 onReady: JsTest$1_1_g$
 onSenderConnected: function (event_0_g$)


 is there a way to achieve this yet or do i have to wait for 2.8/3.0?

 i tried to dig into the gwt code to see if there is a way to add 
 something to support this but unfortunately the gwt code for js processing 
 is a bit out of my scope. 


 some possible solutions would be either
 interface JsFunction {
 T T call(Object... args);
 }
 or
 interface MyOnReadyCallback {
   @JsFunction
   MyReturnType anyName(String arg1, boolean arg2, SomeOtherType arg3);
 }

 and let the Single Abstract Method Handling find the method and add it.


 Thanks! :)



-- 
You received this message because you are subscribed to the Google Groups GWT 
Contributors group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/b78d26e7-3626-4fff-ab7f-fa987ccca0d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [gwt-contrib] Deferred binding bug in 2.7

2014-11-06 Thread 'Goktug Gokdogan' via GWT Contributors
Without a repro case and debugging the best suggestion we have is to enable
strict mode in your compilation. This might show some additional
compilation errors but it's your best shot.
When you are looking at the errors, you will probably see some errors in
client.pages.AddParametersView.MyUiBinder or one of its references and
that's probably the culprit.


On Wed, Nov 5, 2014 at 10:17 PM, Erik Kuefler ekuef...@gmail.com wrote:

 I posted earlier
 https://groups.google.com/d/msg/google-web-toolkit-contributors/vCELYDM2_tE/S-E_AKanEVcJ
 about a bug I was seeing in the 2.7 beta, and it looks like it's still
 there in RC1. I don't have a minimal repro case yet, and it might be tough
 to make one, but I do have a bit more information.

 The problem occurs when trying to compute the deferred binding result for
 some (not all) of the UiBinders in my application. When I run with
 loglevel=DEBUG, it's suggesting that there's a compilation failure when
 processing the one deferred binding rule I have in my top-level gwt.xml.
 That rule looks like this:

 replace-with class=client.environment.ProdEnvironment
   when-type-assignable class=client.environment.Environment/
 /replace-with


 The log shows that everything works fine for most of the UiBinders - they
 skip over this rule (which is always the first one they check, probably
 because it's at the root of the inheritance chain) and eventually find the
 right one:

Computing all possible rebind results for
 'client.widget.band.BandView.MyUiBinder'
   Rebinding client.widget.band.BandView.MyUiBinder
  Checking rule replace-with
 class='client.environment.ProdEnvironment'/
 Checking if all subconditions are true (all)
when-assignable class='client.environment.Environment'/
   No, the requested type was not assignable
No: One or more subconditions was false
  Rule did not match
  Found better fallback match for replace-with
 class='client.environment.ProdEnvironment'/
  Checking rule generate-with
 class='com.google.web.bindery.autobean.gwt.rebind.AutoBeanFactoryGenerator'/
 Checking if all subconditions are true (all)
when-assignable
 class='com.google.web.bindery.autobean.shared.AutoBeanFactory'/
   No, the requested type was not assignable
No: One or more subconditions was false
  Rule did not match
  Found better fallback match for generate-with
 class='com.google.web.bindery.autobean.gwt.rebind.AutoBeanFactoryGenerator'/

   /* ... snip 100's of lines checking other rules */

  Checking rule generate-with
 class='com.google.gwt.uibinder.rebind.UiBinderGenerator'/
 Checking if all subconditions are true (all)
when-assignable class='com.google.gwt.uibinder.client.UiBinder'/
   Yes, the requested type was assignable
Yes: All subconditions were true
  Rule was a match and will be used
  Invoking generator
 com.google.gwt.uibinder.rebind.UiBinderGenerator
 Parsing CSS stylesheet
 file:/var/folders/99/npwplk0x5s716r29tmllw_7hgn/T/uiBinder_client.widget.band_BandView_MyUiBinderImpl_GenCss_style1449650163126694696.css
 Generator returned type
 'client.widget.band.BandView_MyUiBinderImpl; mode
 USE_ALL_NEW_WITH_NO_CACHING; in 15 ms

  Rebind result was client.widget.band.BandView_MyUiBinderImpl

 But for just a few UiBinders, it crashes when checking the deferred
 binding rule:

Computing all possible rebind results for
 'client.AddParametersView.MyUiBinder'
   Rebinding client.pages.AddParametersView.MyUiBinder
  Checking rule replace-with
 class='client.environment.ProdEnvironment'/
 Checking if all subconditions are true (all)
when-assignable class='client.environment.Environment'/
   Tracing compile failure path for type
 'client.pages.AddParametersView.MyUiBinder'
  Checked 0 dependencies for errors.
   [ERROR] Hint: Check the inheritance chain from your
 module; it may not be inheriting a required module or a module may not be
 adding its source path entries properly

[ERROR] Errors in 'client/pages/AddParametersView.java'
   [ERROR] Line 33: Failed to resolve
 'client.pages.AddParametersView.MyUiBinder' via deferred binding


 There's no hint of what's causing the compile failure, but there are only
 a few
 https://github.com/gwtproject/gwt/search?utf8=%E2%9C%93q=logErrorTrace
 places in GWT that log that message, so someone more familiar with the
 internals might be able to tell what's going on. When I remove my deferred
 binding rule, the errors go away. There are no changes in my code other
 than switching the dependency from 2.6.1 to 2.7.0-rc1.

 Does this ring any bells around what the problem might be, or should I try
 digging deeper into figuring out what's different about the