Re: porting older app from 2.5.0 to 2.8.2

2019-08-11 Thread Ignacio Baca Moreno-Torres
I'm not sure how difficult is to make it compile with GWT 2.8, if even
possible, but officially only GXT 4 is compatible with GWT 2.8:
https://docs.sencha.com/gxt/4.x/guides/getting_started/migration/MigrationGWT28.html

On Sun, Aug 11, 2019 at 9:14 PM Blaze  wrote:

> Hi all,
>
> I was wondering if some one can help me on this one...
> I have a older app which uses gxt.2.2.5-gwt22.jar, and when compiling with
> gwt 2.8.2 Im getting some errors like this:
>
>  [ERROR] Errors in
> 'jar:file:/x/gxt-2.2.5-gwt22.jar!/com/extjs/gxt/ui/client/widget/form/ListField.java'
>  [java][ERROR] Line 322: The method append(boolean) is
> ambiguous for the type StringBuffer
>
>
>   [ERROR] Errors in
> 'jar:file:/xx/gxt-2.2.5-gwt22.jar!/com/extjs/gxt/ui/client/widget/form/HtmlEditor.java'
>  [java][ERROR] Line 548: Type mismatch: cannot convert
> from com.google.gwt.dom.client.Element to com.google.gwt.user.client.Element
>  [java]  [ERROR] Hint: Check the inheritance chain from your
> module; it may not be inheriting a required module or a module may not be
> adding its source path entries properly
>
>
> Im guessing other gxt.jar file needs to be used, which adopts the small
> changes.
> I searched on the net, found some but not sure if this are the one to go
> with. e.g a jar called gxt-2.3.1a-gwt22.jar, also this one on git:
> https://github.com/bedatadriven/gxt
>
> Can some one give me some insides on this one, that would be great!!
>
> Tnx in advance,
> Blaze
>
>
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/google-web-toolkit/8986b211-a13b-4e6c-85b7-6d8eaecc57b6%40googlegroups.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/CABVWDC5G6CgXGhBtur38aRFNLaKb4xDh8HFjbyU7LhJoPbwx1g%40mail.gmail.com.


Re: GWT 2.9 Questions

2018-09-06 Thread Ignacio Baca Moreno-Torres
Since 2.8.2 the ECJ was updated too and fixes the RxJava2 compilation
problem... so Rx users are all (yep those 3 users XP) in that 0.1%. To fix
this, the 2.9 release will be nice too! Just saying, hehe lot of work and
we internally work with HEAD-SNAPSHOT. So when you please.

On Thu, Sep 6, 2018 at 9:59 PM Slava Pankov  wrote:

> Sure, any newer version of CLDR would be even nicer.
>
> Another one is updating embedded jetty, but not sure if it's even started.
>
>
> On Thursday, September 6, 2018 at 7:03:37 AM UTC-7, Thomas Broyer wrote:
>>
>> Thanks for the heads up, the issue hadn't been closed so I thought it
>> wasn't done.
>> Any idea if we'd want to update to 33.1?
>>
>> On Thursday, September 6, 2018 at 5:59:21 AM UTC+2, Slava Pankov wrote:
>>>
>>> IMO even "Update CLDR to version 32.0.1
>>> "
>>> is worth for releasing GWT 2.9
>>>
>>> On Wednesday, September 5, 2018 at 2:57:34 AM UTC-7, Thomas Broyer wrote:

 Replying to everyone in one go.

 On Wednesday, September 5, 2018 at 9:12:38 AM UTC+2, Josselin B. wrote:
>
> Hi Jens,
>
> Any idea for a release date of GWT 2.x ?
>

 No. You can follow advancement at
 https://github.com/gwtproject/gwt/milestone/19 (it doesn't move much
 though…)
 For now, it didn't seem urgent to release a 2.9, as 2.8.2 works great
 for 99.9% of people.


> Will it add better support for java interface default functions ?
>

 What do you mean?
 I can't remember issues related to interface default methods (lambdas
 and method references, sure, but not interface default methods)


> Le mer. 5 sept. 2018 à 09:07, Jens  a écrit :
>
>> GWT 2.x will not drop JSNI anytime soon, only GWT 3 will as it uses a
>> different Java -> JavaScript compiler internally. And yes there is really
>> no timeline for GWT 3 as most work is done by contributors in free time.
>> Currently we are trying to migrate GWT 2.x SDK code so it will become 
>> GWT 3
>> compatible with mostly no breaking changes. This process happens on 
>> Github
>> and you can see a list of projects being converted here:
>> ci.vertispan.com . Also some people are working on build plugins to
>> provide a better experience out of the box.
>>
>> GWT 2.x SNAPSHOT already supports Java 10 syntax, however no Java 9 +
>> 10 API additions have been emulated yet in GWT SDK, so you can not use 
>> new
>> Optional methods and such things. Also some Java 8 APIs are still 
>> missing.
>>
>> The only syntax addition of Java 11 is using 'var' for lambda
>> parameters. GWT depends on Eclipse JDT stable release in order to support
>> new syntax features. If you don't use that feature then you should 
>> probably
>> be able to run current GWT with Java 11, haven't tried it though. Never
>> used OpenJDK with GWT but I can't think of a reason why it should not 
>> work.
>>
>
 I (almost) exclusively use OpenJDK, and never had any problem.
 Also, OpenJDK 11 and Oracle JDK 11 will (finally) be functionally the
 same, so if GWT works with Oracle JDK 11, it *will* work with OpenJDK
 11.

 GWT 2.8.2 works with OpenJDK 10 and Oracle JDK 10 already, and while I
 haven't tested I see no reason it wouldn't work with JDK 11 (the big change
 was Jigsaw/JPMS in JDK 9).

 Fwiw, my plan (personal and at work, not for GWT proper) is staying on
 OpenJDK 8 for a little while (switching from Oracle JDK 8 to OpenJDK 8 if
 needed). It looks like there will be many OpenJDK packages with LTS support
 (most Linux distros, AdoptOpenJDK, Zulu) so I may switch to OpenJDK 11 at
 some point, but I bet it won't be before a year… (first and foremost, our
 customers clearly aren't ready; some are only just switching off of Java 7
 …up to Java 8)

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

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


Re: First experience using GWT Boot in my Java Devs Training

2018-05-25 Thread Ignacio Baca Moreno-Torres
JavaExec example here
https://github.com/ibaca/rxsnake-gwt/blob/master/build.gradle ;)

On Fri, May 25, 2018 at 9:17 AM Thomas Broyer  wrote:

> I know about two such plugins:
> https://github.com/Putnami/putnami-gradle-plugin and
> https://github.com/steffenschaefer/gwt-gradle-plugin, though the latter
> is unmaintained afaict.
> Fwiw, I'd start with simple JavaExec tasks and customized configs (to
> bring sources into the classpath), then only try to find out what more
> those plugins would bring me (Putnami's devmode+Jetty looks interesting).
>
> Also, FYI, GWT 3 will come with "official" plugins for both Maven and
> Gradle.
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: Advice needed - compile error while moving back to GWT 2.7 from 2.8.2

2018-05-24 Thread Ignacio Baca Moreno-Torres


I sometimes, when I'm a bit desperate, I debug the project, find some 
classes for the conflicting code using the 
"Thread.currentThread().getContextClassLoader().loadClass(...)", and use 
the variable inspector to find the class loader and the actual file that 
has been used to load the class. At least, you finally found where the hell 
was the cached class! ;) ... maybe the first time is a bit confusing, but 
after sometimes, you will solve those mixed/cached classpath problems much 
faster! 




On Thursday, May 24, 2018 at 9:13:04 PM UTC+2, JonL wrote:
>
> We have seen similar issues with this when we were experimenting with some 
> projects and upgrading to 2.8.2.  The things to double check are:
>
> 1. That there are no duplicate jars from different versions of GWT, as 
> mentions by Thomas Broyer.
> 2. Delete any GWT generated folder such as the gwt-unitCache, and the 
> script outputs in the war folder and also any GWT generated files in the 
> temp folder.
> 3. If still running into problems, delete the Eclipse workspace .metadata 
> folder, re-setup the workspace and import the existing projects into the 
> cleaned workspace.
>
> Due to GWT compilation caching, and Eclipse deployment caching, if files 
> do not change during the modification process, they can still reference the 
> the incorrect version of GWT, or the jars that are actually deployed to the 
> location where the Jetty server is run from by eclipse may not be updated.
>
> On Monday, May 14, 2018 at 6:06:09 AM UTC-7, Rachel wrote:
>>
>> We have to move our project back to GWT 2.7 due to some java 1.8 issues. 
>> I've checked all my jar files to make sure they are 2.7 and no duplicate 
>> jars in the build path but am getting errors when I try to compile with Ant.
>> Any suggestions would be greatly appreciated. Thank you.
>>
>> *prepareGWT*:
>>
>> [*delete*] Deleting directory 
>> C:\Users\s235985\workspace\wkflw_test\Approval\gwt-unitCache
>>
>> [*java*] Compiling module com.aep.mro.approval.approvalsystem
>>
>> [*java*] Computing all possible rebind results for 
>> 'gwtupload.client.bundle.UploadCss'
>>
>> [*java*] Rebinding gwtupload.client.bundle.UploadCss
>>
>> [*java*] Invoking generator 
>> com.google.gwt.resources.rebind.context.InlineClientBundleGenerator
>>
>> [*java*] Initializing ResourceGenerator
>>
>> [*java*] [ERROR] Unable to determine default for GSS in UiBinder
>>
>> [*java*] [ERROR] An internal compiler exception occurred
>>
>> [*java*] *com.google.gwt.dev.jjs.InternalCompilerException*: Unexpected 
>> error during visit.
>>
>> [*java*] at com.google.gwt.dev.jjs.ast.JVisitor.translateException(
>> *JVisitor.java:121*)
>>
>> [*java*] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(
>> *JModVisitor.java:296*)
>>
>> [*java*] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(
>> *JModVisitor.java:285*)
>>
>> [*java*] at com.google.gwt.dev.jjs.ast.JVisitor.accept(
>> *JVisitor.java:128*)
>>
>> [*java*] at com.google.gwt.dev.jjs.ast.JCastOperation.traverse(
>> *JCastOperation.java:67*)
>>
>> [*java*] at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(
>> *JModVisitor.java:381*)
>>
>> [*java*] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(
>> *JModVisitor.java:293*)
>>
>> [*java*] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(
>> *JModVisitor.java:285*)
>>
>> [*java*] at com.google.gwt.dev.jjs.ast.JVisitor.accept(
>> *JVisitor.java:128*)
>>
>> [*java*] at com.google.gwt.dev.jjs.ast.JDeclarationStatement.traverse(
>> *JDeclarationStatement.java:49*)
>>
>> [*java*] at com.google.gwt.dev.jjs.ast.JModVisitor$ListContext.traverse(
>> *JModVisitor.java:95*)
>>
>> [*java*] at 
>> com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemove(
>> *JModVisitor.java:351*)
>>
>> [*java*] at com.google.gwt.dev.jjs.ast.JBlock.traverse(*JBlock.java:92*)
>>
>> [*java*] at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(
>> *JModVisitor.java:381*)
>>
>> [*java*] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(
>> *JModVisitor.java:293*)
>>
>> [*java*] at com.google.gwt.dev.jjs.ast.JVisitor.accept(
>> *JVisitor.java:149*)
>>
>> [*java*] at com.google.gwt.dev.jjs.ast.JVisitor.accept(
>> *JVisitor.java:145*)
>>
>> [*java*] at com.google.gwt.dev.jjs.ast.JMethodBody.traverse(
>> *JMethodBody.java:83*)
>>
>> [*java*] at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(
>> *JModVisitor.java:381*)
>>
>> [*java*] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(
>> *JModVisitor.java:293*)
>>
>> [*java*] at com.google.gwt.dev.jjs.ast.JModVisitor.accept(
>> *JModVisitor.java:285*)
>>
>> [*java*] at com.google.gwt.dev.jjs.ast.JMethod.visitChildren(
>> *JMethod.java:600*)
>>
>> [*java*] at com.google.gwt.dev.jjs.ast.JMethod.traverse(
>> *JMethod.java:569*)
>>
>> [*java*] at com.google.gwt.dev.jjs.ast.JModVisitor.traverse(
>> *JModVisitor.java:381*)
>>
>> [*java*] at com.google.gw

Re: GWT JSON-B

2018-05-22 Thread Ignacio Baca Moreno-Torres
You really should try to avoid inheritance in your JsInterop DTOs. But,
hehe there are always someplace where you need or are forced to use it, in
that case, this is what we are currently using to get "inheritance" working
in the server side and the client side using DTOs:
https://gist.github.com/ibaca/89a2056a862a15c24cb93cdcff908b1f

JSON does not have inheritance, nor types (uhm actually all objects are
Object...), so the visitor strategy mitigates the problem, as this is the
DTO, so the transfer layer, this should not affect your server. Just use
always the factories in both sides and do not continue adding complexity or
at some point, you should stop using JsInterop DTOs and use an actual Java
-> JSON mapper like gwt-jackson[generator|apt].

On Mon, May 21, 2018 at 3:04 AM Ahmad Bawaneh  wrote:

> As long as you can limit your classes to jstypes - double, arrays, jsDate
> ...etc- this could be the right choice, but when the classes are shared
> with the server you might end up with JsType for each bean in the server,
> or you can use a lib that allows you to share the bean between the client
> and server.
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: Elemental2 and constants

2018-02-12 Thread Ignacio Baca Moreno-Torres
do you want to kill elemento? ;) it doesn't seem like an easy task and will
involve generics. Anyway, elemento is how it should look like. If this can
be extracted from closure definitions it will be nice.

On Mon, Feb 12, 2018 at 9:03 AM DavidN  wrote:

> Is there a plan to also generate constants needed in the Elemental2
> classes ?
> I am thinking about for example event-types or KeyboardEvent key values.
> Or is it not possible to auto generate these ?
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: Elemento Questions

2018-02-07 Thread Ignacio Baca Moreno-Torres
Elemento is just a user-friendly API for Elemental2. Elemental2 depends on
the last version of GWT so Elemento does. You can use it to access the
browser API. Integration with legacy GWT application is possible if legacy
doesn't mean old GWT version ;). You can stop using some GWT utils like
Canvas and use it directly with Elemental2. Or you can use the Elemento API
to build an element in the Widget.setElement, or whatever. Elemento is just
a nice API, whatever you have been doing with Elemental 1, you can now do
it with Elemental 2 or Elemento (Elemento best for events and elements).
Here there is a project with various examples using elemental and elemento (
https://github.com/mvp4g/mvp4g2-examples/) or you can do this in github
https://github.com/search?q="import+elemental2.dom";.

On Wed, Feb 7, 2018 at 2:18 PM Mutaz Alghafary  wrote:

> Hello All, I hope all is well.
> I have 2 questions regarding Elemnto library :
> 1- What is the minimum required GWT version for Elemnto to work ?
> 2- Is there any tutorial about integrating Elemento with a legacy GWT
> application ?
>
> Regards.
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: Possible to use Firebase in a GWT app?

2017-12-09 Thread Ignacio Baca Moreno-Torres
With JsInterop is pretty easy to create a minimal integration to make it
work, probably the best option if you just want minimal integration.
Anyway, you can get inspired by someone else code like
https://github.com/spirylics/x-gwt/tree/master/x-gwt-firebase. Not sure if
there is a good/complete gwt firebase API out there.

On Fri, Dec 8, 2017 at 2:54 PM Power Droid  wrote:

> Is it possible and/or does anyone know if any documentation exists
> regarding integrating Firebase with a GWT app?  I'm hoping to use Firebase
> Auth to allow a user to login to an app with a Google account and then
> possibly using some Firebase Analytics.
>
> PD
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: compilerArgs setProperty multi values - [ERROR] Unable to parse JavaScript

2017-11-30 Thread Ignacio Baca Moreno-Torres
OMG 50%, hehe maybe I did something wrong last time I was checking the 
difference. I need to try it again. Thanks!

On Thursday, November 30, 2017 at 8:34:33 AM UTC+1, Freddy Boucher wrote:
>
> Yes I would say it twice the size with emulated:
>
> For example on my demo app https://gwt-storage-objectify.appspot.com/
> the safari permutation:
> - native: 94.8 KB (
> https://gwt-storage-objectify.appspot.com/?compiler.stackMode=native)
> - emulated: 181 KB (
> https://gwt-storage-objectify.appspot.com/?compiler.stackMode=emulated)
>
> With a real app: http://www.learnkeeper.com/
> - native: 325 KB (http://www.learnkeeper.com/?compiler.stackMode=native)
> - emulated: 664 KB (
> http://www.learnkeeper.com/?compiler.stackMode=emulated)
>
>
>
> On Thursday, November 30, 2017 at 5:44:12 PM UTC+11, Ignacio Baca 
> Moreno-Torres wrote:
>>
>> I'm curious, what is the code size difference? We end up using always 
>> emulated bc the performance and size doesn't worth. But it depends on each 
>> app. Or do you do native for performance (speed)?
>>
>> El mié., 29 nov. 2017 14:36, Thomas Broyer  escribió:
>>
>>> So you need to provide a  so the correct permutation 
>>> can be chosen at runtime: 
>>> http://www.gwtproject.org/doc/latest/DevGuideOrganizingProjects.html#DevGuideModuleXml
>>> (this would likely fix your tests too; but you could also pass a 
>>> -setProperty for the tests)
>>>
>>>
>>> On Wednesday, November 29, 2017 at 11:25:15 AM UTC+1, Freddy Boucher 
>>> wrote:
>>>>
>>>> Hi @Thomas
>>>>
>>>> Yes it works perfectly when I declare it in my **.gwt.xml* but not 
>>>> when using Maven **.
>>>>
>>>> The whole story is: 
>>>> For production, I want to compile with both values (*native* and 
>>>> *emulated*). 
>>>> By default User loads *native* permutation but if an 
>>>> *Unexpected Exception* occurs in client code, I send it to server, 
>>>> deobfuscate it, log it, then reload User's browser with *emulated* 
>>>> permutation.
>>>>
>>>> Why doing that? Because it's likely to happen again if User retry to do 
>>>> exactly the same thing and with *emulated* permutation, the 
>>>> Deobfuscated StackTrace is 100% accurate about line number (vs not really 
>>>> with *native* permutation, PS: you can experience it by yourself on my 
>>>> demo app https://gwt-storage-objectify.appspot.com/ native it says 
>>>> *View.java:150* vs emulated *View.java:151* )
>>>>
>>>> But for dev env and test env, I only need *emulated*.
>>>>
>>>> And since I only have one **.gwt.xml *for all envs, I would prefer 
>>>> to keep only one value otherwise GWTTestCase will complain:
>>>>
>>>> INFO: /launch error: While attempting to load the module, property 
>>>> "compiler.stackMode" was not specifiedAllowed values: emulated,native,strip
>>>> Nov 29, 2017 9:22:19 PM com.gargoylesoftware.htmlunit.WebClient 
>>>> printContentIfNecessary
>>>> [WARN] 404 - GET /com.learnkeeper.App.JUnit/undefined.cache.js 
>>>> (127.0.0.1) 328 bytes
>>>> logging for HtmlUnit thread
>>>>[ERROR] Load Script Error: java.io.IOException: Unable to download 
>>>> JavaScript from '
>>>> http://localhost:51160/com.learnkeeper.App.JUnit/undefined.cache.js' 
>>>> (status 404).
>>>> java.io.IOException: Unable to download JavaScript from '
>>>> http://localhost:51160/com.learnkeeper.App.JUnit/undefined.cache.js' 
>>>> (status 404).
>>>> at 
>>>> com.gargoylesoftware.htmlunit.html.HtmlPage.loadJavaScriptFromUrl(HtmlPage.java:1047)
>>>> INFO: statusCode=[404] contentType=[text/html]
>>>> Nov 29, 2017 9:22:19 PM com.gargoylesoftware.htmlunit.WebClient 
>>>> printContentIfNecessary
>>>> INFO: 
>>>> 
>>>> 
>>>> Error 404 Not Found
>>>> 
>>>> HTTP ERROR 404
>>>> Problem accessing /com.learnkeeper.App.JUnit/undefined.cache.js. 
>>>> Reason:
>>>> Not FoundPowered by 
>>>> Jetty://
>>>>
>>>> 
>>>> 
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Wednesday, November 29, 2017 at 7:15:01 PM UTC+11, Thomas Broyer 
>>>> wrote:
>>>>>
>>>>> I would sa

Re: compilerArgs setProperty multi values - [ERROR] Unable to parse JavaScript

2017-11-29 Thread Ignacio Baca Moreno-Torres
I'm curious, what is the code size difference? We end up using always
emulated bc the performance and size doesn't worth. But it depends on each
app. Or do you do native for performance (speed)?

El mié., 29 nov. 2017 14:36, Thomas Broyer  escribió:

> So you need to provide a  so the correct permutation
> can be chosen at runtime:
> http://www.gwtproject.org/doc/latest/DevGuideOrganizingProjects.html#DevGuideModuleXml
> (this would likely fix your tests too; but you could also pass a
> -setProperty for the tests)
>
>
> On Wednesday, November 29, 2017 at 11:25:15 AM UTC+1, Freddy Boucher wrote:
>>
>> Hi @Thomas
>>
>> Yes it works perfectly when I declare it in my **.gwt.xml* but not when
>> using Maven **.
>>
>> The whole story is:
>> For production, I want to compile with both values (*native* and
>> *emulated*).
>> By default User loads *native* permutation but if an
>> *Unexpected Exception* occurs in client code, I send it to server,
>> deobfuscate it, log it, then reload User's browser with *emulated*
>> permutation.
>>
>> Why doing that? Because it's likely to happen again if User retry to do
>> exactly the same thing and with *emulated* permutation, the Deobfuscated
>> StackTrace is 100% accurate about line number (vs not really with
>> *native* permutation, PS: you can experience it by yourself on my demo
>> app https://gwt-storage-objectify.appspot.com/ native it says
>> *View.java:150* vs emulated *View.java:151* )
>>
>> But for dev env and test env, I only need *emulated*.
>>
>> And since I only have one **.gwt.xml *for all envs, I would prefer
>> to keep only one value otherwise GWTTestCase will complain:
>>
>> INFO: /launch error: While attempting to load the module, property
>> "compiler.stackMode" was not specifiedAllowed values: emulated,native,strip
>> Nov 29, 2017 9:22:19 PM com.gargoylesoftware.htmlunit.WebClient
>> printContentIfNecessary
>> [WARN] 404 - GET /com.learnkeeper.App.JUnit/undefined.cache.js
>> (127.0.0.1) 328 bytes
>> logging for HtmlUnit thread
>>[ERROR] Load Script Error: java.io.IOException: Unable to download
>> JavaScript from '
>> http://localhost:51160/com.learnkeeper.App.JUnit/undefined.cache.js'
>> (status 404).
>> java.io.IOException: Unable to download JavaScript from '
>> http://localhost:51160/com.learnkeeper.App.JUnit/undefined.cache.js'
>> (status 404).
>> at
>> com.gargoylesoftware.htmlunit.html.HtmlPage.loadJavaScriptFromUrl(HtmlPage.java:1047)
>> INFO: statusCode=[404] contentType=[text/html]
>> Nov 29, 2017 9:22:19 PM com.gargoylesoftware.htmlunit.WebClient
>> printContentIfNecessary
>> INFO: 
>> 
>> 
>> Error 404 Not Found
>> 
>> HTTP ERROR 404
>> Problem accessing /com.learnkeeper.App.JUnit/undefined.cache.js.
>> Reason:
>> Not FoundPowered by
>> Jetty://
>>
>> 
>> 
>>
>>
>>
>>
>>
>>
>> On Wednesday, November 29, 2017 at 7:15:01 PM UTC+11, Thomas Broyer wrote:
>>>
>>> I would say that you're not supposed to set compiler.stackMode to
>>> anything but a single value, because it doesn't have a property-provider;
>>> and that's exactly the problem with the generated JS: the snippet where the
>>> error occurs is a property provider, but because there's no
>>>  for that property, it generates invalid JS (granted, it
>>> could have failed instead).
>>> What I don't quite understand is that you're saying (IIUC) it only
>>> occurs with -setProperty and not .
>>>
>>> On Tuesday, November 28, 2017 at 8:57:38 AM UTC+1, Freddy Boucher wrote:

 Hi,

 On a GWT 2.8.2 Maven project using *tbroyer/gwt-maven-plugin*

 When I declare:

 
   -setProperty
   compiler.stackMode=native,emulated
 



 it fails:

 [INFO]Compiling 10 permutations

 [INFO]   Compiling permutation 0...

 [INFO]   Compiling permutation 1...

 [INFO]   Compiling permutation 2...

 [INFO]   Compiling permutation 3...

 [INFO]   Compiling permutation 4...

 [INFO]   Compiling permutation 5...

 [INFO]   Compiling permutation 6...

 [INFO]   Compiling permutation 7...

 [INFO]   Compiling permutation 8...

 [INFO]   Compiling permutation 9...

 [INFO]Compile of permutations succeeded

 [INFO]Compilation succeeded -- 53.925s

 [INFO] Linking into
 /Users/freddyboucher/Private/Programming/gwt-storage-objectify/gwt-storage-objectify-client/target/gwt-storage-objectify-client-0.0.1-SNAPSHOT/app;
 Writing extras to
 /Users/freddyboucher/Private/Programming/gwt-storage-objectify/gwt-storage-objectify-client/target/gwt-storage-objectify-client-0.0.1-SNAPSHOT/WEB-INF/deploy/app

 [INFO]Invoking Linker Cross-Site-Iframe

 [INFO]   Attempting to optimize JS

 [INFO]  [ERROR] Unable to parse JavaScript

 [INFO] com.google.gwt.dev.js.JsParserException:
 StandardLinkerContext.optimizeJavaScript(647): missing { before function

Re: Deploying symbolMaps in a production build

2017-11-15 Thread Ignacio Baca Moreno-Torres
https://github.com/ibaca/rxcanvas-gwt 😅

On Thursday, November 16, 2017 at 12:08:44 AM UTC+1, Ignacio Baca 
Moreno-Torres wrote:
>
> FYI this project is a working example of deploying a gwt app with source 
> maps. The pom is configured to included both the source map and the java 
> sources. I use site.sh to deploy as a github page.
>
> On Wednesday, November 15, 2017 at 9:40:26 PM UTC+1, AJ wrote:
>>
>> Thanks Colin.
>> That look like exactly what I need.
>> This will be a 'production' url we use to debug the issue and then 
>> re-deploy the 'real' build once we have stepped the code and found the 
>> offending null point.
>>
>> Nice to know about the stack trace.
>>
>> Thank you very much for the very detailed reply.
>>
>>
>>

-- 
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: Deploying symbolMaps in a production build

2017-11-15 Thread Ignacio Baca Moreno-Torres
FYI this project is a working example of deploying a gwt app with source 
maps. The pom is configured to included both the source map and the java 
sources. I use site.sh to deploy as a github page.

On Wednesday, November 15, 2017 at 9:40:26 PM UTC+1, AJ wrote:
>
> Thanks Colin.
> That look like exactly what I need.
> This will be a 'production' url we use to debug the issue and then 
> re-deploy the 'real' build once we have stepped the code and found the 
> offending null point.
>
> Nice to know about the stack trace.
>
> Thank you very much for the very detailed reply.
>
>
>

-- 
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 moving JsInterop from GWT 2.7 to 2.8

2017-09-29 Thread Ignacio Baca Moreno-Torres
We have been using this technique for more than a year and it works
perfectly. We call it "Java Notation Object", hehe and you should
understand the limitations, which more or less you are currently
fulfilling. Just a few changes...

The most important, yes, you should use
@JsType(isNative=true,namespace=GLOBAL,name="Object"), so you are actually
ignoring any kind of typing, so this is more a "scheme" of where to find
things than an actual typed object. This is pretty important! This is
pretty similar to JSON but in Java, and these classes are not actually Java
classes, are just a scheme. All these limitations are the common
intersection of the feature between Java and JS.

You can do some tricks to use collections but we end up removing all of
them and using arrays instead. But, to make it easy to work with, we added
some @JsOverlay to return or set the Collection. For example if you have
"String[] roles" you can add "@JsOverlay getRoleSet() { return
Stream.of(roles).collecto(toSet()); }". Overlays are ok bc there are just
like extension method or static method, so no behavior is added to the
object.

This work perfectly on both sides, but there is a small annoying
difference between GWT and Java, in java new Foo() will initialize
primitive types and in GWT (js) will not. So we never use constructor
directly, in the kind of classes we always add a static factory method and
we initialize any non-nullable field, even primitives! So in java you are
actually creating the object of the specified type, but in JS you are just
calling "new Object()", but it is ok, bc where are using a scheme, no a
type. And we never use instanceof on these schemes! This will work on the
Java side, but I strongly discourage, you should not need to do that.

Finally, we never use getter and setter, don't make sense, you "cannot use
inheritance" (you can use with some ticks too, for example using some int
or string field as the type indicator and using, for example, the visitor
pattern to traverse, this is what actually people need to do in JS so, no
magic just the common intersection of features between java and json),
almost everything is like final and you must not add behavior, so it is
much explicit and easier to just make all field public.

I think the first you should do is removing getters and setters, and add
@JsType(native,Object) to all your types, this refactor can be done almost
instantly in your IDE (inline method). Then stop using Collection might not
be so easy to refactor. So you might continue using it either using
overlays or creating a custom jsinterop-compatible type. In this case, I
recommend to not to use the whole java.util API bc it will force you to
export the whole API and use generateJsInteropExports. If you are really
interested or need help there just ask, but just try out avoiding maps, and
using arrays. Anyways, the "Map/List own interface" should work too, just
neet to make it work.

On Fri, Sep 29, 2017 at 12:53 PM Thomas Broyer  wrote:

>
>
> On Friday, September 29, 2017 at 11:09:42 AM UTC+2, Jürgen Beringer wrote:
>>
>> Hey,
>>
>> currently  I tried the 2. time to move our application from gwt 2.7 to
>> gwt 2.8, but I have big problems with the changes of JsInterop.
>>
>> The application contains a serverside java part, running in a jetty and
>> the client part, build with gwt, so I can reuse many software on server and
>> client side. (It is the main part of the website  www.spreadshirt.com )
>> To use also the same data classes (containing only fields with getter and
>> setter, no other methods) on both sides, I used JsInterop and it works very
>> well with gwt 2.7 and exchanged the data as json.
>>
>> Example Data class:
>>
>> @JsType
>> public class MyObject {
>> private String id;
>>
>> @JsProperty
>> public String getId() {
>> return id;
>> }
>> @JsProperty
>> public void setId(String id) {
>> this.id = id;
>> }
>> }
>>
>>
>> The class can be used on server side like any normal java class with any
>> REST Framework. On gwt side I was able to convert a transmitted json to the
>> class with:
>>
>>
>> MyObject myObject = getJsTypeObject(JsonUtils.safeEval(jsonString));
>> //use getter and setter to access fields
>>
>> public static native  T getJsTypeObject(JavaScriptObject result)/*-{
>> return result;
>> }-*/;
>>
>>
>> And to create Objects on gwt side and send them to the server as json:
>>
>> MyObject myObject = new MyObject();
>> myObject.setId("1");
>> String jsonString = stringify(myObject);
>>
>>
>> public static final native String stringify(Object result) /*-{
>> return JSON.stringify(result);
>> }-*/;
>>
>>
>> I also solved the problem of List and Map with an own Interface, which is
>> an ArrayList/HashMap on serverside and an own implemented native List/Map
>> on gwt side.
>>
>> The application has more than 100 such Objects which are heavily used on
>> server and client side in many methods which are also be used on both
>> sides

Re: SuperDevMode recompiles RPC since they are unchanged

2017-09-20 Thread Ignacio Baca Moreno-Torres
Eh! the bookmark (or similar tool
https://gist.github.com/ibaca/1dc87a58ee542840a5f90c5ff2931329) are still
useful if you use only the codeserver.

On mié., 20 sept. 2017 10:51 Jens  wrote:

>
> Hey Jens, nobody should use the bookmarklets in 2.7 either ;-)
>>
>
> Oh indeed, mmmh I guess mixing it up was a symptom of always using some
> custom build of GWT :-)
>
> -- 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.
>

-- 
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: Test Strategies for Modern GWT (i.e. Elemental2 etc)

2017-09-18 Thread Ignacio Baca Moreno-Torres
Elemento (so elemental2) uses it to test the builder, but as Erik said, not
quite practical for anything else than non-browser-related logic testing.
https://github.com/hal/elemento/blob/develop/core/src/test/java/org/jboss/gwt/elemento/core/ElementsBuilderTest.java#L50

On Tue, Sep 19, 2017 at 3:48 AM Erik Kuefler  wrote:

> If you want to further explore the mock-based option you should check out
> GwtMockito: https://github.com/google/gwtmockito. It handles natives and
> finals and has a few other GWT-specific features. I haven't made any big
> changes to it in the last couple of years, but if there are new things it
> could do to help with Elemental2 or other modern GWT I'm definitely open to
> suggestions.
>
> Mocking helps for certain types of logic tests, but for anything that
> relies on logic that runs in the browser (e.g. calculating the size of
> elements) it doesn't get you very far, so it's not great for testing
> widgets. For that I don't think there's much way around WebDrive.
>
>
> On Sunday, September 17, 2017 at 5:24:10 AM UTC-7, Peter Donald wrote:
>>
>> Hi,
>>
>> Has anyone got any good examples of how they are testing GWT code that is
>> interacting with the browser APIs.
>>
>> Historically we just ignored that low level code as we either were using
>> pre-existing Widgets that we implicitly trusted and for that limited amount
>> of jsni or browser interaction that we wrote we just hand tested and
>> limited change in that area. We then built abstractions ala MVP and tested
>> the rest of the app (which was typically 95% of the code anyhoo).
>>
>> Now that we are moving to Elemental2 there are fewer abstractions and it
>> would be nice to test the low level code. In particular small little
>> elements.
>>
>> So how do we people do this? Options that we came up with:
>>
>> * Ignore. build abstractions and use manual testing where required.
>> * GWTTestCase - although last time we tried it (maybe ~2010) it was
>> nothing like a real browser and rather slow.
>> * Compile code and tests to javascript and figure out a way to run them
>> in a real browser and scrape the results.
>> * Compile code to javascript and use webdriver/selenium to interact with
>> browser.
>> * Ignore for now and wait till J2CL and use js ecosystems solutions.
>> * Use something like powermock to mock natives etc and run them in jre
>>
>> Anyone got any examples of this working or can offer any suggestions? In
>> particular I am interested to see examples that use Elemental2 or other
>> jsinterop code.
>>
>> --
>> 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 https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: GWT Widgets and Elemental

2017-09-06 Thread Ignacio Baca Moreno-Torres
IMO stop using widgets is too difficult and it just forces you to actually 
not use ANY widget with is super-annoying bc there are some widgets that 
are still pretty useful. If you use widgets, the whole hierarchy should be 
widget aware to make the widget work properly (you can handle the lifecycle 
manually but it is... "even worst"). But, you can use widgets just as a 
component architecture, and use elements inside this components 
intensively, even you can use native events directly instead of gwt unified 
events (this has some risks!). This project is developing the whole APP 
trying to avoid widgets (https://github.com/hal/hal.next) or at least using 
elements intensively (using elemental2 and the user-friendly utility 
elemento), so you can really get inspired and get a good conclusion on how 
to progressively reduce widget dependency in your app. I have been also 
experimenting with widgets alternatives or widgets(less 
usage)-elemental(more usage) alternatives but I haven't concluded 
anything... 
(https://github.com/ibaca/rxtodo-gwt/blob/widgets/src/main/java/todo/client/ApplicationElement.java).

FYI Harald Pehl (https://github.com/hpehl) was already talked about this 
widget-to-something in the past https://www.youtube.com/watch?v=0cI2w-zrFbk 
and he is going to talk again in this edition so be aware! 
(http://www.gwtcon.org/).

Uhm... and yep, you can create HTML and use widgets only in some parts of 
the HTML, this is automatically handled in UIBinder and the actual code 
that handles this situation is the HTMLPanel. I have an experimental 
Elemento specific version of HTMLPanel 
(https://github.com/ibaca/rxtodo-gwt/blob/widgets/src/main/java/todo/client/ElementoHtmlPanel.java).
 
I just copied the required code from HTMLPanel to allow to add widgets in 
the internal native elements hiearchy.

On Wednesday, September 6, 2017 at 1:16:56 AM UTC+2, Jonathan Fischer wrote:
>
> I want/need to start porting my application away from GWT widgets, and for 
> various reasons I'd like to start with the top-most shell of the 
> application. Is it possible to lay out the basics of an application with 
> Elemental, and then attach GWT widgets at some point within? 
>
> E.g., can I do this sort of thing?
>
> 
>   My navigation goes here
>   I want to use this as my root panel for Widgets
> 
>
>
>

-- 
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: has anyone tried building a gwt application using buck ?

2017-08-21 Thread Ignacio Baca Moreno-Torres
This is all I need to compile (actually validate) RxJava (
https://github.com/ibaca/RxJava/commit/42372bb989490698b2e4862454ec469635a8f132).
Only sourceSets, configurations and the gwtCompile goal is relevant. I
think for an app project you will need a bit more because if you want to
create a war you should define the outputs of your task, but anyway doing
it manually seems to worth it.

On Mon, Aug 21, 2017 at 12:58 PM Thomas Broyer  wrote:

>
>
> On Monday, August 21, 2017 at 9:54:09 AM UTC+2, deba...@ainosoft.com
> wrote:
>>
>> Is there any effort you know for creating a gradle gwt plugin on similar
>> lines to your gwt-maven-plugin ?
>>
>
> There's IMO no point in creating a Gradle plugin "on similar lines",
> because it's so easy to just use a JavaExec task to run GWT, it might
> actually be a good idea to group client, shared and server code in the same
> Gradle project, using custom sourceSets (things you simply cannot do with
> Maven), and creating a GWT library is a 3-liner (there might also be better
> ways to organize code for shared libraries than with Maven, with a single
> Gradle project producing 2 JARs; again something simply impossibly with
> Maven).
> (OK, things might actually be slightly different for unit tests)
> There are at least 2 Gradle plugins for GWT though:
> https://github.com/steffenschaefer/gwt-gradle-plugin and
> https://github.com/Putnami/putnami-gradle-plugin
> I personally haven't used any of them because, well, the GWT apps I work
> on actually use Maven (for… reasons), or are only libraries that are still
> incubating (e.g. https://github.com/tbroyer/gwt-events)
>
> Can you kindly point me to a gwt gradle project sample ?
>>
>
> I know Putnami has sample projects, and you should be able to find others
> on GitHub searching for the plugin IDs.
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: Different code-server port with gwt-maven-plugin

2017-08-09 Thread Ignacio Baca Moreno-Torres
You can use arbitrary arguments per-mode, so to add the codeserverPort to 
the codeserver goal add:
-codeServerPort1234
If you are using dev mode use:
-codeServerPort1234.

On Wednesday, August 9, 2017 at 3:01:01 PM UTC+2, Luca Morettoni wrote:
>
> Hello, for a project we’re using the fantastic gwt-maven-plugin, but now 
> we need to migrate a legacy feature of the app to a new version, and we 
> like to run both version of the app (old and new) to compare the results.
> We have a difficult, we can’t force the code-server to use a port 
> different than the default one (9876) with that maven plugin.
>
> Any idea or hint? Looking the documentation there isn’t any option to do 
> that:
>
> https://tbroyer.github.io/gwt-maven-plugin/codeserver-mojo.html
>
> Thanks in advance!
>
> --
> Luca Morettoni  | http://www.morettoni.net
> http://it.linkedin.com/in/morettoni/   | http://twitter.com/morettoni
>
>

-- 
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: Can I remove compile permutations for the default language

2017-08-07 Thread Ignacio Baca Moreno-Torres
We just merge some of them... depending on the final app size. We think a
200k to 400k after compression is acceptable, so just try out various
permutation combinations. If your app is small enough you can just collapse
all with ''. Or merge some permutation like...

















On Mon, Aug 7, 2017 at 10:10 AM Frank  wrote:

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

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


Re: Deploying GWT application on a web server

2017-07-18 Thread Ignacio Baca Moreno-Torres
You can deploy the generated app in whatever web server you choose.
For example, those pom.xml are configured to deploy to github site
https://github.com/ibaca/rxbreakout-gwt/
https://github.com/ibaca/rxsnake-gwt/blob/master/pom.xml
This is a bit more complex, but it deploys the app with source code +
source maps so you can see the source in your browser devtool.
https://github.com/ibaca/rxcanvas-gwt/blob/master/pom.xml

For local development, it is useful to create a command to deploy to your
local web server, something like...
mvn package -Pdraft -DskipTests && scp -rC
target/{mavenFinalName}/{gwtModuleName} mywebserver.com:
/var/www/{gwtModuleName}/


On Tue, Jul 18, 2017 at 12:31 PM Rodolfo Raya  wrote:

> Hi,
>
> Yes, you can use Eclipse Jetty instead of Tomcat. See
> http://www.eclipse.org/jetty/
>
> Regards,
> Rodolfo
> --
> Rodolfo M. Raya  rmr...@maxprograms.com
> Maxprograms  http://www.maxprograms.com
>
> On Tue, Jul 18, 2017 at 6:15 AM  wrote:
>
>> Can I deploy the code generated by GWT other than Tomcat web server?
>>
>> On Tuesday, November 23, 2010 at 4:42:01 PM UTC+5:30, Noor wrote:
>>>
>>> Hi,
>>> I have read the documentation on deployment but I have not yet figured
>>> how to deploy an gwt app on web server. Can someone explain me how to
>>> do so assume the default application created with eclipse:
>>>
>>> that is the server implementation in a package
>>> and the field verifier which is used by the server implementation in
>>> another package.
>>>
>>> thanks in advance!!
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "GWT Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to google-web-toolkit+unsubscr...@googlegroups.com.
>> To post to this group, send email to google-web-toolkit@googlegroups.com.
>> Visit this group at https://groups.google.com/group/google-web-toolkit.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 SuperDev mode issue after migrating from 2.7.0 to 2.8.1 with application that uses Spring Framework

2017-07-17 Thread Ignacio Baca Moreno-Torres
But this is not a multimodule project (means this is not a tbroyer
archetype multimodule project), you need a shared lib, and the client
should Not depend on the server, but if you continue with this layout at
least explicitly exclude non required libs from the server dependency in
the client pom, as anything related with spring.

El lun., 17 jul. 2017 11:05, Andrei Anishchenko 
escribió:

> Hi,
>
> I have a Maven multi-module project that uses Spring Framework in the
> backend. Everything was working fine until I tried to migrate from GWT
> 2.7.0 to 2.8.1. Supposedly production mode works fine (never tried though
> so far), but in SuperDev mode I am getting initialization errors coming
> from Spring bootstrap. Some built-in Spring beans require them to be
> created only once, while attempts to create several of them are taken (see
> the log file attached for an example). Digging into this, I discovered that
> it has something to do with the fix for
> https://github.com/gwtproject/gwt/issues/9292, namely, in
> com.google.gwt.dev.shell.jetty.JettyLauncher.WebAppContextWithReload.WebAppClassLoaderExtension#getResources
> 
> method. Before this fix, Jetty's classloader loaded resources strictly from
> the lib folder of the web application, and now it is so greedy that it
> loads them both from this said folder AND local Maven repo. This makes all
> my Maven submodules available twice in the classpath, each if them is
> treated individually.
>
> To demonstrate the issue, I've created a simple application that resembles
> my original setup. This application is available here:
> https://github.com/AndrewAni/GwtDev. If these
> 
> two scheduler-related bean definitions are commented out, the problem
> doesn't present itself.
>
> It appears that if I go with Java-based Spring configuration, this
> wouldn't bother me anymore, since the suspicious classloader code affects
> only loading resources like XMLs. But I cannot shake the feeling that I am
> doing something wrong, and with the next GWT development iteration even
> Java classes would be loaded differently, breaking my stuff even more.
>
> Am I missing something? Is my setup wrong somehow? Something about Maven
> layout maybe?
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: Annoying Map containing List bug

2017-06-18 Thread Ignacio Baca Moreno-Torres
Oh, developing with netbeans, using legacy devmode (hosted mode) and using 
Object with GWT RPC... you really like it hard! hehe so your one 
permutation draft compilation takes about an hour, isn't it? damn GWT! 😜 I 
thought that RPC will generate serializers for every subtype of Object, but 
from the Jens comment looks like it just ignores it in this case, but I bet 
you use Object in more places, your serializers should be huge! .The last 
years we have been applying changes to make GWT more lightweight and we 
have been reducing compilation times even the application have been growing 
constantly, this also improves debugging experience and app size. Using 
Object there is against any faster/optimized or even type-safe code, hehe 
so not saying is a bad idea, just saying it worth finding some alternative 
😉.

On Saturday, June 17, 2017 at 8:39:48 PM UTC+2, Edson Richter wrote:
>
> I've found a weird behavior of GWT.
> I've a code that communicates with server side via RPC.
>
> The request returns a Map wich runs fine. Until last week, 
> when I spent about 3 days to figure that I can't put a List in the 
> map. The problem is not from Server side to Client side, but when the 
> client side try to send the Map back to server side, it throws an error 
> "this$static[signature][2] is not a function", without any clue about the 
> problem.
>
> the server side RPC code is similar to:
>
> public Map getContext() {
>   Map myMap = new HashMap();
>   List someStrings = new ArrayList();
>   List otherStrings = new ArrayList();
>   List situacoes = new ArrayList();
>
>   someStrings.add("Some strings to test");
>   otherStrings.add("Other strings to test");
>   situacoes.add(SITUACAO.NOVA);
>   myMap.put("someString", someStrings);
>   myMap.put("otherString", otherStrings);
>   myMap.put("someConstant", situacoes);
>   return myMap; 
> }
>
> The client side receives data, and show a dialog with that data. No error. 
> But when I try to send the map back over the wire, I get the error.
>
> Changing the code to:
>
> public Map getContext() {
>   Map myMap = new HashMap();
>   List someStrings = new ArrayList();
>   List otherStrings = new ArrayList();
>   List situacoes = new ArrayList();
>
>   someStrings.add("Some strings to test");
>   otherStrings.add("Other strings to test");
>   situacoes.add(SITUACAO.NOVA.name());
>   myMap.put("someString", someStrings);
>   myMap.put("otherString", otherStrings);
>   myMap.put("someConstant", situacoes);
>   return myMap; 
> }
>
> ...is a workaround!
>
> In time: before someone try to convince me that a Map is a 
> bad idea, it is working really well - I've a system with about 500.000 
> lines of code, and I'll not change this.
>
> If you need more details to fix this annoying bug, please let me know.
>
> Regards,
>
> Edson Richter
>
>

-- 
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 2.8.1 release

2017-06-08 Thread Ignacio Baca Moreno-Torres
This is a programmatic mapping from closure externs
https://github.com/google/closure-compiler/tree/master/contrib/externs so,
at the end if it changes it will change the same in every place, so fixing
it should not be very difficult. Anyways, this super awesome project 😜 is
going to expose a user-friendly and type safe API (manual work) over raw
elemental2 https://github.com/hal/elemento (code example here
https://github.com/ibaca/rxtodo-gwt/blob/master/src/main/java/todo/client/ApplicationElement.java#L53),
IMO pretty promising! RxGWT will be using elemento typed events to make it
also Rx typed events just over elemental2!

Code example here, this is always nice...

root = li().data(ITEM, item.id).css("completed", item.completed)
.add(div().css("view")
.add(toggle =
input(checkbox).css("toggle").checked(item.completed).asElement())
.add(msg = label().textContent(item.text).asElement())
.add(destroy = button().css("destroy").asElement()))
.add(summary = input(text).css("edit").asElement())
.asElement();

bind(toggle, change, ev -> {
root.classList.toggle("completed", toggle.checked);
repository.complete(item, toggle.checked);
application.update();
});

All these fields are typed so, root is a HTMLLiElement, toggle is a
HTMLInputElement or ev in the bind method is an InputEvent.

On Wed, Jun 7, 2017 at 10:14 PM Vassilis Virvilis  wrote:

> thanks for the clarification.
>
> Maybe a sufficiently strong wording in the compatibility guarantees is
> enough.
>
> Something like this: We will try really hard to not rename all methods and
> move all packages around in the next week commits. However we may introduce
> incompatible changes as we are evolving the API. So no you can't use
> __this__ in __production__.
>
> Or maybe this a bad idea that will lead to a new KDE4 fiasco.
>
> Who knows?
>
> Vassilis
>
>
> On Wed, Jun 7, 2017 at 10:14 PM, Daniel Kurka 
> wrote:
>
>> There is some reasoning behind us not broadly announcing elemental2 and
>> the jsinteorp generator:
>> They are both still beta software in the sense that we know there are
>> existing problems, but we already want feedback on them.
>> There are still no guarantees on APIs / compat but if you are brave and
>> want to be part of evolving them and turning them into a finished and
>> polished product, you can do that.
>>
>> We will announce them broadly once we consider them ready for general use
>> and have a compatibility guarantee in place.
>>
>> On Wed, Jun 7, 2017 at 11:48 AM Vassilis Virvilis 
>> wrote:
>>
>>> Ah yes that explains it. It was j2cl that I remembered.
>>>
>>> Thanks for the clarification.
>>>
>>> Vassilis
>>>
>>> On Wed, Jun 7, 2017 at 9:40 PM, Colin Alworth 
>>> wrote:
>>>
 I think you may be misremembering - the jars were released to maven as
 experimental last summer, then as beta in April, and only after that were
 they on github.

 J2CL is not expected to be dropped until it is "ready", but as with
 elemental2, this isn't going to mean "bugfree" but more like "complete
 enough to be reviewed and used".

 On Wednesday, June 7, 2017 at 1:10:37 PM UTC-5, Vassilis Virvilis wrote:
>
> Looks like they are also here in source form
>
> https://github.com/google/elemental2
> https://github.com/google/jsinterop-generator
>
> I thought google didn't want to release them before they were "ready".
> So either they changed their mind, or they feel it is ready or I don't
> remember correctly :-)
>
>  Vassilis
>
> On Wed, Jun 7, 2017 at 7:17 PM, Colin Alworth 
> wrote:
>
>> The groupId has changed - using the mvnrepository site, try
>> https://mvnrepository.com/artifact/com.google.elemental2 to see all
>> of the jars now available.
>>
>>
>> On Wednesday, June 7, 2017 at 11:14:33 AM UTC-5, Bruno Salmon wrote:
>>>
>>>
>>>
 Additionally, this supports the recent beta release of
 jsinterop.base and elemental2, available from Maven Central.



>>> Where can we find that elemental2  beta release (I can see only the
>>> June 2016 version on that page
>>> 
>>> )?
>>>
>>> Thanks for all your amazing work.
>>>
>> --
 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 subs

Re: JSNI -> JsInteop

2017-05-17 Thread Ignacio Baca Moreno-Torres
There are some thing that will require jsni but this lib should have a GWT
maintained utility.
http://search.maven.org/#artifactdetails%7Ccom.google.jsinterop%7Cbase%7C1.0.0-beta-2%7Cjar

El mié., 17 may. 2017 18:42, Kirill Prazdnikov  escribió:

> Hi, I`m looking for methods to migrate completely to JsInterop.
> It is not clear how to translate for (var id in object) { ... } ?
>
> Any suggestions ?
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: gwt elemental newbie

2017-04-29 Thread Ignacio Baca Moreno-Torres
Elemental 1 and 2 are a bit different, both exposes the "whole" HTML5 API,
elemental 1 using jsni and elemental 2 using jsinterop. But elemental 1 has
other tools that look like elemental 2 is not going to include like shared
json implementation and hight-performance collections. And finally and most
important, elemental 2 is pretty unstable right now so it probably will
break your compilation on each alpha release as you have seen in the
branflake code. Just update to make it work.

More info about elemental 1 here
http://www.gwtproject.org/articles/elemental.html.

On Sat, Apr 29, 2017 at 3:51 PM  wrote:

> Hello,
>
> I am starting to learn gwt elemental.
> I've started with the code here:
> https://gist.github.com/branflake2267/8e4b9d4f2dc594fe21a125155516ec97
>
> but there are some compile time errors. See attached screenshot with
> comments on the lines with errors, and my crude attempts at workarounds.
>
> The workarounds seem to fix the compile time errors, but when running the
> app there is a runtime exception at this line of code:
>
> HTMLDocument document =  new HTMLDocument(); //Error-   Illegal
> constructor.
>
> Thanks in advance for your help
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: GWT 2.8.1 - Could not find artifact org.codehaus.mojo:gwt-maven-plugin:jar:2.8.1

2017-04-27 Thread Ignacio Baca Moreno-Torres
Actually, since this commit,
https://github.com/gwt-maven-plugin/gwt-maven-plugin/commit/8b456fedae820cfdcdc581d18900f7244cf51234
using
a gwt-dev and gwt-user explicit dependency in your module should disable
auto-inclusion of gwt dependencies, so the plugin should work.

On Thu, Apr 27, 2017 at 10:24 AM Thomas Broyer  wrote:

>
>
> On Thursday, April 27, 2017 at 9:30:36 AM UTC+2, Ignacio Baca
> Moreno-Torres wrote:
>>
>> Yep, should be released... but it is pretty weird that the plugin should
>> be released on each GWT version, this and other important issues like
>> better multi-module support was the motivation to start the new generation
>> plugin by Thomas Broyer (https://github.com/tbroyer/gwt-maven-plugin).
>> We'll release a new version just to match the GWT version number during
>> this week. In the meantime, you may try to migrate to the new generation
>> one, Thanks!
>>
>
> Also, this should work:
> https://gwt-maven-plugin.github.io/gwt-maven-plugin/user-guide/using-different-gwt-sdk-version.html
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: GWT 2.8.1 - Could not find artifact org.codehaus.mojo:gwt-maven-plugin:jar:2.8.1

2017-04-27 Thread Ignacio Baca Moreno-Torres
Yep, should be released... but it is pretty weird that the plugin should be
released on each GWT version, this and other important issues like better
multi-module support was the motivation to start the new generation plugin
by Thomas Broyer (https://github.com/tbroyer/gwt-maven-plugin). We'll
release a new version just to match the GWT version number during this
week. In the meantime, you may try to migrate to the new generation one,
Thanks!

On Thu, Apr 27, 2017 at 5:59 AM Freddy Boucher 
wrote:

> Hi,
>
> Thanks for the hard work about GWT 2.8.1.
>
> Do you plan to release org.codehaus.mojo:gwt-maven-plugin:jar:2.8.1 ?
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: GWT/Maven development cycle takes much too long

2017-04-24 Thread Ignacio Baca Moreno-Torres
But please, use the tbroyer plugin, it's much better, makes no sense start
a new project using the old one. I also think that using maven makes a
pretty reasonable development lifecycle, I just use the IDE to run the
maven goals, works perfectly, much easier to configure and get it work. The
tbroyer archetype can be used, gwt don't make sense to be executed in debug
mode, and the sever side, tomcat, can be executed as develop maven goal and
works in eclipse and IntelliJ.

El lun., 24 abr. 2017 13:46, Pavlo Iatsiuk 
escribió:

> Magnus, if you still have a problem to run it  - I can create a small
> "hello world" to show you how to do that with maven
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: GWT/Maven development cycle takes much too long

2017-04-23 Thread Ignacio Baca Moreno-Torres
If you want to do it the same way just use the modular webapp-archetype (
https://github.com/tbroyer/gwt-maven-archetypes/blob/master/README.md) 😬👍
videos here (GWT Eclipse Plugin V3:
https://www.youtube.com/playlist?list=PLBbgqtDgdc_TqzA-qXrjgTFMC_6DKAQyT).
Please, watch all the videos! 😉

El dom., 23 abr. 2017 2:17, Magnus  escribió:

> Hello Jens,
>
> I'm beginning to realize that removing scope=provided isn't a solution to
> the eclipse problem.
> Sorry that this took so long...
>
> However, then let's come back to the eclipse error again:
>
> org.apache.maven.plugin.MojoExecutionException: Failed to copy file for
> artifact [msm.lib.acs:msm-lib-acs:jar:1.0-SNAPSHOT:compile]
>
> ...
>
> Caused by: java.io.FileNotFoundException:
> /home/wagner/dvl/prj/msm/msm-lib-acs/target/classes (Is a directory)
>
>
>
> I see two approaches then:
>
>
>-
> *solve the eclipse error without removing scope=provided *Does anyone
>have an idea what may be causing the eclipse error? What file is not found?
>What is the process behind this file access? Can you solve it by placing a
>dummy file somewhere?
>
>-
> *using another maven plugin *As some of you may have noticed in another
>thread, I was evaluating both, Mojo's and Thomas' eclipse plugin. Then, I
>saw that I can live with the pom.xml created by webAppCreator, without
>really caring about which plugin is used then.
>But I thought it was the "GWT way to go", since the pom was created by
>webAppCreator, which is shipped with the GWT SDK.
>
>However, in this thread, Thomas said that the Mojo-Haus plugin doesn't
>work in reactor builds. But I was unsure what I am actually using. When
>looking into my pom.xml I see a plugin with groupId = net.ltgt.gwt.maven.
>This seems to refer to Thomas' plugin. But in contrast, the error message
>refers to "MojoExecutionException". Sorry, but I still cannot follow this.
>Which plugin am I using? And if it's the "wrong" one, how can I switch in
>my existing pom.xml?
>
> There seem to exist people without those problems. I simply want to do it
> the same way.
>
> Magnus
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: JNDI lookup issue when upgrade GWT from 2.2 to 2.8

2017-04-17 Thread Ignacio Baca Moreno-Torres
Having one final war file is ok. But, you should compile the client side in
one module, and add the GWT compilation output to your war file as an
overlay. This is a poor summary, all this is explained in the new maven
plugin which was designed to solve exactly this problem.
https://tbroyer.github.io/gwt-maven-plugin/
https://github.com/tbroyer/gwt-maven-plugin/wiki/DevModeDesignDoc
https://github.com/tbroyer/gwt-maven-archetypes

On Mon, Apr 17, 2017 at 8:01 PM  wrote:

> We have built only one war file for all server/client. Do you mean we
> should build separate war files? one for server and one for client? Can we
> totally avoid gwt-dev.jar in the server war file? Currently it is the
> gwt-dev.jar which requires jetty even we build in production mode.
>
>
> On Monday, April 17, 2017 at 1:45:31 AM UTC-4, Ignacio Baca Moreno-Torres
> wrote:
>
>> This is the classic classpath problem in GWT, you should not use the same
>> classpath in client and server, tbroyer has been writing about that for
>> years. In the server side no client side dependency should be added. You
>> can either migrate to a multimodule project layout over selectively exclude
>> client dependencies in the server until you get it work, this is probably
>> what you do in previous versions, but as you can see, this is pretty
>> fragile.
>>
>> I deduce all this just seen the jetty class, maybe I'm wrong, but, really
>> look like that.
>>
>> El lun., 17 abr. 2017 2:43, Juan Pablo Gardella 
>> escribió:
>>
> Gwt 2.8 uses java7. Are you using this version? The jndi name AFAIK is
>>> defined in jboss-web.xml file for jboss
>>>
>>> El dom., 16 de abr. de 2017 21:26,  escribió:
>>>
>> We used GWT for many years and not upgrade it for far.
>>>> We want to upgrade it to the latest GWT 2.8 and Java 1.8. We had a lot
>>>> of issues.
>>>>
>>>> Currently we had problem to create a data source with Spring under
>>>> JBoss 6.4. It used to work on under GWT 2.2.
>>>>
>>>> The data source is defined in JBoss and it bounds to the database
>>>> without issue. It specified JNDI name there.
>>>>
>>>> In Spring context we reference the jndi name defined in JBoss data
>>>> source:
>>>>
>>>> >>> class="org.springframework.jndi.JndiObjectFactoryBean">
>>>> 
>>>> java:jboss/datasources/oe
>>>> 
>>>> 
>>>>
>>>> This used to work in GWT 2.2 but not in GWT 2.8. It tried to look in
>>>> the jetty environment.It failed to find the jndi name.
>>>> Do I need to specify something special to let it looking for the JBoss
>>>> defined jndi name?
>>>>
>>>> 23:39:32,746 DEBUG
>>>> [org.springframework.beans.factory.support.DefaultListableBeanFactory]
>>>> (ServerService Thread Pool -- 53) Invoking afterPropertiesSet() on bean
>>>> with name 'dataSource'
>>>> 23:39:32,746 DEBUG [org.springframework.jndi.JndiTemplate]
>>>> (ServerService Thread Pool -- 53) Looking up JNDI object with name
>>>> [java:jboss/datasources/oe]
>>>> 23:39:32,746 DEBUG [jndi] (ServerService Thread Pool -- 53)
>>>> InitialContextFactory.getInitialContext()
>>>> 23:39:32,746 DEBUG [jndi] (ServerService Thread Pool -- 53) Created
>>>> initial context delegate for local namespace:
>>>> org.eclipse.jetty.jndi.local.localContextRoot@7f559695
>>>> 23:39:32,746 DEBUG [jndi] (ServerService Thread Pool -- 53) Looking up
>>>> name="java:jboss/datasources/oe"
>>>> 23:39:32,777 ERROR [org.springframework.web.context.ContextLoader]
>>>> (ServerService Thread Pool -- 53) Context initialization failed:
>>>> org.springframework.beans.factory.BeanCreationException: Error creating
>>>> bean with name 'departmentCodeDAOImpl': Injection of persistence
>>>> dependencies failed; nested exception is
>>>> org.springframework.beans.factory.BeanCreationException: Error creating
>>>> bean with name 'entityManagerFactory' defined in ServletContext resource
>>>> [/WEB-INF/classes/resources/database-context.xml]: Cannot resolve reference
>>>> to bean 'dataSource' while setting bean property 'dataSource'; nested
>>>> exception is org.springframework.beans.factory.BeanCreationException: Error
>>>> creating bean with name 'dataSource

Re: JNDI lookup issue when upgrade GWT from 2.2 to 2.8

2017-04-16 Thread Ignacio Baca Moreno-Torres
This is the classic classpath problem in GWT, you should not use the same
classpath in client and server, tbroyer has been writing about that for
years. In the server side no client side dependency should be added. You
can either migrate to a multimodule project layout over selectively exclude
client dependencies in the server until you get it work, this is probably
what you do in previous versions, but as you can see, this is pretty
fragile.

I deduce all this just seen the jetty class, maybe I'm wrong, but, really
look like that.

El lun., 17 abr. 2017 2:43, Juan Pablo Gardella 
escribió:

> Gwt 2.8 uses java7. Are you using this version? The jndi name AFAIK is
> defined in jboss-web.xml file for jboss
>
> El dom., 16 de abr. de 2017 21:26,  escribió:
>
>> We used GWT for many years and not upgrade it for far.
>> We want to upgrade it to the latest GWT 2.8 and Java 1.8. We had a lot of
>> issues.
>>
>> Currently we had problem to create a data source with Spring under JBoss
>> 6.4. It used to work on under GWT 2.2.
>>
>> The data source is defined in JBoss and it bounds to the database without
>> issue. It specified JNDI name there.
>>
>> In Spring context we reference the jndi name defined in JBoss data source:
>>
>> > class="org.springframework.jndi.JndiObjectFactoryBean">
>> 
>> java:jboss/datasources/oe
>> 
>> 
>>
>> This used to work in GWT 2.2 but not in GWT 2.8. It tried to look in the
>> jetty environment.It failed to find the jndi name.
>> Do I need to specify something special to let it looking for the JBoss
>> defined jndi name?
>>
>> 23:39:32,746 DEBUG
>> [org.springframework.beans.factory.support.DefaultListableBeanFactory]
>> (ServerService Thread Pool -- 53) Invoking afterPropertiesSet() on bean
>> with name 'dataSource'
>> 23:39:32,746 DEBUG [org.springframework.jndi.JndiTemplate] (ServerService
>> Thread Pool -- 53) Looking up JNDI object with name
>> [java:jboss/datasources/oe]
>> 23:39:32,746 DEBUG [jndi] (ServerService Thread Pool -- 53)
>> InitialContextFactory.getInitialContext()
>> 23:39:32,746 DEBUG [jndi] (ServerService Thread Pool -- 53) Created
>> initial context delegate for local namespace:
>> org.eclipse.jetty.jndi.local.localContextRoot@7f559695
>> 23:39:32,746 DEBUG [jndi] (ServerService Thread Pool -- 53) Looking up
>> name="java:jboss/datasources/oe"
>> 23:39:32,777 ERROR [org.springframework.web.context.ContextLoader]
>> (ServerService Thread Pool -- 53) Context initialization failed:
>> org.springframework.beans.factory.BeanCreationException: Error creating
>> bean with name 'departmentCodeDAOImpl': Injection of persistence
>> dependencies failed; nested exception is
>> org.springframework.beans.factory.BeanCreationException: Error creating
>> bean with name 'entityManagerFactory' defined in ServletContext resource
>> [/WEB-INF/classes/resources/database-context.xml]: Cannot resolve reference
>> to bean 'dataSource' while setting bean property 'dataSource'; nested
>> exception is org.springframework.beans.factory.BeanCreationException: Error
>> creating bean with name 'dataSource' defined in ServletContext resource
>> [/WEB-INF/classes/resources/database-context.xml]: Invocation of init
>> method failed; nested exception is javax.naming.NameNotFoundException;
>> remaining name 'java:jboss/datasources/oe'
>> Related cause: org.springframework.beans.factory.BeanCreationException:
>> Error creating bean with name 'dataSource' defined in ServletContext
>> resource [/WEB-INF/classes/resources/database-context.xml]: Invocation of
>> init method failed; nested exception is javax.naming.NameNotFoundException;
>> remaining name 'java:jboss/datasources/oe'
>> at
>> org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessPropertyValues(PersistenceAnnotationBeanPostProcessor.java:342)
>> [org.springframework.orm-3.1.1.RELEASE.jar:3.1.1.RELEASE]
>> at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1106)
>> [org.springframework.beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
>> at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
>> [org.springframework.beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
>> at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
>> [org.springframework.beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
>> at
>> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
>> [org.springframework.beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
>> at
>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
>> [org.springframework.beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
>> at
>> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.

Re: Blocked a frame with origin

2017-04-13 Thread Ignacio Baca Moreno-Torres
This is not a GWT problem, I'm not sure why this failed but I recommend
that you find a more general (not GWT) answer like this
http://stackoverflow.com/q/34801417/1824841

El jue., 13 abr. 2017 6:55, David  escribió:

> I am using GWT to process a very old web site. This web site has a lot of
> iframes. Each iframe has a relative url or '#' for its src. The compiled
> javascript - *.nocache.js is included in top document head.
>
> After a page is loaded, I click a link and the page generate following
> iframe in ajax way.
>
> 
>   
> 
>   
>   
> 
>   
> 
>
> On OnLoad event, I have following code:
>  IFrameElement iframeElement;  //I get an instance variable for above
> iframe element
>  NodeList childNodes = iframeElement.getChildNodes();
>  int length = childNodes.getLength();
>  logger.info("childNodes length=" + length);   //print out
> "childNodes length=0"
>
>  final Document contentDocument = iframeElement.getContentDocument();
> //Got UncaughtException: (SecurityError) : Blocked a frame with origin "
> http://xxx.com"; from
>
>  //accessing a cross-origin frame.
>
> I cannot understand why I got "cross-origin frame" issue because they are
> same domain.
>
> I do appreciate your help.
>
> David
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: GWT + Open API

2017-03-26 Thread Ignacio Baca Moreno-Torres
Ok, you can make it work but at least in chrome you need to accept the 
"load unsafe scripts" warning.

<https://lh3.googleusercontent.com/-pHpAbImeZ5E/WNgy1B1z4JI/AAABPAk/afJXxQ0jAac7OO27NE8P9mx_KjlLJ-hZQCLcB/s1600/Screen%2BShot%2B2017-03-26%2Bat%2B23.26.14.png>



On Sunday, March 26, 2017 at 10:45:36 PM UTC+2, Ignacio Baca Moreno-Torres 
wrote:
>
> I have applied my generator to the swagger petstore api, hehe it is pretty 
> unstable, but after some NPE fixes and minor improvements I have generated 
> the API Interface and models. Demo project here 
> https://github.com/ibaca/petstore-client-gwt, uploaded with sourceMaps at 
> https://ibaca.github.io/petstore-client-gwt/, ups, bud sadly github 
> forces https but swagger petstore is not exposed in https so a mixed 
> content exception is thrown. Just download locally and use 'mvn 
> gwt:devmode' to try it out.
>
> On Saturday, March 25, 2017 at 8:57:29 PM UTC+1, Irek Szczesniak wrote:
>>
>> I'm preparing laboratory exercises for students, and we're using the 
>> Swagger's Pet Store: 
>>
>> http://petstore.swagger.io/v2/swagger.json 
>>
>> On 25.03.2017 09:46, Ignacio Baca Moreno-Torres wrote: 
>> > No :), just to see the complexity of the API and what happens if I add 
>> > it to my generator. 
>> > 
>> > On Friday, March 24, 2017 at 8:11:59 PM UTC+1, Irek Szczesniak wrote: 
>> > 
>> > It's public.  Does it make some difference? 
>> > 
>> > On 23.03.2017 17:04, Ignacio Baca Moreno-Torres wrote: 
>> > > Just curious, the API is internal or external, the swagger spec 
>> is 
>> > > public? 
>> > > 
>> > > 
>> > > El jue., 23 mar. 2017 12:16, Ireneusz Szcześniak 
>> > >  <mailto:irek.sz...@gmail.com 
>> > >> escribió: 
>> > > 
>> > > Thank you, Rogelio, for your input. 
>> > > 
>> > > I like the idea of generating the data model from the OpenAPI 
>> > > specification, because I will not have to write some boring 
>> > > error-prone code.  I also like the optimization of the GWT 
>> > compiler. 
>> > > 
>> > > The swagger-codegen can output Jaxrs Cxf Client, which has 
>> > the API 
>> > > interface defined with JAX-RS annotations.  So it seems that 
>> > even the 
>> > > interfaces could be auto-generated.  You only have to modify 
>> > them so 
>> > > that they extend RestService, required by RestyGWT. 
>> > > 
>> > > Have you tried auto-generating the API interfaces with Jaxrs 
>> > Cxf 
>> > > Client? 
>> > > 
>> > > In your previous message you wrote that you auto-generate a 
>> GWT 
>> > > module.  What do you specifically mean by a module here?  Do 
>> > you use 
>> > > some publicly-available tools, or do you have something 
>> > home-grown? 
>> > > 
>> > > On 22.03.2017 23:51, Rogelio Flores wrote: 
>> > > > Yes, those are the Models I was referring to. 
>> > > > 
>> > > > I can't compare my approach to JsInterop + 
>> > > > RequestBuilder/XMLHttpRequest because I haven't tried it, 
>> > but having 
>> > > > used RequestBuilder (and direct XMLHttpRequest) before, I 
>> > can't see 
>> > > > how you will write less code using that approach. A 
>> > benefit of doing 
>> > > > things in Java is that GWT will optimize the resulting 
>> > javascript 
>> > > > (Java classes/methods from the generated api that don't 
>> > get used 
>> > > > aren't included). 
>> > > > 
>> > > > 
>> > > > On Tuesday, March 21, 2017 at 10:39:09 PM UTC-6, Irek 
>> > Szczesniak 
>> > > wrote: 
>> > > > 
>> > > > Thanks, Rogelio! 
>> > > > 
>> > > > When you auto-generate Java source code, do you use 
>> > > > swagger-codegen to 
>> > > > generate Java client code, so that you get Java classes 
>> > > implementing 

Re: GWT + Open API

2017-03-26 Thread Ignacio Baca Moreno-Torres
I have applied my generator to the swagger petstore api, hehe it is pretty 
unstable, but after some NPE fixes and minor improvements I have generated 
the API Interface and models. Demo project 
here https://github.com/ibaca/petstore-client-gwt, uploaded with sourceMaps 
at https://ibaca.github.io/petstore-client-gwt/, ups, bud sadly github 
forces https but swagger petstore is not exposed in https so a mixed 
content exception is thrown. Just download locally and use 'mvn 
gwt:devmode' to try it out.

On Saturday, March 25, 2017 at 8:57:29 PM UTC+1, Irek Szczesniak wrote:
>
> I'm preparing laboratory exercises for students, and we're using the 
> Swagger's Pet Store: 
>
> http://petstore.swagger.io/v2/swagger.json 
>
> On 25.03.2017 09:46, Ignacio Baca Moreno-Torres wrote: 
> > No :), just to see the complexity of the API and what happens if I add 
> > it to my generator. 
> > 
> > On Friday, March 24, 2017 at 8:11:59 PM UTC+1, Irek Szczesniak wrote: 
> > 
> >     It's public.  Does it make some difference? 
> > 
> > On 23.03.2017 17:04, Ignacio Baca Moreno-Torres wrote: 
> > > Just curious, the API is internal or external, the swagger spec is 
> > > public? 
> > > 
> > > 
> > > El jue., 23 mar. 2017 12:16, Ireneusz Szcześniak 
> > >  <mailto:irek.sz...@gmail.com 
> > >> escribió: 
> > > 
> > > Thank you, Rogelio, for your input. 
> > > 
> > > I like the idea of generating the data model from the OpenAPI 
> > > specification, because I will not have to write some boring 
> > > error-prone code.  I also like the optimization of the GWT 
> > compiler. 
> > > 
> > > The swagger-codegen can output Jaxrs Cxf Client, which has 
> > the API 
> > > interface defined with JAX-RS annotations.  So it seems that 
> > even the 
> > > interfaces could be auto-generated.  You only have to modify 
> > them so 
> > > that they extend RestService, required by RestyGWT. 
> > > 
> > > Have you tried auto-generating the API interfaces with Jaxrs 
> > Cxf 
> > > Client? 
> > > 
> > > In your previous message you wrote that you auto-generate a 
> GWT 
> > > module.  What do you specifically mean by a module here?  Do 
> > you use 
> > > some publicly-available tools, or do you have something 
> > home-grown? 
> > > 
> > > On 22.03.2017 23:51, Rogelio Flores wrote: 
> > > > Yes, those are the Models I was referring to. 
> > > > 
> > > > I can't compare my approach to JsInterop + 
> > > > RequestBuilder/XMLHttpRequest because I haven't tried it, 
> > but having 
> > > > used RequestBuilder (and direct XMLHttpRequest) before, I 
> > can't see 
> > > > how you will write less code using that approach. A 
> > benefit of doing 
> > > > things in Java is that GWT will optimize the resulting 
> > javascript 
> > > > (Java classes/methods from the generated api that don't 
> > get used 
> > > > aren't included). 
> > > > 
> > > > 
> > > > On Tuesday, March 21, 2017 at 10:39:09 PM UTC-6, Irek 
> > Szczesniak 
> > > wrote: 
> > > > 
> > > > Thanks, Rogelio! 
> > > > 
> > > > When you auto-generate Java source code, do you use 
> > > > swagger-codegen to 
> > > > generate Java client code, so that you get Java classes 
> > > implementing 
> > > > the types from the OpenAPI #/definitions? 
> > > > 
> > > > On 21.03.2017 20:50, Rogelio Flores wrote: 
> > > > > We do auto-generate Java source code out of the 
> > swagger api 
> > > > (including 
> > > > > a GWT module). That allows us to use the Models on 
> both 
> > > client and 
> > > > > server side. So we don't have to write much code. 
> > > Basically all 
> > > > we do 
> > > > > is specify some options for Resty

Re: GWT + Open API

2017-03-25 Thread Ignacio Baca Moreno-Torres
No :), just to see the complexity of the API and what happens if I add it 
to my generator.

On Friday, March 24, 2017 at 8:11:59 PM UTC+1, Irek Szczesniak wrote:
>
> It's public.  Does it make some difference? 
>
> On 23.03.2017 17:04, Ignacio Baca Moreno-Torres wrote: 
> > Just curious, the API is internal or external, the swagger spec is 
> > public? 
> > 
> > 
> > El jue., 23 mar. 2017 12:16, Ireneusz Szcześniak 
> >  <mailto:irek.sz...@gmail.com 
> >> escribió: 
> > 
> > Thank you, Rogelio, for your input. 
> > 
> > I like the idea of generating the data model from the OpenAPI 
> > specification, because I will not have to write some boring 
> > error-prone code.  I also like the optimization of the GWT compiler. 
> > 
> > The swagger-codegen can output Jaxrs Cxf Client, which has the API 
> > interface defined with JAX-RS annotations.  So it seems that even 
> the 
> > interfaces could be auto-generated.  You only have to modify them so 
> > that they extend RestService, required by RestyGWT. 
> > 
> > Have you tried auto-generating the API interfaces with Jaxrs Cxf 
> > Client? 
> > 
> > In your previous message you wrote that you auto-generate a GWT 
> > module.  What do you specifically mean by a module here?  Do you use 
> > some publicly-available tools, or do you have something home-grown? 
> > 
> > On 22.03.2017 23:51, Rogelio Flores wrote: 
> > > Yes, those are the Models I was referring to. 
> > > 
> > > I can't compare my approach to JsInterop + 
> > > RequestBuilder/XMLHttpRequest because I haven't tried it, but 
> having 
> > > used RequestBuilder (and direct XMLHttpRequest) before, I can't 
> see 
> > > how you will write less code using that approach. A benefit of 
> doing 
> > > things in Java is that GWT will optimize the resulting javascript 
> > > (Java classes/methods from the generated api that don't get used 
> > > aren't included). 
> > > 
> > > 
> > > On Tuesday, March 21, 2017 at 10:39:09 PM UTC-6, Irek Szczesniak 
> > wrote: 
> > > 
> > > Thanks, Rogelio! 
> > > 
> > > When you auto-generate Java source code, do you use 
> > > swagger-codegen to 
> > > generate Java client code, so that you get Java classes 
> > implementing 
> > > the types from the OpenAPI #/definitions? 
> > > 
> > > On 21.03.2017 20:50, Rogelio Flores wrote: 
> > > > We do auto-generate Java source code out of the swagger api 
> > > (including 
> > > > a GWT module). That allows us to use the Models on both 
> > client and 
> > > > server side. So we don't have to write much code. 
> > Basically all 
> > > we do 
> > > > is specify some options for RestyGWT and specify the 
> > endpoints. 
> > > > 
> > > > On Monday, March 20, 2017 at 11:32:41 PM UTC-6, Irek 
> > Szczesniak 
> > > wrote: 
> > > > 
> > > > Thank you, Rogelio, for your info. 
> > > > 
> > > > But I guess no code is generated automatically, you 
> > have to 
> > > > develop it 
> > > > yourself.  Is this right? 
> > > > 
> > > > I'm not fully for code generation (such code is usually 
> > > messy and 
> > > > hard 
> > > > to read), but generating some bits, like a model of 
> > the data 
> > > > structures could be useful. 
> > > > 
> > > > On 20.03.2017 18:24, Rogelio Flores wrote: 
> > > > > We use RestyGWT to consume a swagger REST API and 
> > are very 
> > > pleased 
> > > > > with it: 
> > > > > 
> > > > > https://resty-gwt.github.io/index.html 
> > > <https://resty-gwt.github.io/index.html> 
> > > > <https://resty-gwt.github.io/index.html 
> > > <https://resty-gwt.github.io/index.html>> 
> > > > > 
> > > > > 
> > > 

Re: GWT + Open API

2017-03-23 Thread Ignacio Baca Moreno-Torres
Just curious, the API is internal or external, the swagger spec is public?

El jue., 23 mar. 2017 12:16, Ireneusz Szcześniak 
escribió:

> Thank you, Rogelio, for your input.
>
> I like the idea of generating the data model from the OpenAPI
> specification, because I will not have to write some boring
> error-prone code.  I also like the optimization of the GWT compiler.
>
> The swagger-codegen can output Jaxrs Cxf Client, which has the API
> interface defined with JAX-RS annotations.  So it seems that even the
> interfaces could be auto-generated.  You only have to modify them so
> that they extend RestService, required by RestyGWT.
>
> Have you tried auto-generating the API interfaces with Jaxrs Cxf Client?
>
> In your previous message you wrote that you auto-generate a GWT
> module.  What do you specifically mean by a module here?  Do you use
> some publicly-available tools, or do you have something home-grown?
>
> On 22.03.2017 23:51, Rogelio Flores wrote:
> > Yes, those are the Models I was referring to.
> >
> > I can't compare my approach to JsInterop +
> > RequestBuilder/XMLHttpRequest because I haven't tried it, but having
> > used RequestBuilder (and direct XMLHttpRequest) before, I can't see
> > how you will write less code using that approach. A benefit of doing
> > things in Java is that GWT will optimize the resulting javascript
> > (Java classes/methods from the generated api that don't get used
> > aren't included).
> >
> >
> > On Tuesday, March 21, 2017 at 10:39:09 PM UTC-6, Irek Szczesniak wrote:
> >
> > Thanks, Rogelio!
> >
> > When you auto-generate Java source code, do you use
> > swagger-codegen to
> > generate Java client code, so that you get Java classes implementing
> > the types from the OpenAPI #/definitions?
> >
> > On 21.03.2017 20:50, Rogelio Flores wrote:
> > > We do auto-generate Java source code out of the swagger api
> > (including
> > > a GWT module). That allows us to use the Models on both client and
> > > server side. So we don't have to write much code. Basically all
> > we do
> > > is specify some options for RestyGWT and specify the endpoints.
> > >
> > > On Monday, March 20, 2017 at 11:32:41 PM UTC-6, Irek Szczesniak
> > wrote:
> > >
> > > Thank you, Rogelio, for your info.
> > >
> > > But I guess no code is generated automatically, you have to
> > > develop it
> > > yourself.  Is this right?
> > >
> > > I'm not fully for code generation (such code is usually
> > messy and
> > > hard
> > > to read), but generating some bits, like a model of the data
> > > structures could be useful.
> > >
> > > On 20.03.2017 18:24, Rogelio Flores wrote:
> > > > We use RestyGWT to consume a swagger REST API and are very
> > pleased
> > > > with it:
> > > >
> > > > https://resty-gwt.github.io/index.html
> > 
> > >  > >
> > > >
> > > >
> > > >
> > > > On Monday, March 20, 2017 at 7:06:08 AM UTC-6, Irek
> > Szczesniak
> > > wrote:
> > > >
> > > > Hi,
> > > >
> > > > I need to develop a web client with GWT, which
> > consumes a web
> > > > service defined with Open API (formerly Swagger).
> > > >
> > > > I wonder whether someone could offer some advice on
> > how to
> > > do it
> > > > best with GWT.
> > > >
> > > >
> > > > Thanks,
> > > > Irek
> > > >
> > > > --
> > > > 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/hyILXPwx9Pc/unsubscribe
> > <
> https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe
> >
> >
> > >
> > <
> https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/unsubscribe
> > <
> https://groups.google.com/d/topic/google-web-toolkit/hyILXPwx9Pc/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-we...@googlegroups.com 
> > > > .
> > > > Visit this group at
> > > https://groups.google.com/group/google-web-toolkit
> > 
> > > 

Re: GWT + Open API

2017-03-21 Thread Ignacio Baca Moreno-Torres
Accessing REST apis using JsInterop is easy and natural. RestyGWT add 
almost nothing if you use JsInterop so you better use XMLHttpRequest 
directly (RequestBuilder is easier, and is a thin wrapper around 
XMLHttpRequest). If you want a bit of code-organization, you might use 
AutoREST, but this do not add more than a template to define each endpoint, 
actually enforces you to use JAX-RS, which might just block you in some 
cases. You really should try to map a few endpoints with a few models using 
JsInterop and com.google.gwt.http.client.RequestBuilder to feel how easy 
and clean it is. Do it progressively mapping each endpoint you need to use. 
If you have any doubt just ask for the specific endpoint or model you have 
a problem with.

On Tuesday, March 21, 2017 at 7:08:59 AM UTC+1, Irek Szczesniak wrote:
>
> Thank you, Ignacio, for your input. 
>
> What's cool in your solution is that it uses the JsInterop provided by 
> GWT. 
>
> I wonder what are the pro and cons of the JsInterop approach versus 
> the RestyGWT approach. 
>
> On 21.03.2017 00:00, Ignacio Baca Moreno-Torres wrote: 
> > JsInterop and XMLHttpRequest is a good option too, aka. autorest ;)... 
> > this WIP generator reads openapi from apisguru and generates the GWT 
> > JsInterop spec. 
> > 
> > On Mon, Mar 20, 2017 at 6:24 PM Rogelio Flores 
> >  <mailto:rogelio...@gmail.com 
> >> wrote: 
> > 
> > We use RestyGWT to consume a swagger REST API and are very pleased 
> > with it: 
> > 
> > https://resty-gwt.github.io/index.html 
> > 
> > 
> > 
> > On Monday, March 20, 2017 at 7:06:08 AM UTC-6, Irek Szczesniak 
> wrote: 
> > 
> > Hi, 
> > 
> > I need to develop a web client with GWT, which consumes a web 
> > service defined with Open API (formerly Swagger). 
> > 
> > I wonder whether someone could offer some advice on how to do 
> > it best with GWT. 
> > 
> > 
> > Thanks, 
> > Irek 
> > 
> > -- 
> > 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 
>  
> > <mailto:google-web-toolkit+unsubscr...@googlegroups.com 
> >. 
> > To post to this group, send email to 
> > google-we...@googlegroups.com  
> > <mailto: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. 
> > 
> > -- 
> > 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/hyILXPwx9Pc/unsubscribe. 
>
> > To unsubscribe from this group and all its topics, send an email to 
> > google-web-toolkit+unsubscr...@googlegroups.com  
> > <mailto:google-web-toolkit+unsubscr...@googlegroups.com >. 
> > To post to this group, send email to 
> > google-we...@googlegroups.com  
> > <mailto: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. 
>
>

-- 
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: Synchronization problems with maven and eclipse

2017-03-21 Thread Ignacio Baca Moreno-Torres
I think that eclipse+maven works pretty well, brandon have been making lots
of improvements and nowadays using the tbroyer maven plugin + GWT Eclipse
Plugin v3 should works like a charm! Everithing explained here
https://www.youtube.com/watch?v=DU7ZQVLR5Zo&list=PLBbgqtDgdc_TqzA-qXrjgTFMC_6DKAQyT

On Mon, Mar 20, 2017 at 6:59 PM Magnus  wrote:

> No more posts here?
> It should be a very common problem...
>
> Magnus
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: GWT + Open API

2017-03-20 Thread Ignacio Baca Moreno-Torres
JsInterop and XMLHttpRequest is a good option too, aka. autorest ;)... this
WIP generator reads openapi from apisguru and generates the GWT JsInterop
spec.

On Mon, Mar 20, 2017 at 6:24 PM Rogelio Flores 
wrote:

> We use RestyGWT to consume a swagger REST API and are very pleased with it:
>
> https://resty-gwt.github.io/index.html
>
>
>
> On Monday, March 20, 2017 at 7:06:08 AM UTC-6, Irek Szczesniak wrote:
>
> Hi,
>
> I need to develop a web client with GWT, which consumes a web service
> defined with Open API (formerly Swagger).
>
> I wonder whether someone could offer some advice on how to do it best with
> GWT.
>
>
> Thanks,
> Irek
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: error message and obfuscated code

2017-03-15 Thread Ignacio Baca Moreno-Torres
🙃

On Wed, Mar 15, 2017 at 9:36 AM Pavlo Iatsiuk 
wrote:

> Here is my settings
>
> 
> 
> 
> 
> 
>
> 
>  value="true"/>
>  value="true"/>
>
>
> As result in console on error I see a proper class names and line numbers
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: Mojo's Maven Plugin for GWT - general questions

2017-03-05 Thread Ignacio Baca Moreno-Torres
But this is the documentation of the plugin, not the documentation of the 
archetype. Follow the archetype documentation, or one of the Brandon tutorial. 
👍😊

-- 
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: Mojo's Maven Plugin for GWT - general questions

2017-03-04 Thread Ignacio Baca Moreno-Torres
Oh, the new tutorial it is exactly what you are looking for (
https://youtu.be/Wxlh_E8uyq4).

El jue., 2 mar. 2017 23:26, Ignacio Baca Moreno-Torres 
escribió:

> The new plugin is called GWT Eclipse Plugin. The full explanation here
> https://www.youtube.com/watch?v=x04sufQce-Y. If you are starting a new
> project it's strongly recommended that you use the new maven plugin (
> https://github.com/tbroyer/gwt-maven-plugin). I think that it is much
> easier if you upload your project to github, so we can run it locally or
> comment directly on the source code.
>
> Start from scratch is a good idea, but get inspired by
> https://github.com/tbroyer/gwt-maven-archetypes and
> https://github.com/tbroyer/gwt-maven-plugin/tree/master/src/it. IMO first
> try to compile, run and package the project using just maven. When this
> works, try to make it work in eclipse. BUT, hehe I personally thinks that
> this is not necessary, if you are comfortable debugging in chrome, makes no
> sense to use anything else than the gwt:codeserver goal. We use project
> configuration based on modular-webapp tbroyer archetype, and we use always
> the maven goals. We use the tomcat goal for the server and the
> gwt:codeserver for the client. You can run the goal using eclipse, and if
> you debug the tomcat goal you actually debug tomcat. The obvious advantage,
> this works everywhere and exactly the same way, command line, ci, eclipse
> or intellij.
>
> So for example, this client only project
> https://github.com/ibaca/rxcanvas-gwt/blob/master/pom.xml should be
> imported correctly in eclipse (actually any ide supporting maven). But
> instead of using the eclipse gwt runner, use the gwt:devmode goal. :) this
> is my personal approach, probably not the recommended one (if such thing
> exists), but this is a pretty simple, easy to share and non-ide dependant
> strategy, so try it, if you get used to it this actually simplify your
> project configuration.
>
> On Thu, Mar 2, 2017 at 6:11 PM Jens  wrote:
>
>
>
> But calling "GWT Development mode" results in this message:
>
> Usage: at least one module must be supplied
>
>
> I don't understand this message, because I provided a name for a module
> when I created the project.
>
>
> Sounds like Eclipse / the GWT plugin can not find your *.gwt.xml files of
> your project. Could it be that your source folder is not correctly
> detected/configured in the Eclipse project? Or  because you are using some
> Maven archetype the *.gwt.xml files live in
> /PROJECT_NAME/src/main/resources but that folder isn't marked as source
> root in your project build path settings?
>
> After you have fixed the source folder issue it should work. You should
> already have a GWT run configuration after choosing on of the entries in
> the context menu you have shown in your previous mail. If you configure it
> and open the GWT section you will see that you have no available modules,
> which causes the error you are seeing.
>
> -- 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.
>
>

-- 
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: Mojo's Maven Plugin for GWT - general questions

2017-03-02 Thread Ignacio Baca Moreno-Torres
The new plugin is called GWT Eclipse Plugin. The full explanation here
https://www.youtube.com/watch?v=x04sufQce-Y. If you are starting a new
project it's strongly recommended that you use the new maven plugin (
https://github.com/tbroyer/gwt-maven-plugin). I think that it is much
easier if you upload your project to github, so we can run it locally or
comment directly on the source code.

Start from scratch is a good idea, but get inspired by
https://github.com/tbroyer/gwt-maven-archetypes and
https://github.com/tbroyer/gwt-maven-plugin/tree/master/src/it. IMO first
try to compile, run and package the project using just maven. When this
works, try to make it work in eclipse. BUT, hehe I personally thinks that
this is not necessary, if you are comfortable debugging in chrome, makes no
sense to use anything else than the gwt:codeserver goal. We use project
configuration based on modular-webapp tbroyer archetype, and we use always
the maven goals. We use the tomcat goal for the server and the
gwt:codeserver for the client. You can run the goal using eclipse, and if
you debug the tomcat goal you actually debug tomcat. The obvious advantage,
this works everywhere and exactly the same way, command line, ci, eclipse
or intellij.

So for example, this client only project
https://github.com/ibaca/rxcanvas-gwt/blob/master/pom.xml should be
imported correctly in eclipse (actually any ide supporting maven). But
instead of using the eclipse gwt runner, use the gwt:devmode goal. :) this
is my personal approach, probably not the recommended one (if such thing
exists), but this is a pretty simple, easy to share and non-ide dependant
strategy, so try it, if you get used to it this actually simplify your
project configuration.

On Thu, Mar 2, 2017 at 6:11 PM Jens  wrote:

>
>
> But calling "GWT Development mode" results in this message:
>
> Usage: at least one module must be supplied
>
>
> I don't understand this message, because I provided a name for a module
> when I created the project.
>
>
> Sounds like Eclipse / the GWT plugin can not find your *.gwt.xml files of
> your project. Could it be that your source folder is not correctly
> detected/configured in the Eclipse project? Or  because you are using some
> Maven archetype the *.gwt.xml files live in
> /PROJECT_NAME/src/main/resources but that folder isn't marked as source
> root in your project build path settings?
>
> After you have fixed the source folder issue it should work. You should
> already have a GWT run configuration after choosing on of the entries in
> the context menu you have shown in your previous mail. If you configure it
> and open the GWT section you will see that you have no available modules,
> which causes the error you are seeing.
>
> -- 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.
>

-- 
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: Mojo's Maven Plugin for GWT - general questions

2017-02-26 Thread Ignacio Baca Moreno-Torres
But you are using the old eclipse plugin with the old maven plugin, try
this tutorial https://youtu.be/xeanOpvrbBQ, and watch all other recent
videos in this channel.

El lun., 27 feb. 2017 3:09, Magnus  escribió:

> Hi Rodolfo,
>
> thank you for your help!
>
> I am using the GWT plugin for eclipse since I know GWT. One goal with
> moving to maven is to be able to do most of the important things on the
> command line and to be independent of eclipse and the eclipse plugin.
>
> But wait! Even the documentation of Mojo's Maven plugin shows how to
> create a GWT project with the mvn command:
>
> Using the Archetype
>
> Use it as you would any other Maven archetype to create a template/stub
> project.
>
>  mvn archetype:generate \
>-DarchetypeGroupId=org.codehaus.mojo \
>-DarchetypeArtifactId=gwt-maven-plugin \
>-DarchetypeVersion=2.8.0
>
> [
> https://gwt-maven-plugin.github.io/gwt-maven-plugin/user-guide/archetype.html
> ]
>
> And then it says how to use it in eclipse:
> Using Eclipse
>
> The Google Plugin for Eclipse automatically handles launching DevMode with
> a simple right click on your module *gwt.xml* file "run as > web
> application".
>
> [
> https://gwt-maven-plugin.github.io/gwt-maven-plugin/user-guide/hosted.html
> ]
>
> This means that it should be possible (and intended) to use existing maven
> projects in eclipse like shown by the docs.
>
> I still must be doing something wrong and I hope that someone can clarify
> this...
>
> Magnus
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: Mojo's Maven Plugin: errors with mvn gwt:run

2017-02-25 Thread Ignacio Baca Moreno-Torres
It have been this way for a long time, I'll try to see why and if it is
easy to change. Also, you can create a pull request 😉. Thanks!

El sáb., 25 feb. 2017 2:50, Magnus  escribió:

> Those aren't errors, they're logs to the standard error (stderr) that the
> plugin routes as Maven error logs.
>
>
> Hello Thomas,
>
> thank you! Can you fix this somehow?
> I am sure that you'll miss real errors then...
>
> Magnus
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: Browser.getWindow().newXMLHttpRequest()

2017-02-18 Thread Ignacio Baca Moreno-Torres
Pretty old thread, but... to fix the "is not a function" error you need to 
add the GWT compiler param "-generateJsInteropExports".

On Thursday, November 17, 2016 at 11:32:30 AM UTC+1, P.G.Taboada wrote:
>
> Thanks, this is what I was missing. 
> I tried to use elemental, but could neither find formdata nor append...
>
> I am having troubles with the event listeners:
>
> final XMLHttpRequest xhr = Browser.getWindow().newXMLHttpRequest();
>> xhr.open("POST", "/upload");
>> xhr.setOnprogress(evt -> GWT.log("" + evt));
>> xhr.setOnabort(evt -> GWT.log("" + evt));
>> xhr.setOnerror(evt -> GWT.log("" + evt));
>> xhr.setOnreadystatechange(evt -> {
>> if (xhr.getReadyState() == XMLHttpRequest.DONE) {
>> try {
>> GWT.log("Received http response for request ");
>> String text = xhr.getResponseText();
>> if (text == null || text.isEmpty()) {
>> messageUi.setInnerText("no response");
>> } else {
>> messageUi.setInnerText(text);
>> }
>> } catch (Throwable e) {
>> GWT.log("Error", e);
>> }
>> }
>> });
>> final JsFormData formData = createFormData();
>> append(formData, "someFile", file);
>> xhr.send(formData);
>
>
>
> I get 4 times
>
> JsEventListener.java:42 Uncaught TypeError: this$static_0_g$.handleEvent 
> is not a function
>
> Any idea?
>
>>
>>>

-- 
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: Which maven archetype for GWT applications?

2017-02-13 Thread Ignacio Baca Moreno-Torres
For client side only and lib only project (so only one module) you can see
an example here:
https://github.com/tbroyer/gwt-maven-plugin/tree/master/src/it
Quite simple, maybe adding this use cases as archetype is a good idea, but
IMO it's so simple that using the simple maven archetype and adding those
changes is not a problem either.

On Mon, Feb 13, 2017 at 10:26 AM David  wrote:

> There is an alternative, like they do in guava for example. They have a
> pure java guava.jar and then create a guava-gwt.jar that includes the
> sources, supersources and fieldserializers for gwt projects. This requires
> that you use annotations like GwtCompatible or GwtIncompatible and filter
> the sources to be included in the gwt jar.
>
> I tend to use this approach for reusable components since it makes it
> easier to avoid transitive dependencies that you don't need on the server.
>
> For the main application I use the tbroyer multimodule archetype. Although
> often the shared module is no longer needed since most of the shared code
> is already in the gwt-lib modules.
>
> Yes that is a lot of modules but I'm not talking about a small project.
> Lots of these modules are reused in other projects, so its best to have
> them clearly isolated.
>
>
> On Mon, 13 Feb 2017 at 09:55, Freddy Boucher 
> wrote:
>
> The recommended GWT Archetypes nowadays is one of
> https://github.com/tbroyer/gwt-maven-archetypes
>
> It uses https://github.com/tbroyer/gwt-maven-plugin
>
> And why you should use one of them:
>
> Splitting your server / shared / client code in different module will make
> your life easier if you do it at the beginning of your project.
>
>
>
> On Monday, February 13, 2017 at 1:56:25 AM UTC+11, Magnus wrote:
>
> Hello,
>
> I am looking for a suitable archetype for building GWT applications with
> maven.
>
> I have tried "Codehaus" and "modular-webapp":
>
>- Codehaus
>With the codehaus archetype, I get a lot of errors when importing the
>generated project in eclipse.
>It seems that there are plugins missing
>
>- modular-web-app
>This would be my favorite one, but after importing it into eclipse, it
>leaves me with 4 (!) top-level projects (1 main and 3 sub-projects).
>Maybe the archetype is good, but this is a behavior that I cannot
>accept when dealing with many projects. (Can you avoid this?)
>
> I know that there are several methods of using maven with eclipse and that
> there are different plugins.
> Maybe the errors I saw with Codehaus result from this.
>
> However, what can you recommend?
>
> Thanks
> Magnus
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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: Drag and Drop in GWT

2017-01-27 Thread Ignacio Baca Moreno-Torres
If you are going to use native drag and drop you might what some stream 
composition lib XD, rxjava makes event plumbing a bit easier, clean and 
powerful, and rxgwt has various tools to start using rxjava with gwt, see 
this example using elemental touch events 
https://github.com/intendia-oss/rxgwt/blob/master/examples/elemental/src/main/java/com/intendia/rxgwt/example/client/ElementalExample.java

On Friday, January 27, 2017 at 11:51:57 AM UTC+1, salk31 wrote:
>
> I'd suggest at least looking into using "native" drag and drop support. I 
> imagine it is much lighter and it supports dragging between windows etc... 
> I think gwt-dnd was created before this was available.
>
> On Monday, January 23, 2017 at 4:54:29 PM UTC, Ani wrote:
>>
>> HI
>>  I am working on a Diagram editor with GWT. The requirement is to be able 
>> to drag from a palette and draw and connect different shapes.
>> So using a Canvas component for the drawing part.
>>  Does GWT have an in built Drag and Drop Framework?
>>
>> Any help is appreciated
>>
>> Regards
>> Ani
>>
>

-- 
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: HTTP/2 Server Push

2017-01-16 Thread Ignacio Baca Moreno-Torres
I have been testing server sents events to see how to integrate it in
autorest. Not sure, but might be interesting too 😜.
https://github.com/ibaca/autorest-streaming-example

El lun., 16 ene. 2017 9:37, David  escribió:

I just noticed that my code is actually still just using the Elemental
library:

Here is my initiatlisation code to setup a websocket.
// *websocket* protocol is either *ws* or *wss*, so we just strip *http*
from the document *url*
*final* String url = "ws" + GWT.*getHostPageBaseURL*().substring(4) +
"api/monitor";
*this*.socket = Browser.*getWindow*().newWebSocket(url);
*this*.socket.setOnopen(event -> {
// for some reason this can only be set after the socket is opened
*this*.socket.setOnmessage(event2 -> this.onEvent((MessageEvent) event2));
});
*this*.socket.setOnerror(*this*::onWebSocketError);
*this*.socket.setOnclose(*this*::onWebSocketClose);

The onEvent method just uses GWT jackson to decode the JSON data payload:

*final* MyEventType event = *this*.mapper.read((String) pEvent.getData());
The error and close handlers just try to setup the websocket at regular
intervals (when the server restarts).


On Mon, Jan 16, 2017 at 6:13 AM, Srini v  wrote:

Hi,
Do you have an example demonstrating that please?

 Many thanks

On Sat, 24 Dec 2016 09:09 David,  wrote:

I am using gwt-jackson in combination with Websockets. I just created a
JsInterop mapping to the browser native api. Very little code needed.


On Fri, 23 Dec 2016 at 20:32, Evan Ruff  wrote:

Hello,

I've been away from GWT for a bit and am looking into creating an embeeded
jCEF project using a Jetty Backend and a Chromium Browser. I was wondering
if there were any libraries out there to help integrate the GWT client side
with the HTTP/2 Server Push features of Jetty 9 (and later Servlet 4)?

I'd like to use something like RESTEasy with GWTRestly to do the actual
data mapping, but was hoping for some information about how other people
had approached the problem.

Thanks for any insight!

E








-- 


You received this message because you are subscribed to the Google Groups
"GWT Users" group.


To unsubscribe from this group and stop receiving emails from it, send an
email to google-web-toolkit+unsubscr...@googlegroups.com.


To post to this group, send email to google-web-toolkit@googlegroups.com.


Visit this group at https://groups.google.com/group/google-web-toolkit.


For more options, visit https://groups.google.com/d/optout.


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

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


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

-- 
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 with RequestBuilder

2017-01-12 Thread Ignacio Baca Moreno-Torres
This is a minimal example using CORS
https://github.com/ibaca/autorest-streaming-example/blob/master/server/src/main/java/com/intendia/gwt/example/Main.java#L95

Also, in chrome it is quite easy fix it, because it explain what header is
required to make it work. Not sure if Firefox errors are as descriptive as
chrome.

El vie., 13 ene. 2017 1:03, Thomas Broyer  escribió:

> It looks like you have a cross-origin issue (localhost: vs
> localhost:8080), and CORS would help.
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: Requestfactory: How to use Object?

2017-01-06 Thread Ignacio Baca Moreno-Torres
Salk31, please note that we are saying that if you are going to start
learning RF right now, you better try other approach. But as you said, RF,
editor framework, probably validations, ui binder, etc is a pretty good
solution. You should note that this solution is not going to evolve anymore
(I think), but this again might be a good thing because hasn't evolved in
the last 4 years and it is still a good solution. Actually I stop using RF
when I stopped using editor framework. Both together is a good option.

El vie., 6 ene. 2017 15:54, Jens  escribió:

> And who knows, maybe one day we'll finally have grpc-web ;-)
>
>
> Oh please! +1
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: Requestfactory: How to use Object?

2017-01-06 Thread Ignacio Baca Moreno-Torres
Hehe this is not a bad thing! Just means that now exists simpler solutions.
I personally think that RF keeps track of object (the entity id) which add
really a lot of complexity, at this point I think that the lib should
include some kind of storage with remote synchronization because if not,
the complexity just makes thing difficult with the "only" benefit of
reducing transfer size. I also don't like the obscure encoding, not easy to
debug, not compatible with changes in the model (sometimes). IMO RF was
promising, but it's complexity do not justify its benefits. But the best
thing to do is always an small project, and test each strategy, RF, RPC and
Rest+Jackson, Rest+JsInterop. The last one has de benefit nowadays than is
done almost everything in the browser natively without different code for
different browsers.

El jue., 5 ene. 2017 15:01, salk31  escribió:

> :(
>
>
> On Monday, December 26, 2016 at 2:11:35 PM UTC, Thomas Broyer wrote:
>
> +1 Do not start learning/using RequestFactory (or even GWT RPC I'd say).
> Learn JsInterop and use json-based http APIs.
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: JsInterop JSON.parse()ed object differs from JSNI JSON.parse()ed object

2016-12-31 Thread Ignacio Baca Moreno-Torres
Hehe I'm curious too. What obscure library was modifying your json, and how?

El sáb., 31 dic. 2016 13:37, Vassilis Virvilis  escribió:

> So why it did it in the one case but not in the other? Were you calling
> the third party js explicitly in the one case?
>
> On Sat, Dec 31, 2016 at 1:04 PM, Dave Puchyr  wrote:
>
> After stepping through the compiled js I found that a third party
> (obfuscated) js library manipulated the timestamps on me.  JsInterop is
> fine. :)  Sorry for the noise.
>
>
> On Saturday, December 31, 2016 at 11:20:43 AM UTC+1, Dave Puchyr wrote:
>
> Even when I reduce the json input to
>
> {"Contract":"STK:USD:PBA@NYSE
> ","action":"onHistoricalData","bar":"D","bars":[{"time":1451952000},{"time":1452038400},{"time":1452124800}],"callback":4,"metadata":{"noData":false},"t":1483179318,"t0":1452075258,"ticker":"STK:USD:PBA@NYSE
> "}
>
> the time properties are still 160740 in the JsInterop parsed object.
> Thanks for the suggestion, though.
>
> On Saturday, December 31, 2016 at 8:40:58 AM UTC+1, Paul Robinson wrote:
>
> Have you tried modifying/simplifying the JSON to see what your odd
> behaviour is sensitive to?
>
> Paul
>
> --
> 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.
>

-- 
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: Requestfactory: How to use Object?

2016-12-26 Thread Ignacio Baca Moreno-Torres
Hi, a side note. IMO you should not start using request factory. It is a
pretty awesome lib which solves a lot of problem which probably you don't
have with the cost of a complexity which will make you ask a lot of doubt's
like this one for a long time. IMO if you want a API focused in your model,
with type inheritance, generics, etc. you should use GWT RPC. If you want a
more message payloads focused API, you should use some REST lib like
RestyGWT (mature, full java type support) or AutoREST (new, though to be
used with JsInterop, do not support inheritance or other fancy things).

El lun., 26 dic. 2016 4:01, Manuel  escribió:

> Hi everyone,
>
> I got a question regarding datatypes. I got a object on the server side
> that has a value of type Object. Like this:
>
> class MyObject{
> public *Object *getValue();
> public void setValue(*Object *value);
> }
>
>
> How is it possible to have proxies for this object on the client side
> (with different datatypes (Date, String, Double, Long, etc.))?
> Object-Datatype is not allowed in proxies. Using a template-type is also
> not allowed. Is it somehow possible to have proxies for this object?
>
> I guess I would like to have something like this:
>
> @ProxyFor(value = MyObject.class)
> MyDateObjectProxy{
> public *Date *getValue();
> public void setValue(*Date *value);
> }
>
> or
>
> @ProxyFor(value = MyObject.class)
> MyStringObjectProxy{
> public *String *getValue();
> public void setValue(*String *value);
> }
>
> Your help is much appreciated.
>
> Kind regards,
> Manuel
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: IDEs, Dagger2 and annotationProcessorPaths

2016-12-14 Thread Ignacio Baca Moreno-Torres
I prefer to use maven-processor-plugin because I usually get better IDE
integration. I use intellij, but from time to time I'll try it in eclipse
and I think it work.
https://github.com/ibaca/gwt-dagger2-coffee/blob/master/pom.xml

On Thu, Dec 15, 2016 at 2:49 AM Juan Pablo Gardella <
gardellajuanpa...@gmail.com> wrote:

Check http://stackoverflow.com/a/35744298/741689


On Wed, 14 Dec 2016 at 20:03 Raphael André Bauer <
raphael.andre.ba...@gmail.com> wrote:

Hi,


I am just playing around with GWT 2.8 and Dagger 2.8. I added Dagger 2
via the compiler plugin and the Dagger compiler to
annotationProcessorPaths. When running mvn compile on the command line
everything is fine. The generated DaggerMyAppComponent is generated
properly and can be used in the source code. I can also use everything
in GWT. Awesome.

So far so good. Unfortunately neither Netbeans 8.2 nor Eclipse Neon
recognize the generated Dagger files. I have those wonderful red lines
below autogenerated components. And even though java and class files
are present in the target directory - the IDEs do not want to
recognize those classes. Clean compile in the IDEs does not seem to
work.

I am just wondering whether I am the only one with that problem, or
how others solved that issue regarding the IDE integration.


Thanks!


Raphael

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

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

-- 
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 JsInterop to Java Rhino ?

2016-12-09 Thread Ignacio Baca Moreno-Torres
But, IMO you better separate JS dependant code trying to move it to the 
view, leaving the presenter with plain java code. We use JsInterop for 
DTOs, and with a few limitations, it works seamlessly in Java and JS. But 
trying to execute a JS lib with a JsInterop "wrapper" in JRE sounds like 
cycle of transformations… Java to Js to Java. Or maybe I don't understand 
the use case. Just curious, what is the JS lib your presenters depends on? 
Because usually, this JS lib are used in the view. Anyways, gwt junit test 
using suites are fast (sometimes).

Just to clarify, IMO your problem is not using JsInterop in JRE tests, but 
accessing a JS lib. JsInterop can be used to expose your java code to JS or 
to access JS from your Java code, you only have problems in the second case 
because you need the JS lib, and I think that this is what GWT test are for.

On Friday, December 9, 2016 at 10:15:08 AM UTC+1, DavidN wrote:
>
> Is anybody working on a APT that can take JsInterop annotated classes of 
> native JS libraries and generate the needed code to access them from Java ?
> That would make my life much simpler when unit testing my presenters that 
> rely on JsInterop.
>
>

-- 
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: Serializing entire GWT application

2016-11-27 Thread Ignacio Baca Moreno-Torres
I prefer to HTTP instead of GWT RPC 😁! most browser support it, even old 
version of IE, it automatically deserialize and evaluate the entire GWT 
application 😜!

On Sunday, November 27, 2016 at 7:11:10 PM UTC+1, Bora wrote:
>
> Has anybody tried serializing/deserializing entire GWT application to/from 
> server side using RPC. would that work in any way?
>

-- 
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 2.8 generates code 14% bigger than GWT 2.7

2016-11-26 Thread Ignacio Baca Moreno-Torres
But IMO if you really care user experience you have other places to improve 
your page. I thinks updating to the last version is always a good idea, if 
any security or compatibility blocker problem is detected in your version 
you will need to update, and having a old version won't help. Also this 
helps move forward the community and the lib (GWT), because everyone 
focused in the last version, also focus the issues and improvements in that 
version.

The small step back eliminating the closure compiler just increase a bit 
the code size of your app. But 100k?! did you see the trends and the 
average code size of 
webs? 
http://httparchive.org/trends.php?s=All&minlabel=Nov+15+2014&maxlabel=Nov+1+2016,
 
you should note that even google.com uses 500k in 13request to load, and 
it's ""just"" a text inbox in the center of your window 
(http://httparchive.org/viewsite.php?pageid=70036564).

I might be wrong, but probably trying to embed the app.nocache.js in your 
index.html will gain some milliseconds, probably just that dummy change 
will get more ms than the cache-ables 100k you have lose without the 
closure pass. If your app is quite big, various MBs, you should take care 
than the first split point load a minimum as possible to show something to 
the user. But, in your case, less than a 1M, I think that using split point 
is not a good idea. Your code will get cached, and most of static apps 
already has more than 500k of JS, so your single page app having a 500k-1M 
of JS is pretty reasonable.

You can go forward and apply the progressive web concepts 
(https://developers.google.com/web/progressive-web-apps/checklist). Pretty 
sure you get there without the closure compiler ;). Service workers will 
allow maximum control to preload other split point or resources, and to 
absolutely control how your app caches, so you can use previous version, 
load the next one and in the next page reload the new app version will be 
used. This is not easy at all, but... some time we focus on the 
optimization we have no control of (like the closure pass) and we don't 
apply other we have control of, but that requires our effort.

So, 😀 update to GWT 2.8! it's awesome!, try other solutions to improve 
page loads and share how you do it!

On Friday, November 25, 2016 at 10:39:44 PM UTC+1, Slava Pankov wrote:
>
> @Jens
>
> I've tried WITHOUT any success to use closure compiler externally with GWT 
> 2.8
> See my question here: 
> https://groups.google.com/forum/#!searchin/google-web-toolkit/closure$20compiler%7Csort:date/google-web-toolkit/k_kjIv9Klsg/LZAZiUf9BAAJ
> Still want to find out exact steps to get it working :-(
>
>
> On Friday, November 25, 2016 at 2:43:11 AM UTC-8, Kirill Prazdnikov wrote:
>>
>> Hi Jens, 
>>
>> What if we have SSO linker ? 
>> Then no hacks is needed, right ?
>> Then just run the Google Closure Compiler on the output.
>>
>

-- 
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 Code Splitting: The GWT Stuff and My Core Java Classes

2016-11-21 Thread Ignacio Baca Moreno-Torres
This is an exaggerated comment, but... you know that nowadays most of the 
pages uses various MB on each load, for example just opening apple store 
downloads 2M, just click ipad goes up to 6M. So... em, hehe codespliting a 
1MB uncompressed JS (probably around 300k compressed) which is going to be 
cached forever is not very good place to dedicate your effort ;). Obviously 
is just an opinion. But the monolithic approach with the pretty nice unused 
resources purge algorithm of GWT is even better now than 5 years ago (I 
remark the 'purger' because you cannot purge if you do not compile the 
whole app at once). And it even support code splitting if you goes up to 
various MB of JS.

On Friday, November 4, 2016 at 11:20:31 AM UTC+1, Ramesh S wrote:
>
> Hi, 
>
> I am looking for some help on GWT code splitting. 
>
> I have a very basic gwt - maven project, which have a few model classes 
> (Shape, Circle, Square, etc).
> and I use *demo.html* to load the generated *.nocahce.js*. 
> to pass the inputs and do some computation and get the result back.
>
> Here the *nocache.js* contains the whole java script of the GWT stuff 
> also my java classes converted to javascript. 
>
> Is it possible to have separate java script file for my java classes. ?
>
> Thanks
>
>
>

-- 
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: Browser.getWindow().newXMLHttpRequest()

2016-11-20 Thread Ignacio Baca Moreno-Torres
Did you fix it? It should work using 2.8.0, I just tested it again. If 
still not work, you better upload a project to github :).

On Thursday, November 17, 2016 at 11:32:30 AM UTC+1, P.G.Taboada wrote:
>
> Thanks, this is what I was missing. 
> I tried to use elemental, but could neither find formdata nor append...
>
> I am having troubles with the event listeners:
>
> final XMLHttpRequest xhr = Browser.getWindow().newXMLHttpRequest();
>> xhr.open("POST", "/upload");
>> xhr.setOnprogress(evt -> GWT.log("" + evt));
>> xhr.setOnabort(evt -> GWT.log("" + evt));
>> xhr.setOnerror(evt -> GWT.log("" + evt));
>> xhr.setOnreadystatechange(evt -> {
>> if (xhr.getReadyState() == XMLHttpRequest.DONE) {
>> try {
>> GWT.log("Received http response for request ");
>> String text = xhr.getResponseText();
>> if (text == null || text.isEmpty()) {
>> messageUi.setInnerText("no response");
>> } else {
>> messageUi.setInnerText(text);
>> }
>> } catch (Throwable e) {
>> GWT.log("Error", e);
>> }
>> }
>> });
>> final JsFormData formData = createFormData();
>> append(formData, "someFile", file);
>> xhr.send(formData);
>
>
>
> I get 4 times
>
> JsEventListener.java:42 Uncaught TypeError: this$static_0_g$.handleEvent 
> is not a function
>
> Any idea?
>
>>
>>>

-- 
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: Browser.getWindow().newXMLHttpRequest()

2016-11-16 Thread Ignacio Baca Moreno-Torres
I have two partial examples, one  to create and send a formdata
programmatically
https://github.com/intendia-oss/autorest/blob/gwt-jsinterop/gwt/src/main/java/com/intendia/gwt/autorest/client/XhrResourceBuilder.java
and other to get the datafile that can be added to a formdata
https://github.com/ibaca/dndfiles-gwt/blob/ceda44a6aa5b3497808a7d33ed7ed40b12cc9027/src/main/java/dndfiles/client/DndFiles.java#L45.
Not sure if this will help you, but... this is all you need to know
https://www.html5rocks.com/en/tutorials/file/xhr2/ 😊👌.

El mié., 16 de noviembre de 2016 18:05, P.G.Taboada 
escribió:

> Hi,
>
> I want to upload a file using ajax/ elemental.
>
> I already have the file. How do I get a formdata populated and sent?
>
> bgds,
>
> Papick
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: HowTo use GWT EvenBus to schedule OpenEvent -> CloseEvent sequence

2016-10-29 Thread Ignacio Baca Moreno-Torres
Another example from GWTP
https://github.com/ArcBees/GWTP/blob/master/gwtp-core/gwtp-mvp-client/src/main/java/com/gwtplatform/mvp/client/proxy/PlaceManagerImpl.java,
as Jens said, having a manager controlling the ordering of the events seems
a good idea. And PlaceManager control the ordering of various event fired
in the eventBus like FireRequestInternalEvent, LockInteractionEvent and
NavigationEvent. LockInteractionEvent is a dual event, one for lock start,
and the second for the lock ends, which looks similar to your case.

On Thu, Oct 27, 2016 at 2:22 AM vitrums  wrote:

> Thank you for quick responses. It seems that we all resorted to Scheduler
> and control our custom events by tweaking the intrinsic logic
> of browser's event loop. I thought I could completely miss some obvious
> solution.
>
>
> On Wednesday, October 26, 2016 at 7:51:19 PM UTC+3, vitrums wrote:
>
> [ Original post on StackOverflow
> http://stackoverflow.com/questions/40130383/howto-use-gwt-evenbus-to-schedule-openevent-closeevent-sequence
> ]
>
> Say we have few handlers for both events. The goal is to make sure, that
> all *OpenEvent handlers*finish before any of *CloseEvent handlers* start
> their job. The old *EventBus* had a reverse order flag, which sometimes
> helped greatly in these particular cases. I.e. a handler, responsible for
> launching some process which leads to *CloseEvent* being fired (i.e.
> event emitter), usually registers itself to a bus first.
>
> Now, due to a synchronous nature of javascript each handler of *OpenEvent* 
> ends
> his job before the next handler starts. In my app the first *OpenHandler* 
> added
> to a bus is a *CloseEvent* emitter. Therefore I get an undesirable
> sequence of calls: *1st handler of OpenEvent* -> *all CloseEvent handlers*
>  -> *the rest of OpenEvent handlers*.
>
> *My question is:* what's the best practice to establish the desirable
> behavior? So far as a workaround I use 
> *Scheduler.scheduleDeferred(Scheduler.ScheduledCommand
> cmd)* to enqueue*EventBus.fireEventFromSource(Event event, Object source)*
>  of *CloseEvent* call to the next browser's event loop tick.
>
> p.s. My current thoughts are as follows. I don't want to rely of *Timer*
>  or *Scheduler* (though it might be the only option, which I'm not sure
> about). Also I have no interest in introducing any flag variables,
> responsible for tracking which event occurred first. Instead, if one looks
> closer into the*SimpleEventBus* code, there's a *firingDepth* counter
> variable, which only works to delay*addHandler(...)* and
> *removeHandler(...)* calls. It would be great, if same logic could be
> applied to order call sequences of handlers for different events.
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: How to bind essential singletons in multi-module GIN app and avoid duplicate binding

2016-10-29 Thread Ignacio Baca Moreno-Torres
I think that you are describing the GWTP DefaultModule
https://github.com/ArcBees/GWTP/blob/master/gwtp-core/gwtp-mvp-client/src/main/java/com/gwtplatform/mvp/client/gin/DefaultModule.java
 😁

On Thu, Oct 27, 2016 at 7:48 AM Thomas Broyer  wrote:

> I don't know if it's supported by GIN but Guice has a requireBinding to
> prevent the second case. And if the user of your lib has to use GIN it's
> not abnormal to ask them to bind a few things. You can provide GinModules
> that bind them if you like so they only have to compose them in their
> Ginjector without the need to write the bindings themselves.
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: GWT launch client side application

2016-10-24 Thread Ignacio Baca Moreno-Torres
Maybe here you find better answers,
https://discuss.atom.io/t/execute-shell-commands-from-application/20013 😁

On Mon, Oct 24, 2016 at 6:59 PM Jeffrey Chimene  wrote:

>
> > > The reason this is a GWT issue is my company has gone with a
> > completely GWT solution for a product.
> >
> How badly do you need this solution?
> You could upload a spreadsheet to the server and reflect it with the
> appropriate MIME type. The browser would open the spreadsheet via
> whatever's configured for that MIME type.
>
> That solution involves GWT (and a program on the server to provide the
> reflection). There is no solution (although MS probably has a DLL you
> could invoke from JS in their browser, IDK) that's pure JS.
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: GWT launch client side application

2016-10-23 Thread Ignacio Baca Moreno-Torres
What kind of native app are you trying to launch? This looks more a
browser/html/JavaScript problem that a GWT problem.

El sáb., 22 de octubre de 2016 17:10, Kirill Prazdnikov 
escribió:

> You can not. You only do what you can in JS.
> GWT is a way to write JS applications.
>
>
> On Friday, October 21, 2016 at 10:53:05 PM UTC+2, Aaron Paluzzi wrote:
>
> Hello all,
>
> I'm banging my head against what should be a basic issue.  I need to have
> a GWT web application launch a local application.  What is the best way to
> do this?  I've experimented with JNLP in the past with other platforms but
> I'm not sure if that is the best method here.  Any assistance would be
> appreciated.
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: best practices for modular GWT app

2016-10-13 Thread Ignacio Baca Moreno-Torres
The IT directory in the gwt-maven-plugin includes more ussage examples,
this one includes all possible maven module types
https://github.com/tbroyer/gwt-maven-plugin/tree/master/src/it/e2e as
described here https://tbroyer.github.io/gwt-maven-plugin/. You do not need
to use resources->includes and you should use classifiers for
shared-non-gwt-only modules. Hehe, but this recommendations will make it
work perfect using the command line, I think that Kirill recommendations
will make eclipse more happy, not sure, I always execute GWT using mvn.

My recommendation, do NOT create a maven module if you don't need it (I
think that you do not need it). Client and Server modules are required
because in maven each module should output only one artifact, and also
client and server have independent run classpath. The shared is required to
share code ;).

On Thu, Oct 13, 2016 at 4:38 PM Kirill Prazdnikov  wrote:

> I do not know. We don't use "classifier-sources" in our maven files.
> I never run super-dev-mode from command-line. I run it form within the IDE.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: Replcaing GWT generators with APT - Annotation Processing Tool -

2016-10-09 Thread Ignacio Baca Moreno-Torres
In our experience, using automatic registration has not been very useful. 
We also used generator and try to apply APT, but at some point we just 
realised that it was a unjustified complication, because the advantages was 
pretty questionable. This might not apply to your registry, but in our 
case, we realised that with the automatic registration we end up loosing 
various advantages like java refactoring and code usage inspections and 
lose control on which resources should be added to the registry. This 
disadvantages just to omit a line like registry.register(resource). So when 
you give the user control of this line, which it's almost trivial and I 
don't think it's logic duplication, it's also trivial to make modules 
(something like '(Registry r) -> { r.register(resource1); 
r.register(resource2); }' is enough), or do not register all the resources, 
or has different modules for testing, etc. So we concluded that the 
advantages of writing modules are much more than the auto-generating a bulk 
registry.

On Saturday, October 8, 2016 at 9:40:04 PM UTC+2, Thomas Broyer wrote:
>
>
>
> On Saturday, October 8, 2016 at 12:14:29 AM UTC+2, Ahmad Bawaneh wrote:
>>
>> Dears,
>> We all know that GTW 3.0 will come with some major changes from the 
>> current GWT, and so we find every were suggestions for how to be prepared 
>> for these changes, and that is good, but here is my issue regarding the 
>> removal of generators and the suggestion to replace them with Annotation 
>> processors:
>>
>> I have been using generators to build some kind of registry, so a 
>> developer can annotate a class with an annotation and using the generators 
>> i generate the code that register that class in the registry to picked up 
>> at run-time, which is the normal case here, but in my case developer write 
>> there own modules in seperate projects and provides me with the final 
>> artifact, and since in my generator i scan the class path i was able to 
>> find the annotated classes within these third party jars and register them.
>>
>> that worked perfectly for me.
>>
>> now i have trying to replace my generators with annotation processors, 
>> but annotation processors does not scan classes from third party jars as it 
>> only works for source code, and now if i want things to work for me i have 
>> to ask every one to write thier projects as part of my project - thier 
>> projects source code should be part of my project -.
>>
>> and with this modularity is 100% been killed.
>>
>
> No.
> First, APT can work on already-compiled classes: 
> http://docs.oracle.com/javase/8/docs/technotes/tools/windows/javac.html
> The main issue here is that a) you have to know the class names you want 
> to process (you can use a tool to scan a classpath, such as scannotation, 
> to get that list) and b) most build tools don't have built-in support for 
> passing class names to JavaC, rather than source files.
> But one would argue that classpath scanning is bad (at least if there's no 
> alternative).
> A better approach is to use a service loader-like approach (not 
> service-loader as you don't seem to be forcing a base class/interface): 
> each JAR lists its classes in a specific file in META-INF, so you just have 
> to read all such files from the classpath and you have the list of classes 
> you need to process.
> But ideally, you'd rather have the "final user" explicitly list what it 
> needs (a classpath scanner to create such a list would be one way to do it, 
> but the developer could prefer tailoring the list by hand)
>  
>
>> So is APT the right choice?
>>
>
> Probably not, or at least it would be only part of the solution. Some kind 
> of "preprocessor" would be better suited (it could possibly generate a Java 
> source file that'd later trigger an annotation processor).
>

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

2016-09-15 Thread Ignacio Baca Moreno-Torres
Never see that problem, but... if you think that might be a log-to-console 
problem, you can just create a simple app which produces a lot of console 
logs and see what happens, if thats the problem you can always disable 
logging for the ios permutation.

On Thursday, September 15, 2016 at 4:54:19 PM UTC+2, James Galliford wrote:
>
> Hello,
>
> I've recently been having some native app crashes with my company's app on 
> iOS devices. It seems to be a memory allocation issue, given the crash log 
> says:
>
> Exception Type: EXC_BAD_ACCESS (SIGSEGV) 
> Exception Subtype: KERN_INVALID_ADDRESS at 0xbbadbeef 
>
> I was doing some testing, and I found that we do a lot of logging to the 
> console, which is great when we're using chrome or a chromium based desktop 
> app that we have to test with, but I was wondering if this would be 
> persisted on an iPad running a native app which runs our GWT app by default 
> or where I would be able to check this setting, as I was not the one who 
> set this up. Our app has a synchonisation process which can upload and 
> download a relatively large amount of data, and all of this is logged as it 
> happens, with the exception of raw data for images. I am wondering whether 
> this, in combination with the images we are occasionally sending, is enough 
> to put us over the limit that iOS allows individual apps.
>
> I am sure that this is not an issue with the native app. This is a 
> relatively recent issue, while the native app has been running without 
> changes for a long time, and it isn't an issue with a new version of iOS on 
> the device either.
>
> Have any of you seen this error happen in your own apps and was there an 
> issue that you found that might be of some help to me trying to diagnose my 
> own issue? I'd appreciate any help or answers that can be offered.
>
> Thanks,
>
> James
>

-- 
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: Is GWT is Dead?

2016-09-05 Thread Ignacio Baca Moreno-Torres
Just curious, what and why are you waiting GWT 3? GWT is pretty awesome
right now…

On Tue, Sep 6, 2016 at 8:39 AM Ahamed  wrote:

> Team,
>   My Apologies for asking this question again.
>
> Is GWT is Dead or Alive ? From past 2 years i am waiting for GWT 3.0 but
> still is not released? Can any one from Steering committee explain whats
> going on or Any progress on GWT 3.0 .
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: synchronously waiting for a Promise

2016-09-01 Thread Ignacio Baca Moreno-Torres
Don't forget to check out this https://github.com/intendia-oss/rxjava-gwt ;)

You'll probably get much better results asynchronously, at the end 
await/async is just and advanced (and maybe obscure) syntactic sugar over 
callbacks (I see that way, maybe not), which do not allow the versatility 
obtained with other asynchronous monads like Promise or Observable. Async 
forces a sequential execution (which makes sense because is to make your 
imperative synchronous code asynchronous, so the original sequence should 
be maintained), but with Observable you have all the control in a 
descriptive way.


On Thursday, September 1, 2016 at 4:01:56 PM UTC+2, Ian Preston wrote:
>
> Cool example. You are right. 
>
> We are migrating our code to asynchronous. :-)
>
>
>
> On Thursday, 1 September 2016 13:59:45 UTC+1, Thomas Broyer wrote:
>>
>> Consider the following code:
>>
>> class Foo {
>>   String bar;
>>
>>   synchronized String getBar() {
>> if (bar == null) { // OK, we all know this is bad in the Java world, 
>> just bear with me for this sample code
>>   Future realBar = …; // make a call that returns a 
>> CompletableFuture
>>   bar = realBar.get();
>> }
>> return bar;
>>   }
>> }
>>
>> You're proposing that it's somehow translated more or less to:
>>
>> var _symbol$bar = Symbol("Foo.bar");
>> class Foo {
>>   async getBar() { // Note: transformed to 'async', no 'synchronized'
>> if (this[_symbol$bar] == null) {
>>   var realBar = …;
>>   this[_symbol$bar] = await realBar.get(); // transformed to await
>> }
>> return this[_symbol$bar];
>>   }
>> }
>>
>> Now imagine that while await⋅ing realBar.get(), getBar() is called again, 
>> on the same Foo instance (triggered by an event; for example, getBar() is 
>> called from a click handler, and the … returning the 
>> CompletableFuture fetches some resource through HTTP).
>> Looking at the original Java code, you'd expect that the second call is 
>> blocked until the first one terminates and releases the lock on the Foo 
>> object, so the first call would set the bar field and the second call would 
>> skip the 'if' branch.
>> In JS though, the second call would *enter* the 'if' branch and make a 
>> second call; then, when each 'realBar' is completed, the private (through 
>> Symbol) property is set: twice; and if the call that returned a 
>> CompletableFuture is stateful, that means the state has been 
>> modified twice.
>> What kind of JS would you produce that'd prevent this from happening?
>>
>> I wouldn't trade "emulating CompletableFuture#get" for "bloated JS and a 
>> much more complex compiler". The Pareto rule tells us that you should just 
>> embrace asynchrony and live with only the non-blocking API (CompletionStage 
>> basically, plus getNow() and a few others).
>>
>> On Thursday, September 1, 2016 at 11:53:45 AM UTC+2, Ian Preston wrote:
>>>
>>> Interesting question, Thomas. I believe it should still work. Consider 
>>> the following: 
>>>
>>> 1. A 'thread' comes into a method and obtains a lock on A.
>>> 2. whilst holding the lock, it makes an async call to 
>>> CompletableFuture.get()
>>> 3. Somewhere down the call stack some state which is guarded by the lock 
>>> on A is modified
>>> On the JVM, either that lock is not re-entrant, in which case it is a 
>>> deadlock, or it is re-entrant and modifying the state is fine. We only have 
>>> one thread in JS so it is fine. 
>>>
>>> Correct me if I'm wrong, but I believe this means that GWT could 
>>> continue to ignore synchronization, and get the same results assuming non 
>>> deadlocking programs, which can't be translated without a full emulator 
>>> like doppio anyway. 
>>>
>>>
>>> On Thursday, 1 September 2016 10:22:08 UTC+1, Thomas Broyer wrote:



 On Wednesday, August 31, 2016 at 11:58:51 PM UTC+2, Ian Preston wrote:
>
> One idea, which would be awesome from a user perspective, is the 
> following:
>
> Emulate CompletableFuture with native Promises. Then if the 
> synchronous cf.get() call is used, then translate that to await, and make 
> the function it is in async (in JS land). This would automatically change 
> the signature to a CompletableFuture, and then propagate this up to all 
> callers. If it makes it all the way to a function exposed with JsInterop, 
> then that function changes signature like the rest of them to return a 
> promise. The consumer of this function is obviously in JS and so can 
> handle 
> the promise fine. This would equate to translating the synchronous java 
> calls which wait on a CompletableFuture (Promise) to return promises in 
> JS. 
> This wouldn't require any changes to the Java code - it could continue in 
> its synchronous style, and not disrupt JVM based users of the same code. 
>

> Thoughts?
>

 'await' is not synchronous, which means things can happen while 
 awaiting, which could mutate state you'd rel

Re: remove annotation in gwt compiler process ?

2016-08-29 Thread Ignacio Baca Moreno-Torres
If your problem is that the annotations is making your GWT module
compilation fail, maybe you should try to add your annotations to the GWT
compilation so you don't need to "remove them". Substituting an annotation
with an dummy annotation makes no senses at all XD, are more or less "value
classes", is like substituting a string with a dummy string... but,
sometimes the class might has dependencies to a enums or a Class where
the enum or the T is incompatible, in this situation just add a super
source with the dummy annotation (pretty weird) or a GwtIncompatible in the
annotation or annotation method. Frequently you just need to create a GWT
module pointing to the annotation package, for example, we did that for
jackson adding a module like this:

file://src/com/fasterxml/jackson/annotation/Jackson.gwt.xml










On Mon, Aug 29, 2016 at 8:01 PM Thomas Broyer  wrote:

> I can't see any reason to do that. In case you'd really need to do that,
> you could use a different classpath, like with any Java
> application/compilation (note that super-sources won't work, as annotations
> are -partially- loaded from bytecode, not only source code). Details will
> depend on how you build your 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.
>

-- 
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: How to declare standard java libraries dependencies to the GWT compiler with the tbroyer maven plugin?

2016-08-27 Thread Ignacio Baca Moreno-Torres
I updated the 'deprecation notice', deprecation is a strong word and people 
get scared that the plugin is going to disappear. But the idea is the same, 
you should migrate if you can, so thanks Bruno Salmon to try it out!

On Friday, August 26, 2016 at 4:51:21 PM UTC+2, Thomas Broyer wrote:
>
>
>
> On Friday, August 26, 2016 at 3:36:52 PM UTC+2, Bruno Salmon wrote:
>>
>> hi,
>>
>> Having read the deprecation notice 
>> , I'm 
>> trying to move from the mojo plugin to the new recommended plugin, the one 
>> written by Thomas.
>>
>> But I'm facing this problem: my GWT application uses some java libraries 
>> (standard jar packaging but with GWT compatible sources), however the GWT 
>> compiler can't find these sources although I have listed these libraries in 
>> the application pom:
>>
>> 
>> lib1-groupId
>> lib1-artifactId
>> lib1-version
>> 
>> 
>> lib2-groupId
>> lib2-artifactId
>> lib2-version
>> 
>> ...
>>
>> With the mojo plugin already it was not enough to just declare their 
>> dependencies in the pom, I had to declare them a second time in the 
>> compileSourceArtifacts section of the plugin configuration, like this:
>>
>> 
>> ...
>> 
>> lib1-groupId:lib1-artifactId
>> 
>> lib2-groupId:lib2-artifactId
>> 
>> ...
>> 
>> 
>>
>> and then the GWT compiler could find the sources of these libraries and 
>> include them for the application compilation.
>>
>> I haven't seen the equivalent with the tbroyer plugin.
>> Anybody knows how to do it?
>>
>
> Add dependencies to the source artifacts in addition to the "binary" ones:
>
> 
> lib1-groupId
> lib1-artifactId
> lib1-version
> sources
> 
> 
> lib2-groupId
> lib2-artifactId
> lib2-version
> sources
> 
> ...
>
> See the description of the different kind of dependencies in the home 
> page: https://tbroyer.github.io/gwt-maven-plugin/
>

-- 
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: Completable Future in GWT 2.8-rc1

2016-08-23 Thread Ignacio Baca Moreno-Torres
Looks like a perfect fitting for RxJava, not sure why it add complexity. 
Promises has no concept of subscription, so requests cannot be canceled, 
also you will going to need to create a lot of SAM to support generics and 
lambdas, this is already implemented in RxJava which is pretty mature 
project used in servers and androids! and now in GWT ;)

This is what can be done in RxJava and you will need lot of code to get 
there with promises ;)
RxGwt.click(buttonToLoadSomething)
  // this will cancel the previous request… --v …if next click occurs 
before previous has done
  .switchOnNext(event -> autoRestService.loadZeroOneOrLotOfItems()
.doOnSubscribe(() -> table.cleanAndShowLoading() /* do this on each new 
server request */)
.onErrorResumeNext(err -> { table.stopLoadingAndShowWhy(err); return 
empty(); }))
  .filter(item -> item.name.startWith("iDontLikeThisOne"))
  .subscribe(item -> table.addRow(item));
I'll encourage to try it out, AutoREST will just guide you to a more 
uniform API, instead of the RequestBuilder ModelVistor 
(https://github.com/intendia-oss/autorest-gwt/blob/master/gwt/src/main/java/com/intendia/gwt/autorest/client/RequestResourceBuilder.java)
 
create your own using native XMLHTTPRequest. If you don't prefer Observable 
is because you haven't used them ;), hehe or not! I' just trying to promote 
rxjava-gwt.
 

On Tuesday, August 23, 2016 at 4:30:06 PM UTC+2, zakaria amine wrote:
>
> I am working with native XMLHTTPRequest. I am trying to write a utility 
> that simplifies the asynchornous calls, and that I can use from my 
> applications to call Rest Services. 
>
> Le mardi 23 août 2016 12:44:30 UTC+2, Ignacio Baca Moreno-Torres a écrit :
>>
>> I'm curious... what problem are you trying to solve using promises 
>> (requests, events, presenter logic...)?
>>
>>>
>>>
>>>
>>>

-- 
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: Completable Future in GWT 2.8-rc1

2016-08-23 Thread Ignacio Baca Moreno-Torres
I'm curious... what problem are you trying to solve using promises 
(requests, events, presenter logic...)?

On Tuesday, August 23, 2016 at 11:07:30 AM UTC+2, zakaria amine wrote:
>
> Thanks for the info. rxjava-gwt sounds promising, it does add some 
> complexity though...I will do with Promise for now.
>
>
>

-- 
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: Completable Future in GWT 2.8-rc1

2016-08-22 Thread Ignacio Baca Moreno-Torres
This is much better than 
promises https://github.com/intendia-oss/rxjava-gwt ;) specially combined 
with https://github.com/intendia-oss/autorest-gwt 
and https://github.com/intendia-oss/rxgwt.

On Monday, August 22, 2016 at 6:53:51 PM UTC+2, zakaria amine wrote:
>
> Hello, 
>
> I tried using CompletableFuture in my application, and I got the famous 
> error :
>
>  [ERROR] Line 92: No source code is available for type 
> java.util.concurrent.CompletableFuture; did you forget to inherit a 
> required module?
>
> I suppose CompletableFuture is not emulated, right ? are there other 
> alternatives ? 
>

-- 
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-22 Thread Ignacio Baca Moreno-Torres
"domain object" vs "message payload"; Yes, this is the point. We came from 
RequestFactory which works quite good with "domain object" models, we use 
one model for each type, this model is the same in the server and the 
client, and all views use the same model.

So, responding to the 'JSON object recreation in the client'; JsInterop 
makes trivial Object recreation, you map your messages in a very explicit 
and clean manner having almost zero overhead, but you should take care of 
this "domain object" vs "message payload" model strategy. JsInterop doesn't 
work well with "domain object" models (so questions like how can you return 
a Set or a Map are currently hard to answer, and makes no much sense in the 
"message payload" side), but it will work much better with "message 
payloads". We are getting really good result using plain classes without 
methods. But it's important to think on terms of "message payloads", you 
should try to avoid fancy things, using only primitives (plus Boolean, 
Double and String), arrays or other @JsType models. We end up with lot of 
services like this. This models frequently do not need any special 
annotation, but are so simple that most JSON encoder works correctly 
(Jackson, gson, moshi...) and obviously JsInterop.

@AutoRestGwt
@Path(RESOURCE_TOOLS)
@Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
public interface ToolsRestService {

@GET @Path("build")
Single getBuildInfo();

@JsType(namespace = GLOBAL, name = "Object", isNative = true)
class BuildInfo {
public int buildDate;
public String version;
public String commitId;
public String javaVersion;
}

@GET @Path("system")
Single getSystemInfo();

@JsType(namespace = GLOBAL, name = "Object", isNative = true)
class SystemInfo {
public double startupTime;
public double totalMemory;
public double freeMemory;
public double usedMemory;
}
}


I like to think of this classes as something like JSON (JavaScript Object 
Notation) but in Java and to define the scheme instead of the object itself 
so JOSN (Java Object Scheme Notation), i.e. a subset of Java just to define 
objects schemes. 

On Saturday, August 20, 2016 at 12:54:24 AM UTC+2, Thomas Broyer wrote:
>
> 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: Package a GWT client project, no server code.

2016-08-20 Thread Ignacio Baca Moreno-Torres
You should try the new gwt-maven-plugin, it's not your solution, but it's a 
good idea ;). And you should known that the war is a zip, so actually your 
war just contains the META-INF and the GWT output folder. Take a look to 
this project for example (https://github.com/ibaca/rxcanvas-gwt), after a 
'mvn package' you can see that the 'unzip target/*.war' creates 2 folders, 
the META-INF (that maybe can be descarted, but I'm don't know how to do it 
right now) and the rxcanvas that contains the whole web.

On Saturday, August 20, 2016 at 7:16:25 PM UTC+2, Juan Pablo Gardella wrote:
>
> Maybe you can achieve that by using maven-assembly-plugin 
>
> El sáb., ago. 20, 2016 13:22, Mickael BARON  > escribió:
>
>> Hi,
>>
>> With the GWT Maven plugin (
>> https://gwt-maven-plugin.github.io/gwt-maven-plugin/), i can package my 
>> GWT application into a war file. But, if my GWT application contains only 
>> client layer (no server aspect), is there a solution to package to a 
>> classical web application (for example a zip file) ? In other words, no 
>> web.xml, no META-INF... only the generated GWT application files. I plan to 
>> use a Maven assembly to package my GWT application ?
>>
>> Any idea ?
>>
>> Mickael
>>
>> -- 
>> 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.
>>
>

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

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

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: Convert Bytes from byte[] to data types

2016-05-30 Thread Ignacio Baca Moreno-Torres
Maybe you can use this for 
inspiration... 
https://gist.github.com/ibaca/d8c14e19bf8f96bbe1b4b7f1291b6b24#file-dtachoviewer-java-L99
 
we used this to read binary files and decode in the client side. We 
transform the field in a byte[], after that converting to strings (new 
String(b, 
"ISO-8859-1")) or ints are trivial. You can do something as simple as int x 
= byte[0]; or are more advanced like.

public static long convertIntoUnsigned4ByteInt(byte[] b) {
   long l = 0;

   long al = ( ( (long)b[ 0 ] ) & 0xff ) << 24 ;
   long bl = ( ( (long)b[ 1 ] ) & 0xff ) << 16 ;
   long cl = ( ( (long)b[ 2 ] ) & 0xff ) << 8 ;

   int di =  ( b[ 3 ] & 0xff );
   long dl = ( (long)di ) << 0;

   l = al +  bl + cl + dl;

   return l;
}

All this just work. I have a file drag&drop example 
here https://github.com/ibaca/dndfiles-gwt. Not sure if useful, but is the 
original point of the other example (gist). Transforming it to a byte[] is 
not very performant (byte are emulated in gwt), but is easier and our 
library already exists and use byte[] everywhere. 


On Sunday, May 29, 2016 at 7:15:21 PM UTC+2, Jens wrote:
>
> Never done it but I would say so. GWT supports new String(byte[]) with 
> UTF-8, LATIN-1, ISO_8859_1 charsets. For numbers you probably have to use 
> BigInteger or do the conversion yourself as GWT does not emulate 
> ByteBuffer.wrap(..).get...() for now.
>
> -- 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: GWT 2.8 delays

2016-05-30 Thread Ignacio Baca Moreno-Torres
I said this many times but... I strongly recommend that you create your own 
releases. This is what we have been doing for years...

1. create a release using something like... (tools and trunk are github 
clones, build-deploy.sh is the script to deploy to your company repo, you 
should create it yourself)
system in /Users/you/Code/gwt/  
› ll 
total 16 
-rw-r--r--  1 you staff  247 jul 17  2015 README.md 
-rwxr--r--  1 you staff  297 ago 14  2015 build-deploy.sh 
-rwxr--r--  1 you staff  191 abr 12  2015 build-local.sh 
-rwxr--r--  1 you staff  159 mar 12  2015 push-to-m2.sh 
drwxr-xr-x 10 you staff  340 abr  7 10:56 tools 
drwxr-xr-x 30 you staff 1020 mar 20 09:20 trunk 
drwxr-xr-x  4 you staff  136 sep  6  2014 workspace 
 
system in /Users/you/Code/gwt/   
› cat build-deploy.sh  
#!/bin/sh 
export GWT_VERSION=2.8.0-i`date +%Y%m%d` 
export GWT_MAVEN_REPO_URL=http://maven.yourcompany.com/ext-release-local 
export GWT_MAVEN_REPO_ID=maven.yourcompany.com 
echo building version $GWT_VERSION...  
cd trunk 
ant clean buildonly elemental dist-dev 
maven/push-gwt.sh 
git tag -f $GWT_VERSION

2. update your project gwt version... done. :)


Yep quite easy. We usually make 1 release a week, some time more some time 
less, GWT is extremely stable, usually if something is wrong is really 
wrong, which is a good thing because problems are detected quite early. You 
can spend more time, but I don't think that you are going to find any 
surprise if you develop during one or two week with a new version. So we 
usually change the GWT version just after a release, and we just continue 
developing using the new version, if no-one detects anything before the 
next release we just release. Looks like google compile most of it's 
projects using the gwt head, so you find frequently that if some commit 
makes something inestable they revert it in a few day (frequently the next 
day). So if you test your version during more than a week and you review 
the last commits since your release tag, you can see even more info if 
something is going to fail.


This has obvious advantages, you get used to compile gwt so if you find 
some bug which affect your project you can always hack it (which is far 
easier that find a perfect solution) and fix the problem for your clients, 
obviously, you get the cool advantage of being always using the last 
features of gwt, and finally your are going to start feeling like GWT is 
much live than you thought it be only seeing its releases.


Please, atleast try, make a release in your company maven report. Compile 
your project, and see what happen. Only good things can happens XD

On Monday, May 30, 2016 at 8:50:02 PM UTC+2, NGdeM wrote:
>
> One can understand that the amount of resources behind Angular are far 
> superior to those behind GWT.
>
> In any case, the project's last official hear-beat dates from December 3, 
> 2015, and this was a beta release.
>
> For anybody watching, it is scary to see a UI framework having releases 
> going out at such a slow pace.
> It most likely far from being trivial to bring full support to the Java 8 
> api.
>
> But in that case, could one say that the scope for the deliverable is not 
> properly planned?
> Could the scope of the GWT releases have not been sliced into multiple 
> final incremental stable releases? 
>
> None the less, even if the scope of the 2.8 release is to support the full 
> Java 8 API, then several beta releases like the beta 1 could have already 
> come out. Such as every 4 months there should be a goal to have something 
> stable coming out.
> One could enumerate the set of of open work tasks and APIs not yet 
> supported...
>
> At this point in time, would looking at the release notes in the GWT 
> documentation just thinks the project is terminated.
>
> Would a beta-2 be possible any time soon?
> Many libraries such as Vaadin GWT widgets no longer support 2.8 beta1.
>
> Many thanks and kind regards.
>
>
> On Sunday, May 8, 2016 at 5:26:22 PM UTC+2, steve Zara wrote:
>>
>> GWT 2.8 is now well over a year behind what seemed to be the original 
>> schedule.  I'm having to deal with colleagues who say they have lost 
>> confidence in the GWT project, which is a problem as I have GWT projects to 
>> support and further develop, as part of what I hope will be a globally used 
>> and long-lived system.  Confidence in software requires the presence of 
>> established releases, NOT betas, which put off investors.
>>
>> Is there anything that can be done to assist with progress?  Is there a 
>> problem with lack of interest in GWT from, say, Google?  Does GWT 2.8 
>> involve too many features when compared to 2.7? Is there a lack of 
>> developers working on GWT?  Are more testers needed?  
>>
>> Regards
>>
>> Steve Zara
>>
>>

-- 
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...@google

Re: Update Jetty in GWT?

2016-02-10 Thread Ignacio Baca Moreno-Torres
https://gwt-review.googlesource.com/#/c/7857/ They are trying to get it
done before release. Hope they do! :)

El jue., 11 de febrero de 2016 4:21, Michael Zhou <
zhoumotongxue...@gmail.com> escribió:

> +1, it will be great if GWT 2.8 ships with an updated Jetty.
>
>
> On Friday, May 29, 2015 at 8:47:32 PM UTC-4, P.G.Taboada wrote:
>>
>> Hi,
>>
>> I read through some comments, issues and code reviews but I am not sure
>> if an updated Jetty will land in GWT 2.8.
>>
>> What is the current status of Jetty update?
>>
>>
>> brgds - Papick
>>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: IntelliJ and 2.8.0-SNAPSHOT

2015-11-26 Thread Ignacio Baca Moreno-Torres
Works ok for me. You might have some classpath problem. codeserver.Options 
belong to gwt-codeserver and OptionsJsIntropMode.JS_RC belong to gwt-dev, 
so maybe IntelliJ is using the last codeserver and the not-so-last gwt-dev.

I had some problems with intelliJ gwt dependency configuration. Sometimes 
get confused with the snapshots and point to a specific time-stamped 
version and do not update again. You can see which version is used in the 
classpath or in the .iml files.

Other problem I see sometimes is that intelliJ stop using maven as a gwt 
lib provider, this can be confirmed in the .iml file, you should 
see something like.


  

  
  

  



I hope this helps.

On Thursday, November 26, 2015 at 6:02:40 PM UTC+1, P.G.Taboada wrote:
>
> Hi,
>
> IntelliJ fails to start SDM/ run configuration with 2.8.0-SNAPSHOT here. 
> Are there any known tricks/ workarounds?
>
> java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>>
>> at 
>>> com.google.gwt.dev.shell.SuperDevListener.start(SuperDevListener.java:96)
>>
>> at com.google.gwt.dev.DevMode.ensureCodeServerListener(DevMode.java:660)
>>
>> at com.google.gwt.dev.DevModeBase.doStartup(DevModeBase.java:879)
>>
>> at com.google.gwt.dev.DevMode.doStartup(DevMode.java:545)
>>
>> at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:983)
>>
>> at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:775)
>>
>> at com.google.gwt.dev.DevMode.main(DevMode.java:426)
>>
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>
>> at 
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>>
>> at 
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>
>> at java.lang.reflect.Method.invoke(Method.java:497)
>>
>> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
>>
>> Caused by: java.lang.reflect.InvocationTargetException
>>
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>
>> at 
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>>
>> at 
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>
>> at java.lang.reflect.Method.invoke(Method.java:497)
>>
>> at 
>>> com.google.gwt.dev.shell.SuperDevListener.runCodeServer(SuperDevListener.java:113)
>>
>> at 
>>> com.google.gwt.dev.shell.SuperDevListener.start(SuperDevListener.java:92)
>>
>> ... 11 more
>>
>> Unable to start Code server
>>
>> Caused by: java.lang.NoSuchFieldError: JS_RC
>>
>> at com.google.gwt.dev.codeserver.Options.(Options.java:91)
>>
>> at com.google.gwt.dev.codeserver.CodeServer.main(CodeServer.java:49)
>>
>> ... 17 more
>>
>>
>>

-- 
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: How to get Document before onModuleLoad is executed by GWT?

2015-10-20 Thread Ignacio Baca Moreno-Torres
If you want to do something before gwt entry point without GWT, you may try
adding plain javascript in your document (index.html) before the gwt
script.

If your problem is that the entry point takes to much time to be called,
you may try split points. Do whatever you need in the entry point and call
runAsync to continue with your application bootstrapping.

El mié., 21 de octubre de 2015 2:32, David  escribió:

>
> I want to get BodyElement before onModuleLoad is called by GWT. I think I
> should use a native method to call native Javascript function. But I cannot
> figure out how to do it. Please advice me. Thanks!
>
> David
>
> --
> 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: Getting issue while debugging GWT Module

2015-09-13 Thread Ignacio Baca Moreno-Torres
You are in 'production mode' if you are executing javascript code. This is 
always true in final compiled code (production code 😀) and after 2.7 is 
the default development strategy (using SuperDevMode). If you are executing 
your code in a explorer using Java code (instead of JS) is because you are 
using the GWT Developer Plugin. You should try SuperDevMode instead. 
See http://www.gwtproject.org/articles/superdevmode.html

Names are pretty confusing in GWT (I think this is because its 
functionality has changed/evolved but the names are still the original 
ones, for example, before superdevmode, 'production mode' is only the final 
compiled output, but after superdevmode appears, 'production mode' is also 
used during development, so PRODUCTION is no longer a good name, probably 
'javascript mode' and 'java mode' is much more easy to understand; 
something similar with DevMode)...
production mode -> javascript code used during runtime
DevMode -> web server, and some hooks for the developer plugin or 
superdevmode (configured with arguments)
DevMode with SuperDevMode param -> web server + codeserver
SuperDevMode -> runtime javascript code using a tool which compile the code 
on the fly, this tool is codeserver

On Saturday, September 12, 2015 at 2:51:03 PM UTC+2, anil gupta wrote:
>
> Thanx for the reply can you guide me how can I enable Prod mode I am very 
> new to GWT and need your support
>
> Thanks
> Regards
> Anil
>
> On Wednesday, 9 September 2015 20:39:38 UTC+5:30, Ignacio Baca 
> Moreno-Torres wrote:
>>
>> Java arrays are native JS arrays in production mode, and look like you 
>> are casting a JS array to Java array in dev mode, probably doing something 
>> like...
>> native CallDialedNumber[] getNumbers()/-*{ return this.numbers; }-*/;
>> You may return JsArray (
>> http://www.gwtproject.org/doc/latest/DevGuideCodingBasicsOverlay.html) 
>> or use only prod mode, which I think is a good idea (prod mode is faster 
>> and dev mode is deprecated).
>>
>> On Wednesday, September 9, 2015 at 3:33:43 PM UTC+2, anil gupta wrote:
>>>
>>> Hello Team,
>>>
>>>
>>> when I am debugging my application with help of 
>>>
>>> getting below need someone's immediate help.
>>>
>>> *cjava.lang.ClassCastException: 
>>> com.google.gwt.core.client.JavaScriptObject$ cannot be cast to 
>>> [Lcom.qwest.eqsms.client.structure.CallDialedNumber;*
>>>
>>> *But when I am running without GWT plugging its working file please 
>>> suggest for the fix.*
>>>
>>> *I am using below plugin for debugging*
>>>
>>>
>>> <https://lh3.googleusercontent.com/-Fvnatc6Ab70/VfA0zuF93sI/F7s/aIffZv5LaSw/s1600/GWT%2BPlugin.png>
>>>
>>>
>>>
>>>
>>>
>>> *Regards*
>>> *Anil*
>>>
>>

-- 
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: Getting issue while debugging GWT Module

2015-09-09 Thread Ignacio Baca Moreno-Torres
Java arrays are native JS arrays in production mode, and look like you are 
casting a JS array to Java array in dev mode, probably doing something 
like...
native CallDialedNumber[] getNumbers()/-*{ return this.numbers; }-*/;
You may return JsArray 
(http://www.gwtproject.org/doc/latest/DevGuideCodingBasicsOverlay.html) or 
use only prod mode, which I think is a good idea (prod mode is faster and 
dev mode is deprecated).

On Wednesday, September 9, 2015 at 3:33:43 PM UTC+2, anil gupta wrote:
>
> Hello Team,
>
>
> when I am debugging my application with help of 
>
> getting below need someone's immediate help.
>
> *cjava.lang.ClassCastException: 
> com.google.gwt.core.client.JavaScriptObject$ cannot be cast to 
> [Lcom.qwest.eqsms.client.structure.CallDialedNumber;*
>
> *But when I am running without GWT plugging its working file please 
> suggest for the fix.*
>
> *I am using below plugin for debugging*
>
>
> 
>
>
>
>
>
> *Regards*
> *Anil*
>

-- 
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 + Maven - How to move classes in the "shared" folder into a library project?

2015-09-08 Thread Ignacio Baca Moreno-Torres
Compile this libraries with sources and add as a dependency in the server 
and as a dependency and source dependency in the client. Explained 
here https://tbroyer.github.io/gwt-maven-plugin/. Read all the 
documentation. I think that it is easier if you ask what you don't 
understand in the documentation that how to do something, so your doubts 
can help to improve the documentation :). 

Here an example that contains shared (no gwt) and shared-gwt libs, and how 
to use it in the server and client modules.
https://github.com/tbroyer/gwt-maven-plugin/tree/master/src/it/e2e.

I hope this helps.

On Wednesday, September 9, 2015 at 4:53:57 AM UTC+2, Magnus wrote:
>
> Thank you! Could you please describe this more precisely?
>
> I use the "modular webapp" archetype for the main application.
> The libraries are built with the archetype "maven-archetype-quickstart".
>
> How can I create a "shared module" in one of the libraries? Which library?
>
> Thanks
> Magnus
>

-- 
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 + Maven - How to move classes in the "shared" folder into a library project?

2015-09-08 Thread Ignacio Baca Moreno-Torres
Move the shared package into a shared module. See the archetype 
modular-webapp here https://github.com/tbroyer/gwt-maven-archetypes.

On Tuesday, September 8, 2015 at 5:27:04 PM UTC+2, Magnus wrote:
>
> Hello,
>
> I am migrating code from a single GWT WebApplication into several, 
> external libraries.
> There are two libraries:
>
>- pure Java library
>contains classes to be used at the server side of an app
>
>- GWT library
>contains classes to be used at the client side of a GWT app
>
> I have successfully moved server-side code from the main project into the 
> pure Java library.
> And I have successfully moved client-side GWT-based classes from the main 
> project into the GWT library.
>
> But what about the classes in the "shared" folder?
> These classes must be visible at the server side and at the client side, 
> to be used in RPC communication.
>
> How can you move these classes out of the main project into the libraries?
> Where should they go?
>
> Thanks
> Magnus
>

-- 
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: Architecture of adding 'pure html/js' to client side?

2015-08-23 Thread Ignacio Baca Moreno-Torres
Sorry, I mean that if you want it to be independent of GWT, probably the 
answer is just to not use GWT in this independent part, and I said that 
because of your comment 'add large chunks of html/js as an independent 
part'.

http://stackoverflow.com/questions/744137/best-way-to-externalize-html-in-gwt-apps

On Friday, August 21, 2015 at 9:38:04 AM UTC+2, funkforce wrote:
>
> >But I not sure how this is related to GWT
> I am pretty sure people mix gwt and html/js programming and I wonder how 
> they mix thees things together if they don't use ui-binder in a single page 
> application.
>
> Thanks.
> On Tuesday, August 18, 2015 at 6:38:44 PM UTC+2, Ignacio Baca 
> Moreno-Torres wrote:
>>
>> But I not sure how this is related to GWT, specially if you want it to be 
>> independent. We added the swagger ui (
>> https://github.com/swagger-api/swagger-ui 
>> <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fswagger-api%2Fswagger-ui&sa=D&sntz=1&usg=AFQjCNG_f5sx1oSTt4zl4mz-IRHmMmYZKA>)
>>  
>> in some projects and we just add the dist forlder into the war (webapp 
>> folder if you are using maven). You can add links to this htmls using 
>> anchors or setting the browser url manually using 
>> Window.Location.setLocation.
>>
>> On Tue, Aug 18, 2015 at 9:41 AM funkforce  wrote:
>>
>>> I am a bit surprised that none have added large chunks of html/js as an 
>>> independent part of the application and are willing to sharewell 
>>> well... 
>>>
>>>
>>> On Wednesday, August 12, 2015 at 10:34:52 AM UTC+2, funkforce wrote:
>>>>
>>>> We have a GWT application coded in java on the client. There is no ui 
>>>> binder only a jsp page and a class with our onModuleLoad() method and then 
>>>> pure java serving the gui. We want to add bunch of html/javascript to a 
>>>> new 
>>>> part of the application but I don't know how to organize the new 
>>>> html/javascript part. The new part will most likely contain a lot of 
>>>> html/js + js frameworks and talk json to the same server that now serves 
>>>> gwt-rpc. Its a first step to move from gwt-widgets.
>>>>
>>>>
>>>> Can someone please share how to do this? The closest I have found is 
>>>> ClientBundle but I am not sure its the way to.
>>>>
>>>>
>>>> Thanks.
>>>>
>>>>
>>>>
>>>>
>>>> -- 
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+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: Architecture of adding 'pure html/js' to client side?

2015-08-18 Thread Ignacio Baca Moreno-Torres
But I not sure how this is related to GWT, specially if you want it to be
independent. We added the swagger ui (
https://github.com/swagger-api/swagger-ui) in some projects and we just add
the dist forlder into the war (webapp folder if you are using maven). You
can add links to this htmls using anchors or setting the browser url
manually using Window.Location.setLocation.

On Tue, Aug 18, 2015 at 9:41 AM funkforce  wrote:

> I am a bit surprised that none have added large chunks of html/js as an
> independent part of the application and are willing to sharewell
> well...
>
>
> On Wednesday, August 12, 2015 at 10:34:52 AM UTC+2, funkforce wrote:
>>
>> We have a GWT application coded in java on the client. There is no ui
>> binder only a jsp page and a class with our onModuleLoad() method and then
>> pure java serving the gui. We want to add bunch of html/javascript to a new
>> part of the application but I don't know how to organize the new
>> html/javascript part. The new part will most likely contain a lot of
>> html/js + js frameworks and talk json to the same server that now serves
>> gwt-rpc. Its a first step to move from gwt-widgets.
>>
>>
>> Can someone please share how to do this? The closest I have found is
>> ClientBundle but I am not sure its the way to.
>>
>>
>> Thanks.
>>
>>
>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+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 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Probleme GWT 2.7, Gwtp 1.4 with tomcat

2015-07-19 Thread Ignacio Baca Moreno-Torres
Try adding gwt-servlet as a server dependency.

On Sunday, July 19, 2015 at 9:36:19 AM UTC+2, Sabri Hammami wrote:
>
> my project works with eclipse but did not works with tomcat after compilation 
> !!
>
> Thanks
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+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: [Request Factory]: 405 (HTTP method POST is not supported by this URL)

2015-07-13 Thread Ignacio Baca Moreno-Torres
You have various problems, your project layout is incorrectly 
(WEB-INF/web.xml must be placed inside src/main/webapp), servlet name typo 
(servlet and servlet-name has different names), client side request factory 
are not pointing to the correct place (requesting 
http://localhost:8080/pay-me-back/Example/Example.html but the servlet is 
exposed http://localhost:8080/pay-me-back/gwtRequest), etc...

Maybe you can use one of this sample projects as a starting point, and I 
think that is easier to start with maven instead of gradle:
https://github.com/tbroyer/gwt-maven-archetypes
https://github.com/branflake2267/Archetypes

On Monday, July 13, 2015 at 8:59:55 PM UTC+2, Roger Küng wrote:
>
> Good Day
>
> I am new to GWT and try to have the request factory server communication 
> working.
>
> I setup everything according to the documentation: 
>
> http://www.gwtproject.org/doc/latest/DevGuideRequestFactory.html
>
> But I receive the following error:
>
> POST http://localhost:9876/Example/gwtRequest 405 (HTTP method POST is 
>> not supported by this URL)
>>
>>
> I looked everywhere and just can't figure out what I am missing.
>
> I hosted the project on github:
>
> https://github.com/Aranir/gwt-factoryRequest
>
>
>
> I tried now for hours to resolve the issue, maybe it has is due to the way 
> I wrote my gradle file. I am relatively new to java development and the 
> building tools aren't familiar to me, so it might simply be that I didn't 
> handle correctly all the necessary dependencies in the gradle file.
>
>
> Any help would be appreciated.
>
>
>

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


Re: How to Remote Logging without using RPC?

2015-06-29 Thread Ignacio Baca Moreno-Torres
Remote logging example using request factory 
https://github.com/gwtproject/gwt/blob/master/samples/dynatablerf/src/main/java/com/google/gwt/sample/dynatablerf/client/DynaTableRf.java#L73

On Monday, June 29, 2015 at 9:27:59 PM UTC+2, Chak Lai wrote:
>
> In the GWT application that I am working on, it is setup to remote-logging 
> with any uncaught exceptions via SerializableThrowable >> RPC >> 
>  StackTraceDeobfuscator ...
>
> Is there any documentation on how to do it without using RPC? 
>
> I have search the Internet but is seems most of the documentation are 
> using RPC. 
>

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


Re: I18N- sharing Constants

2015-06-16 Thread Ignacio Baca Moreno-Torres
GWT will not create the CommonLabels_fr.properties, but if you create it, 
it will be used by LogingLabels_fr, isn't it? You can force 
ComonLabels_fr.java creation adding GWT.create(CommonLabels.class) in your 
code (not recommended). You can see why and how localizable resources are 
generated 
here 
https://github.com/gwtproject/gwt/blob/master/user/src/com/google/gwt/i18n/rebind/LocalizableGenerator.java.

Althought, you should see this 
http://dev.arcbees.com/gwtp/advancedfeatures/Merge-Locale.html.

On Tuesday, June 16, 2015 at 8:59:39 PM UTC+2, Tushar Bhasme wrote:
>
> Correction:
> I am getting the behavior I wanted for *LoginLabels.java* such that 
> *LoginLabels_fr 
> extends CommonLabels_fr* by default. It works as I intended.
> But I still don't know why it is not generating a *CommonLabels_fr.java*
>
> Thanks,
> Tushar
>
> On Wednesday, June 17, 2015 at 12:25:00 AM UTC+5:30, Tushar Bhasme wrote:
>>
>> In my app, I have created an interface 
>> CommonLabels extends Constants
>> As name suggests, it contains all the labels that can be user on any 
>> page. There are some pages that use this interface directly.
>> I have created other interfaces (eg LoginLabels) for each page that 
>> extend this interface adding their own labels.
>>
>> I now want to internationalize my app and created *_fr.properties file 
>> for each interface. I then found out that GWT does not create 
>> CommonLabels_fr.java but does create LoginLabels_fr.java. How do I make it 
>> work so that GWT generates a *CommonLabels_fr.java, *and 
>> *LoginLabels.java* such that *LoginLabels_fr extends CommonLabels_fr*
>>
>> Thanks,
>> Tushar
>>
>

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


Re: GWT 2.8.0 forEach, Consumer, Function, Streams and other Java 8 stuff

2015-06-15 Thread Ignacio Baca Moreno-Torres
IMO, stream API is totally replaceable (almost unnecessary), 80% of your
uses cases can be solved with lamdas + Guava FluentIterables, and for
advanced use cases libraries like RxJava (or whatever implements reactive
streams interfaces) or IxJava are much more advanced and easy to extends.
Not sure, but looks like stream API has an over complexity to improve
performance on parallel computing which is not very useful in javascript.

On Mon, Jun 15, 2015 at 4:45 PM Pablo Nussembaum  wrote:

>  Thomas is rigth, using lambdas is are really game changer for subscribing
> (you have 6 lines less on each one) to handlers and also you can use guava
> Optional class and functional idioms until idioms until we have fully java8
> streams.
>
> Be aware that current GWT-2.8.0-SNAPSHOT compiler doesn't support mixing
> inner-classes and lambdas.
>
>
> On 06/15/2015 11:01 AM, Thomas Broyer wrote:
>
>
>
> On Monday, June 15, 2015 at 3:49:10 PM UTC+2, Ivan Hetman wrote:
>>
>> Thanks, got it. But why don't release special GWT 2.8 version with source
>> level 1.8 only? Without improved collection API Java 8 benefits in GWT are
>> low.
>>
>
>  You can write lambdas and use defender methods in your own interfaces,
> that's not nothing.
> Re. a special Java-8-only version of gwt-user, one of the main issues
> which has still not been solved is that of dependency managers relying on
> Maven metadata (most dependency managers). Gradle is apparently working on
> it https://discuss.gradle.org/t/variant-aware-dependency-management/115,
> and I think Ivy has it for years, but it's not there yet (particularly for
> Maven users).
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at http://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at http://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: GWT 2.7.0 RequestFactory + Spring + JPA + Hibernate optimistic locking implementation

2015-06-09 Thread Ignacio Baca Moreno-Torres
IMO using attached entities in RF is dangerous because in hibernate any 
committed transaction will persist any previous change in the current 
context. So, if you are using per-request entityManager, whenever you call 
transaction.commit you will persist any modification sent from the client 
(which has been set to an attached entity). And, because all our entities 
were detached after the validation phase, we did use the default optimistic 
lock (no forceLocked). 

On Tuesday, June 9, 2015 at 9:34:19 PM UTC+2, Anton Mityagin wrote:
>
>
> Thanks for your comment
>
> On Tuesday, June 9, 2015 at 10:12:10 PM UTC+3, Ignacio Baca Moreno-Torres 
> wrote:
>>
>> We made a similar approach using the client/server version variables. But 
>> we call it version/expectedVersion.
>>
>> As explained in stackoverflow 
>> <http://www.google.com/url?q=http%3A%2F%2Fstackoverflow.com%2Fquestions%2F7696764%2Fdoes-gwt-requestfactory-support-implementation-of-optimistic-concurrency-control%2F7697307%237697307&sa=D&sntz=1&usg=AFQjCNEjQwYbtnsepzEPUD0X1zeqCT3jAg>
>>  RF 
>> only sent changes, this forces to have an always-null expectedVersion and 
>> manually copy the getVersion to setExpectedVersion to enable optimistic 
>> locking. BUT! it's critical that the entity be detached when you set the 
>> version (or you detach and merge) because if you set the version on an 
>> attached entity the version is not checked (at least in hibernate).
>>
>> Yes, I know about detached entity and setting version to it, in the end 
> of my post I pointed this thing, and I pointed how to set version to 
> attached entity (managed by hibernate).
>  
>
>> OTOH, RF only sent changes to the server so optimistic locking is not 
>> required most of the time. Just for curiosity, why you need optimistic 
>> locking?
>>
>
> Because there is a possibility conflict while saving data and users dont 
> want to lose their data or overrite someone else's data.
>
>>
>> Usually only some operation requires fully transactional/optimistic 
>> locking and in our experience, this operations are better handled using 
>> some kind of command pattern. I.e. sent how-to-update instead of 
>> what-to-set. We used the optimistic locking approach initially because we 
>> try to use RF/Entities/Proxies for everything, but now we use commands for 
>> this situations and versions are not required anymore. Moreover, RF has a 
>> problem when you try to repeat an operation (which is a good idea in 
>> optimistic locking), because if the server side fails in the operations 
>> phase (after validation phase) the client entity gets invalidated, and you 
>> can't sent the entity again.
>>
>> Yes, I know about this problem.
> I have workaround it.
> Now I test it and I you wish I'll post it here
>
> In short, I send to server clone of proxy and always create a new request 
> context which will be fired.
> 1. get immutable proxy A1 from DB
> 2. driver.display(A1)
> 3. user clicks save button
> 4. make a clone of A1 - A2
> 5. driver.edit(A2, requestContext)
> 6. driver.flush()
> 7. validate(A2) on client
> 8. requestContext.getRequest().save(A2).fire()
> 9. in case of exception or server validation failure driver.display(A1)
> 10. user may fix a problem and try save proxy again
>
>>
>>
>>
>>  
>>
>> On Monday, June 8, 2015 at 11:11:41 PM UTC+2, Anton Mityagin wrote:
>>>
>>>
>>> As all you know RequestFactory does not support optimistic locking.
>>>
>>> see details 
>>> https://code.google.com/p/google-web-toolkit/issues/detail?id=6046
>>>
>>> I tried to implement it для RequestFactory + Spring + JPA + Hibernate
>>>
>>> I took as a basis the idea proposed by Thomas (
>>> http://stackoverflow.com/questions/7696764/does-gwt-requestfactory-support-implementation-of-optimistic-concurrency-control/7697307#7697307
>>> ).
>>>
>>> As he wrote his idea - pure theory.
>>>
>>> @ProxyFor(MyEntity.class)
>>> interface MyEntityProxy extends EntityProxy {
>>>String getServerVersion();
>>>String getClientVersion();
>>>void setClientVersion(String clientVersion);
>>>…
>>> }
>>>
>>> @Entity
>>> class MyEntity {
>>>private String clientVersion;
>>>@Version private String serverVersion;
>>>
>>>public String getServerVersion() { return serverVersion; }
>>>public String getClientVersion() { return null; }
>>>public void setClientVersion(String clientVe

Re: GWT 2.7.0 RequestFactory + Spring + JPA + Hibernate optimistic locking implementation

2015-06-09 Thread Ignacio Baca Moreno-Torres
We made a similar approach using the client/server version variables. But 
we call it version/expectedVersion.
class MyEntity {
 @Version int version;
 public int getExpectedVersion() { return null; }
 public void setExpectedVersion(int v) { this.version = v; }
 public int getVersion() { return version; } 
  // public void setVersion() {} // not required/recomended
}
As explained in stackoverflow 

 RF 
only sent changes, this forces to have an always-null expectedVersion and 
manually copy the getVersion to setExpectedVersion to enable optimistic 
locking. BUT! it's critical that the entity be detached when you set the 
version (or you detach and merge) because if you set the version on an 
attached entity the version is not checked (at least in hibernate).

OTOH, RF only sent changes to the server so optimistic locking is not 
required most of the time. Just for curiosity, why you need optimistic 
locking?

Usually only some operation requires fully transactional/optimistic locking 
and in our experience, this operations are better handled using some kind 
of command pattern. I.e. sent how-to-update instead of what-to-set. We used 
the optimistic locking approach initially because we try to use 
RF/Entities/Proxies for everything, but now we use commands for this 
situations and versions are not required anymore. Moreover, RF has a 
problem when you try to repeat an operation (which is a good idea in 
optimistic locking), because if the server side fails in the operations 
phase (after validation phase) the client entity gets invalidated, and you 
can't sent the entity again.




 

On Monday, June 8, 2015 at 11:11:41 PM UTC+2, Anton Mityagin wrote:
>
>
> As all you know RequestFactory does not support optimistic locking.
>
> see details 
> https://code.google.com/p/google-web-toolkit/issues/detail?id=6046
>
> I tried to implement it для RequestFactory + Spring + JPA + Hibernate
>
> I took as a basis the idea proposed by Thomas (
> http://stackoverflow.com/questions/7696764/does-gwt-requestfactory-support-implementation-of-optimistic-concurrency-control/7697307#7697307
> ).
>
> As he wrote his idea - pure theory.
>
> @ProxyFor(MyEntity.class)
> interface MyEntityProxy extends EntityProxy {
>String getServerVersion();
>String getClientVersion();
>void setClientVersion(String clientVersion);
>…
> }
>
> @Entity
> class MyEntity {
>private String clientVersion;
>@Version private String serverVersion;
>
>public String getServerVersion() { return serverVersion; }
>public String getClientVersion() { return null; }
>public void setClientVersion(String clientVersion) {
>   this.clientVersion = clientVersion;
>}
>
>public void patchVersion() {
>   serverVersion = clientVersion;
>}
>
>public void shouldPatchVersion() {
>   return Objects.equal(serverVersion, clientVersion);
>}
> }
>
> On the server-side we need to use somthing like this to edit MyEntityProxy
>  
> public  P edit(P proxy, RequestContext request)
> {
>   P mutableProxy = request.edit(proxy);
>   
>   if (mutableProxy instanceof MyEntityProxy)
>   {
> MyEntityProxy myProxy = (MyEntityProxy)mutableProxy;
> myProxy.setClientVersion(myProxy.getServerVersion());
>   }
> }
>
> On the server-side we need to handle case when clientVersion not equals to 
> serverVersion.
>
> I think that if we use EntityManager, we do not have to manually throw an 
> exception when the versions are not equal.
> It has to do EntityManager when it tries to save domain object in the 
> database. Otherwise a situation may arise when 
> an object has been checked, but has not been saved to the database, and 
> someone else has save the same object.
>
> I think a good place to make check and patch server version right before 
> validating the domain object.
> ServiceLayerDecorator
> public  Set> validate(T domainObject)
>
> Unfortunately, not enough simply call MyEntity.patchVersion()
> JPA provider uses internal structures to keep current version of maanged 
> object.
> And value of serverVersion does not actually play any role.
>
> We need to use specific JPA provider's API to change a version of managed 
> object.
>
> In my case it's Hibernate:
>
> @Override
> public  Set> validate(T domainObject)
> {
>   
>   if (domainObject != null && domainObject instanceof HasVersion)
>   {
> MyEntity version = (MyEntity)domainObject;
> 
> if (!version.*shouldPatchVersion*())
> {
>   ApplicationContext context = 
> ApplicationContextHolderLocator.getHolder().getApplicationContext();
>   EntityManager entityManager = context.getBean(EntityManager.class);
>   
>   if (entityManager.getDelegate() instanceof SessionImplementor)
>   {
>  

Re: RegExp on TextResource

2015-06-03 Thread Ignacio Baca Moreno-Torres
Not sure whats your problem, maybe 'multiline text' is causing the regex to 
fail.

Alternatively, you can use GQuery and work with the nodes instead of 
strings. Something like (html must start with '<')...
Gquery root = $(html);
// to read...
String pInnerHtml = root.filter(true,"#pid").html();
// to write...
root.filter(true,"#pid").html("updated content");
// finally, append to the dom
root.appendTo(somePlace);



On Saturday, May 30, 2015 at 12:04:39 PM UTC+2, Alireza Rezaei Mahdiraji 
wrote:
>
>
> Hi All, 
>
> I am trying to apply a regular expression on a TextResource (which is an 
> html file),
>
> but it does not work. I can see the content of the resource as strign. If 
> I provide the content of the file directly to RegExp it works. 
>
> String html = ReadHtmlResources.INSTANCE.
> getDocumentationHtml().getText();
>
> RegExp regExp = RegExp.compile("(.*?)");
>
> MatchResult matcher = regExp.exec(html);
>
> boolean matchFound = matcher != null; // returns false
>
>
> Any idea why this does not work? 
>
> Cheers,
> Alireza
>

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


Re: update checkbox after asking the server

2015-04-20 Thread Ignacio Baca Moreno-Torres
Looks like the viewData is caching the result so redraw end up drawing the 
same state. You need to call checkboxCell.clearViewData(proxy) if the user 
cancel the update or alternatively you can extends CheckboxCell to not use 
viewData. Not sure wich one is worst :).

My example 
here: 
https://github.com/ibaca/gwt-editable-tables/blob/master/src/main/java/editabletables/celltable/EditableCellTable.java
But the showcase example is more aggressive and always redraw the 
table: 
https://github.com/epuidokas/gwt-2.4/blob/master/user/javadoc/com/google/gwt/examples/cellview/CellTableFieldUpdaterExampleComplex.java

On Monday, April 20, 2015 at 4:45:01 PM UTC+2, andymel wrote:
>
> Let me simplify my question.
>
> How can I update the rows that have changed? When I delete a complete 
> entry/row 
> table.setVisibleRangeAndClearData(table.getVisibleRange(), true);
> works perfectly fine. But if the entries are not changed the checkbox is 
> not changed back by that line of code. When I reload the page (pressing F5) 
> all data is right again.
>
>1. I have some rows/entries with a checkbox/boolean
>2. I click it
>3. A dialog opens asking me "really?"
>4. I say "no"
>5. The checkbox should be unchecked again
>
> Any advice?
> Best regards!
>

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


  1   2   >