Re: [ANN] net.ltgt.gwt.maven:gwt-maven-plugin:1.0-alpha-1 released

2013-03-25 Thread Hilco Wijbenga
On 25 March 2013 02:22, Thomas Broyer  wrote:
> Preliminary documentation is available at
> https://github.com/tbroyer/gwt-maven-plugin

Is it possible to combine multiple "gwt-lib"s into a "gwt-app" without
re-gwt-compiling everything? Because that would be awesome. :-)

> Note that this is an early alpha:
 >  • There's no way to launch the DevMode or SuperDevMode. I want something
> that works in multi-module builds, contrary to the
> org.codehaus.mojo:gwt-maven-plugin.

What exactly doesn't work when running gwt-maven-plugin in
multi-module builds? We've been doing that for at least a year and I
have never noticed a problem?

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: PopupPanel.center() not centering content?

2013-03-22 Thread Hilco Wijbenga
On 22 March 2013 12:41, Ed Bras  wrote:
> Can somebody please test the above centering of the popup ?
> Let's confirm that it's not only me such that I can report it as a bug.

I haven't tried your exact use case but I can confirm that centering
does not always work. Sometimes you have to use a deferred command.

> Any ideas for workarounds? (some action to trigger the correct dimensions)

Other then using a deferred command, no. One would think that first
showing the popup (forcing its dimensions to become known) before
calling center() would fix it but that does not seem to be the case.
At least not when I tried it. :-)

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: I need link

2013-03-05 Thread Hilco Wijbenga
On 5 March 2013 08:03, Crease  wrote:
> I´m developing an application and I want to do one link that when the user
> push over him then the browser open a new page in other tab, for example
> www.google.es but I don´t know do it, I don´t know what widget take

You are probably looking for target="_blank". See
http://www.w3schools.com/html/html_links.asp.

You can't guarantee that it's going to be a new tab, though, it could
be a new window.

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: How to invoke Java String methods from JSNI code

2013-02-15 Thread Hilco Wijbenga
On 15 February 2013 05:48, alucard  wrote:
> Yes, but that was not the question. I'd like to be able to invoke methods
> from the Java String implementation. The code above is meant just as an
> example for the error I get.

The format object.@Class::method(param;)(arg) you are using seems fine
(I use it in multiple places). Are you sure the error is not in the
call to your "test" method? Has it been properly exported?

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Running a Maven/GWT project

2012-11-12 Thread Hilco Wijbenga
On 12 November 2012 10:13, Magnus  wrote:
> Ok, I renamed the *.pom file into "pom.xml" and ran "mvn" without arguments.
> It downloaded about 1 million jar files, and ended up with this message:
>
> [INFO]
> 
> [INFO] BUILD FAILURE
> [INFO]
> 
> [INFO] Total time: 4:05.227s
> [INFO] Finished at: Mon Nov 12 19:07:36 CET 2012
> [INFO] Final Memory: 10M/217M
> [INFO]
> 
> [ERROR] Failed to execute goal
> org.codehaus.mojo:gwt-maven-plugin:2.4.0:compile (default) on project
> atmosphere-gwt-chat: GWT Module org.atmosphere.samples.GWTDemo not found in
> project sources or resources. -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please
> read the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
>
> What to do next?
>
> (Remember, I just downloaded the pom file from the source above, nothing
> more.)

No doubt you'll need the source code as well. I have to admit the way
they've set things up is rather confusing. It would probably be much
easier if you simply cloned the entire project
(https://github.com/Atmosphere/atmosphere).

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: rename-to module attribute and DevMode

2012-09-24 Thread Hilco Wijbenga
On 24 September 2012 12:59, Joseph Lust  wrote:
> We've been working with rename-to so that our apps (many submodules) don't
> all have ugly, huge urls with the full package name in them. This is working
> well, however when we switch to DevMode, it won't run. DevMode appears
> highly dependent on guessing the location of the X.gwt.xml file based on the
> URL.

We have a very similar setup. We have never had any problems with
running in DevMode, though. Just run "mvn gwt:run". :-)

> There was a gwt bug reported 3 years ago, which has not response to recent
> pleas, so I've had to just remove the rename-to attribute while debugging,
> which seems silly.

Does that mean that you are trying to start DevMode from inside
Eclipse? We never do that so that might be the difference. It would at
least give you a place to start investigating.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT Compilation Time Performance Improvement

2012-09-04 Thread Hilco Wijbenga
On 3 September 2012 23:10, Niraj Salot  wrote:
> 1) Will this help us in Improving the compilation time?

No.

> 2) IF we change only Module 2 and then compile Module Main, will GWT still
> compile Module 1 as it is inherited by Module Main?

Yes.

> Please share your views on above scenario. We have even tried out GWT 2.5
> option but no help in performance improvements.

You might want to check out code splitting (see [1]). I haven't tried
it but it *might* be possible to break up your app into separately
compiled modules.

What we really need is a linker that takes precompiled modules (each
stored in, say, a JAR) and combines them into an application. I know
this has been discussed but I am not aware of anyone actually working
on it. Unless code splitting already allows for all this...

[1] https://developers.google.com/web-toolkit/doc/latest/DevGuideCodeSplitting

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: building a GWT project with fails due to dependency on GWT 2.4.0 (at least 2.5.0-rc1 required)

2012-08-31 Thread Hilco Wijbenga
On 31 August 2012 12:25, koma  wrote:
> adding this :
>
> 
> gwt-maven-plugin
> 2.4.0
> 
>
> to the plugin section, does not help.

Add the groupId?

> Still seeing this :
>
> [INFO] --- gwt-maven-plugin:2.5.0-rc1:compile (default) @ chosen-sample ---

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: building a GWT project with fails due to dependency on GWT 2.4.0 (at least 2.5.0-rc1 required)

2012-08-31 Thread Hilco Wijbenga
On 31 August 2012 12:13, koma  wrote:
> I can see I have two mvn plugins in my .m2 repo :
>
> ./org/codehaus/mojo/gwt-maven-plugin/2.4.0
>  and
> ./org/codehaus/mojo/gwt-maven-plugin/2.5.0-rc1
>
> How do I tell maven from taken the correct one ?

The plugin version for the GWT Maven plugin isn't properly locked down
in the POM. In fact, nothing has been locked down. Without locking
down versions these are the problems you get.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Using System.getProperty(User.Name) in GWT

2012-04-17 Thread Hilco Wijbenga
On 17 April 2012 09:40, Saty  wrote:
> Thanks for your feedback!
>
> I am trying to get the logged in windows user id on the client side.I
> want to get the user name of the user that initiated the request from
> the browser. This is the code that I tried to use in onModuleLoad
> method:
>
> String str = System.getProperty("user.name");
>
> I was getting the error that such method is not defined.
>
> Based on my search on the web, GWT client does not support this
> method. Even, I tried to do JRE emulation based on the link:
>
> http://javaasylum.blogspot.com/2011/02/emulate-non-supported-class-in-gwt.html.
>
> GWT still complains. Probably, GWT has already implemented a version
> of java.lang.System class.
>
> There were some posts on using windows active x control to get he user
> name. I tried JSNI to implement the following code,even though it can
> work only on IE (not an ideal solution).
>
> var WinNetwork = new  ActiveXObject("WScript.Network");
>
> I got the error that GWT could not instantiate the active X object.
>
> Please let me know if you have any other info. I am sure some one
> might have figured the solution! This should be a typical use case.

I'd call this highly *atypical* actually. Why do you need the user's
MS Windows user id?!? Do you even know all your users will be using
that particular OS? What are you going to do with all the users logged
in as Administrator?

If you need them to log in then have them create an account in your
application. *That* would be typical. :-)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Using System.getProperty(User.Name) in GWT

2012-04-16 Thread Hilco Wijbenga
On 5 April 2012 07:33, Saty  wrote:
> I would like to use System.getProperty(User.Name) in GWT. The server
> will be running on iSeries platform. I am looking for ways to do this
> without introducing new framework .

If you mean on the server then it has nothing to do with GWT, just run
System.getProperty. Otherwise, create some sort of callable API (ReST,
RPC, ...) and get the data to the client that way.

In order to receive better answers, ask better questions. Be specific,
tell us what you tried and why/how it failed.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How to make label auto click

2012-04-03 Thread Hilco Wijbenga
On 3 April 2012 12:38, Boris_siroB  wrote:
>> GWT doesn't really support programmatically creating browser events.
>
> Not quite true. See this SO post.

I wrote "doesn't really", not "doesn't". :-) Still, all this mucking
about in the DOM is very hard to (unit) test. In most cases, creating
these events yourself is an anti-pattern. So possible but not
advisable (in general).

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How to make label auto click

2012-04-03 Thread Hilco Wijbenga
On 3 April 2012 10:57, Deepak Singh  wrote:
> I have wrapped a div into Label. Added clickhandler to label.

Why? If you want to use a container, then I would suggest SimplePanel
or FlowPanel. I would keep Labels for displaying simple text.

> Now i want that at some point of time, this label should be autoclicked but
> we dont have anything like click() method for label as we have for
> button.click().

Why not simply call the corresponding onClick (or what ever you called
it) method directly? GWT doesn't really support programmatically
creating browser events.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Maven compilatiion error

2012-03-29 Thread Hilco Wijbenga
On 22 March 2012 16:36, developer  wrote:
> [INFO]             [ERROR] Unable to find type
> 'com.mycompany.web.dmt.gwt.client.DmtGwt'

It seems you are missing a JAR (pom.xml) and/or a GWT module (*.gwt.xml).

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Compiling GWT Trunk w/ Tests : Can't get past 50K tests passed

2012-03-16 Thread Hilco Wijbenga
On 16 March 2012 22:07, Joseph Lust  wrote:
> For my personal edification I've setup TeamCity to build all new GWT updates
> from the Google SVN (yes, I checkout the tools folder too). Everything
> builds fine (7min), but when I enable the tests in Ant, per the official GWT
> build instructions, TC dies at 2h 15m to OutOfMemory errors.
>
> I've setup TC to run the JVM with 512MB PermGen and 4GB max heap, but it
> still only makes it to ~50,600 tests passed until it fails out. It dies
> around this point whether running 2GB, 3GB, or 4GB heap sizes (I had gotten
> PermGen errors earlier, but 512MB seems to have fixed that).
>
> So, my question is, does anyone else try building GWT with the tests? It
> seems like a rather obscene number of tests, but surely it works inside
> Google. And if you wonder why I am doing this, it is just to poke around and
> learn more about GWT, unit testings, and best dev practices in general.
>
> Build Machine Specs: Ubuntu 11.10, AMD FX8150 (unit tests utilize all
> cores), 16GB Ram, SSD.

I tried the same thing (at least a year ago, though) and ran into the
exact same problems. And also wondered whether anyone had ever run
them all. :-)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Differences between Dev Mode and Production Mode

2012-03-12 Thread Hilco Wijbenga
On 12 March 2012 09:49, Cristian Rinaldi  wrote:
> I have two modules, each with your EntryPoint.
> Each EntryPoint initializes a part of the UI based on the IDs of element in
> the HostPage.
>
> Host Page:
> 
> 
>   
>     
>     
>     Web Application Starter Project
>      src="pp/pp.nocache.js">
>      src="core/core.nocache.js">
>   
>   
>     Web Application Starter Project
>     
>     
>   
> 
>
> Module PP
> 
> 
>   
>   
>   
>   
>   
> 
>
> EntryPoint of Module PP
> public class PP implements EntryPoint {
> public void onModuleLoad() {
> RootPanel.get("modulo1").add(new Label("Modulo 1 Load!"));
> }
> }
>
> Modulo Core
> 
>  "http://google-web-toolkit.googlecode.com/svn/tags/2.4.0/distro-source/core/src/gwt-module.dtd";>
> 
> 
> 
> 
> 
>
> EntryPoint of Core
> public class Core implements EntryPoint {
> @Override
> public void onModuleLoad() {
> RootPanel.get("modulo2").add(new Label("Modulo 2 Load!"));
> }
> }
>
> In Development Mode the code throws errors:
> com.google.gwt.core.client.JavaScriptException: (TypeError): Object [object
> HTMLDivElement] has no method 'createElement'
>     at
> com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:248)
>     at
> com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
>     at
> com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
>     at
> com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
>     at
> com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
>     at com.google.gwt.dom.client.DOMImpl.createElement(DOMImpl.java)
>     at
> com.google.gwt.dom.client.Document$.createDivElement$(Document.java:290)
>     at com.google.gwt.user.client.ui.LabelBase.(LabelBase.java:52)
>     at com.google.gwt.user.client.ui.Label.(Label.java:141)
>     at com.google.gwt.user.client.ui.Label.(Label.java:151)
>     at com.logikas.pp.client.PP.onModuleLoad(PP.java:13)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:597)
>     at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:396)
>     at
> com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
>     at
> com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:525)
>     at
> com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
>     at java.lang.Thread.run(Thread.java:662)
>
> In Production Mode there are no errors.

When I see strange behaviour like that I run a full clean build and
that has always fixed such problems.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How to make Label as

2012-02-28 Thread Hilco Wijbenga
On 28 February 2012 10:56, Deepak Singh  wrote:
> Label la = new label("");
>
> The above line when converted to java script generates into . What i
> want is it should be converted in .
> How can i achieve it ?

Use InlineLabel or simply add "display:inline".

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: why hasn't GWT an interface for Node or Element?

2012-02-22 Thread Hilco Wijbenga
On 22 February 2012 04:34, salk31  wrote:
> Do you mean something like:
> http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/user/client/DOM.html
> http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/user/client/Element.html
> ?

The OP asked for *interfaces* not classes.

Unfortunately, a lot of the GWT code base is either native, static, or
in an abstract class. This really hinders easy unit testing.
Interfaces would help alleviate (some of) the pain. Luckily, more and
more interfaces are appearing so hopefully after a few more releases
we'll have something that is easier to test.

Until then, you have to write your own. Usually, it's not hard; it
just should not be necessary.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: get IP address

2012-02-06 Thread Hilco Wijbenga
On 6 February 2012 14:25, IHateSoda  wrote:
> I'm trying to get my IP address (192.168..) but I always get the
> localhost IP (127.0.0.1).

You are presumably running your appserver (Tomcat, Jetty, ...)  as
localhost. If you want the servlet to return something else then do
not run as localhost.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Problemas con GWTP

2012-01-20 Thread Hilco Wijbenga
On 20 January 2012 11:42, Samuel Tasna  wrote:
> *
>
> The problem I have is with the persistence, before developing
> a small application starts using Netbeans, GWT 2.1, 0.5 gwtp all, hibernate,
> as the tool develops andofficial IDE is eclipse wanted to migrate the code
> to eclipse, there is now GWT2.4but this persistent problem,
> no connection to the db, setting, copying sample codenow makes the
> connection to hang appeared the WARN db and send it.
> Now the problem is that data are not displayed any error does not come
> out and thought it was for the WARN. 19/01/2012 but yesterday I discovered
> that if you make the connection but no where is the error, plus I can
> not migrate a portion of code above q is the menu bar on the main
> screen gives me an error that is:
> Error loading menu:
>
> (as history was developing an architecture for developing application (XXX)
> that is to create a generic class, etc ...)
> I would appreciate if I can help
>
> 14:32:28.546 [ERROR] [com.wipay.esafw] Uncaught exception escaped
> com.google.gwt.event.shared.UmbrellaException: One or more exceptions
> caught, see full set in UmbrellaException#getCauses
>     at
> com.google.gwt.event.shared.EventBus.castFireEventFromSource(EventBus.java:77)
>     at
> com.google.gwt.event.shared.SimpleEventBus.fireEventFromSource(SimpleEventBus.java:67)
>     at
> com.gwtplatform.mvp.client.PresenterWidget.fireEvent(PresenterWidget.java:254)
>     at
> com.gwtplatform.mvp.client.proxy.RevealRootContentEvent.fire(RevealRootContentEvent.java:51)
>     at
> com.wipay.esafw.client.presenter.esafwapp.EsafwAppP.revealInParent(EsafwAppP.java:85)

This is your first clue (it also appears in the second stack trace).

>     at com.gwtplatform.mvp.client.Presenter.forceReveal(Presenter.java:189)
>     at
> com.gwtplatform.mvp.client.proxy.ProxyPlaceAbstract.manualReveal(ProxyPlaceAbstract.java:227)
>     at
> com.gwtplatform.mvp.client.proxy.ProxyPlaceAbstract$3$1.execute(ProxyPlaceAbstract.java:213)
>     at
> com.google.gwt.core.client.impl.SchedulerImpl$Task$.executeScheduled$(SchedulerImpl.java:50)
>     at
> com.google.gwt.core.client.impl.SchedulerImpl.runScheduledTasks(SchedulerImpl.java:228)
>     at
> com.google.gwt.core.client.impl.SchedulerImpl.flushPostEventPumpCommands(SchedulerImpl.java:388)
>     at
> com.google.gwt.core.client.impl.SchedulerImpl$Flusher.execute(SchedulerImpl.java:78)
>     at
> com.google.gwt.core.client.impl.SchedulerImpl.execute(SchedulerImpl.java:138)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>     at java.lang.reflect.Method.invoke(Unknown Source)
>     at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
>     at
> com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
>     at
> com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
>     at
> com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:337)
>     at
> com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:218)
>     at
> com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
>     at
> com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
>     at
> com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
>     at
> com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
>     at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
>     at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:213)
>     at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>     at java.lang.reflect.Method.invoke(Unknown Source)
>     at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
>     at
> com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
>     at
> com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
>     at
> com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:292)
>     at
> com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:546)
>     at
> com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
>     at java.lang.Thread.run(Unknown Source)
> Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError):
> Cannot read property 'length' of undefined

This is your second clue.

>     at
> com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:248)
>     at
> com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
>     at
> com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
>     at
> com.google.gwt.dev.shel

Re: how to add external module WITHOUT Eclipse

2012-01-19 Thread Hilco Wijbenga
On 19 January 2012 19:22, Paul Shannon  wrote:
> You were right, Hilco:  I misspelled the module name.  Fixing that got
> me a bit further, but alas, linking problems continue.

Just for the record, it really is quite simple. Add the JAR (+
sources) to your classpath and add an inherits line. It really isn't
hard. Maybe the SVG library has it's own dependencies?

> All of which reminds me that, when in Rome, one should do as the
> Romans do.  Eclipse, here I come.

If you're using some sort of SCM, you should be able to check the
changes Eclipse makes. (I mean you should be able to create a diff
between the before and after.) That ought to tell you what you want to
know. I bet it's something small: a typo or editing the wrong file. Or
missing dependencies.

> Thanks for your kind assistance!

You're welcome. Good luck.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: how to add external module WITHOUT Eclipse

2012-01-19 Thread Hilco Wijbenga
On 19 January 2012 15:35, Paul Shannon  wrote:
> Thanks, Hilco, for offering to help out.
>
> (It may be that, working in true-beginner learning mode as I am, that
> using Lukas Laag's gwt-svg library as my test case, as the external
> module I wish to include in my simple gwt app,  is more complicating
> than need be.  If there is some classic gwt add-on, 3rd party external
> module that would be a better -- simpler -- test case, please suggest
> it).
>
> In svgApp/src/examples, where client/ server/ and shared/ directories
> are found, I have svgApp.gwt.xml which includes this line:
>
>  
>  

My first guess is that you've got the name wrong. I think it's
"org.vectomatic.libgwtsvg".

> I put the gwt-svg jar in svgApp/war/WEB-INF/lib, which has this
> listing:
>
> gwt-servlet-deps.jar
> gwt-servlet.jar
> lib-gwt-svg-0.5.4.jar
>
> # which has these contents:
> # jar tvf lib-gwt-svg-0.5.4.jar | grep gwt.xml
> #   2141 Wed Nov 02 18:54:46 PDT 2011 org/vectomatic/libgwtsvg.gwt.xml
>
> And the error message is:
>
> 00:00:00.032  [TRACE] Loading inherited module
> 'org.vectomatic.dom.svg'
>  00:00:00.032  [ERROR] Unable to find 'org/vectomatic/dom/
> svg.gwt.xml' on your classpath; could be a typo,
>                        or maybe you forgot to include a classpath
> entry for source?
>
> Is  war/WEB-INF/lib the wrong place for me to put the client-side
> external module jar?

Not sure, I don't use the strange and unconventional setup that the
GWT docs seem to advocate. I use Maven and the gwt-maven-plugin. But
it's a lib directory so it may very well be the right one. Check the
docs, I'm sure this is documented.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: how to add external module WITHOUT Eclipse

2012-01-19 Thread Hilco Wijbenga
On 19 January 2012 13:37, Paul Shannon  wrote:
> I prefer not to do my GWT programming in Eclipse, nor in any IDE, even
> though that seems to be what most people use.

Only the script kiddies. ;-)

>  I looked far and wide for instruction on how to add an external
> module (like gwt-svg) to a GWT project, tried lots of variations on
> adding "inherits" to myProj.gwt.xml, looking for place to specify
> classpath, adding the external jar at various places in the project
> directory structure -- but always not quite succeeding.
>
> Doing this in Eclipse is well-documented, easily achieved.

I have no idea how to do this in Eclipse but I don't see why a more
manual/CLI approach would be any different.

> If I must persist :} in my command-line approach to GWT, can anyone
> explain to me what I am missing?  What exactly are all the steps
> needed to add an external project?

Add the necessary dependency to your POM (or dump it in your lib
directory if you're not using Maven) [don't forget the sources JAR!]
and add an inherits line to your *.gwt.xml. That's it.

You seem to be doing this already, so it might help if you gave
specific error messages.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Problemas con GWTP

2012-01-19 Thread Hilco Wijbenga
On 19 January 2012 07:44, wipay  wrote:
> hola amigos
> tengo problemas con gwt 2.4 me sale el siguiente error
>
> 19/01/2012 10:37:05 AM com.google.inject.servlet.GuiceFilter
> setPipeline
> ADVERTENCIA: Multiple Servlet injectors detected. This is a warning
> indicating that you have more than one GuiceFilter running in your web
> application. If this is deliberate, you may safely ignore this
> message. If this is NOT deliberate however, your application may not
> work as expected.
> [WARN] Server class 'javax.validation.Validation' could not be found
> in the web app, but was found on the system classpath
>   [WARN] Adding classpath entry 'file:/C:/Java/eclipse/plugins/
> com.google.gwt.eclipse.sdkbundle_2.4.0.v201112160242-rel-r37/gwt-2.4.0/
> validation-api-1.0.0.GA.jar' to the web app classpath for this session
>   For additional info see: file:/C:/Java/eclipse/plugins/
> com.google.gwt.eclipse.sdkbundle_2.4.0.v201112160242-rel-r37/gwt-2.4.0/
> doc/helpInfo/webAppClassPath.html

Firstly, they're not errors, they're warnings. So unless you actually
see a problem later on, you may ignore them.

If you don't want to ignore them (and it makes sense that you
shouldn't) then fix them. They are all accompanied by a reasonable
description, aren't they?

What exactly are you having trouble with?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: RequestFactory: How to retrieve an EntityProxy within another EntityProxy?

2011-12-12 Thread Hilco Wijbenga
On 12 December 2011 10:39, Alexander Orlov  wrote:
> I've got sth. like:
>
> @ProxyFor(value = Report.class, locator = CommonLocator.class)
> public interface ReportProxy extends EntityProxy {
>     // ...
>     Integer getUserId(); // works
>
>     void setUserId(Integer userId);
>
>     UserProxy getUser(); // doesn't work
>
>     void setUser(UserProxy user);
> }
>
> @Service(value = ReportDAOService.class, locator = DAOServiceLocator.class)
> public interface ReportRequest extends RequestContext {
>    // ...
>     Request> getReports(Integer sessionId);
> }
>
>
> Calling getReports(sessionId) retrieves the reports where getUserId()
>  returns the proper userId whereby getUser() returns null. On the server
> side calling getUser() on result.get(0)  returns the proper entity/object
> value as well.
>
> Any idea, how I can get getUser()'s UserProxy representation?

By default, you only get a partial proxy. See [1] and also getPaths()
of the Editor framework.

[1] 
http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.html#relationships

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: gwt uibinder in an abstract parent class

2011-12-08 Thread Hilco Wijbenga
On 8 December 2011 02:18, Ed  wrote:
> Even do you you might create the above lazily and only when needed, I would
> still never put an initWidget() method in my constructor: the constructor
> should be light weight (general sun rule), and you make the code
> unit-testable if you don't put this method in the constructor.
> I use my own SimpleComposite base class that extends from Composite that
> will automatically create the widget subclass when needed -> real lazy
> loading (I think the  SimpleComposite class appears in the issue tracker).

It would be great if I didn't have to put initWidget() in the
constructor (so that, like you say, unit tests become much easier) but
how would that work then? I suppose you have some sort of init()
method? How does that get called then?

Moreover, in Composite it says "All composites must call initWidget()
in their constructors.". You have encountered no difficulties not
having initWidget() in the constructor?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Error :No source available ..

2011-11-16 Thread Hilco Wijbenga
On 16 November 2011 08:58, learning coding  wrote:
> Hi i have added some external jar file in  web application
> When i compile it its show me eror related to all the jar file which i
> am using in application
>        error Line 12: No source code is available for type ...;
> did you forget to inherit a required module?
>
> how to rectify it.?

Did you try including the source?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Is there a way to include arbitrary .java files into my gwt module?

2011-11-14 Thread Hilco Wijbenga
On 14 November 2011 17:50, Stephen Buergler  wrote:
> I want to use java files in the libraries that I am using with my gwt
> module. Is there a way to include them without copying them into an emul
> directory and using ? How does gwt-user.jar get included? I am
> using Eclipse.

I have not needed this so far, so no guarantees, but ... did you try
just including the supporting code on the classpath? You'll need to
include the source code as well. I'm guessing you'll probably need to
create a separate GWT module for such code but that would be easy
enough, I suppose.

If the code you want to include uses features that are not available
in GWT (such as Thread or ClassLoader) then, of course, things become
much harder (if not impossible). That's where super-source *might* be
helpful. But at that point you're probably better off trying a
different approach altogether.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: EntityProxy & equals

2011-11-14 Thread Hilco Wijbenga
On 14 November 2011 12:49, Robert Quinn  wrote:
> I also have collections of EntityProxys, but I make the lifetime of
> the collection the same as the lifetime of the RequestContext.
>
> So after I do a CRUD operation, I refresh my collections in the new
> RequestContext, and therefore don't have any inter-RequestContext
> problems.

That just doesn't seem feasible, I'm afraid.

Basically what I do is the following:
1) request a list of proxies from the database (List, "list");
2) unrelated, at a later time in another place, new RequestContext for "entity";
3) add one proxy ("proxy") from "list" to a Set ("set");
(this "set" is part of "entity")
4) RequestContext.fire();
5) onSuccess();
6) unrelated, at a later time in another place, check that
entity.set.contains(proxy).

Is this really such a strange scenario?

Why would EntityProxyCategory.equals() include requestContext()? What
would be the impact of removing that particular check?

How do I get an EntityProxy to have a NULL RequestContext?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: EntityProxy & equals

2011-11-14 Thread Hilco Wijbenga
On 14 November 2011 08:47, Hilco Wijbenga  wrote:
> On 14 November 2011 06:33, Robert Quinn  wrote:
>> Equality works as Thomas mentioned, so one basic question leaps to
>> mind: Why are you comparing EntityProxys from different contexts or
>> with different stableIds?  Maybe there is a more centralized way you
>> could manage those EntityProxys so that you are not dispersing them in
>> various states/contexts across your app.
>
> Firstly, I should have been more concerned about hashCode when working
> with Sets but hashCode and equals go hand in hand and hashCode is part
> of EntityProxyCategory as well.
>
> The EntityProxy-s might be from different contexts but they are not
> editable and all fields (including stableId) are the same. I checked
> this. They all come from the database, through RF, so I have no
> control over how many instances are created, AFAICT.
>
> But I'm really confused now. I can see that equals/hashCode do what I
> need them to do (i.e. compare stableId) but it's not working. Very
> strange.

Okay, so Robert was spot on. The problem is with RequestContexts. The
set has a RequestContext (although I'm not sure why, AFAICT its
onSuccess method has already run) and the proxy does not (i.e.
BaseProxyCategory.requestContext(proxy) returns NULL).

I'm sure there is a good reason for the RequestContext check in
EntityProxyCategory.equals() but it seems more like a bug than a
feature to me. Because of this extra check sets and maps no longer
work as one would expect them to.

How do I remove an EntityProxy from its RequestContext? There doesn't
seem to be a close() method or similar on RequestContext. When is the
RequestContext set to NULL? How do I get sets/maps to work again?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: EntityProxy & equals

2011-11-14 Thread Hilco Wijbenga
On 14 November 2011 06:33, Robert Quinn  wrote:
> Equality works as Thomas mentioned, so one basic question leaps to
> mind: Why are you comparing EntityProxys from different contexts or
> with different stableIds?  Maybe there is a more centralized way you
> could manage those EntityProxys so that you are not dispersing them in
> various states/contexts across your app.

Firstly, I should have been more concerned about hashCode when working
with Sets but hashCode and equals go hand in hand and hashCode is part
of EntityProxyCategory as well.

The EntityProxy-s might be from different contexts but they are not
editable and all fields (including stableId) are the same. I checked
this. They all come from the database, through RF, so I have no
control over how many instances are created, AFAICT.

But I'm really confused now. I can see that equals/hashCode do what I
need them to do (i.e. compare stableId) but it's not working. Very
strange.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



EntityProxy & equals

2011-11-13 Thread Hilco Wijbenga
Hi all,

I was trying to check the presence of an EntityProxy in a
Set [i.e. set.contains(proxy)]. This returned false even
though the proxy was an element of the set. As it turns out
EntityProxy.equals() doesn't work, or, more precisly, it seems to
behave as the default equals() and check reference equality instead of
value equality.

So how do I get a working value checking equals? Without it,
Set is just about useless. I didn't see anything relevant
in [1] and Google was no help either. (I did find a similar question
but it went unanswered.)

Cheers,
Hilco

[1] http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.html

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How to determine *at runtime* which permutation is used?

2011-11-09 Thread Hilco Wijbenga
On 9 November 2011 17:37, Danny Kirchmeier  wrote:
> You can use GWT.getPermutationStrongName()

Thank you.

Unfortunately, this gives me: F0A79CA92B424357F8F0A6170AD004B9. Is
there a way to turn this into something readable?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



How to determine *at runtime* which permutation is used?

2011-11-09 Thread Hilco Wijbenga
Hi all,

It would be helpful to see which permutation is being downloaded by
the browser. Is there a way to determine *at runtime* which
permutation (or at least which browser permutation) is being used?

It would be fine if extra work is needed during the build to generate
this information. Perhaps there is some sort of trigger/event at the
start of each permutation's compilation? Any ideas?

Cheers,
Hilco

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Maven compilation error

2011-11-04 Thread Hilco Wijbenga
On 4 November 2011 06:29, Anton Grinenko  wrote:
> I use gwt 2.4 and maven 3.0.1 with  gwt-maven-plugin 2.4.0 in my
> application. During compilation I got an error:
> 
> The most strange thing that this error occurs not always. Sometimes
> maven build my project successfully. And sometimes I got this error.
> Can someone help me to solve this error?

Does the same happen when you compile outside of Eclipse?

You should upgrade Maven to the latest. Did it work with the previous
gwt-maven-plugin?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How to change GWT.xml with maven profile by a GWT project

2011-11-02 Thread Hilco Wijbenga
On 2 November 2011 12:15, Gary S  wrote:
> It's not clear. gwt-maven-plugin user's guide
> http://mojo.codehaus.org/gwt-maven-plugin/user-guide/project.html
> has a screenshot eclipse package explorer of gwt.xml in src/main/
> resources then under Multi-project setup a text diagram with gwt.xml
> in src/main/java

Yes, this is the setup you should follow. If you use Maven you
can/should ignore the weird setup that GWT recommends (mixing source
and compiled output and including JARs in SCM).

> Then 
> http://code.google.com/webtoolkit/doc/latest/DevGuideOrganizingProjects.html
> shows
> 
>  
>  
>  
> 
>
> Why inherit its own name?

Probably a typo, I suspect it should be inheriting from WorkingModule.

> I could build in Eclipse but Hudson couldn't find my module. What
> finally worked was adding a module property like this
>                        
>                         
>                                org.codehaus.mojo
>                                gwt-maven-plugin
>                                ${gwt-maven-plugin.version}
>                                
>                                  xxx.xxx.xxx.xxxClient
>                                        
> xxx.xxx.xxx/xxxclient.html
>                                        
> ${webappDirectory}
>                                
> Which I found after endless googling here
> http://jgonian.wordpress.com/2011/02/24/efficient-gwt-development-swap-your-gwt-xml-with-maven/

This is what I use (GWT Maven Plugin 2.3.0-1 / GWT 2.4.0):


  org.codehaus.mojo
  gwt-maven-plugin
  
/index.html

${project.build.directory}/${project.artifactId}

${project.build.directory}/${project.artifactId}
true
${env.IP_GWT_HOSTED_MODE_PORT}
true
  
  

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

  


It's part of my parent POM and works for all of my GWT projects
*without changes*. Try it out and see how it works for you. I don't
use the  element but it doesn't look very portable (i.e.
reusable by other GWT projects without changes).

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How to change GWT.xml with maven profile by a GWT project

2011-11-02 Thread Hilco Wijbenga
On 2 November 2011 06:20, Kotuboy  wrote:
> Currently, i am working on a gwt-maven project. As every GWT project, it has
> the following gwt.xml
>
>>     
>>     
>>     
>>    .
>>    .
>>    ...
>
> I created another gwt.xml to set configuration for continous integration.
> (as defined here.)
>
>>     
>>         
>>         
>>    .
>>    .
>>    ...
>
> and here is my pom to manage the profiles and change the gwt.xml.
>
>>     
>>   ci
>>         
>>       
>>             
>>           org.codehaus.mojo
>>           gwt-maven-plugin
>>           
>>   com.myCompany.myProject
>>       OBF
>>           
>>       
>>     
>>      
>>
>>     
>
>
>
> If i try to package the project with profile ci (mvn package -Pci), i get
> the following error.
>
>     [ERROR] Failed to execute goal
> org.codehaus.mojo:gwt-maven-plugin:2.3.0-1:compile (default) on project
> MyProject: GWT Module com.myCompany.myProject not found in project sources
> or resources. -> [Help 1]
>
> Where is the problem? How can i solve it?

Isn't "not found" very clear? Maven cannot find your gwt.xml file. Did
you put it in src/main/resources?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Clarifying Understanding of Presenter Interface

2011-10-31 Thread Hilco Wijbenga
On 31 October 2011 10:52, Ari  wrote:
> After reading Large scale application development and MVP, I'm a bit
> unclear on the Presenter interface and I'd appreciate help in
> clarifying my understanding. Specifically I'm unclear as to whether
> each Presenter is supposed to have it's own Presenter Interface or is
> there supposed to be a universal Presenter interface, which all
> Presenters then implement?

In general, you would have a separate presenter interface for each
view. Your views do different things after all so the presenters can't
all be the same.

You could have each presenter extend a parent interface but so far I
have not needed that. That doesn't mean there are no situations where
that might be useful.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Findbugs problem by GWT Project.

2011-10-31 Thread Hilco Wijbenga
On 31 October 2011 07:37, Kotuboy  wrote:
> I have a maven GWT project and i am using findbugs to analyze the code.
>
> 
>                 org.codehaus.mojo
>                 findbugs-maven-plugin
>                 2.3.2
>                 
>                     1.6
>                     com.mycompany.
>
>                 
> 
>
> But I am getting the following error and dont get any result from findbugs.
> The other plugins are working properly.
>
> [INFO] Fork Value is true
> [java] The following classes needed for analysis were missing:
> [java] com.google.gwt.core.client.GWTBridge
> [java] Missing classes: 2
> [INFO] xmlOutput is false
>
> What is the difference of findbugs?? What do you recommend?

GWTBridge is in gwt-dev. Did you add that as a dependency? Mind you, I
don't know why FindBugs would need it given your ...

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



How to "guarantee HTML-safety of the template"?

2011-10-18 Thread Hilco Wijbenga
Hi all,

I have been getting the warning below for quite some time now and I
decided I finally wanted to do something about it.

[WARN] Template with variable in URL attribute context: The template
code generator cannot guarantee HTML-safety of the template -- please
inspect manually or use SafeUri to specify arguments in a URL
attribute context

It wasn't easy (because the warning doesn't give the slightest hint as
to where the problem might be) but I found the method that triggers
it: getLocation().

class MyWidget ... {
  ...
  @UiConstructor
  MyWidget(String location, ...) {
this.location = location;
...
  }
  ...
  String getLocation() {
return location;
  }
}

This is used in MyWidget.ui.xml:



  ...


The warning seems to indicate I should use something like

SafeUri getLocation() (which then returns a SafeUri wrapper of 'location')

but doing that results in

[ERROR] Returns interface com.google.gwt.safehtml.shared.SafeUri,
can't be used as class java.lang.String

So I guess that's not the right way then. And using SafeUri's asString
(i.e. "{widget.getLocation.asString}") gets me the original warning
back.

What should I do to get rid of the warning?

Cheers,
Hilco

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



UiBinder & setVisible - Confusing (Inconsistent?) Behaviour

2011-10-14 Thread Hilco Wijbenga
Hi all,

If I use (in UiBinder) something like

Hello World!

then the widget is hidden as expected. This calls
UIObject.setVisible(boolean), IIUC.

When I try this for my own widgets this doesn't work, however. I have

public interface MiniGameWidget
{
  @UiTemplate("MiniGameWidget.ui.xml")
  interface UiBinder
extends
  com.google.gwt.uibinder.client.UiBinder
  {}
  interface View
extends IsWidget, HasVisibility
  { ... }
  ...
}

and

public class DefaultMiniGameWidgetView
  extends Composite
  implements View
{  ... }

Using



(in another widget) fails with

[ERROR] Class MiniGameWidget.View has no appropriate setVisible()
method Element  (:17)

even though View extends HasVisibility.

But it gets stranger. If I add a different method (like setXyz) which
then calls this.setVisible() everything works fine. So



and

void setXyz(boolean visible) {
  this.setVisible(visible);
}

works like a charm.

So it looks like the "visible" property is special somehow? How do I
get it to work for my widget?

Cheers,
Hilco

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: [RequestFactory] Updating a proxy

2011-09-30 Thread Hilco Wijbenga
On 30 September 2011 16:08, Thomas Broyer  wrote:
> If you edit() and persist User (what you did in the code sample you sent),
> then the "mutableUser" will be frozen at the time you fire() the request,
> and if all goes well (i.e. in the Receiver's onSuccess), you could then just
> use the "mutableUser" instance as your new "cached" user.

:-) Yes, but then BasicUser doesn't get persisted which was the whole
point of the operation.

And server side [i.e. in UserService#persist(User)] I have no idea
what changed in User (only RF would know that). I really don't want to
have save the entire User graph just to update one integer.

What I've got working now is persisting BasicUser and requesting User
from the server afterwards. Very expensive and wasteful but at least
that works. Surely there must be a better way?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: [RequestFactory] Updating a proxy

2011-09-30 Thread Hilco Wijbenga
On 30 September 2011 15:08, Thomas Broyer  wrote:
> On Friday, September 30, 2011 9:26:22 PM UTC+2, Hilco Wijbenga wrote:
>> On 30 September 2011 00:54, Thomas Broyer  wrote:
>> > Why would BasicUserService ( = GizmoService?) be called if you invoke
>> > UserRequest#persist(UserProxy) ( = ThingRequest#persist(ThingProxy) ?)
>>
>> Because BasicUserProxy is part of UserProxy.
>
> If you call a method on UserRequest, the equivalent method will be called on
> its @Service (i.e. UserService), and no other service method will be called.
> If you call setters on proxies (UserProxy, BasicUserProxy), the equivalent
> setters are called on their @ProxyFor (User, BasicUser).
> The only "special namings" RequestFactory uses are the static findXxx(), and
> the getId() and getVersion() methods; and only if you do not use a Locator.
> A method called "persist" is in no way a special method.
> What I mean is that calling UserRequest#persist(UserProxy) cannot imply a
> call to, say, BasicUserService#persist(BasicUser) on the server; only
> UserService#persist(User) will be called.
>
>>
>> > It's hard to follow what you're expecting given that you switched from
>> > thing/gizmo/setSomething to [something-else]/user/basicUser/set[what?]
>>
>> I wanted to keep it generic but see below.
>>
>> > Could you post the actual code that led to the request whose payload you
>> > posted already?
>>
>> Here you go:
>>
>> final UserRequest userRequest =
>> domainRequestApi.getRequestBuilder().newUserRequest();
>> final UserProxy mutableUser =
>> userRequest.edit(domainRequestApi.getCache().getCurrentUser());
>> final BasicUserProxy mutableBasicUser = mutableUser.getBasicUser();
>> final int level = mutableBasicUser.getLevel();
>> final int basicCurrencyDelta = ...;
>> final int premiumCurrencyDelta = ...;
>> final int newLevel = level + 1;
>> final String comment = "Level Up to Level " + newLevel + ".";
>> mutableBasicUser.setLevel(newLevel);
>> final Receiver levelUpReceiver = new LevelUpReceiver(...,
>> mutableUser, comment, basicCurrencyDelta, premiumCurrencyDelta);
>> userRequest.persist(mutableUser).fire(levelUpReceiver);
>
> What's strange is that there's a "comment": "Level Up to Level 1." in the
> JSON payload of the request, while I don't see a setComment() above; and
> there's no "level":1 while there is a setLevel(newLevel).

:-) I apologise for "comment", that's being done by a separate event.
The JSON you see contains two proxies going to the server. I didn't
want to change the JSON as I was not clear on the exact dependencies.

I've wondered about the missing "level":1 as well. I know I've seen it
once but that may have been when I was persisting BasicUser directly.

>> Given that BasicUserProxy is part of UserProxy, I would expect its
>>
>> changes to be stored, i.e. I expect the entire object graph that is
>> UserProxy to be stored (as necessary).
>
> What do you mean exactly by "stored"? What RequestFactory will do on the
> server side is:

I mean persisting it in the database.

> get User and BasicUser (and others, as needed) by their ID
> "apply the diff" from the request to these objects, by calling the
> appropriate setters.
> call the service methods; here, call UserService#persist(User) with the User
> instance modified above

Yeah, I had assumed it would call BasicUserService#persist(BasicUser) as well.

> So actually persisting the "entire object graph" is up to the
> UserService#persist(User) method; as the doc says:
> “RequestFactory automatically sends the whole object graph in a single
> request. In this case, the implementation of Person.persist() on the server
> is responsible for persisting the related Address also, which may or may not
> happen automatically, depending on the ORM framework and how the
> relationship is defined.” (the part about @Embedded objects not being
> supported is no longer true since GWT 2.1.1 and the introduction of
> ValueProxy; but that doesn't apply here)
> — http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.html#relationships

All right, I guess I was expecting too much.

> So, is your problem that BasicUser is not persisted? or that the
> User#getBasicUser() passed to the persist() method doesn't have its level
> modified?
> Or is your issue that domainRequestApi.getCache().getCurrentUser() doesn't
> reflect the change? In that case, then unless you, somewhere, setCurrentUser
> with the "mutableUser", that's normal: i

Re: [RequestFactory] Updating a proxy

2011-09-30 Thread Hilco Wijbenga
On 30 September 2011 00:54, Thomas Broyer  wrote:
> Why would BasicUserService ( = GizmoService?) be called if you invoke
> UserRequest#persist(UserProxy) ( = ThingRequest#persist(ThingProxy) ?)

Because BasicUserProxy is part of UserProxy.

> It's hard to follow what you're expecting given that you switched from
> thing/gizmo/setSomething to [something-else]/user/basicUser/set[what?]

I wanted to keep it generic but see below.

> Could you post the actual code that led to the request whose payload you
> posted already?

Here you go:

final UserRequest userRequest =
domainRequestApi.getRequestBuilder().newUserRequest();
final UserProxy mutableUser =
userRequest.edit(domainRequestApi.getCache().getCurrentUser());
final BasicUserProxy mutableBasicUser = mutableUser.getBasicUser();
final int level = mutableBasicUser.getLevel();
final int basicCurrencyDelta = ...;
final int premiumCurrencyDelta = ...;
final int newLevel = level + 1;
final String comment = "Level Up to Level " + newLevel + ".";
mutableBasicUser.setLevel(newLevel);
final Receiver levelUpReceiver = new LevelUpReceiver(...,
mutableUser, comment, basicCurrencyDelta, premiumCurrencyDelta);
userRequest.persist(mutableUser).fire(levelUpReceiver);

LevelUpReceiver's onSuccess simply fires some events, including one
that sends out the by then presumably updated UserProxy (hence the
mutableUser in the constructor).

Given that BasicUserProxy is part of UserProxy, I would expect its
changes to be stored, i.e. I expect the entire object graph that is
UserProxy to be stored (as necessary).

Just to be complete:

@ProxyForName(value = "com.company.domain.api.User", locator =
"com.company.domain.service.api.UserService")
public interface UserProxy extends EntityProxy
{
  BasicUserProxy getBasicUser();
  void setBasicUser(BasicUserProxy basicUser);
  ... a few others ...
}

@ProxyForName(value = "com.company.domain.api.BasicUser", locator =
"com.company.domain.service.api.BasicUserService")
public interface BasicUserProxy extends EntityProxy
{
  int getLevel();
  void setLevel(int level);
  ... a few others ...
}

In very short pseudo code, what I want to happen is the following:

User.BasicUser.Level := User.BasicUser.Level + 1;
Persist User (or BasicUser, I don't care);
Make sure that User.BasicUser.Level == BasicUser.Level, i.e. User's
BasicUser should be the newly updated one.

(I've tried persisting User but then BasicUser's changes are ignored;
persisting BasicUser works but then User references an outdated
BasicUser; I tried using the Editor framework but that didn't make any
difference either.)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: [RequestFactory] Updating a proxy

2011-09-29 Thread Hilco Wijbenga
On 29 September 2011 12:27, Hilco Wijbenga  wrote:
> On 29 September 2011 01:33, Thomas Broyer  wrote:
>> The first approach should be the good one. Have you checked what goes on the
>> wire? Are there really no operations being sent (look for an "O" property in
>> the JSON)?
>> (FYI: in RF, there are operations on proxies, and invocations on services)
>
> Sure, lots of them (user = ThingProxy, basicUser = GizmoProxy [the
> level should change from 0 to 1 in basicUser]):

For the record, my UserService *is* being called, just not the
BasicUserService. It really should be the other way around.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: [RequestFactory] Updating a proxy

2011-09-29 Thread Hilco Wijbenga
On 29 September 2011 01:33, Thomas Broyer  wrote:
> The first approach should be the good one. Have you checked what goes on the
> wire? Are there really no operations being sent (look for an "O" property in
> the JSON)?
> (FYI: in RF, there are operations on proxies, and invocations on services)

Sure, lots of them (user = ThingProxy, basicUser = GizmoProxy [the
level should change from 0 to 1 in basicUser]):

{
  "F":"com.company.domain.request.api.DomainRequest$Builder",
  "O":
  [
{
  "T":"MUhstLEy3myftqjcUSbJiXK7UTM=",
  "P":
  {
"balanceDelta":1000,
"currentBalance":1000,
"currencyType":
{
  "T":"2SkAFKlbopWmIXRi$HD1bTQ3ppo=",
  "S":"Mi4w"
},
"comment":"Level Up to Level 1.",
"user":
{
  "T":"XsxUVV_IoQWMCnw5Bk9oWk4mU$g=",
  "S":"NS4w"
}
  },
  "C":1,
  "R":"1",
  "O":"PERSIST"
},
{
  "T":"XsxUVV_IoQWMCnw5Bk9oWk4mU$g=",
  "V":"MS4w",
  "P":
  {
"basicUser":
{
  "T":"KrJKdAdDPLkbzJh$UCC4PAyD9tQ=",
  "S":"NS4w"
},
"friendsGroup":
{
  "T":"dPtqVUr1qWygjnZOjOHwDI3E_6c=",
  "S":"Ni4w"
}
  },
  "S":"NS4w",
  "O":"UPDATE"
},
{
  "T":"KrJKdAdDPLkbzJh$UCC4PAyD9tQ=",
  "V":"MS4w",
  "P":
  {
"account":
{
  "T":"Inde8rw1dKVFojfvX8WlUbtX84M=",
  "S":"NS4w"
}
  },
  "S":"NS4w",
  "O":"UPDATE"
},
{
  "T":"Inde8rw1dKVFojfvX8WlUbtX84M=",
  "V":"MS4w",
  "S":"NS4w",
  "O":"UPDATE"
},
{
  "T":"dPtqVUr1qWygjnZOjOHwDI3E_6c=",
  "V":"MS4w",
  "P":
  {
"groupType":
{
  "T":"PZiZQZ4KxLWrDDpldtcde_S3dQE=",
  "S":"MS4w"
}
  },
  "S":"Ni4w",
  "O":"UPDATE"
},
{
  "T":"PZiZQZ4KxLWrDDpldtcde_S3dQE=",
  "V":"MS4w",
  "S":"MS4w",
  "O":"UPDATE"
}
  ],
  "I":
  [
{
  "P":
  [
{
  "T":"MUhstLEy3myftqjcUSbJiXK7UTM=",
  "R":"1",
  "C":1
}
  ],
  "O":"xWeECnR2JMgNVkoxRJcKT3orPAE="
}
  ]
}

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



[RequestFactory] Updating a proxy

2011-09-29 Thread Hilco Wijbenga
Hi all,

Let's say I have a ThingProxy which has a GizmoProxy (and other stuff):

interface ThingProxy {
  GizmoProxy getGizmo();
  void setGizmo(GizmoProxy gizmo);
  ... other getters and setters ...
}

I need an instance of ThingProxy everywhere so I keep one available.
At some point I need to update something in its GizmoProxy. And that's
when the fun starts...

I see two approaches and neither works. :-(

First approach:
ThingProxy thing = ...;
ThingRequest thingRequest = RequestBuilder.newThingRequest();
ThingProxy mutableThing = thingRequest.edit(thing);
GizmoProxy mutableGizmo = mutableThing.getGizmo();
mutableGizmo.setSomething(...);
thingRequest.persist(mutableThing).fire(... receiver ...);

Unfortunately, this doesn't save the changes in the GizmoProxy.
Apparently, RF sees that the ThingProxy hasn't changed so it does
nothing (at least, nothing with the GizmoProxy).

Second approach:
ThingProxy thing = ...;
GizmoRequest gizmoRequest = RequestBuilder.newGizmoRequest();
GizmoProxy mutableGizmo = gizmoRequest.edit(thing.getGizmo());
mutableGizmo.setSomething(...);
gizmoRequest.persist(mutableGizmo).fire(... receiver ...);

This works fine and saves the change in GizmoProxy. But now ThingProxy
is out of date and I can't call setGizmo because the ThingProxy is
frozen. I tried using a mutable ThingProxy but then I get errors later
on (object is being edited in a different context).

How am I supposed to do this?

Cheers,
Hilco

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: how create project from pom??

2011-09-23 Thread Hilco Wijbenga
On 23 September 2011 09:53, cri  wrote:
> The uptick post is very outdated. It will only confuse folks I'm
> afraid. A much better place to start is the link I posted. (http://
> code.google.com/p/google-web-toolkit/wiki/WorkingWithMaven).
> Developing GWT in conjunction with Maven has IMHO always been error
> prone and tricky. It does seem like the GWT team is giving a little
> more importance to this than they have in the past. The new Indigo /
> maven integration has thrown a wrench in things to some extent.

I don't think that's entirely correct.

Maven works fine with GWT and has been since (IIRC) 2.1. What possibly
doesn't work fine is *Eclipse* + Maven + GWT. I have no problems
(other than the usual) but I run builds on the command line (where
they belong) and use Eclipse for simple compiling and
editing/refactoring/formatting/et cetera.

Having said that, there are certainly a number of issues. GWT's
approach to JARs/project management is not quite optimal. It requires
existing JARs to be changed to create one-offs that don't exist
anywhere else (AFAIK). Furthermore, these JARs are then all dumped
together in a few big ueber JARs. This breaks Maven's dependency
management and creates classpath problems. Luckily, the fallout
doesn't seem too bad. It would be great if this could be improved (and
work is being done in this area). Of course, it would be even better
if GWT used Maven itself instead of Ant... ;-)

By the way, I have not been able to get Indigo to run properly at all.
It keeps breaking on updates so I'm still on Helios. I do get the
impression that the Maven plugins (there's more than one) are at the
heart of the issue but I have not delved in any deeper.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: gwt 2.4.0 and maven

2011-09-20 Thread Hilco Wijbenga
On 20 September 2011 10:16, EMan  wrote:
> I am trying to get GWT 2.4.0 to work.  my project is currently using
> GWT 2.3.0.  is there a GWT maven plugin available yet that is
> compatible with 2.4.0?  The highest version Is see is 2.3.0-1.

Have you tried it? It seems to work fine. I don't think their version
numbers need to match.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Wanted: Missing Interface - Is the GWT compiler too aggressive?

2011-08-30 Thread Hilco Wijbenga
On 30 August 2011 12:59, Hilco Wijbenga  wrote:
> Hi all,
>
> I have the following:
>
> interface Api {
>  void api();
> }
> interface Init {
>  void init();
> }
> class Impl implements Api, Init {
>  void api() { ... }
>  void init() { ... }
> }
>
> In the GWT module:
>
> 
>  
>  
>    
>  
>  ...
> 
>
> I then use the above like this:
>
> Api api = GWT.create(Api.class); // This correctly returns an instance of 
> Impl.
> ((Init) api).init();
>
> This fails with a ClassCastException:
>
> java.lang.reflect.InvocationTargetException
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>  at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>  at java.lang.reflect.Method.invoke(Method.java:597)
>  at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:396)
>  at 
> com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:193)
>  at 
> com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:510)
>  at 
> com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
>  at java.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.ClassCastException: impl.Impl cannot be cast to api.Init
>  at ...
>
> Given that impl.Impl implements api.Init, this is rather strange. Was
> the GWT compiler too aggressive? Did it remove the Init interface and
> implementation "because it's not being used"? Or did I run into
> something else and is the error message just overly cryptic?

Sigh. Please ignore, typical PEBKAC. One of the JARs involved had the
wrong version.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Wanted: Missing Interface - Is the GWT compiler too aggressive?

2011-08-30 Thread Hilco Wijbenga
Hi all,

I have the following:

interface Api {
  void api();
}
interface Init {
  void init();
}
class Impl implements Api, Init {
  void api() { ... }
  void init() { ... }
}

In the GWT module:


  
  

  
  ...


I then use the above like this:

Api api = GWT.create(Api.class); // This correctly returns an instance of Impl.
((Init) api).init();

This fails with a ClassCastException:

java.lang.reflect.InvocationTargetException
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:396)
  at 
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:193)
  at 
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:510)
  at 
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
  at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ClassCastException: impl.Impl cannot be cast to api.Init
  at ...

Given that impl.Impl implements api.Init, this is rather strange. Was
the GWT compiler too aggressive? Did it remove the Init interface and
implementation "because it's not being used"? Or did I run into
something else and is the error message just overly cryptic?

Cheers,
Hilco

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Custom implementation of the EventBus

2011-08-29 Thread Hilco Wijbenga
On 29 August 2011 15:32, Stefan Ollinger  wrote:
> Why do you want to create your own event bus?

Read my email and the discussion that your namesake linked to.

> Am 29.08.2011 22:21, schrieb Hilco Wijbenga:
>>
>> On 29 August 2011 13:03, Stefan  wrote:
>>>
>>> Hello Everybody
>>>
>>>  From what I see the application developer is not suppose to be able to
>>> create a custom implementation of the EventBus type. The main reasons
>>> are the protected void dispatch(H handler) and packaged void
>>> setSource(Object source) methods of the GwtEvent type. What is the
>>> rational behind this? After all do you expect the default
>>> implementation SimpleEventBus to be sufficient for everybody ?
>>
>> If you use the same package as SimpleEventBus then you should be fine.
>> That's what I did anyway and it's working well. So I guess the current
>> SimpleEventBus does not work for everybody. I.e., until somebody can
>> explain to me how I'm using events incorrectly and why this
>> firingDepth thing is necessary/useful. :-)
>>
>>> A somewhat related discussion
>>>
>>> http://groups.google.com/group/google-web-toolkit/browse_frm/thread/1626a088f0d09ffc/335d4ff7202bb2e4?tvc=1&q=SimpleEventBus#335d4ff7202bb2e4
>>>
>>>
>>> Thanks
>>> Stefan
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Google Web Toolkit" group.
>>> To post to this group, send email to google-web-toolkit@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> google-web-toolkit+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>>
>>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Custom implementation of the EventBus

2011-08-29 Thread Hilco Wijbenga
On 29 August 2011 13:03, Stefan  wrote:
> Hello Everybody
>
> From what I see the application developer is not suppose to be able to
> create a custom implementation of the EventBus type. The main reasons
> are the protected void dispatch(H handler) and packaged void
> setSource(Object source) methods of the GwtEvent type. What is the
> rational behind this? After all do you expect the default
> implementation SimpleEventBus to be sufficient for everybody ?

If you use the same package as SimpleEventBus then you should be fine.
That's what I did anyway and it's working well. So I guess the current
SimpleEventBus does not work for everybody. I.e., until somebody can
explain to me how I'm using events incorrectly and why this
firingDepth thing is necessary/useful. :-)

> A somewhat related discussion
> http://groups.google.com/group/google-web-toolkit/browse_frm/thread/1626a088f0d09ffc/335d4ff7202bb2e4?tvc=1&q=SimpleEventBus#335d4ff7202bb2e4
>
>
> Thanks
> Stefan
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: (perplexing + frustrating) CSS image not found

2011-08-22 Thread Hilco Wijbenga
On 22 August 2011 23:14, Shawn Brown  wrote:
>  HI,
>> Why can I directly access them using the url that it is being reported
>> GWT can not find them at.
>>
>> I mean:
>>
>> /images/panel/top.gif  ---> is found
>> /images/panel/bottom.gif --> is not found by gwt but can be accessed
>> by using the link DevTools says GWT says it's not at.
>> It's just beyond crazy.
>
> Yuck.  I will guess that using RunAsync to split code is the cause.
>
> The urls are relative so if called from javascript placed in
> /deferredjs/somehash2345, then I guess they can not resolve.
>
> Taking out RunAsnyc seems to work (in GAE devmode at least).
>
> I can't understand though since the script calling from
> /deferredjs/somehash2345 seems to find some .gifs but not others.
>
> So, it seems related to RunAsync but exactly how or why I can't say.
>
> Yuck.  This sucks.

You didn't happen to run into either of these did you: [1], [2]? You
didn't mention how you access your images, so I'm just guessing.

[1] http://code.google.com/p/google-web-toolkit/issues/detail?id=6145
[2] http://code.google.com/p/google-web-toolkit/issues/detail?id=6149

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: SimpleEventBus : why such a non-predictive behavior implementation ?

2011-08-05 Thread Hilco Wijbenga
On 27 July 2011 08:48, david.herv...@gmail.com  wrote:
> Even if multithreaded my implementation is (normally)  done.
> I really don't know why they have used such a mecanism...
> There may be a use case I'm missing
>
> On 27 juil, 17:28, Sixin Zhang  wrote:
>> i feel alike, all new registrations are delayed until the end of
>> firing (depth=0) .. so nothing will happen if firing those new events
>> before the end ..
>> depth behaves like a lock for concurrency, but not really necessary
>> for single-thread JavaScript ..

I'd like to add my "+1" ... I just finished a major debugging session.
Everything was working correctly but the event handlers were not
receiving the event they had signed up for. Because of firingDepth
(which was >0 because of a PlaceChange event). It's really insidious
because all code is correct and working in the right order and context
... but the event handlers don't respond to events.

I would think that either both handler registration *and* event firing
is deferred or neither. The current situation seems a strange
combination where event handler registration is deferred but event
firing is not.

I'm wondering now whether I should implement my own EventBus (using
David's patch e.g.) or if I am simply using events incorrectly?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: UiBinder.useSafeHtmlTemplates

2011-08-04 Thread Hilco Wijbenga
On 4 August 2011 05:43, Brian Reilly  wrote:
> Put the line to set the configuration property after
> inheriting com.google.gwt.uibinder.UiBinder, which you're probably
> inheriting indirectly by way of com.google.gwt.user.User.

Ah, that's the trick. After adding an inherits
com.google.gwt.user.User to my lowest level module, all warnings
disappear.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: UiBinder.useSafeHtmlTemplates

2011-08-03 Thread Hilco Wijbenga
On 29 July 2011 19:50, Hilco Wijbenga  wrote:
> Hi all,
>
> I'm sure you're familiar with the warning "Configuration property
> UiBinder.useSafeHtmlTemplates is false!". I did the obvious, I added
>
>  value="true"/>
>
> to the lowest level GWT module I have (it gets included directly or
> indirectly by all other modules).
>
> Well, colour me surprised:
>
> [INFO] Loading inherited module 'com.example.domain.request.DomainRequestImpl'
> [INFO]    Loading inherited module 
> 'com.example.domain.request.DomainRequestApi'
> [INFO]       Loading inherited module 
> 'com.example.domain.proxy.DomainProxyApi'
> [INFO]          Loading inherited module 'com.example.domain.DomainApi'
> [INFO]             [WARN] Setting configuration property named
> UiBinder.useSafeHtmlTemplates in com.example.domain.DomainApi that has
> not been previously defined.  This may be disallowed in the future.
> [INFO] Loading inherited module 'com.example.fe.Measurements'
> [INFO]    Loading inherited module
> 'com.google.web.bindery.requestfactory.RequestFactory'
> [INFO]       Loading inherited module 
> 'com.google.web.bindery.autobean.AutoBean'
> [INFO]          Loading inherited module 'com.google.gwt.user.User'
> [INFO]             Loading inherited module 'com.google.gwt.uibinder.UiBinder'
> [INFO]                [WARN] Definition of already set configuration
> property named UiBinder.useSafeHtmlTemplates in
> com.google.gwt.uibinder.UiBinder (set in
> com.example.domain.DomainApi).  This may be disallowed in the future.
> [INFO] Compiling module com.example.fe.MeasurementsApp
> [INFO]    Scanning for additional dependencies:
> file:/home/me/workspaces/project-workspace/measurements/src/main/java/com/example/fe/widgets/DefaultMeasurementsApi.java
> [INFO]       Computing all possible rebind results for
> 'com.example.fe.widgets.Measurements.UiBinder'
> [INFO]          Rebinding com.example.fe.widgets.Measurements.UiBinder
> [INFO]             Invoking generator
> com.google.gwt.uibinder.rebind.UiBinderGenerator
> [INFO]                [WARN] Configuration property
> UiBinder.useSafeHtmlTemplates is false! UiBinder SafeHtml integration
> is off, leaving your users more vulnerable to cross-site scripting
> attacks. This property will default to true in future releases of GWT.
>
> What's going on here? First it complains about it not being defined,
> then that it's already set, and finally that it's *not* set?!?

Nobody has a clue?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



UiBinder.useSafeHtmlTemplates

2011-07-29 Thread Hilco Wijbenga
Hi all,

I'm sure you're familiar with the warning "Configuration property
UiBinder.useSafeHtmlTemplates is false!". I did the obvious, I added



to the lowest level GWT module I have (it gets included directly or
indirectly by all other modules).

Well, colour me surprised:

[INFO] Loading inherited module 'com.example.domain.request.DomainRequestImpl'
[INFO]Loading inherited module 'com.example.domain.request.DomainRequestApi'
[INFO]   Loading inherited module 'com.example.domain.proxy.DomainProxyApi'
[INFO]  Loading inherited module 'com.example.domain.DomainApi'
[INFO] [WARN] Setting configuration property named
UiBinder.useSafeHtmlTemplates in com.example.domain.DomainApi that has
not been previously defined.  This may be disallowed in the future.
[INFO] Loading inherited module 'com.example.fe.Measurements'
[INFO]Loading inherited module
'com.google.web.bindery.requestfactory.RequestFactory'
[INFO]   Loading inherited module 'com.google.web.bindery.autobean.AutoBean'
[INFO]  Loading inherited module 'com.google.gwt.user.User'
[INFO] Loading inherited module 'com.google.gwt.uibinder.UiBinder'
[INFO][WARN] Definition of already set configuration
property named UiBinder.useSafeHtmlTemplates in
com.google.gwt.uibinder.UiBinder (set in
com.example.domain.DomainApi).  This may be disallowed in the future.
[INFO] Compiling module com.example.fe.MeasurementsApp
[INFO]Scanning for additional dependencies:
file:/home/me/workspaces/project-workspace/measurements/src/main/java/com/example/fe/widgets/DefaultMeasurementsApi.java
[INFO]   Computing all possible rebind results for
'com.example.fe.widgets.Measurements.UiBinder'
[INFO]  Rebinding com.example.fe.widgets.Measurements.UiBinder
[INFO] Invoking generator
com.google.gwt.uibinder.rebind.UiBinderGenerator
[INFO][WARN] Configuration property
UiBinder.useSafeHtmlTemplates is false! UiBinder SafeHtml integration
is off, leaving your users more vulnerable to cross-site scripting
attacks. This property will default to true in future releases of GWT.

What's going on here? First it complains about it not being defined,
then that it's already set, and finally that it's *not* set?!?

Cheers,
Hilco

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Lots of DIVs

2011-07-28 Thread Hilco Wijbenga
Hi all,

I've been wondering about this for a long time. I thought it was about
time I asked.

When I create even the simplest widget, I see

 

 


 







at runtime. The middle DIV with class GMYET22DPF is (finally) my stuff. :-)

Do I really need all those extra DIVs? And all that position absolute
styling stuff? Is there a way to get rid of it or is it actually
adding value somehow?

(I am not a CSS/HTML person so to me it just seems unnecessary.)

Cheers,
Hilco

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Eclipse: Depending on a non-GWT project

2011-07-27 Thread Hilco Wijbenga
On 26 July 2011 16:11, Steve Wedig  wrote:
> Hello,
>
> I've only used Java for GWT purposes, so sorry in advance if this is a
> dumb question :)
>
> In Eclipse, I would like to have my GWT project depend on code in a
> non-GWT project (so I don't think GWT module inheritance will work).
>
> In setting this up, my preferences in order would be:
> 1. No need to compile the parent project into a JAR, for both dev-mode
> and deployment compilation.
> 2. Need to compile into JAR when deploying, but not for dev-mode.
> 3. Need to compile into JAR even during development (which would be
> pretty painful).
>
> I'm wondering, how can I set up any of these?

The GWT compiler simply needs the source of your dependency available
at compile time. It doesn't matter whether it's in the form of a JAR
file or a directory on the classpath. You do need to make sure GWT
knows where to look, so see  (for your *.gwt.xml).

Be careful that your new dependency doesn't use reflection because
most of that is not supported by GWT (for obvious reasons).

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT Developer Job Openings

2011-07-10 Thread Hilco Wijbenga
On 10 July 2011 17:35, Jeff  wrote:
> However, your negative response was quite unnecessary when the link alone
> would do. Thanks for that by the way.

Clearly he was being sarcastic. He was actually agreeing with your
posting here since there is currently no real alternative.

> 

Nice one. Sort of like a double negative, though, don't you think? :-)
That should probably be . ;-)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Eclipse crashes when starting GWT Designer View

2011-07-10 Thread Hilco Wijbenga
On 9 July 2011 13:02, Mark  wrote:
> Hello,
>
> I did install Eclipse Indigo (3.7) and the Google Plugin for Eclipse
> 3.7. Everytime I try to start a design view of a *.ui.xml file Eclipse
> crashes.
> Is there anotherway to get more debug information? Have you any hints
> or solutions for this problem?
>
> Thanks, Mark
>
> Eclipse output:
>

> Inconsistency detected by ld.so: dl-tls.c: 79: _dl_next_tls_modid:
> Assertion `result <= _rtld_local._dl_tls_max_dtv_idx + 1' failed!

That's your problem. If you search the web for this error, you'll see
you're not the first to encounter this issue. Good luck! :-)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Same origin policy with subdomain

2011-07-07 Thread Hilco Wijbenga
On 7 July 2011 10:05, ag87  wrote:
> Is there any way to avoid the SOP ?

Just run a proxy on your server. Everything uses the same server:port
so no SOP issues and the server (i.e. your proxy) figures out where to
send the request. Jetty does this quite nicely for development.

(This has been asked and answered before. Google for more detailed answers.)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: how to handle resources on server side (maven gwt)

2011-07-04 Thread Hilco Wijbenga
On 4 July 2011 08:35, tanteanni  wrote:
> i need some files on sever side but the normal: put it in
> "resources"-Folder(i created one because webappcreator didn't) and use
> MyClass.class.getResourceAsStream("/" + "filename"); does not work?! i
> allways get null. usind FileInputStream and absolute path works.
> gwt-maven-plugin copies the file to target but it seems that it is not part
> of classpath?!
> what is the normal way to use resources on server side in a gwt/maven
> project?

GWT is mostly client side so I doubt it has anything to do with this problem.

Server side everything Java should work normally. Is this code in a
web app (i.e. a WAR)? Or standalone? If a WAR then note the difference
between src/main/resources and src/main/webapp. Check what ends up in
your WAR and where.

Also, if a WAR, you should use
Thread.currentThread().getContextClassLoader().getResourceAsStream()
or this.getClass().getResourceAsStream(). The leading slash might be
implied, i.e. the filename is treated as being absolute (I read that
somewhere, I haven't checked whether it's true).

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re : @ImageOptions [Solved]

2011-06-22 Thread Hilco Wijbenga
On 21 June 2011 18:56, Thomas Broyer  wrote:
> Could it rather be about how you *use* the ImageResource?
> See http://code.google.com/p/google-web-toolkit/issues/detail?id=6145

Ah, good call. And I even remember looking at those issues. This
should really be flagged by the compiler.

Anyway, for anyone else running into this, I changed



to



and things magically started to work again.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



@ImageOptions

2011-06-21 Thread Hilco Wijbenga
Hi all,

I've been using @ImageOptions to scale (PNG) images. This mostly
worked in GWT 2.2 but now that I've moved to GWT 2.3 most images fail
quietly and don't display (meaning that src="#" instead of the inlined
image at runtime).

public interface MyResources
  extends
ClientBundle
{
  @Source("org/example/my-image-a.png")
  @ImageOptions(width = 118, height = 156)
  ImageResource myImageA();
:
  @Source("org/example/my-image-b.png")
  @ImageOptions(width = 130)
  ImageResource myImageB();
}

There does not seem to be any rule (AFAICT) that determines which
images work and which don't. What always seems to work is
@ImageOptions (i.e. no scaling) and @ImageOptions(width = W, height =
H) (where H and W are the actual height and width of the image). Other
values might or might not work. (It's quite deterministic though, the
same number(s) for the same image either work or they don't, it
doesn't change from run to run).

I intend to scale the images myself to work around the problem but I
would like to understand what the root cause is and why there are no
error messages. Any ideas?

Cheers,
Hilco

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: No source code is available for type java.lang.NoSuchFieldError

2011-06-20 Thread Hilco Wijbenga
On 20 June 2011 11:59, Nathan Klatt  wrote:
> I've inherited a GWT project and I'm receiving the following compiler error
> (more info below):
>
> [java] [ERROR] Line 51: No source code is available for type
> java.lang.NoSuchFieldError; did you forget to inherit a required module?
>
> It's complaining about a core part of the language here, right? Why is it
> looking for source code for it at all? Is it not finding one of the core jar
> files? Do I need to point it at something in the ant build.xml file?

GWT doesn't support *everything* available in the Java core libraries.

> For testing purposes, I followed all the GWT instructions, used
> webAppCreator to generate a "Hello, world." app, and that builds and runs
> just fine. I added a simple try...catch(NoSuchFieldError err) - and an
> import java.lang.NoSuchFieldError line - and it gave me the error.
>
> I'm new to this Java/GWT stuff so I suspect I'm missing something obvious -
> I'd love it if you could point out exactly what! :)

Without knowing why you want to catch NoSuchFieldError, I'd say the
"obvious" answer is not to catch NoSuchFieldError. :-) Try it with
e.g. IllegalStateException instead (assuming you just want to test
exception handling).

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: FireFox 5.0

2011-06-13 Thread Hilco Wijbenga
On 13 June 2011 06:59, john destefano  wrote:
> Just updated my OS (Ubuntu 11.04 -64) and got the latest version of
> firefox which is 5.0. The GWT plugin no longer works. Says that it's
> not compatible with 5.0. Any idea when a compatible version will be
> released?

AFAIK, FF5 is not out yet. So what you have is either FF4 or the FF5
preview. The plugin works with FF4. Do you really want the GWT team to
spend time on getting it to it to work with a *preview* version? :-)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Problems using RequestFactory

2011-06-07 Thread Hilco Wijbenga
On 6 June 2011 11:02, Ryan McFall  wrote:
> I am migrating an application which used Gilead as the go-between
> between Hibernate and GWT to use RequestFactory.  I am having a
> problem where the RequestFactoryGenerator doesn't want to generate a
> RequestFactory for my service.  The error I see in the Development
> Mode console is:
>
> [ERROR] [surveyeditor] - Invalid Request parameterization
> edu.hope.cs.surveys.dao.pojo.Tag
>
> I have tried simplifying Tag as much as possible - in particular, it
> used to implement java.io.Serializable, but now it does not.
>
> It's not clear to me what the possible reasons for the above error
> might be, so it's kind of hard to diagnose.
>
> Below are the relevant interfaces/classes.  Thanks in advance for any
> ideas.
>
> Ryan
>
> -
> package edu.hope.cs.surveys.dao;
>
> import com.google.web.bindery.requestfactory.shared.EntityProxy;
> import com.google.web.bindery.requestfactory.shared.ProxyFor;
>
> import edu.hope.cs.surveys.dao.pojo.Tag;
>
> @ProxyFor(Tag.class)
> public interface ITag extends EntityProxy {
>        public boolean isPublic ();
>        public void setPublic (boolean isPublic);

I'm guessing these might be a problem. Firstly, normal boolean getters
don't seem to work (i.e. is*, has*). This may have changed in GWT2.3,
though (I haven't tried). Secondly, setPublic might generate a
parameter "public" which would not compile.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Massive increase in compile time with GWT 2.3

2011-05-19 Thread Hilco Wijbenga
On 19 May 2011 00:37, googelybear  wrote:
> This build I am trying to optimize is compiled on our build server by
> the continuous integration tool (hudson in our case triggered after
> every commit). It is mainly used to run unit tests and for general
> testing by the developers to get "instant" feedback (well, it used to
> do that when we started). It is not a production build. But I don't
> like to take too many things out, e.g. take out browsers then you can
> no longer test it on different browsers and your feedback cycle - the
> time until you notice something doesn't work after you implemented it
> - gets longer). For the production build then it is absolutely OK to
> take longer.

In general, I don't think it is a good idea to have one build for
(many) different purposes.

For unit tests you don't need all browsers so pick one and stick with
it. In fact, for unit tests you don't need any browser. :-) Your unit
test build can and should be very fast. This should be the most
stripped down version you can think of. Mind you, it would be even
better if you broke up your app into separate modules so that all the
unit testing is done in the small, fast module builds.

The second build would be for integration testing. For your automated
integration testing you don't need more than one browser either.
(Unless, of course, you have a very advanced setup testing multiple
browsers.) Run this build once or twice a day at a specific time (say
lunch time and dinner time). (The specific time is so that people know
about it and can try to make sure their change is (or is not)
included.)

If the automated integration test build is successful then kick off
the full build for all browsers. This need only happen once a day or
even once a week. This build is then used for manual testing. It
should be auto deployed to some QA/test environment. Most (test/QA)
people don't like working with a moving target (for obvious reasons),
hence the "build once a week" suggestion. Then, if QA says this build
is good, promote it to production; no need for another build. I.e.
assuming you follow the best practice of not including your
environment configuration in the WAR.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: RequestFactory error

2011-05-17 Thread Hilco Wijbenga
On 17 May 2011 19:36, Pavel Byles  wrote:
> For some reason I'm getting this error while trying to set up my code to use
> RequestFactory:
> No source code is available for type
> com.google.web.bindery.requestfactory.shared.Request; did you forget to
> inherit a required module?
> No source code is available for type
> com.google.web.bindery.requestfactory.shared.RequestFactory; did you forget
> to inherit a required module?
>
> My project.gwt.xml file contains the following inherits element:
>
> 
>
> I also have my web.xml set up correctly too.
> Does anyone have any idea why I get this error?

Yes, com.google.gwt.requestfactory is deprecated. Use
com.google.web.bindery.requestfactory.RequestFactory. This has been
mentioned once or twice... ;-)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: RequestFactory not working when upgrade from 2.2 to 2.3

2011-05-16 Thread Hilco Wijbenga
On 16 May 2011 03:26, icamts  wrote:
> Add gwt-servlet-deps.jar to your project. It comes with gwt sdk
> distribution.

I don't see this JAR on Maven Central.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: how to move GWT-code into a reusable library?

2011-05-15 Thread Hilco Wijbenga
On 15 May 2011 22:22, Hilco Wijbenga  wrote:
> On 15 May 2011 21:34, Magnus  wrote:
>> Thanks!
>>
>> I already have a library (jar) for my server side code. Can I also put
>> the GWT stuff in it, e. g.:
>>
>> - org/acme/stuff/server
>> - org/acme/stuff/gwtlib
>
> Sure, it's an ordinary JAR, you can put in anything you like. As long
> as you use default directory names or you add the relevant elements in
> you Stuff.gwt.xml you'll be fine.

Oops, a little too quick on the draw.

I'm rather religious about keeping server and client code separate. I
don't think it's a good idea (in general) to add client side code to
your server side JARs. I try to make sure my server side code doesn't
know about GWT and my client side code doesn't know about
Hibernate/Spring/Shiro/Jersey/whatever that I use server side.

If you want to add org/acme/stuff/server to your GWT module (because
the GWT module needs it) then that would be okay but I would avoid
mixing the two as much as possible.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: how to move GWT-code into a reusable library?

2011-05-15 Thread Hilco Wijbenga
On 15 May 2011 21:34, Magnus  wrote:
> Thanks!
>
> I already have a library (jar) for my server side code. Can I also put
> the GWT stuff in it, e. g.:
>
> - org/acme/stuff/server
> - org/acme/stuff/gwtlib

Sure, it's an ordinary JAR, you can put in anything you like. As long
as you use default directory names or you add the relevant elements in
you Stuff.gwt.xml you'll be fine.

>> Do note that it still has to be compiled to JavaScript so you don't
>> gain anything there.
>
> I think I gained that I can have only one source for everything, even
> if this source must be compiled.

Oh yes, absolutely.

> What do you mean with "no gain"?

I did not mean to imply this wasn't useful. I have tons of these
JARs/modules. The "there" referred to the JavaScript compilation. This
is what is taking so much time during the build so it would be really
nice if you could do (some of) that on a per module basis. Then the
main build could "just" link all those modules together. It's much
more complicated then that, of course, because the GWT compiler does
so much optimizing. I certainly don't want to lose that but perhaps
(some of) the work could be done by the modules. I would be okay with
(much) bigger modules (i.e. keep all kinds of compiler/linker stuff)
if it meant a (much) faster main build.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: how to move GWT-code into a reusable library?

2011-05-15 Thread Hilco Wijbenga
On 15 May 2011 06:14, Magnus  wrote:
> I have mutiple GWT projects and a lot of classes that are the same in
> each project.
>
> How can I move them out of the projects into a library (jar) that I
> can reuse in the projects?
>
> I think there is something special in GWT concerning modules and that.

It's not all that special. :-) Let's say you have org.acme.stuff.*
that you want in a separate module. Simply compile your code and put

- org/acme/stuff/*.class
- org/acme/stuff/*.java
- org/acme/Stuff.gwt.xml

in a JAR. The Stuff.gwt.xml only needs to contain


http://google-web-toolkit.googlecode.com/svn/tags/2.2.0/distro-source/core/src/gwt-module.dtd";>

  
  


(Update appropriately if using a different GWT version.)

Now you can do  in other modules to
reuse your code.

Do note that it still has to be compiled to JavaScript so you don't
gain anything there.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How to debug a GWT app in hosted mode, which depends on an external servlet (Same Origin Policy)

2011-05-14 Thread Hilco Wijbenga
On 13 May 2011 01:44, Rich  wrote:
> Hi,
>
> We have a GWT application which draws some resources from a separate
> servlet via javascript. In production this poses no problems as both
> the producer servlet and the consumer GWT app will reside on the same
> server, however for development I can't find a way to make this happen
> as we are head to head with the Same Origin Policy.
>
> As a temporary solution I have the servlet running on Tomcat, and I
> compile and deploy the GWT app to that same Tomcat instance - this of
> course works, and it does allow me to attach Eclipse for debugging.
> However there is the slight problem of the 40 second or so build time
> for each modification.
>
> We would like to be able to debug via GWT's hosted mode w/ OOPHM - can
> anybody see a way for us to do this?

Jetty makes setting up proxies very simple. I have different Jetty
instances running (one for the backend [port 8080] and one for GWT
[port ]). I also have a Jetty instance that proxies calls for port
18000 to either port 8080 (backend calls) or port  (client calls).
The only difference at run time is that I invoke my GWT app with port
18000 instead of . That is how I get around SOP.

Check out org.eclipse.jetty.servlets.ProxyServlet$Transparent.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: RequestFactory not working when upgrade from 2.2 to 2.3

2011-05-14 Thread Hilco Wijbenga
On 13 May 2011 16:26, Joshua Kappon  wrote:
> Hi All
>
> I'm trying to upgrade my project to use GWT 2.3
> I changed all the imports and xml project and web.xml to point to the
> new packages locations.
>
> but RequestFactory calls still don't work.
>
> when running in dev mode I get the following exceptions on run time:
>
> java.lang.NoClassDefFoundError: org/json/JSONException
>    at
> com.google.web.bindery.autobean.shared.impl.StringQuoter.createSplittable(StringQuoter.java:
> 58)
>    at
> com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.(AbstractAutoBean.java:
> 71)
>
> this originates from:
>
> Caused by: java.lang.ClassNotFoundException: null
>    at com.google.gwt.dev.shell.CompilingClassLoader
> $MultiParentClassLoader.findClass(CompilingClassLoader.java:365)
>    at java.lang.ClassLoader.loadClass(Unknown Source)
>
> that is caused by a code call to a
>
> request.doSomething()
> or a
> request.create(someobject.class)
>
>
> Did someone else stumble upon something like this?
> I'm clueless.

Yes, I ran into something similar. I fixed the complaint about not
finding JSONException by adding
http://repo1.maven.org/maven2/org/json/json/20090211/json-20090211.jar
to my POM. I find it very strange this should be necessary. We're
supposed to be on the client, in a JavaScript environment after all.
:-) I have not researched this any further so I don't know whether you
need that JSON JAR in the WAR as well or if it's just for dev mode.

The error reporting in RF is not very helpful, unfortunately. The root
cause for me just said something like "Server error: null". It turned
out that the hashCode() methods on two of my DTOs referenced each
other. That obviously led to an infinite loop and apparently to
"Server error: null". :-) (I guess that's how the programming gods
punish people who do not write unit tests. ;-) )

Oh, and don't waste any time on getting GWT/RF's logging to run. It's
completely useless. I had it set to FINEST but it basically only
reported "sent something" and "received something". No mention of what
that something was. Not helpful at all.

I suggest you start adding helpful GWT.log (client side) and
System.out.println (server side) statements and start debugging. It
took me several hours.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: apache commons-math

2011-05-08 Thread Hilco Wijbenga
On 8 May 2011 20:28, Sydney  wrote:
> [ERROR] [portfolio] - Line 82: No source code is available for type
> org.apache.commons.math.fraction.FractionFormat; did you forget to inherit a
> required module?
> [ERROR] [portfolio] - Line 83: No source code is available for type
> org.apache.commons.math.fraction.Fraction; did you forget to inherit a
> required module?

Did you actually try providing the source code?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Debugging Maven Project in Eclipse ( Tutorial )

2011-04-22 Thread Hilco Wijbenga
On 22 April 2011 00:33, Metronome & Basic
 wrote:
> Any suggestion for debugging in Eclipse

Use mvn gwt:debug (instead of mvn gwt:run) and attach your debugger in
Eclipse (use Remote Java Application).

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Where placeholders in uibinder?

2011-03-17 Thread Hilco Wijbenga
On 17 March 2011 17:20, ss.require  wrote:
> Let's assume I need to paste some piece of html in my page: e.g.
> 
>    Hello, MAX
>  
> Where "MAX" is a parameter.
>
> If I would do that in the code I would make the next function:
> public String getHtmlTemplate(String parameter){
>     return "
>    Hello, " + parameter + "
>  "
> }
>
> But If I would use uibinder I should make the next:
> 
>  
>    Hello, .
>  
> 
> +
> declare @UiField SpanElement nameSpan; + call
> nameSpan.setInnerText(name).
>
> I think the first approach is simpler, has less code and more
> effective(no need extra calls to js object-elements). However, the
> first approach is maybe less  maintainable.
>
> So, in general I think it's better to do html-template in the source
> code than uibinder templates! Why does GWT not handle placeholders? I
> don't see any hindrances to implement that for GWT. What do others
> think about uibinder?

Go with UiBinder. Use InlineLabel and simply call setText.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: src attribute causes error in the Google Eclipse plugin

2011-03-08 Thread Hilco Wijbenga
On 8 March 2011 06:56, Philippe Beaudoin  wrote:
> A quick update on my progress on this...
> As you suggested, adding src/main/resources as source in Eclipse works fine.
> The problem is that m2eclipse automatically adds excluding="**" in
> .classpath for any resource folder. I have therefore not found a way to have
> the GEP work out-of-the-box with a /src/main/gwt folder, it requires a user
> manipulation to remove the exclusion. This seems to be documented here:
>   https://issues.sonatype.org/browse/MNGECLIPSE-864
> but I have little hope of it being solve. Someone says there is a workaround
> using the maven-eclipse-plugin, but I have not been able to make it work.
> Any clue?

I assume you already saw and tried this:

http://maven.apache.org/plugins/maven-eclipse-plugin/examples/specifying-source-path-inclusions-and-exclusions.html

? Secondly, you might have a look at the "additionalConfig" parameter.

You probably already looked into both. The only other thing I can
think of is some Antrun plugin thing that "fixes" the .classpath.
That, or try to add explicit support for what you want to the Maven
Eclipse plugin?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: src attribute causes error in the Google Eclipse plugin

2011-03-04 Thread Hilco Wijbenga
On 4 March 2011 19:53, Brian Reilly  wrote:
>>> There's a deeper question there: are UiBinder ui.xml, LocalizableResources
>>> properties, ClientBundle css, images, etc. "resources" or "sources"?
>>
>> From Maven's point of view: yes, they are resources, not sources.
>> Sources contain source code (i.e. Java code).
>
> Java code is just one example. Groovy and Scala are not Java, but are
> still source code. I would also consider .ui.xml files to be source
> code. Leaving aside libraries for the moment, they are not bundled in
> the final artifact and are instead compiled into an entirely different
> form.

I haven't worked with Groovy/Scala and Maven. Are you saying
Groovy/Scala code is supposed to go in src/main/resources? That would
indeed be strange.

The *.ui.xml files are certainly outliers. It would be nice to have
separate directories for specific GWT stuff. Maybe
src/main/gwt-resources or simply src/main/gwt.

>>> Because these are all about client-side code, which is meant to be given to
>>> the GWT Compiler, I tend to think of them as "sources" more than
>>> "resources".
>>
>> Resources are available to all Maven plugins and tools. Just like,
>> e.g., a Hibernate configuration file. So the fact that a resource is
>> given to the GWT compiler doesn't make it a source (from Maven's point
>> of view).
>
> True. However, by default, there is an implication that resources will
> be copied (possibly with filtering) directly into the target packaging
> area during the build. Here's a subset of the maven lifecycle. Note
> the description of process-resources (I've included the surrounding
> phases for context).
>
> * generate-sources: generate any source code for inclusion in compilation.
> * process-sources: process the source code, for example to filter any values.
> * generate-resources: generate resources for inclusion in the package.
> * process-resources: copy and process the resources into the
> destination directory, ready for packaging.
> * compile: compile the source code of the project.
> * process-classes: post-process the generated files from compilation,
> for example to do bytecode enhancement on Java classes.
>
> If you have files in your project that:
>
> * are needed for compilation
> * don't fit in any other source directory under src/main (e.g. src/main/java)
> * shouldn't be included in the final artifact
>
> you can either:
>
> * put them in src/main/resources and configure a resource exclude
> * add another source directory under src/main and configure a source include

Yep, agreed.

> The types of files that Thomas mentioned are in this category. If I
> were to be concerned with not polluting src/main/java with these, I
> would choose to add another source directory.

I'm too lazy to do so but I agree. :-)

> Finally, as Thomas pointed out, whether or not the files are included
> in the final artifact depends on whether it's an application WAR or a
> library JAR. I've been assuming WAR above. For a JAR, I would probably
> use the same directory structure for consistency and just change the
> includes/excludes to get the files packaged correctly.
>
> Though I also agree that it's unfortunate that they can't be
> configured the same, compiled separately, and linked together for the
> final application WAR.
>
> -Brian

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: src attribute causes error in the Google Eclipse plugin

2011-03-04 Thread Hilco Wijbenga
On 4 March 2011 12:02, Thomas Broyer  wrote:
> There's a deeper question there: are UiBinder ui.xml, LocalizableResources
> properties, ClientBundle css, images, etc. "resources" or "sources"?

>From Maven's point of view: yes, they are resources, not sources.
Sources contain source code (i.e. Java code).

> Because these are all about client-side code, which is meant to be given to
> the GWT Compiler, I tend to think of them as "sources" more than
> "resources".

Resources are available to all Maven plugins and tools. Just like,
e.g., a Hibernate configuration file. So the fact that a resource is
given to the GWT compiler doesn't make it a source (from Maven's point
of view).

> In the context of a "GWT library" though, you don't give them directly to
> the GWT Compiler and you'd want them in the packaged JAR so they'd rather be
> "resources"; but even Java files play both roles here: compiled by javac
> (and packaged as *.class files in the JAR) and packaged as *.java files,
> i.e. seen as "resources".

True but a rather unfortunate consequence of not being able to create
real GWT libraries. A "real" GWT library would not need to be
recompiled when included in the WAR project. A "real" GWT library
would only have resources and JavaScript (assuming no shared or server
Java code).

> This gets even blurier when your "GWT library" is made of "shared code".
> All of these are why I do think that GWT projects in Maven should have a
> specific type/packaging (or actually several specific types: one for "GWT
> libraries", that are only packaged as JARs, and one for "GWT apps", that go
> through the compiler to generate javascript files, that you'd then use in a
> packaging=war module).

That's an interesting idea. I would still like to be able to actually
GWT compile my libraries, though. That would seriously cut down on
compile time of the whole app. The GWT compiler would only have to
(re)link all the libraries together (I'm guessing) to create the end
result.

> See http://www.sonatype.com/books/mvnref-book/reference/flex-dev-sect-multimodule-archetype.html for
> an example of what I mean, just using "shockwave" libraries (swc) and
> "shockwave" applications (swf), later used by a webapp.
> But there are two kinds of "libraries": client-only code (gwt-google-apis or
> GIN for instance) and "shared code", where you don't want to have your
> source code deployed to your server as "resources" in the JAR (so you'd need
> two JARs).
>
> The main "complication" is if you want to still support "simple webapps"
> where everything (client, shared and server code) is in one module; but I
> think that if you use Maven, you should have separate modules for client and
> server code.

Yes, I agree.

> The drawbacks of all these are:
>
> running DevMode: it'd be hard (or very convoluted) to run DevMode with its
> embedded server when your code is split in several apps, while still
> supporting "hot refreshes". But this is actually a global issue with Maven,
> that you also have when coding a multi-module webapp,
> see http://stackoverflow.com/q/3636493

We create separate widgets that can run independently (in their
project). That way you don't need to run the whole app to work on
parts. Once such a widget is "done" you include it somewhere else and
it cannot be changed anymore (at least not directly in the including
project). This alleviates the problem to a large extent.

> I tend to think this is on-purpose with Maven: favoring unit-tested modules
> rather than "integration-tested", manually tested, applications.

Yep.

> We've opted for -noserver and a separate Jetty server (using WTP, but it
> would work with mvn jetty:run)
> some plugins (cobertura, checkstyle, pmd, findbugs; maybe not all of them,
> but at least some, and I can't remember those) are apparently looking at any
> class that has its java counter-part in the classpath; or is it the
> maven-compiler-plugin compiles them? (why is it compiling sources that don't
> come from the project.build.sourceDirectory, isn't it the actual bug?)

I'm not entirely clear what you mean here.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: src attribute causes error in the Google Eclipse plugin

2011-03-04 Thread Hilco Wijbenga
On 3 March 2011 21:31, Philippe Beaudoin  wrote:
> Hi!
> I'm using Maven to build my GWT project, together with the standard Maven
> directory layout. That is, sources are in src/main/java while resources
> (such as CSS files) are in src/main/resources.
> Now, in one of my .ui.xml file I have a  tag that uses an src
> attribute to define some constants (such as lightPanelColor, below). Here it
> is:
> src/main/java/com/gwtplatform/samples/tab/client/view/AdminAreaView.ui.xml:
> 
> .panel {
> background-color: lightPanelColor;
> padding: 5px;
> }
> 
> src/main/resources/com/gwtplatform/samples/tab/defines.css:
>
> @def darkPanelColor  #fcb072;
> @def lightPanelColor #fcd5b6;
> @def messageBoxColor #fad163;
> @def titleFontWeight  bold;
> @def titleFontSize    22px;
> @def titleColor #921b12;
> @def minAppWidth 700px;
> @def leftColWidth 200px;
> @def formLineSpacing 8px;
>
> This works very well when I gwt compile my project, but it causes an error
> in Eclipse on that line:
>
> 
>
> because defines.css cannot be found. It's not surprising as it's not in the
> same directory tree...
> The fix is simple: just move defines.css to the java directory tree, but it
> feels a bit dirty. I wondered if it would be possible to make the GEP
> maven-aware somehow? (Maybe this would even let me drop the .ui.xml in the
> resources folder?)

You can most certainly put all of your resources (*.css, *.ui.xml,
*.gwt.xml) in src/main/resources. You do have to make sure that when
you add src/main/resources as a source folder in Eclipse that
Eclipse/Maven do not add an exclusion filter (i.e. remove it).

Another option is to use the Java annotation [i.e.
@Source("../../defines.css")] and use ui:with instead of  in
your *.ui.xml. This works very well.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: help sending emails in GWT

2011-03-01 Thread Hilco Wijbenga
On 1 March 2011 19:38, Dougherty, Gregory T.  wrote:
> Wow, so you're saying you think that randomly picked up bits of
> JavaScript should be able to take over your computer and send emails
> from your computer to whomever they want?
>
> Every spammer in the world must love you.
>
> Fortunately, the browser makers disagree.

Sigh, yes of course. I saw "client" and wasn't thinking "browser + SOP". :-)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: help sending emails in GWT

2011-03-01 Thread Hilco Wijbenga
On 1 March 2011 02:27, Graham Haroldson  wrote:
> Again,  im not quite sure what im trying to send emails from,  i can
> probably use my email, which is a gmail account.  I tried that and i also
> tried adding my account and password to the properties but it still does
> nothing

Get it working as a normal Java application so you're sure you have
all your settings correct. Then move it into your GWT code.

Note that while it's possible to do this from the client, I don't
think it's a good idea to put your credentials in your client code
(you're basically telling anyone who uses your app what your password
is). So create some sort of message that you can send from the client
to the server and let the server handle sending the actual email. Then
you don't have to add all the JavaMail related JARs to your client
code.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: help sending emails in GWT

2011-03-01 Thread Hilco Wijbenga
On 1 March 2011 17:29, Greg Dougherty  wrote:
> "From" isn't your email account, "From" is "which half of your
> application, the client, or the server?"
>
> You can NOT send email from the client, but that so0und't like what
> you're trying to do.

*OF COURSE* you can send an email from the client. What do you think
your desktop is, a server? :-) You do need to be able to *connect* to
a server but you don't have to be running *on* a server.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Very strange long assignment issue

2011-02-25 Thread Hilco Wijbenga
On 25 February 2011 15:06, shahid  wrote:
> I have the following piece of test code in my application (using GWT
> 2.1.0):
>
>                        Date expiry = new Date();
>                        long expiryTime  = expiry.getTime();
>                        expiryTime = expiryTime +  (1000 * 60 * 60 * 24 * 90); 
> // 90 days

This statement is your problem. The (1000 * ... * 90) part is still
using int arithmetic and results in -813934592. Change it to something
like

expiryTime = expiryTime +  (1000L * 60 * 60 * 24 * 90); // 90 days
[Note that it's now 1000L instead of 1000.]

Now the whole (1000L * ... * 90) will use long arithmetic instead of
int and you'll get the correct result.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: UiBinder + HTMLPanel + css = Loss of hair???

2011-02-19 Thread Hilco Wijbenga
On 19 February 2011 03:43, pete  wrote:
> Hallo,
>
> I have a weird problem, in my UiBinder template (suppose it's the
> template for TestWidget) I have sth like the following code
>
> 
>    .fullSize {
>        height: 100%;
>        width: 100%;
>    }
> 
>
> 
>    
>        TestDiv
>    
> 
>
> But if I initialize
>
> TestWidget test = new TestWidget();
> SimplePanel testPanel = new SimplePanel();
> testPanel.setPixelSize(800, 600);
> testPanel.add(test);
> RootPanel.get().add(testPanel);
>
> I see that the ScollPanel indeed has the full size of 800 x 600, but
> then in FireBug it shows a weird div with just position: relative; and
> for all child elements the size is broken (meaning, the percentage
> doesn't refer to the 800 x 600 px anymore...)
> I tried for a ridiculous long time, to fix this, but I don't know
> where I go wrong (since literally every f* tag should have size
> 100% and therefore I don't know where this ominous tag without style
> comes from...)
>
> Does anyone know what I'm doing wrong, and how to fix it? It' almost 5
> in the morning here, so it might as well be a stupid mistake, that I
> can't identify through my swollen little pig eyes anymore, but I
> couldn't find rest, if I hadn't at least posted it here ;-)

The strange div you're seeing is part of ScrollPanel. ScrollPanel
consists of a div in a div.

If you add

.fullSize div {
  height: 100%;
  width: 100%;
}

then you should get what you want.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: gwt-maven-plugin: missing module HTML & CSS with version 2.1.0+ of the plugin

2011-02-14 Thread Hilco Wijbenga
On 14 February 2011 00:40, Henry  wrote:
> Unfortunately, after I upgrading to the new version of the plugin, the
> internal Jetty can't find the module HTML (with the reference to the
> GWT js file) as well as the coresponding CSS and web.xml file anymore.
> It seems that a new folder was created in target/${artifactId}-$
> {version}, which contains the compiled GWT Javascript and all static
> resources besides the entry point HTML, CSS and web.xml. There is also
> a war folder that is always created, which contains all necessary
> resources, including the HTML & CSS file. It seems that the 1.2
> version of the plugin used this war folder, whereas the newer versions
> use the folder under target, which doesn't contain vital parts of the
> compiler output. Also before there wasn't any compiler output under
> the target folder.

I'm using Jetty together with the GWT Maven plugin with the configuration below.


  org.codehaus.mojo
  gwt-maven-plugin
  2.1.0-1
  
/index.html

${project.build.directory}/${project.artifactId}

${project.build.directory}/${project.artifactId}
true
  



  org.mortbay.jetty
  jetty-maven-plugin
  8.0.0.M0
  

  /${project.artifactId}

  


${project.build.directory}/${project.artifactId}/WEB-INF/classes

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Call external main program

2011-02-13 Thread Hilco Wijbenga
On 13 February 2011 11:10, daniela iervolino  wrote:
> Ok. I have a GWT web app and a Java project with a main() method and I
> don't know how to communicate with this java proj from my gwt
> application...

That doesn't answer the question. Should it run on the client or on the server?

If on the client then you need to provide the source so the GWT
compiler can compile it into JavaScript; if on the server then you
need to trigger it somehow by sending some sort of event to the server
(RPC, form submission, GET, et cetera).

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Debug - Maven - Eclipse

2011-02-11 Thread Hilco Wijbenga
On 11 February 2011 14:55, mortsahl  wrote:
> I'll give that a shot, thanks ... I was hoping to somehow configure a
> debug launch configuration to work ... so far, I haven't figured out
> the magic.

I have been unable to get it to work from inside Eclipse. Eclipse
seems to be getting in the way. Of course, I haven't tried very hard
because mvn gwt:debug + Remote Java App works great. :-)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Debug - Maven - Eclipse

2011-02-11 Thread Hilco Wijbenga
On 11 February 2011 13:48, mortsahl  wrote:
> Thanks .. I've got the plugin installed .. but that still doesn't
> answer my question on how to debug in eclipse when using a maven
> project (I refuse to go back 10 years and use ant)

Just run mvn gwt:debug and attach a debugger in Eclipse (Debug
Configuration --> Remote Java Application).

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Separate Widgets & CSS+JS

2011-02-08 Thread Hilco Wijbenga
On 4 February 2011 14:03, Hilco Wijbenga  wrote:
> On 4 February 2011 11:21, Thomas Broyer  wrote:
>> GWT.getModuleBaseURL() + "my-image.png" ?
>
> Mmmh, yeah, something like that (GWT.getModuleName() +
> "/my-image.png") works. But that means I'm changing the image's url at
> runtime. I'd like to avoid that.
>
> I was hoping for something I could put in UiBinder. Can I access the
> module name as a property? E.g.
>
> 
>
> or something like that?
>
> I tried variations of {moduleName} and various fields and methods in
> the Java code but nothing works.

Okay, I finally figured it out. It turns out to be incredibly simple.




-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: No Source code is available for type client.Utilityt, did you forget to inherit a required module?

2011-02-08 Thread Hilco Wijbenga
On 8 February 2011 10:20, NAARAYANA REDDY NANDIGAMA
 wrote:
> I am talking about two buttons having the same text message in java.
> private Button validateButtonOne = new Button();
> private Button validateButtonTwo = new Button();
> validateButtonOne.setText("Validate");
> validateButtonTwo.setText("validate");
> buttonlisteners(validateButtonOne);
> buttonListeners(validateButtonTwo);;
> private buttonListeners(Button button) {
> button.addHandler(new ...) {
>  >>I need to add a separate logic based on button click...
> For example, if validateButtonOne click then do logic related to button one
>                     Elese add logic related to validateButtonTwo.
>     }
> }
>
> So how to identify which button is clicked within common handler method?

Add a separate handler to each button.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: No Source code is available for type client.Utilityt, did you forget to inherit a required module?

2011-02-07 Thread Hilco Wijbenga
On 7 February 2011 17:41, NAARAYANA REDDY NANDIGAMA
 wrote:
> I have another requirement.. I have two buttons with same name "validate". I
> need to identify which button is clicked when I user click on any one of
> validate buttton. I thought i can use button.getText but both buttons has
> the same name so not sure what to do. Could you please advise me on this?

I'm not sure what you mean by "the same name". You can't have the same
id twice and I don't see why you would want that either.

Just do something like

Validate
Validate

and in Java

(if you want to do something with the buttons themselves)
@UiField
Button validateOne;
@UiField
Button validateTwo;

(if you want to respond to clicks)
@UiHandler("validateOne")
void onClickValidateOne(ClickEvent event) {...}
@UiHandler("validateTwo")
void onClickValidateTwo(ClickEvent event) {...}

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: No Source code is available for type client.Utilityt, did you forget to inherit a required module?

2011-02-07 Thread Hilco Wijbenga
On 5 February 2011 21:14, Dallas007  wrote:
> Hi,
> i am new to GWT so need help please. I'm am not able to compile my
> code due to below error.
>
> Here are my project details,
> I have added a new class Utility.java which is out side of Client
> package. I have instantiae the Utiltity object inside cliant code and
> imported the class. So I am not sure how to fix this could you please
> advise me on this?. How to use my Utility class in side client code?

See 
http://www.gwtapps.com/doc/html/com.google.gwt.doc.DeveloperGuide.Fundamentals.Modules.ModuleXml.html,
specifically the  tag.

I would suggest you create a separate module for your utility code.
The generated JAR should contain:

org/example/utils/Code.java
org/example/utils/Code.class
org/example/Utilities.gwt.xml

Where Utilities.gwt.xml has


http://google-web-toolkit.googlecode.com/svn/tags/2.0.1/distro-source/core/src/gwt-module.dtd";
>

  
  


Then you can use  to use your
utility code in other modules.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Separate Widgets & CSS+JS

2011-02-04 Thread Hilco Wijbenga
On 4 February 2011 11:21, Thomas Broyer  wrote:
> GWT.getModuleBaseURL() + "my-image.png" ?

Mmmh, yeah, something like that (GWT.getModuleName() +
"/my-image.png") works. But that means I'm changing the image's url at
runtime. I'd like to avoid that.

I was hoping for something I could put in UiBinder. Can I access the
module name as a property? E.g.



or something like that?

I tried variations of {moduleName} and various fields and methods in
the Java code but nothing works.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Separate Widgets & CSS+JS

2011-02-03 Thread Hilco Wijbenga
On 2 February 2011 16:17, Thomas Broyer  wrote:
> You can automate it by writing a linker that concatenates the CSS files into
> a single one (same for JS ?) and emit a new artifact for the all-in-one
> file.
> There's no built-in solution for that, because the 

Re: @UiHandler and method scope

2011-02-03 Thread Hilco Wijbenga
On 3 February 2011 18:12, Christopher  wrote:
> Thanks. I'll declare them explicitly as protected (package private).

Just to be clear: protected != package private. Making your UiHandlers
protected will work fine, though.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



  1   2   >