Re: live edit/chnage a gwt-lib as dependency with gwt-maven-archetypes possible ?

2016-08-19 Thread Thomas Broyer
How do you run SDM on that project? Would you be able to create a small repro 
case (or maybe this is an open source project?)

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


Re: Best Practice for JSON object recreation on client

2016-08-19 Thread Thomas Broyer
I think the crux is thinking in terms of messages (payloads) rather than 
"domain objects". This applies to DTOs vs domain objects too, with RPC or 
RequestFactory or whatever.

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


Re: Best Practice for JSON object recreation on client

2016-08-19 Thread Ignacio Baca Moreno-Torres
I mean java8 Streams 
(https://docs.oracle.com/javase/8/docs/api/java/util/stream/package-summary.html).
 
And I said that is the same as Immutable+FluentIterable because you can use 
Stream.of(values[]). And IMO this makes more sense in a DTO than using the 
interfaces on the collection frameworks (list, set, map, and worst with 
specific types like ArrayList, EnumSet, etc), because whats means a set in 
a DTO (I mean in the JSON), or worst an EnumSet? this information is not 
related to the schema of the transferred data, and I think that this makes 
the encoding/decoding much more complex. And with Streams you can get back 
to the java collection whenever you really need it quite easy, for example 
if you have 'String[] types' an array of enum names of TypeEnum, you can 
get the Set using Stream.of(types).map(TypeEnum::valueOf).colllect(toSet());

On Friday, August 19, 2016 at 8:04:37 PM UTC+2, Vassilis Virvilis wrote:
>
> Thanks for the write up. I would definitely have it in mind.
>
> BTW can you expand a bit on the stream thingy? Is there a link somewhere 
> to read about?
>
> Vassilis
>
> On Fri, Aug 19, 2016 at 8:59 PM, Ignacio Baca Moreno-Torres <
> ign...@bacamt.com > wrote:
>
>> Migrating everything is not a good idea, but you should give a try to 
>> arrays in new models or some parts of your application. We found that we 
>> frequently end up using Immutable collections and FluentIterable, and this 
>> is almost the same that using arrays and streams. As you said, migrating a 
>> whole project is too complicated, but you can just start using and 
>> progressively applying to the whole API if this actually works for you. In 
>> 3 years we past from using RequestFactory, to RestyGWT to almost plain 
>> request + jsinterop (actually autorest-gwt). Maybe using plain objects and 
>> arrays doesn't fit in your project, but you really should try.
>>
>> Emm... and a bit of context; I'm try to justify that the complexity added 
>> during parsing/encoding to support collections and generics really do not 
>> worth (depends on projects) if your API use DTOs and you have streams 
>> available. In our project the DTOs classes end up as a scheme definition, 
>> defining the name and type of each property and with a minimal overhead 
>> during parsing/encoding in JRE, GWT and even Android (
>> https://github.com/ibaca/autorest-nominatim-example/).
>>
>> On Friday, August 19, 2016 at 4:10:30 PM UTC+2, Vassilis Virvilis wrote:
>>>
>>> This makes sense for newer projects maybe.
>>>
>>> I already have a codebase and making trampolines to convert collections 
>>> and maps to arrays and don't know what is a terrifying option.
>>>
>>> I prefer to depend on gwt-jackson (which doesn't work for me - resty-gwt 
>>> works - resty-gwt is switching to gwt-jackson - eventually gwt-jackson will 
>>> work for me) especially if I am using jackson already in the server,
>>>
>>>
>>> On Fri, Aug 19, 2016 at 5:02 PM, Ignacio Baca Moreno-Torres <
>>> ign...@bacamt.com> wrote:
>>>
 IMHO supporting the whole collection frameworks is just an unnecessary 
 complication. Just use plain array, not generics need, and now that stream 
 are supported in GWT you has no excuse to use arrays. The inheritance is 
 not solved in JsInterop for now, just try to avoid.

 On Friday, August 19, 2016 at 3:38:28 PM UTC+2, Vassilis Virvilis wrote:
>
> How about transmitting nested Collections, Map, complex inheritance 
> and generics?
>
> On Fri, Aug 19, 2016 at 4:30 PM, zakaria amine  
> wrote:
>
>> I also tried to convert back to the original object: 
>>
>> @JsType(isNative=true, namespace=GLOBAL)
>> public class JSON {
>> public native static String stringify(Object obj);
>> public native static Object parse(String obj);
>>
>> }
>>
>> and then: 
>> //
>>
>>   Record converted = (Record) JSON.parse(json);
>>
>> and it works just fine. why would we need something like gwt-jackson 
>> anymore? 
>>
>>
>> Le vendredi 19 août 2016 12:05:32 UTC+2, zakaria amine a écrit :
>>>
>>> It works. I prefer your solution.
>>>
>>> Le vendredi 19 août 2016 11:51:35 UTC+2, Jens a écrit :



 Am Freitag, 19. August 2016 11:43:12 UTC+2 schrieb zakaria amine:
>
> I have tried something like: 
>
> @JsType(namespace=GLOBAL)
> public class Record {
> String id;
> String date;
> String data;
> public Record() {
> }
> }
>

 By default @JsType property "isNative" is false, so your Record 
 class is a non-native class that might get exported to JS if you use 
 -generateJsInteropExports during compilation. If you don't use that 
 flag 
 the @JsType is treated as a normal class I guess.

 You should use 

[gwt-contrib] Re: A possible JsInterop issue in GWT 2.8 RC2

2016-08-19 Thread Jens
@JsType with isNative = false (the default) are probably treated as normal 
classes now if you do not use -generateJsInteropExports as compiler 
parameter. I guess it works again if you use the compiler parameter?

-- J.

-- 
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/3f124c9c-f38b-413b-91c9-ab1c0c741e24%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[gwt-contrib] Hide GWT Development Mode window

2016-08-19 Thread Paul Stockley
When launching the SDM code server, is it possible to hide the swing UI 
window?

-- 
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/602d16f4-9e87-4120-bff5-74a0163dd930%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Best Practice for JSON object recreation on client

2016-08-19 Thread Vassilis Virvilis
Thanks for the write up. I would definitely have it in mind.

BTW can you expand a bit on the stream thingy? Is there a link somewhere to
read about?

Vassilis

On Fri, Aug 19, 2016 at 8:59 PM, Ignacio Baca Moreno-Torres <
igna...@bacamt.com> wrote:

> Migrating everything is not a good idea, but you should give a try to
> arrays in new models or some parts of your application. We found that we
> frequently end up using Immutable collections and FluentIterable, and this
> is almost the same that using arrays and streams. As you said, migrating a
> whole project is too complicated, but you can just start using and
> progressively applying to the whole API if this actually works for you. In
> 3 years we past from using RequestFactory, to RestyGWT to almost plain
> request + jsinterop (actually autorest-gwt). Maybe using plain objects and
> arrays doesn't fit in your project, but you really should try.
>
> Emm... and a bit of context; I'm try to justify that the complexity added
> during parsing/encoding to support collections and generics really do not
> worth (depends on projects) if your API use DTOs and you have streams
> available. In our project the DTOs classes end up as a scheme definition,
> defining the name and type of each property and with a minimal overhead
> during parsing/encoding in JRE, GWT and even Android (
> https://github.com/ibaca/autorest-nominatim-example/).
>
> On Friday, August 19, 2016 at 4:10:30 PM UTC+2, Vassilis Virvilis wrote:
>>
>> This makes sense for newer projects maybe.
>>
>> I already have a codebase and making trampolines to convert collections
>> and maps to arrays and don't know what is a terrifying option.
>>
>> I prefer to depend on gwt-jackson (which doesn't work for me - resty-gwt
>> works - resty-gwt is switching to gwt-jackson - eventually gwt-jackson will
>> work for me) especially if I am using jackson already in the server,
>>
>>
>> On Fri, Aug 19, 2016 at 5:02 PM, Ignacio Baca Moreno-Torres <
>> ign...@bacamt.com> wrote:
>>
>>> IMHO supporting the whole collection frameworks is just an unnecessary
>>> complication. Just use plain array, not generics need, and now that stream
>>> are supported in GWT you has no excuse to use arrays. The inheritance is
>>> not solved in JsInterop for now, just try to avoid.
>>>
>>> On Friday, August 19, 2016 at 3:38:28 PM UTC+2, Vassilis Virvilis wrote:

 How about transmitting nested Collections, Map, complex inheritance and
 generics?

 On Fri, Aug 19, 2016 at 4:30 PM, zakaria amine 
 wrote:

> I also tried to convert back to the original object:
>
> @JsType(isNative=true, namespace=GLOBAL)
> public class JSON {
> public native static String stringify(Object obj);
> public native static Object parse(String obj);
>
> }
>
> and then:
> //
>
>   Record converted = (Record) JSON.parse(json);
>
> and it works just fine. why would we need something like gwt-jackson
> anymore?
>
>
> Le vendredi 19 août 2016 12:05:32 UTC+2, zakaria amine a écrit :
>>
>> It works. I prefer your solution.
>>
>> Le vendredi 19 août 2016 11:51:35 UTC+2, Jens a écrit :
>>>
>>>
>>>
>>> Am Freitag, 19. August 2016 11:43:12 UTC+2 schrieb zakaria amine:

 I have tried something like:

 @JsType(namespace=GLOBAL)
 public class Record {
 String id;
 String date;
 String data;
 public Record() {
 }
 }

>>>
>>> By default @JsType property "isNative" is false, so your Record
>>> class is a non-native class that might get exported to JS if you use
>>> -generateJsInteropExports during compilation. If you don't use that flag
>>> the @JsType is treated as a normal class I guess.
>>>
>>> You should use @JsType(isNative=true, namespace=GLOBAL,
>>> name="Object") so that your Record class becomes a plain JavaScript 
>>> object
>>>
>>> -- 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-we...@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit
> .
> For more options, visit https://groups.google.com/d/optout.
>



 --
 Vassilis Virvilis

>>> --
>>> 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 https://groups.google.com/group/google-web-toolkit.
>>> 

Re: Best Practice for JSON object recreation on client

2016-08-19 Thread Ignacio Baca Moreno-Torres
Migrating everything is not a good idea, but you should give a try to 
arrays in new models or some parts of your application. We found that we 
frequently end up using Immutable collections and FluentIterable, and this 
is almost the same that using arrays and streams. As you said, migrating a 
whole project is too complicated, but you can just start using and 
progressively applying to the whole API if this actually works for you. In 
3 years we past from using RequestFactory, to RestyGWT to almost plain 
request + jsinterop (actually autorest-gwt). Maybe using plain objects and 
arrays doesn't fit in your project, but you really should try.

Emm... and a bit of context; I'm try to justify that the complexity added 
during parsing/encoding to support collections and generics really do not 
worth (depends on projects) if your API use DTOs and you have streams 
available. In our project the DTOs classes end up as a scheme definition, 
defining the name and type of each property and with a minimal overhead 
during parsing/encoding in JRE, GWT and even Android 
(https://github.com/ibaca/autorest-nominatim-example/).

On Friday, August 19, 2016 at 4:10:30 PM UTC+2, Vassilis Virvilis wrote:
>
> This makes sense for newer projects maybe.
>
> I already have a codebase and making trampolines to convert collections 
> and maps to arrays and don't know what is a terrifying option.
>
> I prefer to depend on gwt-jackson (which doesn't work for me - resty-gwt 
> works - resty-gwt is switching to gwt-jackson - eventually gwt-jackson will 
> work for me) especially if I am using jackson already in the server,
>
>
> On Fri, Aug 19, 2016 at 5:02 PM, Ignacio Baca Moreno-Torres <
> ign...@bacamt.com > wrote:
>
>> IMHO supporting the whole collection frameworks is just an unnecessary 
>> complication. Just use plain array, not generics need, and now that stream 
>> are supported in GWT you has no excuse to use arrays. The inheritance is 
>> not solved in JsInterop for now, just try to avoid.
>>
>> On Friday, August 19, 2016 at 3:38:28 PM UTC+2, Vassilis Virvilis wrote:
>>>
>>> How about transmitting nested Collections, Map, complex inheritance and 
>>> generics?
>>>
>>> On Fri, Aug 19, 2016 at 4:30 PM, zakaria amine  
>>> wrote:
>>>
 I also tried to convert back to the original object: 

 @JsType(isNative=true, namespace=GLOBAL)
 public class JSON {
 public native static String stringify(Object obj);
 public native static Object parse(String obj);

 }

 and then: 
 //

   Record converted = (Record) JSON.parse(json);

 and it works just fine. why would we need something like gwt-jackson 
 anymore? 


 Le vendredi 19 août 2016 12:05:32 UTC+2, zakaria amine a écrit :
>
> It works. I prefer your solution.
>
> Le vendredi 19 août 2016 11:51:35 UTC+2, Jens a écrit :
>>
>>
>>
>> Am Freitag, 19. August 2016 11:43:12 UTC+2 schrieb zakaria amine:
>>>
>>> I have tried something like: 
>>>
>>> @JsType(namespace=GLOBAL)
>>> public class Record {
>>> String id;
>>> String date;
>>> String data;
>>> public Record() {
>>> }
>>> }
>>>
>>
>> By default @JsType property "isNative" is false, so your Record class 
>> is a non-native class that might get exported to JS if you use 
>> -generateJsInteropExports during compilation. If you don't use that flag 
>> the @JsType is treated as a normal class I guess.
>>
>> You should use @JsType(isNative=true, namespace=GLOBAL, 
>> name="Object") so that your Record class becomes a plain JavaScript 
>> object
>>
>> -- 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-we...@googlegroups.com.
 Visit this group at https://groups.google.com/group/google-web-toolkit.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>
>>>
>>> -- 
>>> Vassilis Virvilis
>>>
>> -- 
>> 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 https://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, 

Re: GWT 2.8.0 RC2 is here!

2016-08-19 Thread Alexander Polunochev
Hi Daniel,

Link to download SDK on the official page still points to RC1.
http://www.gwtproject.org/download.html



On Thursday, August 11, 2016 at 6:25:18 PM UTC-7, Daniel Kurka wrote:
>
> Hi all,
>
> I just build the GWT 2.8.0 RC2 and pushed it to maven central. The 
> complete SDK is also available from here .
>
> Please start testing and let us know if you run into any trouble and file 
> bugs .
>
> We are planing to release this as GWT 2.8.0 if we do not here about any 
> serious issues within the next two weeks. The release notes for RC 
> 2
>  will 
> be made available shortly after this notice, in the mean time you can take 
> a look at the github repository 
> 
> .
>
> Daniel,
> on behalf of the GWT team
>

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


Re: [gwt-contrib] Re: Experimental release of Elemental2

2016-08-19 Thread 'Ray Cromwell' via GWT Contributors
Is the underlying object actually an ArrayBuffer? The return value is
supposed to be either an ArrayBuffer or a String depending on how you
invoke the reader API.

It seems to me that any methods which might throw CCE because of this
should actually return null, e.g.


class FileReader {

  public @JsOverlay ArrayBuffer getArrayBufferResult() {
 Object result = getResult();
 return result instanceof ArrayBuffer ? (ArrayBuffer) result : null;
  }

  public native Object getResult();
}


On Sat, Aug 6, 2016 at 7:08 PM, Luke Last  wrote:
> What's the best way to type cast objects? I get a ClassCastException in
> super dev mode with the following.
>
> ArrayBuffer ab = (ArrayBuffer) fileReader.result;
>
> The exception stems from com.google.gwt.lang.Cast#castToNative
>
> If I use JSNI to perform the cast it works fine.
>
> Thanks for working on Elemental2. I think it's super important for GWT.
> -Luke
>
>
> On Wednesday, June 29, 2016 at 8:23:51 PM UTC-4, Julien Dramaix wrote:
>>
>> A new experimental version of Elemental2 using the new JsInterop
>> specification has been pushed on Sonatype today.
>>
>>
>> You can try it by downloading the jar file or adding this following maven
>> dependency:
>>
>>
>> 
>>
>>  com.google.gwt
>>
>>  elemental2-experimental
>>
>>  16-06-30
>>
>> 
>>
>>
>> Then, inherits the elemental2 module:
>>
>>
>> 
>>
>>
>> This experimental version works only with the last 2.8-snapshot release of
>> GWT.
>>
>>
>> The goal of this release is to get feedback so don’t hesitate to report
>> any bugs, issues, concerns you have on this mailing list.
>>
>>
>> Important note: This is an experimental release and without doubt the
>> future updates until the final release are going to break code!
>>
>>
>> - Julien
>>
>>
> --
> 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/e0b5ae3d-e987-40e4-9d70-dfde08f1ffc2%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

-- 
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/CAPVRV7ekncp%2Bkd1dqnzf5%3DedFyxm5XMTFw32wa7Qh7Fu2%2BaUKw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [gwt-contrib] Re: Experimental release of Elemental2

2016-08-19 Thread James Horsley
Sounds great. Thanks!

On Fri, Aug 19, 2016 at 4:27 PM Julien Dramaix 
wrote:

> elemental2 is generated from closure extern files.
>
> The open source version of the generator should have a support for
> converting d.ts file to java. We don't know yet when the generator will be
> open sourced.
>
> On Fri, Aug 19, 2016 at 4:12 PM James Horsley 
> wrote:
>
>> I remember hearing that elemental2 was being generated from TypeScript
>> definitions. If that's true, is there any chance we could get a look at the
>> generator code too?
>>
>>
>> On Thursday, June 30, 2016 at 1:23:51 AM UTC+1, Julien Dramaix wrote:
>>>
>>> A new experimental version of Elemental2 using the new JsInterop
>>> specification has been pushed on Sonatype today.
>>>
>>> You can try it by downloading the jar file
>>> 
>>> or adding this following maven dependency:
>>>
>>> 
>>>
>>>  com.google.gwt
>>>
>>>  elemental2-experimental
>>>
>>>  16-06-30
>>>
>>> 
>>>
>>> Then, inherits the elemental2 module:
>>>
>>> 
>>>
>>> This experimental version works only with the last 2.8-snapshot release
>>> of GWT.
>>>
>>> The goal of this release is to get feedback so don’t hesitate to report
>>> any bugs, issues, concerns you have on this mailing list.
>>>
>>>
>>> Important note: This is an experimental release and without doubt the
>>> future updates until the final release are going to break code!
>>>
>>> - Julien
>>>
>>> --
>> 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/cd662014-000e-4823-8eab-0acb469c574c%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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/CABb_3%3D6y-xP%3DUU-LzPBXj68KPycBT6hdep%3DFehbh8QbPvb_vJQ%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAHUxr6PHZWmBfW3n73d2qadVRBWdWBTRiUv557ucvQA-KooOCQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: NPE with 2.8.0 rc2, SDM, Errai

2016-08-19 Thread Andrei Korzhevskii
I dont think it's a gwt issue.
I guess the issue will be resolved when errai will use gwt 2.8 final 
instead of gwt 2.8 beta

On Friday, August 19, 2016 at 6:24:10 PM UTC+3, Alberto Mancini wrote:
>
> Yes, adding the dependency actually solves the problem, thanks. 
> Actually i cannot remove errai profile in the real project. 
>
> In your opinion, is it an issue in gwt or errai  dependencies ?
>
> Thanks again,
>Alberto. 
>
>
> On Fri, Aug 19, 2016 at 3:49 PM Andrei Korzhevskii  > wrote:
>
>> Yes, that's true. Some dependency hell is going on there.
>> Commenting out the errai profile does not help but it helps if you just 
>> add gson 2.6.2 to your project as a dependency
>>
>> 
>> com.google.code.gson
>> gson
>> 2.6.2
>> 
>> 
>>
>>
>> On Friday, August 19, 2016 at 4:13:12 PM UTC+3, Seamus McMorrow wrote:
>>>
>>> I had a quick look at that sample project. 
>>> The errai profile which is activated by default at the bottom of your 
>>> pom.xml has a dependencyManagement section BOM import. 
>>> That is conflicting the versions for gson and some others, xerces.
>>>
>>> If you comment out the whole profile bit 
>>>
>>> On Friday, 19 August 2016 13:42:27 UTC+1, Andrei Korzhevskii wrote:

 Ok, I've tracked down the problem.
 The problem is that gwt-dev somehow relies on gson 1.7.2 but should 
 rely on 2.6.2. I dont know what the problem is. I hope Jens or Thomas can 
 help with that.
 The problem was that gson 1.7.2 incorrectly parsed provided source map 
 string and returned empty JsonObject which resulted in NPE.

 [INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ sourcemap ---
 [INFO] com.testcase:sourcemap:war:1.0-SNAPSHOT
 [INFO] +- com.google.gwt:gwt-user:jar:2.8.0-rc2:provided
 [INFO] |  +- com.google.jsinterop:jsinterop-annotations:jar:1.0.0:provided
 [INFO] |  +- 
 com.google.jsinterop:jsinterop-annotations:jar:sources:1.0.0:provided
 [INFO] |  +- javax.validation:validation-api:jar:1.0.0.GA:provided
 [INFO] |  +- javax.validation:validation-api:jar:sources:1.0.0.GA:provided
 [INFO] |  +- javax.servlet:javax.servlet-api:jar:3.1.0:provided
 [INFO] |  \- org.w3c.css:sac:jar:1.3:provided
 [INFO] \- com.google.gwt:gwt-dev:jar:2.8.0-rc2:provided
 [INFO]+- com.google.code.gson:gson:jar:1.7.2:provided (version managed 
 from 2.6.2)
 [INFO]+- org.ow2.asm:asm:jar:5.0.3:provided
 [INFO]+- org.ow2.asm:asm-util:jar:5.0.3:provided
 [INFO]|  \- org.ow2.asm:asm-tree:jar:5.0.3:provided
 [INFO]| \- (org.ow2.asm:asm:jar:5.0.3:provided - omitted for 
 duplicate)
 [INFO]+- org.ow2.asm:asm-commons:jar:5.0.3:provided
 [INFO]|  \- (org.ow2.asm:asm-tree:jar:5.0.3:provided - omitted for 
 duplicate)
 [INFO]+- colt:colt:jar:1.2.0:provided
 [INFO]+- ant:ant:jar:1.6.5:provided
 [INFO]+- commons-collections:commons-collections:jar:3.2.2:provided
 [INFO]+- commons-io:commons-io:jar:2.4:provided
 [INFO]+- com.ibm.icu:icu4j:jar:50.1.1:provided
 [INFO]+- tapestry:tapestry:jar:4.0.2:provided
 [INFO]+- net.sourceforge.htmlunit:htmlunit:jar:2.19:provided
 [INFO]|  +- xalan:xalan:jar:2.7.1:provided (version managed from 2.7.2)
 [INFO]|  |  \- xalan:serializer:jar:2.7.1:provided
 [INFO]|  | \- xml-apis:xml-apis:jar:1.4.01:provided (version 
 managed from 1.3.04)
 [INFO]|  +- 
 (commons-collections:commons-collections:jar:3.2.2:provided - version 
 managed from 3.2.1; omitted for duplicate)
 [INFO]|  +- org.apache.commons:commons-lang3:jar:3.1:provided (version 
 managed from 3.4)
 [INFO]|  +- org.apache.httpcomponents:httpclient:jar:4.5:provided 
 (version managed from 4.5.1)
 [INFO]|  |  +- org.apache.httpcomponents:httpcore:jar:4.4.1:provided
 [INFO]|  |  \- (commons-codec:commons-codec:jar:1.10:provided - 
 version managed from 1.9; omitted for duplicate)
 [INFO]|  +- org.apache.httpcomponents:httpmime:jar:4.5.1:provided
 [INFO]|  |  \- (org.apache.httpcomponents:httpclient:jar:4.5:provided 
 - version managed from 4.5.1; omitted for duplicate)
 [INFO]|  +- commons-codec:commons-codec:jar:1.10:provided
 [INFO]|  +- net.sourceforge.htmlunit:htmlunit-core-js:jar:2.17:provided
 [INFO]|  +- xerces:xercesImpl:jar:2.11.0.SP4:provided (version managed 
 from 2.11.0)
 [INFO]|  +- net.sourceforge.nekohtml:nekohtml:jar:1.9.22:provided
 [INFO]|  +- net.sourceforge.cssparser:cssparser:jar:0.9.18:provided
 [INFO]|  |  \- (org.w3c.css:sac:jar:1.3:provided - omitted for 
 duplicate)
 [INFO]|  +- (commons-io:commons-io:jar:2.4:provided - omitted for 
 duplicate)
 [INFO]|  +- commons-logging:commons-logging:jar:1.1.1:provided 
 (version managed from 1.2)
 [INFO]|  \- 
 

Re: [gwt-contrib] Re: Experimental release of Elemental2

2016-08-19 Thread Julien Dramaix
elemental2 is generated from closure extern files.

The open source version of the generator should have a support for
converting d.ts file to java. We don't know yet when the generator will be
open sourced.

On Fri, Aug 19, 2016 at 4:12 PM James Horsley 
wrote:

> I remember hearing that elemental2 was being generated from TypeScript
> definitions. If that's true, is there any chance we could get a look at the
> generator code too?
>
>
> On Thursday, June 30, 2016 at 1:23:51 AM UTC+1, Julien Dramaix wrote:
>>
>> A new experimental version of Elemental2 using the new JsInterop
>> specification has been pushed on Sonatype today.
>>
>> You can try it by downloading the jar file
>> 
>> or adding this following maven dependency:
>>
>> 
>>
>>  com.google.gwt
>>
>>  elemental2-experimental
>>
>>  16-06-30
>>
>> 
>>
>> Then, inherits the elemental2 module:
>>
>> 
>>
>> This experimental version works only with the last 2.8-snapshot release
>> of GWT.
>>
>> The goal of this release is to get feedback so don’t hesitate to report
>> any bugs, issues, concerns you have on this mailing list.
>>
>>
>> Important note: This is an experimental release and without doubt the
>> future updates until the final release are going to break code!
>>
>> - Julien
>>
>> --
> 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/cd662014-000e-4823-8eab-0acb469c574c%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CABb_3%3D6y-xP%3DUU-LzPBXj68KPycBT6hdep%3DFehbh8QbPvb_vJQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: NPE with 2.8.0 rc2, SDM, Errai

2016-08-19 Thread Alberto Mancini
Yes, adding the dependency actually solves the problem, thanks.
Actually i cannot remove errai profile in the real project.

In your opinion, is it an issue in gwt or errai  dependencies ?

Thanks again,
   Alberto.


On Fri, Aug 19, 2016 at 3:49 PM Andrei Korzhevskii 
wrote:

> Yes, that's true. Some dependency hell is going on there.
> Commenting out the errai profile does not help but it helps if you just
> add gson 2.6.2 to your project as a dependency
>
> 
> com.google.code.gson
> gson
> 2.6.2
> 
> 
>
>
> On Friday, August 19, 2016 at 4:13:12 PM UTC+3, Seamus McMorrow wrote:
>>
>> I had a quick look at that sample project.
>> The errai profile which is activated by default at the bottom of your
>> pom.xml has a dependencyManagement section BOM import.
>> That is conflicting the versions for gson and some others, xerces.
>>
>> If you comment out the whole profile bit
>>
>> On Friday, 19 August 2016 13:42:27 UTC+1, Andrei Korzhevskii wrote:
>>>
>>> Ok, I've tracked down the problem.
>>> The problem is that gwt-dev somehow relies on gson 1.7.2 but should rely
>>> on 2.6.2. I dont know what the problem is. I hope Jens or Thomas can help
>>> with that.
>>> The problem was that gson 1.7.2 incorrectly parsed provided source map
>>> string and returned empty JsonObject which resulted in NPE.
>>>
>>> [INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ sourcemap ---
>>> [INFO] com.testcase:sourcemap:war:1.0-SNAPSHOT
>>> [INFO] +- com.google.gwt:gwt-user:jar:2.8.0-rc2:provided
>>> [INFO] |  +- com.google.jsinterop:jsinterop-annotations:jar:1.0.0:provided
>>> [INFO] |  +- 
>>> com.google.jsinterop:jsinterop-annotations:jar:sources:1.0.0:provided
>>> [INFO] |  +- javax.validation:validation-api:jar:1.0.0.GA:provided
>>> [INFO] |  +- javax.validation:validation-api:jar:sources:1.0.0.GA:provided
>>> [INFO] |  +- javax.servlet:javax.servlet-api:jar:3.1.0:provided
>>> [INFO] |  \- org.w3c.css:sac:jar:1.3:provided
>>> [INFO] \- com.google.gwt:gwt-dev:jar:2.8.0-rc2:provided
>>> [INFO]+- com.google.code.gson:gson:jar:1.7.2:provided (version managed 
>>> from 2.6.2)
>>> [INFO]+- org.ow2.asm:asm:jar:5.0.3:provided
>>> [INFO]+- org.ow2.asm:asm-util:jar:5.0.3:provided
>>> [INFO]|  \- org.ow2.asm:asm-tree:jar:5.0.3:provided
>>> [INFO]| \- (org.ow2.asm:asm:jar:5.0.3:provided - omitted for 
>>> duplicate)
>>> [INFO]+- org.ow2.asm:asm-commons:jar:5.0.3:provided
>>> [INFO]|  \- (org.ow2.asm:asm-tree:jar:5.0.3:provided - omitted for 
>>> duplicate)
>>> [INFO]+- colt:colt:jar:1.2.0:provided
>>> [INFO]+- ant:ant:jar:1.6.5:provided
>>> [INFO]+- commons-collections:commons-collections:jar:3.2.2:provided
>>> [INFO]+- commons-io:commons-io:jar:2.4:provided
>>> [INFO]+- com.ibm.icu:icu4j:jar:50.1.1:provided
>>> [INFO]+- tapestry:tapestry:jar:4.0.2:provided
>>> [INFO]+- net.sourceforge.htmlunit:htmlunit:jar:2.19:provided
>>> [INFO]|  +- xalan:xalan:jar:2.7.1:provided (version managed from 2.7.2)
>>> [INFO]|  |  \- xalan:serializer:jar:2.7.1:provided
>>> [INFO]|  | \- xml-apis:xml-apis:jar:1.4.01:provided (version 
>>> managed from 1.3.04)
>>> [INFO]|  +- (commons-collections:commons-collections:jar:3.2.2:provided 
>>> - version managed from 3.2.1; omitted for duplicate)
>>> [INFO]|  +- org.apache.commons:commons-lang3:jar:3.1:provided (version 
>>> managed from 3.4)
>>> [INFO]|  +- org.apache.httpcomponents:httpclient:jar:4.5:provided 
>>> (version managed from 4.5.1)
>>> [INFO]|  |  +- org.apache.httpcomponents:httpcore:jar:4.4.1:provided
>>> [INFO]|  |  \- (commons-codec:commons-codec:jar:1.10:provided - version 
>>> managed from 1.9; omitted for duplicate)
>>> [INFO]|  +- org.apache.httpcomponents:httpmime:jar:4.5.1:provided
>>> [INFO]|  |  \- (org.apache.httpcomponents:httpclient:jar:4.5:provided - 
>>> version managed from 4.5.1; omitted for duplicate)
>>> [INFO]|  +- commons-codec:commons-codec:jar:1.10:provided
>>> [INFO]|  +- net.sourceforge.htmlunit:htmlunit-core-js:jar:2.17:provided
>>> [INFO]|  +- xerces:xercesImpl:jar:2.11.0.SP4:provided (version managed 
>>> from 2.11.0)
>>> [INFO]|  +- net.sourceforge.nekohtml:nekohtml:jar:1.9.22:provided
>>> [INFO]|  +- net.sourceforge.cssparser:cssparser:jar:0.9.18:provided
>>> [INFO]|  |  \- (org.w3c.css:sac:jar:1.3:provided - omitted for 
>>> duplicate)
>>> [INFO]|  +- (commons-io:commons-io:jar:2.4:provided - omitted for 
>>> duplicate)
>>> [INFO]|  +- commons-logging:commons-logging:jar:1.1.1:provided (version 
>>> managed from 1.2)
>>> [INFO]|  \- 
>>> org.eclipse.jetty.websocket:websocket-client:jar:9.2.13.v20150730:provided
>>> [INFO]| +- 
>>> (org.eclipse.jetty:jetty-util:jar:9.2.14.v20151106:provided - version 
>>> managed from 9.2.13.v20150730; omitted for duplicate)
>>> [INFO]| +- 
>>> (org.eclipse.jetty:jetty-io:jar:9.2.14.v20151106:provided - version managed 

[gwt-contrib] A possible JsInterop issue in GWT 2.8 RC2

2016-08-19 Thread Boris Brudnoy
Hello all, 

I was tripped yesterday by a discrepancy in JsType field treatment between 
beta1 and rc2 releases, so I made a small Maven project reproducing it: 
https://github.com/bbrudnoy/jsinterop-test.

The problem is as follows: given a simple JsType-annotated class, HelloWorld 

:

@JsType(namespace = JsPackage.GLOBAL)
public class HelloWorld {

  public String hello = "Hello";
  public String world = "World";
}

passing an instance of it to a JavaScript function from GWT, as I do in 
App.java 
,
 
the field names are preserved and usable in JavaScript, *if I use beta1*. 
Chrome Dev tools show this:




however, for the same code, if I change GWT version to *2.8.0-rc2*, the 
fields become obfuscated and are no longer usable in JavaScript which 
worked previously:


 
Is this a JsInterop issue, or am I missing something in the way JsInterop 
has officially changed in RC2?

-- 
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/b2048b76-cf36-4a4b-8e54-137078926050%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


GWT 2.8 - ScriptInjector in GWTTestCase

2016-08-19 Thread Rocco De Angelis
Hi All,

after the migration to GWT 2.6.1 - > 2.8 I'm not anymore able to run our 
unit tests (GWTTestCases's).
The call of new 
ScriptInjector.FromString(javascript).setWindow(ScriptInjector.TOP_WINDOW
).inject();  doesn't work anymore.

Following error happens:

Aug 19, 2016 4:34:09 PM 
com.gargoylesoftware.htmlunit.javascript.StrictErrorReporter runtimeError
SCHWERWIEGEND: runtimeError: message=[TypeError: Cannot convert a Symbol 
value to a string] sourceName=[script in 
http://localhost:52747/com.aris.web.WebUiKitDevTest.JUnit/junit.html?gwt.codesvr=localhost:52736
 
from (-1, -1) to (-1, -1)] line=[1] lineSource=[null] lineOffset=[0]

com.google.gwt.core.client.JavaScriptException: (null) 
@com.google.gwt.core.client.ScriptInjector::nativeAttachToHead(Lcom/google/gwt/core/client/JavaScriptObject;Lcom/google/gwt/core/client/JavaScriptObject;)([JavaScript
 
object(12), JavaScript object(13)]): null

Somebody an idea?

THX
Rocco

 

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


Re: Problems connecting to Super Dev Mode server with 2.8 / multi-module project

2016-08-19 Thread Drew Spencer
The SDM recompile happens first time, it's just that when I reload the page 
I see the "skipped compile because no input files have changed" message.

I think I have a similar problem to this: 
http://stackoverflow.com/questions/27433642/gwt-superdevmode-fails-to-see-changes
 
but if I remove src/main/java from the resources I get errors that my 
BootstrapperImpl.java can't be found: 

[ERROR] The type 
'com.utilitiessavings.usavappv7.client.gin.BootstrapperImpl' was not found, 
either the class name is wrong or there are compile errors in your code.

That's essentially my EntryPoint, so looks like no sources are found at all.

On Thursday, 18 August 2016 20:41:15 UTC+1, Jens wrote:
>
> SDM generates a special module.nocache.js file which contains the 
> "recompile on reload" feature. You have to make sure that you have deployed 
> that generated file. If you start the DevMode class the file is placed into 
> the directory your DevMode -war parameter is pointing to. If you start 
> CodeServer you have to use the -launcherDir parameter (DevMode delegates 
> -war to -launcherDir). Make sure its pointing to the directory you deploy.
>
> -- J.
>

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


[gwt-contrib] Re: Experimental release of Elemental2

2016-08-19 Thread James Horsley
I remember hearing that elemental2 was being generated from TypeScript 
definitions. If that's true, is there any chance we could get a look at the 
generator code too?

On Thursday, June 30, 2016 at 1:23:51 AM UTC+1, Julien Dramaix wrote:
>
> A new experimental version of Elemental2 using the new JsInterop 
> specification has been pushed on Sonatype today.
>
> You can try it by downloading the jar file 
> 
>  
> or adding this following maven dependency:
>
> 
>
>  com.google.gwt
>
>  elemental2-experimental
>
>  16-06-30
>
> 
>
> Then, inherits the elemental2 module:
>
> 
>
> This experimental version works only with the last 2.8-snapshot release of 
> GWT.
>
> The goal of this release is to get feedback so don’t hesitate to report 
> any bugs, issues, concerns you have on this mailing list.
>
>
> Important note: This is an experimental release and without doubt the 
> future updates until the final release are going to break code!  
>
> - Julien
>
>

-- 
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/cd662014-000e-4823-8eab-0acb469c574c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Best Practice for JSON object recreation on client

2016-08-19 Thread Vassilis Virvilis
This makes sense for newer projects maybe.

I already have a codebase and making trampolines to convert collections and
maps to arrays and don't know what is a terrifying option.

I prefer to depend on gwt-jackson (which doesn't work for me - resty-gwt
works - resty-gwt is switching to gwt-jackson - eventually gwt-jackson will
work for me) especially if I am using jackson already in the server,


On Fri, Aug 19, 2016 at 5:02 PM, Ignacio Baca Moreno-Torres <
igna...@bacamt.com> wrote:

> IMHO supporting the whole collection frameworks is just an unnecessary
> complication. Just use plain array, not generics need, and now that stream
> are supported in GWT you has no excuse to use arrays. The inheritance is
> not solved in JsInterop for now, just try to avoid.
>
> On Friday, August 19, 2016 at 3:38:28 PM UTC+2, Vassilis Virvilis wrote:
>>
>> How about transmitting nested Collections, Map, complex inheritance and
>> generics?
>>
>> On Fri, Aug 19, 2016 at 4:30 PM, zakaria amine 
>> wrote:
>>
>>> I also tried to convert back to the original object:
>>>
>>> @JsType(isNative=true, namespace=GLOBAL)
>>> public class JSON {
>>> public native static String stringify(Object obj);
>>> public native static Object parse(String obj);
>>>
>>> }
>>>
>>> and then:
>>> //
>>>
>>>   Record converted = (Record) JSON.parse(json);
>>>
>>> and it works just fine. why would we need something like gwt-jackson
>>> anymore?
>>>
>>>
>>> Le vendredi 19 août 2016 12:05:32 UTC+2, zakaria amine a écrit :

 It works. I prefer your solution.

 Le vendredi 19 août 2016 11:51:35 UTC+2, Jens a écrit :
>
>
>
> Am Freitag, 19. August 2016 11:43:12 UTC+2 schrieb zakaria amine:
>>
>> I have tried something like:
>>
>> @JsType(namespace=GLOBAL)
>> public class Record {
>> String id;
>> String date;
>> String data;
>> public Record() {
>> }
>> }
>>
>
> By default @JsType property "isNative" is false, so your Record class
> is a non-native class that might get exported to JS if you use
> -generateJsInteropExports during compilation. If you don't use that flag
> the @JsType is treated as a normal class I guess.
>
> You should use @JsType(isNative=true, namespace=GLOBAL,
> name="Object") so that your Record class becomes a plain JavaScript object
>
> -- 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-we...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/google-web-toolkit.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Vassilis Virvilis
>>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>



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


Re: Best Practice for JSON object recreation on client

2016-08-19 Thread Ignacio Baca Moreno-Torres
IMHO supporting the whole collection frameworks is just an unnecessary 
complication. Just use plain array, not generics need, and now that stream 
are supported in GWT you has no excuse to use arrays. The inheritance is 
not solved in JsInterop for now, just try to avoid.

On Friday, August 19, 2016 at 3:38:28 PM UTC+2, Vassilis Virvilis wrote:
>
> How about transmitting nested Collections, Map, complex inheritance and 
> generics?
>
> On Fri, Aug 19, 2016 at 4:30 PM, zakaria amine  > wrote:
>
>> I also tried to convert back to the original object: 
>>
>> @JsType(isNative=true, namespace=GLOBAL)
>> public class JSON {
>> public native static String stringify(Object obj);
>> public native static Object parse(String obj);
>>
>> }
>>
>> and then: 
>> //
>>
>>   Record converted = (Record) JSON.parse(json);
>>
>> and it works just fine. why would we need something like gwt-jackson 
>> anymore? 
>>
>>
>> Le vendredi 19 août 2016 12:05:32 UTC+2, zakaria amine a écrit :
>>>
>>> It works. I prefer your solution.
>>>
>>> Le vendredi 19 août 2016 11:51:35 UTC+2, Jens a écrit :



 Am Freitag, 19. August 2016 11:43:12 UTC+2 schrieb zakaria amine:
>
> I have tried something like: 
>
> @JsType(namespace=GLOBAL)
> public class Record {
> String id;
> String date;
> String data;
> public Record() {
> }
> }
>

 By default @JsType property "isNative" is false, so your Record class 
 is a non-native class that might get exported to JS if you use 
 -generateJsInteropExports during compilation. If you don't use that flag 
 the @JsType is treated as a normal class I guess.

 You should use @JsType(isNative=true, namespace=GLOBAL, name="Object") 
 so that your Record class becomes a plain JavaScript object

 -- 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-we...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/google-web-toolkit.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Vassilis Virvilis
>

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


Re: NPE with 2.8.0 rc2, SDM, Errai

2016-08-19 Thread Andrei Korzhevskii
Yes, that's true. Some dependency hell is going on there.
Commenting out the errai profile does not help but it helps if you just add 
gson 2.6.2 to your project as a dependency


com.google.code.gson
gson
2.6.2




On Friday, August 19, 2016 at 4:13:12 PM UTC+3, Seamus McMorrow wrote:
>
> I had a quick look at that sample project. 
> The errai profile which is activated by default at the bottom of your 
> pom.xml has a dependencyManagement section BOM import. 
> That is conflicting the versions for gson and some others, xerces.
>
> If you comment out the whole profile bit 
>
> On Friday, 19 August 2016 13:42:27 UTC+1, Andrei Korzhevskii wrote:
>>
>> Ok, I've tracked down the problem.
>> The problem is that gwt-dev somehow relies on gson 1.7.2 but should rely 
>> on 2.6.2. I dont know what the problem is. I hope Jens or Thomas can help 
>> with that.
>> The problem was that gson 1.7.2 incorrectly parsed provided source map 
>> string and returned empty JsonObject which resulted in NPE.
>>
>> [INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ sourcemap ---
>> [INFO] com.testcase:sourcemap:war:1.0-SNAPSHOT
>> [INFO] +- com.google.gwt:gwt-user:jar:2.8.0-rc2:provided
>> [INFO] |  +- com.google.jsinterop:jsinterop-annotations:jar:1.0.0:provided
>> [INFO] |  +- 
>> com.google.jsinterop:jsinterop-annotations:jar:sources:1.0.0:provided
>> [INFO] |  +- javax.validation:validation-api:jar:1.0.0.GA:provided
>> [INFO] |  +- javax.validation:validation-api:jar:sources:1.0.0.GA:provided
>> [INFO] |  +- javax.servlet:javax.servlet-api:jar:3.1.0:provided
>> [INFO] |  \- org.w3c.css:sac:jar:1.3:provided
>> [INFO] \- com.google.gwt:gwt-dev:jar:2.8.0-rc2:provided
>> [INFO]+- com.google.code.gson:gson:jar:1.7.2:provided (version managed 
>> from 2.6.2)
>> [INFO]+- org.ow2.asm:asm:jar:5.0.3:provided
>> [INFO]+- org.ow2.asm:asm-util:jar:5.0.3:provided
>> [INFO]|  \- org.ow2.asm:asm-tree:jar:5.0.3:provided
>> [INFO]| \- (org.ow2.asm:asm:jar:5.0.3:provided - omitted for 
>> duplicate)
>> [INFO]+- org.ow2.asm:asm-commons:jar:5.0.3:provided
>> [INFO]|  \- (org.ow2.asm:asm-tree:jar:5.0.3:provided - omitted for 
>> duplicate)
>> [INFO]+- colt:colt:jar:1.2.0:provided
>> [INFO]+- ant:ant:jar:1.6.5:provided
>> [INFO]+- commons-collections:commons-collections:jar:3.2.2:provided
>> [INFO]+- commons-io:commons-io:jar:2.4:provided
>> [INFO]+- com.ibm.icu:icu4j:jar:50.1.1:provided
>> [INFO]+- tapestry:tapestry:jar:4.0.2:provided
>> [INFO]+- net.sourceforge.htmlunit:htmlunit:jar:2.19:provided
>> [INFO]|  +- xalan:xalan:jar:2.7.1:provided (version managed from 2.7.2)
>> [INFO]|  |  \- xalan:serializer:jar:2.7.1:provided
>> [INFO]|  | \- xml-apis:xml-apis:jar:1.4.01:provided (version managed 
>> from 1.3.04)
>> [INFO]|  +- (commons-collections:commons-collections:jar:3.2.2:provided 
>> - version managed from 3.2.1; omitted for duplicate)
>> [INFO]|  +- org.apache.commons:commons-lang3:jar:3.1:provided (version 
>> managed from 3.4)
>> [INFO]|  +- org.apache.httpcomponents:httpclient:jar:4.5:provided 
>> (version managed from 4.5.1)
>> [INFO]|  |  +- org.apache.httpcomponents:httpcore:jar:4.4.1:provided
>> [INFO]|  |  \- (commons-codec:commons-codec:jar:1.10:provided - version 
>> managed from 1.9; omitted for duplicate)
>> [INFO]|  +- org.apache.httpcomponents:httpmime:jar:4.5.1:provided
>> [INFO]|  |  \- (org.apache.httpcomponents:httpclient:jar:4.5:provided - 
>> version managed from 4.5.1; omitted for duplicate)
>> [INFO]|  +- commons-codec:commons-codec:jar:1.10:provided
>> [INFO]|  +- net.sourceforge.htmlunit:htmlunit-core-js:jar:2.17:provided
>> [INFO]|  +- xerces:xercesImpl:jar:2.11.0.SP4:provided (version managed 
>> from 2.11.0)
>> [INFO]|  +- net.sourceforge.nekohtml:nekohtml:jar:1.9.22:provided
>> [INFO]|  +- net.sourceforge.cssparser:cssparser:jar:0.9.18:provided
>> [INFO]|  |  \- (org.w3c.css:sac:jar:1.3:provided - omitted for duplicate)
>> [INFO]|  +- (commons-io:commons-io:jar:2.4:provided - omitted for 
>> duplicate)
>> [INFO]|  +- commons-logging:commons-logging:jar:1.1.1:provided (version 
>> managed from 1.2)
>> [INFO]|  \- 
>> org.eclipse.jetty.websocket:websocket-client:jar:9.2.13.v20150730:provided
>> [INFO]| +- 
>> (org.eclipse.jetty:jetty-util:jar:9.2.14.v20151106:provided - version 
>> managed from 9.2.13.v20150730; omitted for duplicate)
>> [INFO]| +- (org.eclipse.jetty:jetty-io:jar:9.2.14.v20151106:provided 
>> - version managed from 9.2.13.v20150730; omitted for duplicate)
>> [INFO]| \- 
>> org.eclipse.jetty.websocket:websocket-common:jar:9.2.13.v20150730:provided
>> [INFO]|+- 
>> org.eclipse.jetty.websocket:websocket-api:jar:9.2.13.v20150730:provided
>> [INFO]|+- 
>> (org.eclipse.jetty:jetty-util:jar:9.2.14.v20151106:provided - version 
>> managed from 9.2.13.v20150730; omitted for 

Re: Best Practice for JSON object recreation on client

2016-08-19 Thread Vassilis Virvilis
How about transmitting nested Collections, Map, complex inheritance and
generics?

On Fri, Aug 19, 2016 at 4:30 PM, zakaria amine 
wrote:

> I also tried to convert back to the original object:
>
> @JsType(isNative=true, namespace=GLOBAL)
> public class JSON {
> public native static String stringify(Object obj);
> public native static Object parse(String obj);
>
> }
>
> and then:
> //
>
>   Record converted = (Record) JSON.parse(json);
>
> and it works just fine. why would we need something like gwt-jackson
> anymore?
>
>
> Le vendredi 19 août 2016 12:05:32 UTC+2, zakaria amine a écrit :
>>
>> It works. I prefer your solution.
>>
>> Le vendredi 19 août 2016 11:51:35 UTC+2, Jens a écrit :
>>>
>>>
>>>
>>> Am Freitag, 19. August 2016 11:43:12 UTC+2 schrieb zakaria amine:

 I have tried something like:

 @JsType(namespace=GLOBAL)
 public class Record {
 String id;
 String date;
 String data;
 public Record() {
 }
 }

>>>
>>> By default @JsType property "isNative" is false, so your Record class is
>>> a non-native class that might get exported to JS if you use
>>> -generateJsInteropExports during compilation. If you don't use that flag
>>> the @JsType is treated as a normal class I guess.
>>>
>>> You should use @JsType(isNative=true, namespace=GLOBAL, name="Object")
>>> so that your Record class becomes a plain JavaScript object
>>>
>>> -- J.
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>



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


Re: Best Practice for JSON object recreation on client

2016-08-19 Thread zakaria amine
I also tried to convert back to the original object: 

@JsType(isNative=true, namespace=GLOBAL)
public class JSON {
public native static String stringify(Object obj);
public native static Object parse(String obj);

}

and then: 
//

  Record converted = (Record) JSON.parse(json);

and it works just fine. why would we need something like gwt-jackson 
anymore? 

Le vendredi 19 août 2016 12:05:32 UTC+2, zakaria amine a écrit :
>
> It works. I prefer your solution.
>
> Le vendredi 19 août 2016 11:51:35 UTC+2, Jens a écrit :
>>
>>
>>
>> Am Freitag, 19. August 2016 11:43:12 UTC+2 schrieb zakaria amine:
>>>
>>> I have tried something like: 
>>>
>>> @JsType(namespace=GLOBAL)
>>> public class Record {
>>> String id;
>>> String date;
>>> String data;
>>> public Record() {
>>> }
>>> }
>>>
>>
>> By default @JsType property "isNative" is false, so your Record class is 
>> a non-native class that might get exported to JS if you use 
>> -generateJsInteropExports during compilation. If you don't use that flag 
>> the @JsType is treated as a normal class I guess.
>>
>> You should use @JsType(isNative=true, namespace=GLOBAL, name="Object") so 
>> that your Record class becomes a plain JavaScript object
>>
>> -- J.
>>
>

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


Re: NPE with 2.8.0 rc2, SDM, Errai

2016-08-19 Thread Seamus McMorrow
I had a quick look at that sample project. 
The errai profile which is activated by default at the bottom of your 
pom.xml has a dependencyManagement section BOM import. 
That is conflicting the versions for gson and some others, xerces.

If you comment out the whole profile bit 

On Friday, 19 August 2016 13:42:27 UTC+1, Andrei Korzhevskii wrote:
>
> Ok, I've tracked down the problem.
> The problem is that gwt-dev somehow relies on gson 1.7.2 but should rely 
> on 2.6.2. I dont know what the problem is. I hope Jens or Thomas can help 
> with that.
> The problem was that gson 1.7.2 incorrectly parsed provided source map 
> string and returned empty JsonObject which resulted in NPE.
>
> [INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ sourcemap ---
> [INFO] com.testcase:sourcemap:war:1.0-SNAPSHOT
> [INFO] +- com.google.gwt:gwt-user:jar:2.8.0-rc2:provided
> [INFO] |  +- com.google.jsinterop:jsinterop-annotations:jar:1.0.0:provided
> [INFO] |  +- 
> com.google.jsinterop:jsinterop-annotations:jar:sources:1.0.0:provided
> [INFO] |  +- javax.validation:validation-api:jar:1.0.0.GA:provided
> [INFO] |  +- javax.validation:validation-api:jar:sources:1.0.0.GA:provided
> [INFO] |  +- javax.servlet:javax.servlet-api:jar:3.1.0:provided
> [INFO] |  \- org.w3c.css:sac:jar:1.3:provided
> [INFO] \- com.google.gwt:gwt-dev:jar:2.8.0-rc2:provided
> [INFO]+- com.google.code.gson:gson:jar:1.7.2:provided (version managed 
> from 2.6.2)
> [INFO]+- org.ow2.asm:asm:jar:5.0.3:provided
> [INFO]+- org.ow2.asm:asm-util:jar:5.0.3:provided
> [INFO]|  \- org.ow2.asm:asm-tree:jar:5.0.3:provided
> [INFO]| \- (org.ow2.asm:asm:jar:5.0.3:provided - omitted for 
> duplicate)
> [INFO]+- org.ow2.asm:asm-commons:jar:5.0.3:provided
> [INFO]|  \- (org.ow2.asm:asm-tree:jar:5.0.3:provided - omitted for 
> duplicate)
> [INFO]+- colt:colt:jar:1.2.0:provided
> [INFO]+- ant:ant:jar:1.6.5:provided
> [INFO]+- commons-collections:commons-collections:jar:3.2.2:provided
> [INFO]+- commons-io:commons-io:jar:2.4:provided
> [INFO]+- com.ibm.icu:icu4j:jar:50.1.1:provided
> [INFO]+- tapestry:tapestry:jar:4.0.2:provided
> [INFO]+- net.sourceforge.htmlunit:htmlunit:jar:2.19:provided
> [INFO]|  +- xalan:xalan:jar:2.7.1:provided (version managed from 2.7.2)
> [INFO]|  |  \- xalan:serializer:jar:2.7.1:provided
> [INFO]|  | \- xml-apis:xml-apis:jar:1.4.01:provided (version managed 
> from 1.3.04)
> [INFO]|  +- (commons-collections:commons-collections:jar:3.2.2:provided - 
> version managed from 3.2.1; omitted for duplicate)
> [INFO]|  +- org.apache.commons:commons-lang3:jar:3.1:provided (version 
> managed from 3.4)
> [INFO]|  +- org.apache.httpcomponents:httpclient:jar:4.5:provided 
> (version managed from 4.5.1)
> [INFO]|  |  +- org.apache.httpcomponents:httpcore:jar:4.4.1:provided
> [INFO]|  |  \- (commons-codec:commons-codec:jar:1.10:provided - version 
> managed from 1.9; omitted for duplicate)
> [INFO]|  +- org.apache.httpcomponents:httpmime:jar:4.5.1:provided
> [INFO]|  |  \- (org.apache.httpcomponents:httpclient:jar:4.5:provided - 
> version managed from 4.5.1; omitted for duplicate)
> [INFO]|  +- commons-codec:commons-codec:jar:1.10:provided
> [INFO]|  +- net.sourceforge.htmlunit:htmlunit-core-js:jar:2.17:provided
> [INFO]|  +- xerces:xercesImpl:jar:2.11.0.SP4:provided (version managed 
> from 2.11.0)
> [INFO]|  +- net.sourceforge.nekohtml:nekohtml:jar:1.9.22:provided
> [INFO]|  +- net.sourceforge.cssparser:cssparser:jar:0.9.18:provided
> [INFO]|  |  \- (org.w3c.css:sac:jar:1.3:provided - omitted for duplicate)
> [INFO]|  +- (commons-io:commons-io:jar:2.4:provided - omitted for 
> duplicate)
> [INFO]|  +- commons-logging:commons-logging:jar:1.1.1:provided (version 
> managed from 1.2)
> [INFO]|  \- 
> org.eclipse.jetty.websocket:websocket-client:jar:9.2.13.v20150730:provided
> [INFO]| +- 
> (org.eclipse.jetty:jetty-util:jar:9.2.14.v20151106:provided - version managed 
> from 9.2.13.v20150730; omitted for duplicate)
> [INFO]| +- (org.eclipse.jetty:jetty-io:jar:9.2.14.v20151106:provided 
> - version managed from 9.2.13.v20150730; omitted for duplicate)
> [INFO]| \- 
> org.eclipse.jetty.websocket:websocket-common:jar:9.2.13.v20150730:provided
> [INFO]|+- 
> org.eclipse.jetty.websocket:websocket-api:jar:9.2.13.v20150730:provided
> [INFO]|+- 
> (org.eclipse.jetty:jetty-util:jar:9.2.14.v20151106:provided - version managed 
> from 9.2.13.v20150730; omitted for duplicate)
> [INFO]|\- 
> (org.eclipse.jetty:jetty-io:jar:9.2.14.v20151106:provided - version managed 
> from 9.2.13.v20150730; omitted for duplicate)
> [INFO]+- org.eclipse.jetty:jetty-webapp:jar:9.2.14.v20151106:provided
> [INFO]|  +- org.eclipse.jetty:jetty-xml:jar:9.2.14.v20151106:provided
> [INFO]|  |  \- 
> (org.eclipse.jetty:jetty-util:jar:9.2.14.v20151106:provided - version managed 
> 

Re: Slowness / Hangs on GWT 2.7 with Chrome 50.0 Release

2016-08-19 Thread Andrei Volgin
I have seen no issues with Chrome 50 in my apps. They work as usual.

Is there any reason why you upgraded to Chrome 50? The current stable 
version is 52. Have you tried it?

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


Re: NPE with 2.8.0 rc2, SDM, Errai

2016-08-19 Thread Andrei Korzhevskii
Ok, I've tracked down the problem.
The problem is that gwt-dev somehow relies on gson 1.7.2 but should rely on 
2.6.2. I dont know what the problem is. I hope Jens or Thomas can help with 
that.
The problem was that gson 1.7.2 incorrectly parsed provided source map 
string and returned empty JsonObject which resulted in NPE.

[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ sourcemap ---
[INFO] com.testcase:sourcemap:war:1.0-SNAPSHOT
[INFO] +- com.google.gwt:gwt-user:jar:2.8.0-rc2:provided
[INFO] |  +- com.google.jsinterop:jsinterop-annotations:jar:1.0.0:provided
[INFO] |  +- 
com.google.jsinterop:jsinterop-annotations:jar:sources:1.0.0:provided
[INFO] |  +- javax.validation:validation-api:jar:1.0.0.GA:provided
[INFO] |  +- javax.validation:validation-api:jar:sources:1.0.0.GA:provided
[INFO] |  +- javax.servlet:javax.servlet-api:jar:3.1.0:provided
[INFO] |  \- org.w3c.css:sac:jar:1.3:provided
[INFO] \- com.google.gwt:gwt-dev:jar:2.8.0-rc2:provided
[INFO]+- com.google.code.gson:gson:jar:1.7.2:provided (version managed from 
2.6.2)
[INFO]+- org.ow2.asm:asm:jar:5.0.3:provided
[INFO]+- org.ow2.asm:asm-util:jar:5.0.3:provided
[INFO]|  \- org.ow2.asm:asm-tree:jar:5.0.3:provided
[INFO]| \- (org.ow2.asm:asm:jar:5.0.3:provided - omitted for duplicate)
[INFO]+- org.ow2.asm:asm-commons:jar:5.0.3:provided
[INFO]|  \- (org.ow2.asm:asm-tree:jar:5.0.3:provided - omitted for 
duplicate)
[INFO]+- colt:colt:jar:1.2.0:provided
[INFO]+- ant:ant:jar:1.6.5:provided
[INFO]+- commons-collections:commons-collections:jar:3.2.2:provided
[INFO]+- commons-io:commons-io:jar:2.4:provided
[INFO]+- com.ibm.icu:icu4j:jar:50.1.1:provided
[INFO]+- tapestry:tapestry:jar:4.0.2:provided
[INFO]+- net.sourceforge.htmlunit:htmlunit:jar:2.19:provided
[INFO]|  +- xalan:xalan:jar:2.7.1:provided (version managed from 2.7.2)
[INFO]|  |  \- xalan:serializer:jar:2.7.1:provided
[INFO]|  | \- xml-apis:xml-apis:jar:1.4.01:provided (version managed 
from 1.3.04)
[INFO]|  +- (commons-collections:commons-collections:jar:3.2.2:provided - 
version managed from 3.2.1; omitted for duplicate)
[INFO]|  +- org.apache.commons:commons-lang3:jar:3.1:provided (version 
managed from 3.4)
[INFO]|  +- org.apache.httpcomponents:httpclient:jar:4.5:provided (version 
managed from 4.5.1)
[INFO]|  |  +- org.apache.httpcomponents:httpcore:jar:4.4.1:provided
[INFO]|  |  \- (commons-codec:commons-codec:jar:1.10:provided - version 
managed from 1.9; omitted for duplicate)
[INFO]|  +- org.apache.httpcomponents:httpmime:jar:4.5.1:provided
[INFO]|  |  \- (org.apache.httpcomponents:httpclient:jar:4.5:provided - 
version managed from 4.5.1; omitted for duplicate)
[INFO]|  +- commons-codec:commons-codec:jar:1.10:provided
[INFO]|  +- net.sourceforge.htmlunit:htmlunit-core-js:jar:2.17:provided
[INFO]|  +- xerces:xercesImpl:jar:2.11.0.SP4:provided (version managed from 
2.11.0)
[INFO]|  +- net.sourceforge.nekohtml:nekohtml:jar:1.9.22:provided
[INFO]|  +- net.sourceforge.cssparser:cssparser:jar:0.9.18:provided
[INFO]|  |  \- (org.w3c.css:sac:jar:1.3:provided - omitted for duplicate)
[INFO]|  +- (commons-io:commons-io:jar:2.4:provided - omitted for duplicate)
[INFO]|  +- commons-logging:commons-logging:jar:1.1.1:provided (version 
managed from 1.2)
[INFO]|  \- 
org.eclipse.jetty.websocket:websocket-client:jar:9.2.13.v20150730:provided
[INFO]| +- (org.eclipse.jetty:jetty-util:jar:9.2.14.v20151106:provided 
- version managed from 9.2.13.v20150730; omitted for duplicate)
[INFO]| +- (org.eclipse.jetty:jetty-io:jar:9.2.14.v20151106:provided - 
version managed from 9.2.13.v20150730; omitted for duplicate)
[INFO]| \- 
org.eclipse.jetty.websocket:websocket-common:jar:9.2.13.v20150730:provided
[INFO]|+- 
org.eclipse.jetty.websocket:websocket-api:jar:9.2.13.v20150730:provided
[INFO]|+- 
(org.eclipse.jetty:jetty-util:jar:9.2.14.v20151106:provided - version managed 
from 9.2.13.v20150730; omitted for duplicate)
[INFO]|\- (org.eclipse.jetty:jetty-io:jar:9.2.14.v20151106:provided 
- version managed from 9.2.13.v20150730; omitted for duplicate)
[INFO]+- org.eclipse.jetty:jetty-webapp:jar:9.2.14.v20151106:provided
[INFO]|  +- org.eclipse.jetty:jetty-xml:jar:9.2.14.v20151106:provided
[INFO]|  |  \- (org.eclipse.jetty:jetty-util:jar:9.2.14.v20151106:provided 
- version managed from 9.2.13.v20150730; omitted for duplicate)
[INFO]|  \- org.eclipse.jetty:jetty-servlet:jar:9.2.14.v20151106:provided
[INFO]| \- 
org.eclipse.jetty:jetty-security:jar:9.2.14.v20151106:provided
[INFO]|\- 
(org.eclipse.jetty:jetty-server:jar:9.2.14.v20151106:provided - omitted for 
duplicate)
[INFO]+- org.eclipse.jetty:jetty-servlets:jar:9.2.14.v20151106:provided
[INFO]|  +- 
org.eclipse.jetty:jetty-continuation:jar:9.2.14.v20151106:provided
[INFO]|  +- 

Re: NPE with 2.8.0 rc2, SDM, Errai

2016-08-19 Thread Alberto Mancini


mvn:run should give you the error 
>

Sorry, i mean:  
mvn gwt:run 

 
Thanks,  
   A. 

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


Re: NPE with 2.8.0 rc2, SDM, Errai

2016-08-19 Thread Alberto Mancini
Thanks Andrei,
pushed the sample on githib:

https://github.com/abmancini/testcase-sourcemap

mvn:run should give you the error

if you comment

<*dependency*>

<*groupId*>com.google.gwt

<*artifactId*>gwt-dev

<*version*>${gwt.version}

<*scope*>provided



in the pom file the problem disappear.


Thanks,

A.





On Fri, Aug 19, 2016 at 1:04 PM Andrei Korzhevskii 
wrote:

> It's hard to see what the problem actually is. I see you've created a test
> project, can you share it? That would help to reproduce and track the error.
>
>
> On Friday, August 19, 2016 at 1:06:56 PM UTC+3, Alberto Mancini wrote:
>>
>> Hello,
>> we have still the same problem with SourceMaps.
>> A teammate tracked down the problem and we found that the error appears if we
>> depend on  gwt-dev (rc1 or rc2) and errai.
>>
>> ---
>>  Job com.testcase.sourcemap.App_1_0
>> [INFO]   Linking into
>> /var/folders/n8/8w8npfys46x90q0y9lqdxb0hgn/T/gwt-codeserver-4222675233479416644.tmp/com.testcase.sourcemap.App/compile-2/war/app;
>> Writing extras to
>> /var/folders/n8/8w8npfys46x90q0y9lqdxb0hgn/T/gwt-codeserver-4222675233479416644.tmp/com.testcase.sourcemap.App/compile-2/extras/app
>> [INFO]  [WARN] Can't write source map
>> D84F40D38A264502877474A1394B6135_sourceMap0.json
>> [INFO] java.lang.NullPointerException
>> [INFO] at
>> com.google.gwt.thirdparty.debugging.sourcemap.SourceMapConsumerV3.parse(SourceMapConsumerV3.java:101)
>> 
>> 
>>
>> Am I missing something trivial ?
>> Should i file a bug on gwt-2.8.0-rc2  or errai beta2?
>>
>> Follows the sample  pom.
>>
>> Thanks,
>>Alberto.
>>
>> 
>>
>> 
>> http://maven.apache.org/POM/4.0.0;
>>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
>>  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
>> http://maven.apache.org/xsd/maven-4.0.0.xsd;>
>> 4.0.0
>>
>> com.testcase
>> sourcemap
>> 1.0-SNAPSHOT
>> war
>>
>> 
>> 4.0.0.Beta2
>> 2.8.0-rc2
>> 
>>
>> 
>> 
>> jboss
>> JBoss Public Repo
>> 
>> https://repository.jboss.org/nexus/content/groups/public
>> 
>> 
>>
>>
>>
>> 
>> 
>> 
>> com.google.gwt
>> gwt-user
>> ${gwt.version}
>> provided
>> 
>> 
>> 
>> com.google.gwt
>> gwt-dev
>> ${gwt.version}
>> provided
>> 
>> 
>> 
>>
>>
>> 
>> ${project.artifactId}
>> 
>> 
>> src/main/java
>> 
>> 
>>
>> 
>> 
>> maven-compiler-plugin
>> 3.5.1
>> 
>> 1.8
>> 1.8
>> 
>> 
>> 
>> maven-clean-plugin
>> 2.4.1
>> 
>> 
>> 
>> ${basedir}
>> 
>> src/gen/
>> src/main/webapp/app/
>> 
>> src/main/webapp/WEB-INF/deploy/
>> 
>> src/main/webapp/WEB-INF/lib/
>> 
>> src/main/webapp/WEB-INF/classes/**/*.*
>> 
>> src/main/webapp/WEB-INF/classes/**/*
>> 
>> src/main/webapp/WEB-INF/classes
>> **/gwt-unitCache/**
>> .errai/
>> 
>> 
>> 
>> 
>> 
>> 
>> maven-war-plugin
>> 2.6
>> 
>> 
>> org.codehaus.mojo
>> gwt-maven-plugin
>> 2.8.0-rc1
>> 
>> 
>> 
>> compile
>> 
>> 
>> 
>> 
>> 0.0.0.0
>> WARN
>> true
>> false
>> src/gen/java
>> src/gen/java
>> 
>> ${project.basedir}/src/main/webapp
>> 
>> ${project.basedir}/src/main/webapp  
>>   /
>> -Xmx2048m 
>> -XX:CompileThreshold=700
>> true
>> 
>> 
>> 
>> com.google.gwt
>> gwt-user
>> ${gwt.version}
>> 
>> 
>> com.google.gwt
>> 

Re: NPE with 2.8.0 rc2, SDM, Errai

2016-08-19 Thread Andrei Korzhevskii
It's hard to see what the problem actually is. I see you've created a test 
project, can you share it? That would help to reproduce and track the error.

On Friday, August 19, 2016 at 1:06:56 PM UTC+3, Alberto Mancini wrote:
>
> Hello,
> we have still the same problem with SourceMaps.
> A teammate tracked down the problem and we found that the error appears if we 
> depend on  gwt-dev (rc1 or rc2) and errai.
>
> ---
>  Job com.testcase.sourcemap.App_1_0
> [INFO]   Linking into 
> /var/folders/n8/8w8npfys46x90q0y9lqdxb0hgn/T/gwt-codeserver-4222675233479416644.tmp/com.testcase.sourcemap.App/compile-2/war/app;
>  
> Writing extras to 
> /var/folders/n8/8w8npfys46x90q0y9lqdxb0hgn/T/gwt-codeserver-4222675233479416644.tmp/com.testcase.sourcemap.App/compile-2/extras/app
> [INFO]  [WARN] Can't write source map 
> D84F40D38A264502877474A1394B6135_sourceMap0.json
> [INFO] java.lang.NullPointerException
> [INFO] at 
> com.google.gwt.thirdparty.debugging.sourcemap.SourceMapConsumerV3.parse(SourceMapConsumerV3.java:101)
> 
> 
>
> Am I missing something trivial ? 
> Should i file a bug on gwt-2.8.0-rc2  or errai beta2?
>
> Follows the sample  pom.
>
> Thanks,
>Alberto.
>
> 
>
> 
> http://maven.apache.org/POM/4.0.0;
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
>  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
> http://maven.apache.org/xsd/maven-4.0.0.xsd;>
> 4.0.0
>
> com.testcase
> sourcemap
> 1.0-SNAPSHOT
> war
>
> 
> 4.0.0.Beta2
> 2.8.0-rc2
> 
>
> 
> 
> jboss
> JBoss Public Repo
> 
> https://repository.jboss.org/nexus/content/groups/public
> 
> 
>
>
>
> 
> 
> 
> com.google.gwt
> gwt-user
> ${gwt.version}
> provided
> 
> 
> 
> com.google.gwt
> gwt-dev
> ${gwt.version}
> provided
> 
> 
> 
>
>
> 
> ${project.artifactId}
> 
> 
> src/main/java
> 
> 
>
> 
> 
> maven-compiler-plugin
> 3.5.1
> 
> 1.8
> 1.8
> 
> 
> 
> maven-clean-plugin
> 2.4.1
> 
> 
> 
> ${basedir}
> 
> src/gen/
> src/main/webapp/app/
> 
> src/main/webapp/WEB-INF/deploy/
> 
> src/main/webapp/WEB-INF/lib/
> 
> src/main/webapp/WEB-INF/classes/**/*.*
> 
> src/main/webapp/WEB-INF/classes/**/*
> 
> src/main/webapp/WEB-INF/classes
> **/gwt-unitCache/**
> .errai/
> 
> 
> 
> 
> 
> 
> maven-war-plugin
> 2.6
> 
> 
> org.codehaus.mojo
> gwt-maven-plugin
> 2.8.0-rc1
> 
> 
> 
> compile
> 
> 
> 
> 
> 0.0.0.0
> WARN
> true
> false
> src/gen/java
> src/gen/java
> 
> ${project.basedir}/src/main/webapp
> 
> ${project.basedir}/src/main/webapp   
>  /
> -Xmx2048m 
> -XX:CompileThreshold=700
> true
> 
> 
> 
> com.google.gwt
> gwt-user
> ${gwt.version}
> 
> 
> com.google.gwt
> gwt-dev
> ${gwt.version}
> compile
> 
> 
> 
> 
> 
>
> 
> 
> errai
> 
> true
> 
> 
> 
> 
> org.jboss.errai.bom
> errai-bom
> ${errai.version}
> pom
> import
> 
> 
> 
> 
> 
> 
> 
> 

NPE with 2.8.0 rc2, SDM, Errai

2016-08-19 Thread Alberto Mancini
Hello,
we have still the same problem with SourceMaps.
A teammate tracked down the problem and we found that the error appears if we
depend on  gwt-dev (rc1 or rc2) and errai.

---
 Job com.testcase.sourcemap.App_1_0
[INFO]   Linking into
/var/folders/n8/8w8npfys46x90q0y9lqdxb0hgn/T/gwt-codeserver-4222675233479416644.tmp/com.testcase.sourcemap.App/compile-2/war/app;
Writing extras to
/var/folders/n8/8w8npfys46x90q0y9lqdxb0hgn/T/gwt-codeserver-4222675233479416644.tmp/com.testcase.sourcemap.App/compile-2/extras/app
[INFO]  [WARN] Can't write source map
D84F40D38A264502877474A1394B6135_sourceMap0.json
[INFO] java.lang.NullPointerException
[INFO] at
com.google.gwt.thirdparty.debugging.sourcemap.SourceMapConsumerV3.parse(SourceMapConsumerV3.java:101)



Am I missing something trivial ?
Should i file a bug on gwt-2.8.0-rc2  or errai beta2?

Follows the sample  pom.

Thanks,
   Alberto.




http://maven.apache.org/POM/4.0.0;
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
4.0.0

com.testcase
sourcemap
1.0-SNAPSHOT
war


4.0.0.Beta2
2.8.0-rc2




jboss
JBoss Public Repo
https://repository.jboss.org/nexus/content/groups/public








com.google.gwt
gwt-user
${gwt.version}
provided



com.google.gwt
gwt-dev
${gwt.version}
provided






${project.artifactId}


src/main/java





maven-compiler-plugin
3.5.1

1.8
1.8



maven-clean-plugin
2.4.1



${basedir}

src/gen/
src/main/webapp/app/

src/main/webapp/WEB-INF/deploy/
src/main/webapp/WEB-INF/lib/

src/main/webapp/WEB-INF/classes/**/*.*

src/main/webapp/WEB-INF/classes/**/*

src/main/webapp/WEB-INF/classes
**/gwt-unitCache/**
.errai/






maven-war-plugin
2.6


org.codehaus.mojo
gwt-maven-plugin
2.8.0-rc1



compile




0.0.0.0
WARN
true
false
src/gen/java
src/gen/java

${project.basedir}/src/main/webapp

${project.basedir}/src/main/webapp
/
-Xmx2048m
-XX:CompileThreshold=700
true



com.google.gwt
gwt-user
${gwt.version}


com.google.gwt
gwt-dev
${gwt.version}
compile








errai

true




org.jboss.errai.bom
errai-bom
${errai.version}
pom
import



















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


Re: Best Practice for JSON object recreation on client

2016-08-19 Thread zakaria amine
It works. I prefer your solution.

Le vendredi 19 août 2016 11:51:35 UTC+2, Jens a écrit :
>
>
>
> Am Freitag, 19. August 2016 11:43:12 UTC+2 schrieb zakaria amine:
>>
>> I have tried something like: 
>>
>> @JsType(namespace=GLOBAL)
>> public class Record {
>> String id;
>> String date;
>> String data;
>> public Record() {
>> }
>> }
>>
>
> By default @JsType property "isNative" is false, so your Record class is a 
> non-native class that might get exported to JS if you use 
> -generateJsInteropExports during compilation. If you don't use that flag 
> the @JsType is treated as a normal class I guess.
>
> You should use @JsType(isNative=true, namespace=GLOBAL, name="Object") so 
> that your Record class becomes a plain JavaScript object
>
> -- J.
>

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


Re: Best Practice for JSON object recreation on client

2016-08-19 Thread Jens


Am Freitag, 19. August 2016 11:43:12 UTC+2 schrieb zakaria amine:
>
> I have tried something like: 
>
> @JsType(namespace=GLOBAL)
> public class Record {
> String id;
> String date;
> String data;
> public Record() {
> }
> }
>

By default @JsType property "isNative" is false, so your Record class is a 
non-native class that might get exported to JS if you use 
-generateJsInteropExports during compilation. If you don't use that flag 
the @JsType is treated as a normal class I guess.

You should use @JsType(isNative=true, namespace=GLOBAL, name="Object") so 
that your Record class becomes a plain JavaScript object

-- J.

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


Re: Best Practice for JSON object recreation on client

2016-08-19 Thread zakaria amine
I have tried something like: 

@JsType(namespace=GLOBAL)
public class Record {
String id;
String date;
String data;
public Record() {
}
}

As mentioned above, I created a JsInterop wrapper for the JSON class in 
javascript :

@JsType(isNative=true, namespace=GLOBAL)
public class JSON {
public native static String stringify(Object obj);

}

After calling : 

  Record record = new Record();
   record.id = "1";
   record.date = "20";
   record.data = "30";

GWT.log(JSON.stringify(record));

I got : 

{"id_1_g$":"1","date_1_g$":"20","data_1_g$":"30"}

I am not sure why does GWT adds _1_g$ to all properties. the solution is to 
annotate properties with @JsProperty(name="property name") 





Le jeudi 18 août 2016 09:33:37 UTC+2, Max Fromberger a écrit :
>
> Hello everybody,
>
> First of all a big THANKS to everyone involved in developing and 
> supporting GWT.
>
> please correct me wherever I am wrong:
>
> In the past you used JsonUtils.safeEval() to create a JavaScriptObject 
> from a JSON String. As i understand it, jsinterop annotations on classes 
> not extending JavaScriptObject are now preferred over JavaScriptObjects.
>
> What is the recommended, future-proof way of having a server-client common 
> class (i.e. package "shared") that can be:
>
> - created and accessed in a JVM servlet
> - created and accessed from the client end
> - serialized to JSON / deserialized from JSON to the specific class on the 
> server (e.g. using GSON)
> - serialized to JSON / deserialized from JSON to the specific class on the 
> client
>
> Background: Using WebSocket Servers to bidirectionally transfer JSONified 
> objects. No GWT-RPC involved.
> Trying to avoid duplicate environment specific classes, boilerplate code 
> etc.
>
> Thanks for every clue and please overlook me not having a native English 
> interface. ;)
>
>
>
> kind regards,
> max
>
>
>

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


Re: Best Practice for JSON object recreation on client

2016-08-19 Thread Thomas Broyer
Or you could use an array instead of a collection.

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