Re: Progress bar during GWT bootstrap process?

2015-10-26 Thread Jens


> But, I'm talking about the time from when the user visits the site, to the 
> time when the entrypoint's onModuleLoad is called. Often there can be a few 
> seconds of lag between nocache.js loading -> onModuleLoad being called. Is 
> there a way to show a progress bar during that period, e.g to show the 
> remaining assets to be downloaded before onModuleLoad is called?
>

Thats why he said you should put the loading indicator into your index.html 
and let the entry point remove it once it is executed. Works well.

-- 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: JsInterop: Casting native javascript objects in gwt

2015-10-26 Thread Cristiano Costantini
jsinterop.annotations

Truly,
If one day I'll find the man who continue using non standard packages in
GWT, I'll take all his keyboards and "hack" so that each key will output
"org.gwtproject" as a prefix to any key stroke!

:-D

Il giorno lun 26 ott 2015 alle ore 13:30 Brian Pedersen <
brian.peder...@gmail.com> ha scritto:

> I didn't get that quite right, the generated function seem to fail doing
> the lookup in the castableTypeMap, which must be it's way of assuring
> that the types are actually castable to the target type.
>
> Den mandag den 26. oktober 2015 kl. 13.16.21 UTC+1 skrev Brian Pedersen:
>>
>> It seems the generated
>> function 
>> com_google_gwt_lang_Cast_canCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z
>> only supports strings, maps, numbers and booleans.
>>
>> function
>> com_google_gwt_lang_Cast_canCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(src_0,
>> dstId){
>>   return typeof src_0 === 'string' &&
>> !!com_google_gwt_lang_Cast_stringCastMap[dstId]
>>   || src_0.java_lang_Object_castableTypeMap &&
>> !!src_0.java_lang_Object_castableTypeMap[dstId]
>>   || typeof src_0 === 'number' &&
>> !!com_google_gwt_lang_Cast_doubleCastMap[dstId]
>>   || typeof src_0 === 'boolean' &&
>> !!com_google_gwt_lang_Cast_booleanCastMap[dstId];
>> }
>>
>> /Brian
>>
>> Den mandag den 26. oktober 2015 kl. 13.01.40 UTC+1 skrev Brian Pedersen:
>>>
>>> Thank's for pointing that out. So i switched to the new annotations in
>>> jsinterop.annotations and activated the new mode with -jsInteropMode
>>> JS_RC.
>>>
>>> The cast still doesn't work though :(
>>>
>>> Instead of a java.lang.ClassCastException, I now get a  Uncaught
>>> [object Object] during the cast.
>>> Once again, everything works if I use the concrete type and remove the
>>> cast.
>>>
>>> POM: https://github.com/bitwerk/jspoc/blob/master/pom.xml
>>> Javascript:
>>> https://github.com/bitwerk/jspoc/blob/master/src/main/webapp/jspoc.html
>>> GWT:
>>> https://github.com/bitwerk/jspoc/tree/master/src/main/java/dk/bitwerk/client
>>>
>>> /Brian
>>>
>>> Den mandag den 26. oktober 2015 kl. 12.29.21 UTC+1 skrev Jens:


 I am using GWT 2.8.0-SNAPSHOT, but the new annotations does not work
> for me.
>
> I tried using @JsType(namespace = "acme", name = "MyJavaScriptObject"),
> as described in the new version of the JsInterop document, but apparently
> the namespace and name attributes are not there in the jar file.
> Same thing with the @JsExport and @JsNamespace, I currently have to
> use them or things stop working.
>

 The new annotations have a different package: jsinterop.annotations.
 Also @JsExport does not exist anymore in the new JsInterop version,
 you just use @JsType.

 To activate the new annotations you also have to change the JsInterop
 mode via -jsInteropMode JS_RC


 -- 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 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 "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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Next release

2015-10-26 Thread bendg25
Hi

My rationale for the request is we run up server, client and server, in a 
single jvm.  We have tried upgrading our runtime to say jetty 9 and come 
unstuck.  (I don't have the detail)

More recently I have been working on a spring boot gwt app.  I would like to 
run this in one Jvm using maven gwt plugin but could not get it working as it 
uses jetty 8.  I supplied a web.xml (that Spring boot does not need) to enable 
jetty to bootstrap but Spring security was not handling the requests for some 
reason.

I have ended up with running my spring boot container exposing debug port and 
running gwt maven plugin with super Dev mode and no server option.  This allows 
me to recompile using bookmark lets but the break points are not being hit so 
it is not ideal.

However back to my original request, I just don't understand, from a design 
perspective, why you would want to couple yourself so closely to a particular 
version of a web container.  It does cause issues.

-- 
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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Progress bar during GWT bootstrap process?

2015-10-26 Thread Ali Akhtar
But, I'm talking about the time from when the user visits the site, to the
time when the entrypoint's onModuleLoad is called. Often there can be a few
seconds of lag between nocache.js loading -> onModuleLoad being called. Is
there a way to show a progress bar during that period, e.g to show the
remaining assets to be downloaded before onModuleLoad is called?

On Tue, Oct 27, 2015 at 5:45 AM, Peter Donald 
wrote:

> The easiest way to do that is to just have the base page have a
> loading indicator and have the last action in your EntryPoint remove
> the loading indicator. If you want progress as loads occur then you
> can just update the progress level from each step in your EntryPoint.
> HTH
>
> On Tue, Oct 27, 2015 at 10:54 AM, Ali Akhtar  wrote:
> > When GWT based sites are first loaded, the browser shows a loading
> indicator
> > as nocache.js is downloaded. But then, when nocache.js inserts the actual
> > scripts, there's no loading indicator, and the user is left staring at an
> > idle screen. Not a very good experience.
> >
> > Is it possible to show a progress bar indicator as the other gwt assets
> > loaded during the bootstrap process, are downloaded?
> >
> > --
> > 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 http://groups.google.com/group/google-web-toolkit.
> > For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> Cheers,
>
> Peter Donald
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "GWT Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-web-toolkit/Cr8DuGnX1lk/unsubscribe
> .
> To unsubscribe from this group and all its topics, 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.
>

-- 
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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Progress bar during GWT bootstrap process?

2015-10-26 Thread Peter Donald
The easiest way to do that is to just have the base page have a
loading indicator and have the last action in your EntryPoint remove
the loading indicator. If you want progress as loads occur then you
can just update the progress level from each step in your EntryPoint.
HTH

On Tue, Oct 27, 2015 at 10:54 AM, Ali Akhtar  wrote:
> When GWT based sites are first loaded, the browser shows a loading indicator
> as nocache.js is downloaded. But then, when nocache.js inserts the actual
> scripts, there's no loading indicator, and the user is left staring at an
> idle screen. Not a very good experience.
>
> Is it possible to show a progress bar indicator as the other gwt assets
> loaded during the bootstrap process, are downloaded?
>
> --
> 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 http://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.



-- 
Cheers,

Peter Donald

-- 
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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Progress bar during GWT bootstrap process?

2015-10-26 Thread Ali Akhtar
When GWT based sites are first loaded, the browser shows a loading 
indicator as nocache.js is downloaded. But then, when nocache.js inserts 
the actual scripts, there's no loading indicator, and the user is left 
staring at an idle screen. Not a very good experience.

Is it possible to show a progress bar indicator as the other gwt assets 
loaded during the bootstrap process, are downloaded?

-- 
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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


How to eliminate extra balnk column in CellBrowser

2015-10-26 Thread Thomas Broyer
In which browser are you seeing this? No issue for me in Chrome (for Android).
Either that or I didn't understand the issue (a screenshot might 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT as a "thin" layer over JavaScript?

2015-10-26 Thread negora

  
  
Hello Jens:

That has been a very clarifying response. 

JsInterop seems to fit better with what I need from GWT. A fast way
to build a gate between new code written in Java and existing
libraries in _javascript_. I read a little about JSNI some days ago
but it didn't attracted me too much, sincerely. Although I
understand that it still is the best method to write a functionality
that is implemented in a different way by each browser. Fortunately
this is less frequent nowadays.

About Elemental 2.0, that's another thing that will be really
useful. It sounds exciting to have an API that's constantly up to
date with the W3C standards.

Now I'm going to take a look to the document about JsInterop that
you've indicated.

Thank you, Jens and the other users, for having spent your time to
clarify my doubts.


On 26/10/15 17:34, Jens wrote:


  
Currently the heart of GWT is JSNI which allows you to
  define a Java method and implement it using _javascript_. So
  whenever GWT code interacts with _javascript_ it is done through
  JSNI. With GWT 2.8 there will be JsInterop v1.0 which allows
  you to define interfaces/classes along with annotations to
  access browser or general _javascript_ APIs. This is done based
  on naming conventions. You can read more about JsInterop
here: https://docs.google.com/document/d/10fmlEYIHcyead_4R1S5wKGs1t2I7Fnp_PaNaa7XTEk0/edit#


With JsInterop most JSNI code will go away as JSNI code is
  often just a one liner mapping from Java world to _javascript_
  world. JsInterop and JSNI are the low-level tools of GWT and
  allow you to access any _javascript_ API be it a browser API or
  a third party JS framework / library.


For accessing the DOM you can use GWT's Element classes
  which are implemented using JSNI. Its a thin layer with some
  adjustments to be cross browser compatible. Since it tries to
  be cross browser compatible you won't find the newest JS
  Element APIs here. If you need newer browser features then you
  either have to use JSNI / JsInterop yourself of use the
  Elemental library. However as you noted Elemental is based on
  WebKit so some things simply won't work in all browser. Its up
  to you to figure out if its safe to use some Elemental APIs
  based on your decision which browsers you want to support in
  your app. With GWT 3 or so there will be Elemental 2.0 which
  will be implemented using JsInterop and will be based on
  html5index.org. So it won't be webkit specific anymore. 


The widget system of GWT is build on top of GWT's Element
  API and is designed in a way that makes it impossible to
  produce memory leaks in older browsers (below IE 10) because
  of circular dependencies between DOM elements and _javascript_
  event handlers. Most widgets GWT provides are very simple
  wrappers around HTML elements like  and such.
  There are a few more complex widgets but generally the UI
  widget set of GWT is just a starting point. For complex apps
  you will quickly build your own widgets or look at third party
  UI libraries or even use some shiny webcomponents.


One thing to keep in mind though is that GWT 3.x will have
  a different compiler than GWT 2.x. Basically GWT 3.x will
  transform your Java classes into ES6 compatible _javascript_
  classes which then will optimized by Google Closure compiler.
  GWT 3.x will also not support some core features of GWT 2.x
  which means quite some SDK code of GWT needs to be rewritten
  to be useable with GWT 3. But that is only an issue for
  existing GWT apps that are based on GWT 2.x. If you start a
  new app with GWT 3 then you obviously don't have that issue.
  If you start a GWT 2.x app now then just stay away from
  GWT-RPC as its something that most likely won't make it to GWT
  3, but we will see.




-- 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 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 "GWT Users" group.
To unsubscr

How to eliminate extra balnk column in CellBrowser

2015-10-26 Thread Rogelio Flores
On a CellBrowser, whenever you select a given value/row on a non-leaf 
column, two new columns are added, the one with the result(s), and an 
additional blank one. Does anyone know a way to eliminate the extra blank 
column when selecting a value that displays the leaf column values? That 
is, I don't want the extra column at the right hand side since it will 
never contain anything.

I'm wondering if there's an option I'm missing, or perhaps somebody has 
already modfied it to achieve this behavior.

You can see exactly what I'm talking about in the Showcase when you select 
any of the A,B,C, etc rows in the second column:

http://samples.gwtproject.org/samples/Showcase/Showcase.html#!CwCellBrowser

-- 
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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT as a "thin" layer over JavaScript?

2015-10-26 Thread negora

  
  
Hello Jon:

By a chance, that is the way I've been trying to model my mind
towards GWT. I don't want to abstract the essence of _javascript_. I
just want a better syntax and organization for my code. Something
that allows me to use static types, put my code in packages or
modules, refactor easily, re-use some code from the back-end in the
front-end... Indeed, TypeScript, which you also mention, is another
alternative right now, because it meets that criteria.

In my opinion, there are issues with _javascript_ that can't be
abstracted, and that any programmer coming from pure Java should be
aware of. Such as the fact that the events in a single window happen
in a single thread. In an higher level of abstraction (Vaadin, JSF)
this wouldn't matter much. But when you work directly with the DOM,
it's important to know such things.

The problem is that reading the tutorials of GWT in the official
site, it isn't clear if it acts just as a wrapper, or if it's a
whole abstraction of the DOM. I guess that, as Ed has suggested me,
at the beginning GWT tried to be the later but now it's being
transformed to be the other. I hope that for the version 3.0 the
documentation is more explicit about that.

Thank you.


On 26/10/15 16:49, JonL wrote:


  I think the key to remember is that when working on
the client side code for GWT is that, even though you are
writing in Java, your are ultimately writing _javascript_.  It's a
key mindset, there is nothing that you can't do in _javascript_
that you can't do in GWT with the right mindset.  Typescript is
even just _javascript_ once its boiled down and sent to the
browser.


The GWT compiler can even offer you some optimizations and
  performance gains over regular _javascript_.


If you find that you don't need some of the things at
  runtime that GWT enables, like type casting, class checking,
  etc, you can turn them off via a compiler flag.  Maybe you
  only use those flags during development and testing, but turn
  them off in production to reduce code size and speed things
  up.


GWT client side code isn't a wrapper around _javascript_, it
  IS _javascript_, highly optimized and transpiled from Java.
   "Wrappers" of common _javascript_ projects are simply thin
  facades over the _javascript_, if they are written correctly,
  according to my standards.


GWT doesn't preclude the usage of other _javascript_
  libraries either and there are very few instances where you
  would find GWT incompatible with any particular _javascript_
  project.
  
  On Monday, October 26, 2015 at 8:29:35 AM UTC-7, negora wrote:
  
 That information is
  interesting. I had read about JSNI, but not about
  _javascript_ overlays. The tool from Vaadin also looks like
  useful. Thank you.
  
  I guess I'll have to read the entire tutorials and
  documentation from the GWT website to know if I'm going to
  feel comfortable in this new scenario. I'm so used to do
  all these things with _javascript_, that I'm a little afraid
  :S .
  
  
  On 26/10/15 14:57, JonL wrote:
  
  

  There are multiple ways to do this.  
  
  
  See these pages:
  
  
  http://www.gwtproject.org/doc/latest/DevGuideCodingBasicsJSNI.html
  http://www.gwtproject.org/doc/latest/DevGuideCodingBasicsOverlay.html
  
  
  GWT 2.8, if I remember correctly, will also
introduce a new Elemental generator, so the
Elemental jar will always be up to date.
  
  
  Vaadin also has an api generator for GWT.
  
  
  https://github.com/vaadin/gwt-api-generator

On Monday, October 26, 2015 at 2:51:18 AM UTC-7,
negora wrote:

  Hello:

I code in both _javascript_ and Java. I make my
back-ends with Java whereas I use _javascript_ for
the front-ends. Nothing new. However, for the
last years I aimed my career so much to Java,
that I missed out many important _javascript_
libraries and proj

Re: GWT as a "thin" layer over JavaScript?

2015-10-26 Thread Jens
Currently the heart of GWT is JSNI which allows you to define a Java method 
and implement it using JavaScript. So whenever GWT code interacts with 
JavaScript it is done through JSNI. With GWT 2.8 there will be JsInterop 
v1.0 which allows you to define interfaces/classes along with annotations 
to access browser or general JavaScript APIs. This is done based on naming 
conventions. You can read more about JsInterop 
here: 
https://docs.google.com/document/d/10fmlEYIHcyead_4R1S5wKGs1t2I7Fnp_PaNaa7XTEk0/edit#

With JsInterop most JSNI code will go away as JSNI code is often just a one 
liner mapping from Java world to JavaScript world. JsInterop and JSNI are 
the low-level tools of GWT and allow you to access any JavaScript API be it 
a browser API or a third party JS framework / library.

For accessing the DOM you can use GWT's Element classes which are 
implemented using JSNI. Its a thin layer with some adjustments to be cross 
browser compatible. Since it tries to be cross browser compatible you won't 
find the newest JS Element APIs here. If you need newer browser features 
then you either have to use JSNI / JsInterop yourself of use the Elemental 
library. However as you noted Elemental is based on WebKit so some things 
simply won't work in all browser. Its up to you to figure out if its safe 
to use some Elemental APIs based on your decision which browsers you want 
to support in your app. With GWT 3 or so there will be Elemental 2.0 which 
will be implemented using JsInterop and will be based on html5index.org. So 
it won't be webkit specific anymore. 

The widget system of GWT is build on top of GWT's Element API and is 
designed in a way that makes it impossible to produce memory leaks in older 
browsers (below IE 10) because of circular dependencies between DOM 
elements and JavaScript event handlers. Most widgets GWT provides are very 
simple wrappers around HTML elements like  and such. There are a few 
more complex widgets but generally the UI widget set of GWT is just a 
starting point. For complex apps you will quickly build your own widgets or 
look at third party UI libraries or even use some shiny webcomponents.

One thing to keep in mind though is that GWT 3.x will have a different 
compiler than GWT 2.x. Basically GWT 3.x will transform your Java classes 
into ES6 compatible JavaScript classes which then will optimized by Google 
Closure compiler. GWT 3.x will also not support some core features of GWT 
2.x which means quite some SDK code of GWT needs to be rewritten to be 
useable with GWT 3. But that is only an issue for existing GWT apps that 
are based on GWT 2.x. If you start a new app with GWT 3 then you obviously 
don't have that issue. If you start a GWT 2.x app now then just stay away 
from GWT-RPC as its something that most likely won't make it to GWT 3, but 
we will see.


-- 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT as a "thin" layer over JavaScript?

2015-10-26 Thread negora

  
  
Hello Ed:

That's exactly one of the matters that worries me more: the
transition from the version 2.7 to the new versions and, thus, the
lack of documentation (or worse, the existence of outdated or
contradictory documentation). I'm worried to learn new concepts that
I'll have to "un-learn" when the new versions arrive :/ . I started
with the tutorials, but then I thought about this issue and decided
to stop to re-consider the adoption of GWT.

What you say about the conversion of GWT into a transpiler cheers me
up. Because more than an abstraction of the DOM, what I need is to
replace the formula HTML + CSS + JS with HTML + CSS + Java. I guess
that a developer used to Swing will have an opinion opposite to mine
and will want full abstraction, but I prefer to use something closer
to the browser's reality. After all, if you want abstraction,
projects like Vaadin or JSF offers something simplier.

I'll look for more information about GWT 2.8 and 3.0 and then decide
either if I wait to see what they bring, or start with it now.

Thank you.


On 26/10/15 14:57, Ed wrote:


  

  

  

  Hi negora,

  
  Its never to late for GWT.

Just be aware that there are transitions in the works as
GWT moves into 2.8 and 3.0.
  
  Search this list for road map and you will find
  interesting takes on the where GWT is headed.

At first GWT covered the many discrepancies of the browsers,
now that the _javascript_ is supported in a standard way, GWT
is transforming into a transpiler so we can write java code
in our editor for translation into _javascript_ on the client
side. This is a big plus no matter how you look at it.

  
  Regards
  

Ed  

  

  

  

  
  
On Mon, Oct 26, 2015 at 4:24 AM, negora
  
  wrote:
  
Hello:
  
  I code in both _javascript_ and Java. I make my back-ends
  with Java whereas I use _javascript_ for the front-ends.
  Nothing new. However, for the last years I aimed my career
  so much to Java, that I missed out many important
  _javascript_ libraries and projects. Instead, I always used
  my old custom _javascript_ libraries. Now I want to change
  that, but I got a little tired of the dynamic typing,
  among other ugly things of _javascript_. That's why I'm
  considering to move either to TypeScript or to GWT.
  
  In the case of GWT, I know that I'm "arriving" very late.
  There are some people that even told me to stay away from
  it. However, I also want to hear directly from people who
  still use GWT.
  
  I don't want too much abstraction of the DOM. Indeed, I
  want to have absolute control over it if necessary. Could
  be GWT used that way, as a "thin" layer over _javascript_? I
  read about Elemental, but it seems to be very tied to
  WebKit and experimental. I also have read about GwtQuery.
  Would it be what I need to manipulate the DOM, instead of
  Elemental? Is it still maintained? Does it still receive
  new features?
  
  With this I don't mean that I'm not interested in using
  the GWT widgets. It's the opposite really. But I want to
  be sure that, if I need it, I still can do things at a
  lower level.
  
  Thank you.
  


-- 
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 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 "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

Re: GWT Design Error (Eclipse Mars?

2015-10-26 Thread Jens


> If they could only open source it ...
>

You have seen the Github link above?

-- 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT as a "thin" layer over JavaScript?

2015-10-26 Thread JonL
I think the key to remember is that when working on the client side code 
for GWT is that, even though you are writing in Java, your are ultimately 
writing Javascript.  It's a key mindset, there is nothing that you can't do 
in Javascript that you can't do in GWT with the right mindset.  Typescript 
is even just javascript once its boiled down and sent to the browser.

The GWT compiler can even offer you some optimizations and performance 
gains over regular Javascript.

If you find that you don't need some of the things at runtime that GWT 
enables, like type casting, class checking, etc, you can turn them off via 
a compiler flag.  Maybe you only use those flags during development and 
testing, but turn them off in production to reduce code size and speed 
things up.

GWT client side code isn't a wrapper around Javascript, it IS javascript, 
highly optimized and transpiled from Java.  "Wrappers" of common Javascript 
projects are simply thin facades over the javascript, if they are written 
correctly, according to my standards.

GWT doesn't preclude the usage of other Javascript libraries either and 
there are very few instances where you would find GWT incompatible with any 
particular Javascript project.

On Monday, October 26, 2015 at 8:29:35 AM UTC-7, negora wrote:
>
> That information is interesting. I had read about JSNI, but not about 
> JavaScript overlays. The tool from Vaadin also looks like useful. Thank you.
>
> I guess I'll have to read the entire tutorials and documentation from the 
> GWT website to know if I'm going to feel comfortable in this new scenario. 
> I'm so used to do all these things with JavaScript, that I'm a little 
> afraid :S .
>
>
> On 26/10/15 14:57, JonL wrote:
>
> There are multiple ways to do this.  
>
> See these pages:
>
> http://www.gwtproject.org/doc/latest/DevGuideCodingBasicsJSNI.html
> http://www.gwtproject.org/doc/latest/DevGuideCodingBasicsOverlay.html
>
> GWT 2.8, if I remember correctly, will also introduce a new Elemental 
> generator, so the Elemental jar will always be up to date.
>
> Vaadin also has an api generator for GWT.
>
> https://github.com/vaadin/gwt-api-generator
>
> On Monday, October 26, 2015 at 2:51:18 AM UTC-7, negora wrote: 
>>
>> Hello:
>>
>> I code in both JavaScript and Java. I make my back-ends with Java whereas 
>> I use JavaScript for the front-ends. Nothing new. However, for the last 
>> years I aimed my career so much to Java, that I missed out many important 
>> JavaScript libraries and projects. Instead, I always used my old custom 
>> JavaScript libraries. Now I want to change that, but I got a little tired 
>> of the dynamic typing, among other ugly things of JavaScript. That's why 
>> I'm considering to move either to TypeScript or to GWT.
>>
>> In the case of GWT, I know that I'm "arriving" very late. There are some 
>> people that even told me to stay away from it. However, I also want to hear 
>> directly from people who still use GWT.
>>
>> I don't want too much abstraction of the DOM. Indeed, I want to have 
>> absolute control over it if necessary. Could be GWT used that way, as a 
>> "thin" layer over JavaScript? I read about Elemental, but it seems to be 
>> very tied to WebKit and experimental. I also have read about GwtQuery. 
>> Would it be what I need to manipulate the DOM, instead of Elemental? Is it 
>> still maintained? Does it still receive new features?
>>
>> With this I don't mean that I'm not interested in using the GWT widgets. 
>> It's the opposite really. But I want to be sure that, if I need it, I still 
>> can do things at a lower level.
>>
>> Thank you.
>>
>> -- 
> 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-we...@googlegroups.com 
> .
> 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 "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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT as a "thin" layer over JavaScript?

2015-10-26 Thread negora

  
  
That information is interesting. I had read about JSNI, but not
about _javascript_ overlays. The tool from Vaadin also looks like
useful. Thank you.

I guess I'll have to read the entire tutorials and documentation
from the GWT website to know if I'm going to feel comfortable in
this new scenario. I'm so used to do all these things with
_javascript_, that I'm a little afraid :S .


On 26/10/15 14:57, JonL wrote:


  
There are multiple ways to do this.  


See these pages:


http://www.gwtproject.org/doc/latest/DevGuideCodingBasicsJSNI.html
http://www.gwtproject.org/doc/latest/DevGuideCodingBasicsOverlay.html


GWT 2.8, if I remember correctly, will also introduce a new
  Elemental generator, so the Elemental jar will always be up to
  date.


Vaadin also has an api generator for GWT.


https://github.com/vaadin/gwt-api-generator
  
  On Monday, October 26, 2015 at 2:51:18 AM UTC-7, negora wrote:
  
Hello:
  
  I code in both _javascript_ and Java. I make my back-ends
  with Java whereas I use _javascript_ for the front-ends.
  Nothing new. However, for the last years I aimed my career
  so much to Java, that I missed out many important
  _javascript_ libraries and projects. Instead, I always used
  my old custom _javascript_ libraries. Now I want to change
  that, but I got a little tired of the dynamic typing,
  among other ugly things of _javascript_. That's why I'm
  considering to move either to TypeScript or to GWT.
  
  In the case of GWT, I know that I'm "arriving" very late.
  There are some people that even told me to stay away from
  it. However, I also want to hear directly from people who
  still use GWT.
  
  I don't want too much abstraction of the DOM. Indeed, I
  want to have absolute control over it if necessary. Could
  be GWT used that way, as a "thin" layer over _javascript_? I
  read about Elemental, but it seems to be very tied to
  WebKit and experimental. I also have read about GwtQuery.
  Would it be what I need to manipulate the DOM, instead of
  Elemental? Is it still maintained? Does it still receive
  new features?
  
  With this I don't mean that I'm not interested in using
  the GWT widgets. It's the opposite really. But I want to
  be sure that, if I need it, I still can do things at a
  lower level.
  
  Thank you.
  

  

  
  -- 
  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 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 "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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT Design Error (Eclipse Mars?

2015-10-26 Thread Alain Ekambi
If they could only open source it ...

On 26 October 2015 at 15:33, Jens  wrote:

> GWT Designer does not work with newer GWT versions as no one is doing
> maintenance for GWT Designer right now. It is kind of considered deprecated
> and unsupported from a GWT point of view.
>
> But I guess you can create pull request to fix the issue:
> https://github.com/gwt-plugins/gwt-designer
>
> -- 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 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/ 

-- 
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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT Design Error (Eclipse Mars?

2015-10-26 Thread Jens
GWT Designer does not work with newer GWT versions as no one is doing 
maintenance for GWT Designer right now. It is kind of considered deprecated 
and unsupported from a GWT point of view.

But I guess you can create pull request to fix the 
issue: https://github.com/gwt-plugins/gwt-designer

-- 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


GWT Design Error (Eclipse Mars?

2015-10-26 Thread Johannes Birkenberger
Hello, that ist my Error

Internal Error

encountered unexpected internal error. 

This could be caused by a bug or by a misconfiguration issue, conflict, 
partial update, etc.

java.lang.NoSuchMethodError: 
com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(Lcom/google/gwt/core/ext/TreeLogger;Ljava/lang/String;Z)Lcom/google/gwt/dev/cfg/ModuleDef;

*Show stack trace.*  
*Hide stack trace.*  

Stack trace:

java.lang.NoSuchMethodError: 
com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(Lcom/google/gwt/core/ext/TreeLogger;Ljava/lang/String;Z)Lcom/google/gwt/dev/cfg/ModuleDef;
at 
com.google.gwt.dev.shell.designtime.HostedModeSupportImpl.loadModule(HostedModeSupportImpl.java:85)
at 
com.google.gwt.dev.shell.designtime.HostedModeSupportImpl.createModuleSpaceHost(HostedModeSupportImpl.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at 
org.eclipse.wb.internal.core.utils.reflect.ReflectionUtils.invokeMethod(ReflectionUtils.java:901)
at 
com.google.gdt.eclipse.designer.hosted.tdt.HostedModeSupport.createModuleSpaceHost(HostedModeSupport.java:451)
at 
com.google.gwt.dev.shell.designtime.ModuleSpace.(ModuleSpace.java:60)
at 
com.google.gdt.eclipse.designer.webkit.jsni.ModuleSpaceWebKit.(ModuleSpaceWebKit.java:45)
at 
com.google.gdt.eclipse.designer.webkit.BrowserShellWebKit.setUrl(BrowserShellWebKit.java:85)
at 
com.google.gdt.eclipse.designer.hosted.tdt.HostedModeSupport.startup(HostedModeSupport.java:184)
at 
com.google.gdt.eclipse.designer.model.widgets.support.GwtState.initialize0(GwtState.java:248)
at 
com.google.gdt.eclipse.designer.model.widgets.support.GwtState.initialize(GwtState.java:206)
at 
com.google.gdt.eclipse.designer.parser.ParseFactory.getClassLoader(ParseFactory.java:429)
at 
org.eclipse.wb.internal.core.parser.AbstractParseFactory.initializeClassLoader(AbstractParseFactory.java:732)
at 
com.google.gdt.eclipse.designer.parser.ParseFactory.getRootContext(ParseFactory.java:117)
at 
org.eclipse.wb.internal.core.parser.JavaInfoParser.prepareParseContext(JavaInfoParser.java:1182)
at 
org.eclipse.wb.internal.core.parser.JavaInfoParser.parse(JavaInfoParser.java:242)
at 
org.eclipse.wb.internal.core.parser.JavaInfoParser.access$9(JavaInfoParser.java:238)
at 
org.eclipse.wb.internal.core.parser.JavaInfoParser$1.runObject(JavaInfoParser.java:153)
at 
org.eclipse.wb.internal.core.parser.JavaInfoParser$1.runObject(JavaInfoParser.java:1)
at 
org.eclipse.wb.internal.core.utils.execution.ExecutionUtils.runDesignTime(ExecutionUtils.java:159)
at 
org.eclipse.wb.internal.core.parser.JavaInfoParser.parse(JavaInfoParser.java:151)
at 
org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF(DesignPage.java:534)
at 
org.eclipse.wb.internal.core.editor.DesignPage.access$9(DesignPage.java:522)
at 
org.eclipse.wb.internal.core.editor.DesignPage$8$1.run(DesignPage.java:449)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:186)
at 
org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:4761)
at 
org.eclipse.wb.internal.core.editor.DesignPage$8.run(DesignPage.java:446)
at 
org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:463)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:371)
at 
org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:500)
at 
org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF_withProgress(DesignPage.java:465)
at 
org.eclipse.wb.internal.core.editor.DesignPage.internal_refreshGEF(DesignPage.java:415)
at 
org.eclipse.wb.internal.core.editor.UndoManager.refreshDesignerEditor(UndoManager.java:381)
at 
org.eclipse.wb.internal.core.editor.UndoManager.activate(UndoManager.java:90)
at 
org.eclipse.wb.internal.core.editor.DesignPage.handleActiveState_True(DesignPage.java:263)
at 
org.eclipse.wb.internal.core.editor.DesignPage.handleActiveState(DesignPage.java:241)
at 
org.eclipse.wb.internal.core.editor.multi.DefaultMultiMode.showPage(DefaultMultiMode.java:125)
at 
org.eclipse.wb.internal.core.editor.multi.DefaultMultiMode$1.widgetSelected(DefaultMultiMode.java:63)
at 
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4362)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113)
at org.eclips

CellTree only expands on clicking icon

2015-10-26 Thread Jaron Shulver
Hi,

I want to have a CellTree which expands when you click anywhere on the 
cell, not just on the icon. This seems to be an open issue: 
https://github.com/gwtproject/gwt/issues/8334 and of course the view is 
inaccessible so short of re-implementing the entire structure I wish to 
just hack around the problem by triggering a JavaScript click event using 
GQuery on the image icon when an item is selected. 

This it does not seem to work if I try click or mousedown (it *seems* to be 
the mousedown event that causes the expanding animation to start) on either 
the img element or the div.cellTreeImageIcon above it. I'd rather avoid 
using the TreeNode expandChildNode call because expanding the children 
individually breaks the animations.

Any ideas?

Thanks,
Jaron

-- 
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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT as a "thin" layer over JavaScript?

2015-10-26 Thread Ed
Hi negora,

Its never to late for GWT.
Just be aware that there are transitions in the works as GWT moves into 2.8
and 3.0.
Search this list for road map and you will find interesting takes on the
where GWT is headed.
At first GWT covered the many discrepancies of the browsers, now that the
java script is supported in a standard way, GWT is transforming into a
transpiler so we can write java code in our editor for translation into
java script on the client side. This is a big plus no matter how you look
at it.

Regards

Ed



On Mon, Oct 26, 2015 at 4:24 AM, negora  wrote:

> Hello:
>
> I code in both JavaScript and Java. I make my back-ends with Java whereas
> I use JavaScript for the front-ends. Nothing new. However, for the last
> years I aimed my career so much to Java, that I missed out many important
> JavaScript libraries and projects. Instead, I always used my old custom
> JavaScript libraries. Now I want to change that, but I got a little tired
> of the dynamic typing, among other ugly things of JavaScript. That's why
> I'm considering to move either to TypeScript or to GWT.
>
> In the case of GWT, I know that I'm "arriving" very late. There are some
> people that even told me to stay away from it. However, I also want to hear
> directly from people who still use GWT.
>
> I don't want too much abstraction of the DOM. Indeed, I want to have
> absolute control over it if necessary. Could be GWT used that way, as a
> "thin" layer over JavaScript? I read about Elemental, but it seems to be
> very tied to WebKit and experimental. I also have read about GwtQuery.
> Would it be what I need to manipulate the DOM, instead of Elemental? Is it
> still maintained? Does it still receive new features?
>
> With this I don't mean that I'm not interested in using the GWT widgets.
> It's the opposite really. But I want to be sure that, if I need it, I still
> can do things at a lower level.
>
> Thank you.
>
> --
> 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 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 "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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT as a "thin" layer over JavaScript?

2015-10-26 Thread JonL
There are multiple ways to do this.  

See these pages:

http://www.gwtproject.org/doc/latest/DevGuideCodingBasicsJSNI.html
http://www.gwtproject.org/doc/latest/DevGuideCodingBasicsOverlay.html

GWT 2.8, if I remember correctly, will also introduce a new Elemental 
generator, so the Elemental jar will always be up to date.

Vaadin also has an api generator for GWT.

https://github.com/vaadin/gwt-api-generator

On Monday, October 26, 2015 at 2:51:18 AM UTC-7, negora wrote:
>
> Hello:
>
> I code in both JavaScript and Java. I make my back-ends with Java whereas 
> I use JavaScript for the front-ends. Nothing new. However, for the last 
> years I aimed my career so much to Java, that I missed out many important 
> JavaScript libraries and projects. Instead, I always used my old custom 
> JavaScript libraries. Now I want to change that, but I got a little tired 
> of the dynamic typing, among other ugly things of JavaScript. That's why 
> I'm considering to move either to TypeScript or to GWT.
>
> In the case of GWT, I know that I'm "arriving" very late. There are some 
> people that even told me to stay away from it. However, I also want to hear 
> directly from people who still use GWT.
>
> I don't want too much abstraction of the DOM. Indeed, I want to have 
> absolute control over it if necessary. Could be GWT used that way, as a 
> "thin" layer over JavaScript? I read about Elemental, but it seems to be 
> very tied to WebKit and experimental. I also have read about GwtQuery. 
> Would it be what I need to manipulate the DOM, instead of Elemental? Is it 
> still maintained? Does it still receive new features?
>
> With this I don't mean that I'm not interested in using the GWT widgets. 
> It's the opposite really. But I want to be sure that, if I need it, I still 
> can do things at a lower level.
>
> Thank you.
>
>

-- 
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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: JsInterop: Casting native javascript objects in gwt

2015-10-26 Thread Brian Pedersen
I didn't get that quite right, the generated function seem to fail doing 
the lookup in the castableTypeMap, which must be it's way of assuring that 
the types are actually castable to the target type.

Den mandag den 26. oktober 2015 kl. 13.16.21 UTC+1 skrev Brian Pedersen:
>
> It seems the generated 
> function 
> com_google_gwt_lang_Cast_canCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z
>  
> only supports strings, maps, numbers and booleans.
>
> function 
> com_google_gwt_lang_Cast_canCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(src_0,
>  
> dstId){
>   return typeof src_0 === 'string' && 
> !!com_google_gwt_lang_Cast_stringCastMap[dstId] 
>   || src_0.java_lang_Object_castableTypeMap && 
> !!src_0.java_lang_Object_castableTypeMap[dstId] 
>   || typeof src_0 === 'number' && 
> !!com_google_gwt_lang_Cast_doubleCastMap[dstId] 
>   || typeof src_0 === 'boolean' && 
> !!com_google_gwt_lang_Cast_booleanCastMap[dstId];
> }
>
> /Brian
>
> Den mandag den 26. oktober 2015 kl. 13.01.40 UTC+1 skrev Brian Pedersen:
>>
>> Thank's for pointing that out. So i switched to the new annotations in 
>> jsinterop.annotations and activated the new mode with -jsInteropMode 
>> JS_RC.
>>
>> The cast still doesn't work though :(
>>
>> Instead of a java.lang.ClassCastException, I now get a  Uncaught [object 
>> Object] during the cast.
>> Once again, everything works if I use the concrete type and remove the 
>> cast.
>>
>> POM: https://github.com/bitwerk/jspoc/blob/master/pom.xml
>> Javascript: 
>> https://github.com/bitwerk/jspoc/blob/master/src/main/webapp/jspoc.html
>> GWT: 
>> https://github.com/bitwerk/jspoc/tree/master/src/main/java/dk/bitwerk/client
>>
>> /Brian
>>
>> Den mandag den 26. oktober 2015 kl. 12.29.21 UTC+1 skrev Jens:
>>>
>>>
>>> I am using GWT 2.8.0-SNAPSHOT, but the new annotations does not work for 
 me.

 I tried using @JsType(namespace = "acme", name = "MyJavaScriptObject"), 
 as described in the new version of the JsInterop document, but apparently 
 the namespace and name attributes are not there in the jar file.
 Same thing with the @JsExport and @JsNamespace, I currently have to use 
 them or things stop working.

>>>
>>> The new annotations have a different package: jsinterop.annotations. 
>>> Also @JsExport does not exist anymore in the new JsInterop version, you 
>>> just use @JsType.
>>>
>>> To activate the new annotations you also have to change the JsInterop 
>>> mode via -jsInteropMode JS_RC
>>>
>>>
>>> -- 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: JsInterop: Casting native javascript objects in gwt

2015-10-26 Thread Brian Pedersen
It seems the generated 
function 
com_google_gwt_lang_Cast_canCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z
 
only supports strings, maps, numbers and booleans.

function 
com_google_gwt_lang_Cast_canCast__Ljava_lang_Object_2Lcom_google_gwt_core_client_JavaScriptObject_2Z(src_0,
 
dstId){
  return typeof src_0 === 'string' && 
!!com_google_gwt_lang_Cast_stringCastMap[dstId] 
  || src_0.java_lang_Object_castableTypeMap && 
!!src_0.java_lang_Object_castableTypeMap[dstId] 
  || typeof src_0 === 'number' && 
!!com_google_gwt_lang_Cast_doubleCastMap[dstId] 
  || typeof src_0 === 'boolean' && 
!!com_google_gwt_lang_Cast_booleanCastMap[dstId];
}

/Brian

Den mandag den 26. oktober 2015 kl. 13.01.40 UTC+1 skrev Brian Pedersen:
>
> Thank's for pointing that out. So i switched to the new annotations in 
> jsinterop.annotations and activated the new mode with -jsInteropMode JS_RC
> .
>
> The cast still doesn't work though :(
>
> Instead of a java.lang.ClassCastException, I now get a  Uncaught [object 
> Object] during the cast.
> Once again, everything works if I use the concrete type and remove the 
> cast.
>
> POM: https://github.com/bitwerk/jspoc/blob/master/pom.xml
> Javascript: 
> https://github.com/bitwerk/jspoc/blob/master/src/main/webapp/jspoc.html
> GWT: 
> https://github.com/bitwerk/jspoc/tree/master/src/main/java/dk/bitwerk/client
>
> /Brian
>
> Den mandag den 26. oktober 2015 kl. 12.29.21 UTC+1 skrev Jens:
>>
>>
>> I am using GWT 2.8.0-SNAPSHOT, but the new annotations does not work for 
>>> me.
>>>
>>> I tried using @JsType(namespace = "acme", name = "MyJavaScriptObject"), 
>>> as described in the new version of the JsInterop document, but apparently 
>>> the namespace and name attributes are not there in the jar file.
>>> Same thing with the @JsExport and @JsNamespace, I currently have to use 
>>> them or things stop working.
>>>
>>
>> The new annotations have a different package: jsinterop.annotations. 
>> Also @JsExport does not exist anymore in the new JsInterop version, you 
>> just use @JsType.
>>
>> To activate the new annotations you also have to change the JsInterop 
>> mode via -jsInteropMode JS_RC
>>
>>
>> -- 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: JsInterop: Casting native javascript objects in gwt

2015-10-26 Thread Brian Pedersen
Thank's for pointing that out. So i switched to the new annotations in 
jsinterop.annotations and activated the new mode with -jsInteropMode JS_RC.

The cast still doesn't work though :(

Instead of a java.lang.ClassCastException, I now get a  Uncaught [object 
Object] during the cast.
Once again, everything works if I use the concrete type and remove the cast.

POM: https://github.com/bitwerk/jspoc/blob/master/pom.xml
Javascript: 
https://github.com/bitwerk/jspoc/blob/master/src/main/webapp/jspoc.html
GWT: 
https://github.com/bitwerk/jspoc/tree/master/src/main/java/dk/bitwerk/client

/Brian

Den mandag den 26. oktober 2015 kl. 12.29.21 UTC+1 skrev Jens:
>
>
> I am using GWT 2.8.0-SNAPSHOT, but the new annotations does not work for 
>> me.
>>
>> I tried using @JsType(namespace = "acme", name = "MyJavaScriptObject"), 
>> as described in the new version of the JsInterop document, but apparently 
>> the namespace and name attributes are not there in the jar file.
>> Same thing with the @JsExport and @JsNamespace, I currently have to use 
>> them or things stop working.
>>
>
> The new annotations have a different package: jsinterop.annotations. Also 
> @JsExport does not exist anymore in the new JsInterop version, you just 
> use @JsType.
>
> To activate the new annotations you also have to change the JsInterop mode 
> via -jsInteropMode JS_RC
>
>
> -- 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: JsInterop: Casting native javascript objects in gwt

2015-10-26 Thread Jens


> I am using GWT 2.8.0-SNAPSHOT, but the new annotations does not work for 
> me.
>
> I tried using @JsType(namespace = "acme", name = "MyJavaScriptObject"), 
> as described in the new version of the JsInterop document, but apparently 
> the namespace and name attributes are not there in the jar file.
> Same thing with the @JsExport and @JsNamespace, I currently have to use 
> them or things stop working.
>

The new annotations have a different package: jsinterop.annotations. Also 
@JsExport does not exist anymore in the new JsInterop version, you just use 
@JsType.

To activate the new annotations you also have to change the JsInterop mode 
via -jsInteropMode JS_RC


-- 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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: JsInterop: Casting native javascript objects in gwt

2015-10-26 Thread Brian Pedersen
Ahhh, I just realized that the new annotations are in a different 
package, jsinterop.annotations instead of com.google.gwt.core.client.js :)

/Brian

Den mandag den 26. oktober 2015 kl. 12.18.21 UTC+1 skrev Brian Pedersen:
>
> I am using GWT 2.8.0-SNAPSHOT, but the new annotations does not work for 
> me.
>
> I tried using @JsType(namespace = "acme", name = "MyJavaScriptObject"), 
> as described in the new version of the JsInterop document, but apparently 
> the namespace and name attributes are not there in the jar file.
> Same thing with the @JsExport and @JsNamespace, I currently have to use 
> them or things stop working.
>
> My gwt-user-2.8.0-SNAPSHOT.jar, which contains the annotations, is from 
> today.
>
> This is the pom I am using: 
> https://github.com/bitwerk/jspoc/blob/master/pom.xml
>
> /Brian
>  
> Den mandag den 26. oktober 2015 kl. 11.43.32 UTC+1 skrev Thomas Broyer:
>>
>> You may want to use GWT 2.8.0-SNAPSHOT and the new JsInterop annotations; 
>> as your usecase maybe is just not supported with the "old" annotations.
>>
>> On Monday, October 26, 2015 at 11:10:28 AM UTC+1, Brian Pedersen wrote:
>>>
>>> I have a dispatch method, exposed through JsInterop, which can take 
>>> various kinds of payloads.
>>>
>>> Once called from native javascript, I need to cast the payload, but this 
>>> doesn't quite work as I would like it too.
>>>
>>> Here is a simplified example.
>>>
>>> *GWT:*
>>> @JsExport
>>> @JsType
>>> @JsNamespace("foo")
>>> public class Dispatcher {
>>> public String dispatch(String action, Payload payload){
>>> if("action1".equals(action))
>>> return dispatchWithCast(payload);
>>> return "Unknown action: " + action;
>>> }
>>> public String dispatchWithCast(Payload payload){
>>> ConcretePayload w = (ConcretePayload) payload;
>>> return w.foo;
>>> }
>>> }
>>>
>>> @JsExport
>>> @JsType
>>> public class Payload {}
>>>
>>> @JsExport
>>> @JsType
>>> public class ConcretePayload extends Payload {
>>> public String foo;
>>> public int bar;
>>> }
>>>
>>> *Javascript:*
>>> var test = new foo.Dispatcher();
>>> alert("Dispatch: " + test.dispatch("action1", {"foo": "a", "bar": 2})); 
>>> // Uncaught java.lang.ClassCastException
>>>
>>> Everything works just fine if I replace the Payload type in the 
>>> Dispatcher class with ConcretePayload, and removes the cast.
>>>
>>> I guess this this may be beyond the capabilities of the transpiler, I 
>>> just need to figure out an alternative approach.
>>>
>>> Any ideas?
>>>
>>> (By the way, I am using the sso linker.)
>>>
>>

-- 
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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: JsInterop: Casting native javascript objects in gwt

2015-10-26 Thread Brian Pedersen
I am using GWT 2.8.0-SNAPSHOT, but the new annotations does not work for me.

I tried using @JsType(namespace = "acme", name = "MyJavaScriptObject"), as 
described in the new version of the JsInterop document, but apparently the 
namespace and name attributes are not there in the jar file.
Same thing with the @JsExport and @JsNamespace, I currently have to use 
them or things stop working.

My gwt-user-2.8.0-SNAPSHOT.jar, which contains the annotations, is from 
today.

This is the pom I am using: 
https://github.com/bitwerk/jspoc/blob/master/pom.xml

/Brian
 
Den mandag den 26. oktober 2015 kl. 11.43.32 UTC+1 skrev Thomas Broyer:
>
> You may want to use GWT 2.8.0-SNAPSHOT and the new JsInterop annotations; 
> as your usecase maybe is just not supported with the "old" annotations.
>
> On Monday, October 26, 2015 at 11:10:28 AM UTC+1, Brian Pedersen wrote:
>>
>> I have a dispatch method, exposed through JsInterop, which can take 
>> various kinds of payloads.
>>
>> Once called from native javascript, I need to cast the payload, but this 
>> doesn't quite work as I would like it too.
>>
>> Here is a simplified example.
>>
>> *GWT:*
>> @JsExport
>> @JsType
>> @JsNamespace("foo")
>> public class Dispatcher {
>> public String dispatch(String action, Payload payload){
>> if("action1".equals(action))
>> return dispatchWithCast(payload);
>> return "Unknown action: " + action;
>> }
>> public String dispatchWithCast(Payload payload){
>> ConcretePayload w = (ConcretePayload) payload;
>> return w.foo;
>> }
>> }
>>
>> @JsExport
>> @JsType
>> public class Payload {}
>>
>> @JsExport
>> @JsType
>> public class ConcretePayload extends Payload {
>> public String foo;
>> public int bar;
>> }
>>
>> *Javascript:*
>> var test = new foo.Dispatcher();
>> alert("Dispatch: " + test.dispatch("action1", {"foo": "a", "bar": 2})); 
>> // Uncaught java.lang.ClassCastException
>>
>> Everything works just fine if I replace the Payload type in the 
>> Dispatcher class with ConcretePayload, and removes the cast.
>>
>> I guess this this may be beyond the capabilities of the transpiler, I 
>> just need to figure out an alternative approach.
>>
>> Any ideas?
>>
>> (By the way, I am using the sso linker.)
>>
>

-- 
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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: JsInterop: Casting native javascript objects in gwt

2015-10-26 Thread Thomas Broyer
You may want to use GWT 2.8.0-SNAPSHOT and the new JsInterop annotations; 
as your usecase maybe is just not supported with the "old" annotations.

On Monday, October 26, 2015 at 11:10:28 AM UTC+1, Brian Pedersen wrote:
>
> I have a dispatch method, exposed through JsInterop, which can take 
> various kinds of payloads.
>
> Once called from native javascript, I need to cast the payload, but this 
> doesn't quite work as I would like it too.
>
> Here is a simplified example.
>
> *GWT:*
> @JsExport
> @JsType
> @JsNamespace("foo")
> public class Dispatcher {
> public String dispatch(String action, Payload payload){
> if("action1".equals(action))
> return dispatchWithCast(payload);
> return "Unknown action: " + action;
> }
> public String dispatchWithCast(Payload payload){
> ConcretePayload w = (ConcretePayload) payload;
> return w.foo;
> }
> }
>
> @JsExport
> @JsType
> public class Payload {}
>
> @JsExport
> @JsType
> public class ConcretePayload extends Payload {
> public String foo;
> public int bar;
> }
>
> *Javascript:*
> var test = new foo.Dispatcher();
> alert("Dispatch: " + test.dispatch("action1", {"foo": "a", "bar": 2})); 
> // Uncaught java.lang.ClassCastException
>
> Everything works just fine if I replace the Payload type in the Dispatcher 
> class 
> with ConcretePayload, and removes the cast.
>
> I guess this this may be beyond the capabilities of the transpiler, I just 
> need to figure out an alternative approach.
>
> Any ideas?
>
> (By the way, I am using the sso linker.)
>

-- 
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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


JsInterop: Casting native javascript objects in gwt

2015-10-26 Thread Brian Pedersen
I have a dispatch method, exposed through JsInterop, which can take various 
kinds of payloads.

Once called from native javascript, I need to cast the payload, but this 
doesn't quite work as I would like it too.

Here is a simplified example.

*GWT:*
@JsExport
@JsType
@JsNamespace("foo")
public class Dispatcher {
public String dispatch(String action, Payload payload){
if("action1".equals(action))
return dispatchWithCast(payload);
return "Unknown action: " + action;
}
public String dispatchWithCast(Payload payload){
ConcretePayload w = (ConcretePayload) payload;
return w.foo;
}
}

@JsExport
@JsType
public class Payload {}

@JsExport
@JsType
public class ConcretePayload extends Payload {
public String foo;
public int bar;
}

*Javascript:*
var test = new foo.Dispatcher();
alert("Dispatch: " + test.dispatch("action1", {"foo": "a", "bar": 2})); 
// Uncaught java.lang.ClassCastException

Everything works just fine if I replace the Payload type in the Dispatcher 
class 
with ConcretePayload, and removes the cast.

I guess this this may be beyond the capabilities of the transpiler, I just 
need to figure out an alternative approach.

Any ideas?

(By the way, I am using the sso linker.)

-- 
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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Using GWT as a thin layer over JavaScript?

2015-10-26 Thread negora
Hello:

Just a few minutes ago I wrote a message like this one, but I don't know 
where it has gone. Anyway, I'm going to try to reproduce it again.

I'm a developer who code both in Java and JavaScript. I use the former to 
make the back-ends, and the later for the front-ends. Nothing new, I know. 
But I aimed my career so much to Java, that I missed out much about 
JavaScript. I kept using my own and old fashioned JavaScript libraries. But 
now I want to change that to be more productive. My problem is that I'm 
getting tired of the dynamic typing, among other ugly thing of JavaScript 
(i.e. lack of native modules; although that's going to change with 
ECMAScript 6). That led me to consider TypeScript and GWT.

I'm "arriving" late to GWT. Some people have even recommended me to stay 
away from it. However, I also want to hear from people who use GWT daily.

I want to know if it's possible to use GWT without abstracting the DOM too 
much, just as a thin layer over JavaScript. I'm interested in using the 
widgets, of course. But I also want to be sure that I can manipulate the 
DOM if I needed (customers tend to make you change very specific parts). 
I've read about Elemental. But I seems to be tied to WebKit too much and 
that it's experimental yet. I've also read about GwtQuery or GQuery. Is it 
the thing that I need? Is it still maintained and receive new features?

Other topic that worries me it's the UI design. I feel comfortable with 
HTML and CSS. In GWT, you can make the UI in a programmatic way or in a 
declarative way, using UiBinder. I think that I would choose the last one, 
because it would give me a better picture of the whole interface, and 
because it's more similar to how I work with HTML. But, Could I mix HTML 
without much hassle? Are there common problems that I must be aware about?

Finally, I've read that there will be a new GWTCon in November, in Florenze 
(Italy), and there will be news about GWT 3.0. Given that GWT 3.0 could 
suppose a break from the 2.x series, Do you recommend me to wait until the 
version 3.0 is released, so that I don't have to "un-learn" many things?

Thank you!

-- 
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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


GWT as a "thin" layer over JavaScript?

2015-10-26 Thread negora
Hello:

I code in both JavaScript and Java. I make my back-ends with Java whereas I 
use JavaScript for the front-ends. Nothing new. However, for the last years 
I aimed my career so much to Java, that I missed out many important 
JavaScript libraries and projects. Instead, I always used my old custom 
JavaScript libraries. Now I want to change that, but I got a little tired 
of the dynamic typing, among other ugly things of JavaScript. That's why 
I'm considering to move either to TypeScript or to GWT.

In the case of GWT, I know that I'm "arriving" very late. There are some 
people that even told me to stay away from it. However, I also want to hear 
directly from people who still use GWT.

I don't want too much abstraction of the DOM. Indeed, I want to have 
absolute control over it if necessary. Could be GWT used that way, as a 
"thin" layer over JavaScript? I read about Elemental, but it seems to be 
very tied to WebKit and experimental. I also have read about GwtQuery. 
Would it be what I need to manipulate the DOM, instead of Elemental? Is it 
still maintained? Does it still receive new features?

With this I don't mean that I'm not interested in using the GWT widgets. 
It's the opposite really. But I want to be sure that, if I need it, I still 
can do things at a lower level.

Thank you.

-- 
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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: SEO Google Crawlable experience ?

2015-10-26 Thread Vassilis Virvilis
Glad to hear it.

Unfortunately I don't know to answer your question - but if you find out
please post it back here for future reference.

One other question is # or #!? Will google try to index plain # or you need
to have #! in the url?



On Mon, Oct 26, 2015 at 10:48 AM, Ed Bras  wrote:

> Thanks Vassilis.
> I just solved part of the issue: I commented a line robots.txt file such
> that it can crawl the /resouces folder that contains all images/css/js.
> So google was able to get further, and show correctly the first screen.
> I just have to find out how it's able to crawl the rest of the screens. It
> hink through a sitemap, but I am a bit confused how the sitemap should look
> ? Should I just use the full ur's with the history token ? example:
> www.leuker.nl/index.html#OtherPage ?
> - Ed
> ​
>
> --
> 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 http://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Vassilis Virvilis

-- 
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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: SEO Google Crawlable experience ?

2015-10-26 Thread Ed Bras
Thanks Vassilis.
I just solved part of the issue: I commented a line robots.txt file such
that it can crawl the /resouces folder that contains all images/css/js.
So google was able to get further, and show correctly the first screen.
I just have to find out how it's able to crawl the rest of the screens. It
hink through a sitemap, but I am a bit confused how the sitemap should look
? Should I just use the full ur's with the history token ? example:
www.leuker.nl/index.html#OtherPage ?
- Ed
​

-- 
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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.