Re: how do I verify my GWT backend is protected by authentication

2012-10-22 Thread JoseM
Look at what you setup in your web.xml, it's there.  Most likely something 
like /gwtRequest.

You can also just use something like FireBug or the Developer Tools in 
Chrome to see the requests that the Browser is making.

Note: if you really want to be secure I would suggest you use HTTPS.

On Monday, October 22, 2012 10:51:00 AM UTC-4, Yan wrote:
>
> Hi there, 
>
> GWT has frontend and backend, I am using Request Factory. 
>
> When client makes a call to backend, it does HTTP post/get, how do I get 
> the URL being used?  Because I want to verify that if I simply get/post 
> this URL directly, I will get 401 or 403. This is for security reasons.
>
> How can I find the server URL? Is there a naming convention?
>
> Thanks,
> Yan
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/sx_66nM03ZEJ.
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: Thread deadlock when trying to maven compile using 2.5-rc1

2012-07-19 Thread JoseM
I put in a bug 
report: http://code.google.com/p/google-web-toolkit/issues/detail?id=7536

On Thursday, July 19, 2012 6:38:28 AM UTC-4, Thomas Broyer wrote:
>
>
>
> On Thursday, July 19, 2012 6:44:04 AM UTC+2, JoseM wrote:
>>
>> If it helps I am trying to build this using my Mac.
>>
>> I also realized that there is also now a 2.5-rc1 version of the plugin so 
>> I tried with that one and I still get the deadlock:
>>
>
> It's not surprising, as the deadlock is in GWT, not the gwt-maven-plugin.
>
> As a workaround, try using 1 (or 
> -Dgwt.localWorkers=1) to use a single-threaded build and hopefully avoid 
> the deadlock.
>
> You'll note also that it seems to rather be a bug in Java rather than in 
> GWT, as the locks seem to have been created by standard classes (java.awt.* 
> and sun.security.*) rather than GWT ones.
>
> Worth a bug report for GWT though (and then see how it's triaged)
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/wcpVn4SGNVcJ.
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: Thread deadlock when trying to maven compile using 2.5-rc1

2012-07-19 Thread JoseM
Even with local workers set to 1 I get the same deadlock, I forgot to mention 
that is what I did in my second post 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/udDjlLJo5N8J.
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.



Thread deadlock when trying to maven compile using 2.5-rc1

2012-07-18 Thread JoseM
I created a project about two months ago using Thomas Broyer's 
modular-requestfactory maven archetype from 
here: 
https://github.com/tbroyer/gwt-maven-archetypes/tree/master/modular-requestfactory

Our application has been building and working fine using the 2.4 
dependencies for GWT and the gwt-maven-plugin.  Today I updated my pom to 
use GWT 2.5-rc1 and the latest version of the gwt-maven-plugin (build #35 
of 2.5-SNAPSHOT from 
here: 
https://buildhive.cloudbees.com/job/gwt-maven-plugin/job/gwt-maven-plugin/35/org.codehaus.mojo$gwt-maven-plugin/)
 
but when doing the maven compile (by doing a mvn clean install) it always 
stops when attempting to start compiling the first module of my application.

I issued a kill -3 on the process and here is the output (below), does 
anybody know what be wrong? Do I need to change anything in my pom 
files/configuration that 2.5 needs?  All I did was update the version 
numbers of the dependencies to the latest one.

[INFO] 

[INFO] Building web-client 1.0-SNAPSHOT
[INFO] 

[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ web-client ---
[INFO] Deleting /xxx/projects/web/client/target
[INFO] Deleting /xxx/projects/web/client/src/main/webapp/moduleAppOne 
(includes = [**/*], excludes = [])
[INFO] Deleting 
/xxx/projects/web/client/src/main/webapp/moduleAppTwo (includes = [**/*], 
excludes = [])
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ 
web-client ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.4:compile (default-compile) @ web-client 
---
[INFO] Compiling 75 source files to /xxx/projects/web/client/target/classes
[INFO] 
[INFO] --- maven-resources-plugin:2.4.3:testResources 
(default-testResources) @ web-client ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory 
/xxx/projects/web/client/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.4:testCompile (default-testCompile) @ 
web-client ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ web-client ---
[INFO] Tests are skipped.
[INFO] 
[INFO] --- gwt-maven-plugin:pre-2.5.0-20120719:compile (gwt-compile) @ 
web-client ---
[INFO] Compiling module com.mycompany.web.ModuleAppOne_dev
[INFO] 2012-07-18 23:55:21
[INFO] Full thread dump Java HotSpot(TM) 64-Bit Server VM (20.6-b01-415 
mixed mode):
[INFO] 
[INFO] "Thread-4" daemon prio=5 tid=7fef4a874000 nid=0x10b433000 waiting 
for monitor entry []
[INFO]java.lang.Thread.State: BLOCKED (on object monitor)
[INFO] 
[INFO] "Thread-3" daemon prio=5 tid=7fef4aaba800 nid=0x10c68b000 waiting 
for monitor entry [10c688000]
[INFO]java.lang.Thread.State: BLOCKED (on object monitor)
[INFO] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:293)
[INFO] - waiting to lock <79fe5f198> (a sun.misc.Launcher$AppClassLoader)
[INFO] at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
[INFO] at 
java.util.ResourceBundle$RBClassLoader.loadClass(ResourceBundle.java:435)
[INFO] at 
java.util.ResourceBundle$Control.newBundle(ResourceBundle.java:2289)
[INFO] at java.util.ResourceBundle.loadBundle(ResourceBundle.java:1364)
[INFO] at java.util.ResourceBundle.findBundle(ResourceBundle.java:1328)
[INFO] at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1224)
[INFO] at java.util.ResourceBundle.getBundle(ResourceBundle.java:747)
[INFO] at java.awt.Toolkit$3.run(Toolkit.java:1616)
[INFO] at java.security.AccessController.doPrivileged(Native Method)
[INFO] at java.awt.Toolkit.(Toolkit.java:1612)
[INFO] at java.lang.ClassLoader$NativeLibrary.load(Native Method)
[INFO] at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1827)
[INFO] - locked <79fe010a8> (a java.util.Vector)
[INFO] - locked <79fe01100> (a java.util.Vector)
[INFO] at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1724)
[INFO] at java.lang.Runtime.loadLibrary0(Runtime.java:823)
[INFO] - locked <79fe083d0> (a java.lang.Runtime)
[INFO] at java.lang.System.loadLibrary(System.java:1045)
[INFO] at 
sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
[INFO] at java.security.AccessController.doPrivileged(Native Method)
[INFO] at 
apple.awt.CGraphicsEnvironment.(CGraphicsEnvironment.java:23)
[INFO] at java.lang.Class.forName0(Native Method)
[INFO] at java.lang.Class.forName(Class.java:169)
[INFO] at 
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
[INFO] - locked <7e094ec98> (a java.lang.Class for 
java.awt.GraphicsEnvironment)
[INFO] at 
com.google.gwt.dev.GraphicsInitThread.run(GraphicsInitThread.java:39)
[INFO] 
[INFO] "pool-1-thread-1" prio=5 tid=7fef4aab7800 nid=0x10c588000 waiting on 
condition [10c587000]
[INFO]java.lang.Threa

Re: GWT FileUpload Help :-(

2012-07-11 Thread JoseM
For one, you need to add the FileUpload object to the form, not the panel, 
that will probably solve your problem.

I would also probably create a separate servlet just for the file upload 
that only handles your file uploads and is not used for GWT RPC since the 
overriding of the post can interfere with what GWT expects the servlet to 
do.

On Monday, July 9, 2012 8:45:55 AM UTC-4, Alexander Bonzo Supertramp wrote:
>
> Hi all,
> i'm working on GWT FileUpload. I have two side, clinet and server. In 
> client there are a form with FileUpload widget and a submit button that 
> send a file to server side. The problem is that the check
> if (ServletFileUpload.isMultipartContent(request))
>   {}
>
> is true (so there is a file in request) but when i iterate  the line 4 is 
> false.
> 
>  1. List items = upload.parseRequest(request);
>  2.Iterator iter = items.iterator();
>  3.FileItem item;
>  4.while (iter.hasNext()) { 
> ...
> }
>
> so i can't process the file sended. Can anybody help me?
> I attach my code (client and server side). Thanks to all.
> With respect,
> Alex.
>  
> 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/cWTIkrqnSPIJ.
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: Loading third-party Javascript with a script loader

2012-06-28 Thread JoseM
You can also try using ScriptInjector, and make sure you set the Window to 
the one you want ($wnd).  They provide a callback to let you know when it 
is loaded:

http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/core/client/ScriptInjector.html

Here is one way I have used 
it: 
http://stackoverflow.com/questions/8744663/how-to-insert-twitter-widget-into-a-gwt-view/8764304#8764304

On Thursday, June 28, 2012 6:02:54 PM UTC-4, Bakul wrote:
>
> Hi,
>
> You can add javascript asynchronously whenever you want and invoke any 
> function from that js using JSNI.
>
> Please refer following 
>
> https://developers.google.com/web-toolkit/articles/using_gwt_for_json_mashups
>  
>
> You will probably need something like following to add js in the page and 
> then you can invoke the method from your js using JSNI
>
> public void addScript(String url) {
> Element e = DOM.createElement("script");
> DOM.setAttribute(e, "language", "JavaScript");
> DOM.setAttribute(e, "src", url);
> DOM.appendChild(RootPanel.get().getElement(), e);
> } 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/l8zhZo-wkgQJ.
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.5 RC1 Is Here!

2012-06-28 Thread JoseM
Can we use this with the existing gwt maven plugin or do we need to use a 
newer version/build or own?

http://mojo.codehaus.org/gwt-maven-plugin/

On Thursday, June 28, 2012 12:34:58 PM UTC-4, Thomas Broyer wrote:
>
>
>
> On Thursday, June 28, 2012 4:56:28 PM UTC+2, Albert Attard wrote:
>>
>> Thanks for sharing this and well done.
>>
>> What version of Java does this work with?  Does it support Java 7 code?
>>
>
> No, Java 6 only.
>
> (you should be able to use a JDK 7, but you can only use Java 6 the 
> language: -source 1.6 -target 1.6) 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/LMsFwUIB_ssJ.
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.



Timing issue when using JSNI in gwt.

2012-05-19 Thread JoseM
You could use ScriptInjector to insert your external javascript file onto the 
Page. It has a callback that will be invoked once it has been loaded. 

You can also test to see if your $wnd.variable is undefined before trying to 
use it and if it is then use a timer or schedule deferred or repeating to wait 
until it is available. 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/3aQGAug_WiIJ.
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, Spring when projects are split apart (client, services, persistence)

2012-05-19 Thread JoseM
I didn't realize I had to still run the jetty server seperately before.  I 
got it to work now running the jetty server using mvn jetty:start -Ddev and 
I just needed to right-click Run As "Web Application (running on an 
external server)" and supply the url (something like 
http://localhost:8080/{projectName}-server-1.0-SNAPSHOT/ )and uncheck the 
"Select an HTML page" option.

Is there a way to have it all running from within in eclipse with one 
command? Maybe even with the embedded jetty? The reason I ask is to make it 
easier to use the eclipse debugger to debug both server side and client 
side code at the same time.

Or can I somehow startup the jetty server within eclipse so that I can run 
it in debug mode?

On Saturday, May 19, 2012 6:21:51 AM UTC-4, Thomas Broyer wrote:
>
>
>
> On Friday, May 18, 2012 11:37:20 PM UTC+2, JoseM wrote:
>>
>> So I am assuming I would do this on the client project right? I can't sem 
>> to get it to work though.  
>>
>> No matter what settings I put for the war I get this message:
>>
>> [WARN] No startup URLs supplied and no plausible ones found -- use 
>> -startupUrl
>>
> Oh yeah, sure, I forgot to say that you have to add or update the 
> -startupUrl argument: -startupUrl 
> http://127.0.0.1:8080/foobar/index.html(where the URL is the one of your 
> Jetty server), and uncheck "use embedded 
> server" (or add the -noserver argument).
>
>  
>
>> And when I go to the root of the jetty server the index.html file is not 
>> there.
>>
> Then you have to build your project, or whatever it takes to make your 
> webapp work (i.e. copy index.html to the folder served by your jetty 
> server); that goes beyond GWT usage though.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/1pp88EqGxDoJ.
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, Spring when projects are split apart (client, services, persistence)

2012-05-18 Thread JoseM
So I am assuming I would do this on the client project right? I can't sem 
to get it to work though.  

No matter what settings I put for the war I get this message:

[WARN] No startup URLs supplied and no plausible ones found -- use 
-startupUrl

And when I go to the root of the jetty server the index.html file is not 
there.  

On Friday, May 18, 2012 11:52:48 AM UTC-4, Thomas Broyer wrote:
>
>
>
> On Friday, May 18, 2012 5:32:59 PM UTC+2, JoseM wrote:
>>
>> Can you expand a bit more on how to get GWT DevMode to work by launching 
>> from within Eclipse? We are used to creating a GWT Application run 
>> configuration in eclipse but right now I am not sure how to get to work so 
>> that the HTML/webapp resources are available to the run configuration.
>
>
> The easiest is to Run as… → Web Application. It will fail because it's 
> missing the source code for your other projects, but it'll have created the 
> launcher. Edit it to add your other projects' src/main/java and 
> src/main/resources (or whatever, if you'e not using Maven) to the classpath.
> If you want to share the *.launch file with other devs (e.g. commit it to 
> your VCS), then you can replace absolute file paths in the "arguments" tab 
> with Eclipse variables.
>

On Friday, May 18, 2012 11:52:48 AM UTC-4, Thomas Broyer wrote:
>
>
>
> On Friday, May 18, 2012 5:32:59 PM UTC+2, JoseM wrote:
>>
>> Can you expand a bit more on how to get GWT DevMode to work by launching 
>> from within Eclipse? We are used to creating a GWT Application run 
>> configuration in eclipse but right now I am not sure how to get to work so 
>> that the HTML/webapp resources are available to the run configuration.
>
>
> The easiest is to Run as… → Web Application. It will fail because it's 
> missing the source code for your other projects, but it'll have created the 
> launcher. Edit it to add your other projects' src/main/java and 
> src/main/resources (or whatever, if you'e not using Maven) to the classpath.
> If you want to share the *.launch file with other devs (e.g. commit it to 
> your VCS), then you can replace absolute file paths in the "arguments" tab 
> with Eclipse variables.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/LJITfbheeNIJ.
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, Spring when projects are split apart (client, services, persistence)

2012-05-18 Thread JoseM
Can you expand a bit more on how to get GWT DevMode to work by launching 
from within Eclipse? We are used to creating a GWT Application run 
configuration in eclipse but right now I am not sure how to get to work so 
that the HTML/webapp resources are available to the run configuration.

On Friday, May 11, 2012 3:48:07 AM UTC-4, Thomas Broyer wrote:
>
>
>
>
> As for GWT DevMode, you have to add the source folders of your 
> dependencies (the 'shared' project, possibly others) to the classpath in 
> your Eclipse launcher. Depending on the configuration of your servlet 
> container / deployed app, you might have to use the 'server' project's 
> project.build.outputDirectory or WTP's temporary folder as the -war folder 
> for the DevMode.
> Have a look at 
> https://developers.google.com/eclipse/docs/faq#gwt_with_maven
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/qSFTwDrXrToJ.
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: Create autobean as RF does it

2012-04-02 Thread JoseM
Is there a way to a ValueProxy from the same type of object that RF would 
use to make a ValueProxy but outside of a web server.

I'm looking to use ProxySerializer to get a string of a ValueProxy and send 
it via some other means to the browser where I can then serialize it back 
into a ValueProxy.

On Friday, March 30, 2012 3:32:03 AM UTC-4, Thomas Broyer wrote:
>
> Have a look at AbstractRequestContext (particularly the 
> processReturnOperations method; also look for calls to setTag), but 
> basically you'll have to transport more than the AutoBean data: you'll have 
> to send its stableId and version (have a look at SimpleRequestContext et 
> al. for how they're computed).
> You'll also have to apply the BaseProxycategory, EntityProxyCategory and 
> ValueProxyCategory to your AutoBeanFactory, and @NoWrap the EntityProxyId. 
> Have a look at the RequestFactoryGenerator or run the DevMode or Compiler 
> with the -gen argument to look at what's generated.
>
> All in all, it might be better (and I really mean *might*, as I have not 
> actually looked at it in details) to use a ProxySerializer or extend the 
> AbstractRequestContext to use RF's serialization.
>
> Search the group, there has been a similar question in the past months 
> (and I made basically the same answer).
>
> On Thursday, March 29, 2012 12:10:09 PM UTC+2, Eugene Ivlev wrote:
>>
>> I have such problem: 
>>
>> I use RF as main CRUD client-server interface, but I also use 
>> Atmosphere framework as server-push mechanism. 
>> My aim is multi-client application. All clients must receive 
>> notification about changes made by anyone.  The communication looks 
>> like this: 
>>
>>
>> @ProxyFor(TestEntity.class) 
>> TestProxy extends EntityProxy 
>>
>>
>>
>> || 
>>   TestProxy obj|RF update entity-->|--- 
>>  RequestFactory 
>> Servlet 
>> ||  | 
>> ||  | 
>> ||  | 
>> ||  | 
>> AutoBean obj|<--Atmosphere notification-|<-| 
>> Atmosphere Servlet creates AutoBean 
>> |   with entity to all client| 
>> || 
>> || 
>> || 
>> || 
>> || 
>> || 
>> client server 
>>
>> But RF adds to AutoBean some kind of additional information. Therefore 
>> I can't use autobaen received from Atmosphere in next communication by 
>> RF channel. 
>> How I can create autobean as RF does it?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/cmvim7mn3ywJ.
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: Errer after GWT 2.4 upgrade.

2012-03-29 Thread JoseM
Do you have any more details on how to do that exactly? 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/-xoaN8UN1vYJ.
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: HTML Code Generation

2012-03-19 Thread JoseM
Those tests run as if they were really running on a web browser (because 
they are). You would need to send it back to the "server" using RPC or RF 
or whatever else you want.

On Monday, March 19, 2012 9:35:18 AM UTC-4, HK wrote:
>
> Thank you for your response! 
> I tried this and now I can call toString(). But how can I call basic 
> JAVA Methods? For example how can I write the generated HTML Code to a 
> File? Using java.io.File I get an error when executing the GWT JUnit 
> Test: 
> [ERROR] Line 41: No source code is available for type java.io.File; 
> did you forget to inherit a required module? 
> This error appears for every JRE class I try to use. 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/Ab6yNA6eyy4J.
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.



sending a data stream directly to a client printer via GWT

2012-03-17 Thread JoseM
What if you just send the client a PDF of what needs to be printed and then 
they can print that from within their PDF application. 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/h9I9uwoBLwwJ.
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: celltable - howto use an image as background of the entire table or at least for some rows

2012-03-16 Thread JoseM
You can try a hack like this, although maybe the syntax would be a little 
different for you.

 static {

 StyleInjector.injectAtEnd("."+tableResources
.cellTableStyle().cellTableHoveredRow()+" tr {background-image: 
url(image.jpg);}");

}

On Thursday, March 15, 2012 12:04:24 AM UTC-4, David Gonzalez wrote:
>
> Hi,
>
> I need to use an image as table background (as entire row background will 
> works).
> I tried this:
>
> .cellTableOddRow {
> background-image: url(image.jpg);
> background-repeat: repeat-y;
> width: 300px;
> }
>
>
> but it puts the image in each cell.
> Is this possible?
>
> Thx a lot! 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/Keyy0fssIaUJ.
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 any way to remove the sort arrow decorator in a header of a CellTable?

2012-03-10 Thread JoseM
Maybe you can do it by subclassing CellTable and overriding the code which 
renders that piece but I'm not sure if that can be easily done. Or create your 
own version of CellTable that renders it as an i tag. 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/jMBNpKyjnlYJ.
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: CellTable styles incorrectly on IE9

2012-03-09 Thread JoseM
So then it seems that this is related to that other bug where GWT thinks the 
browser is Chrome since Chrome Frame is installed (but maybe not being used) 
and it uses the webkit specific browser code and not the Trident/IE one. (I 
believe the bug is more of a Chromium bug than a GWT bug). 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/J-jLIimZuZ8J.
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.



Is there any way to remove the sort arrow decorator in a header of a CellTable?

2012-03-09 Thread JoseM
You can control what to show for that with the CellTable Resources. You would 
have to pass in your own resources to the CellTable constructor that overrides 
the sort style to display what you want. 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/qPY0Iep7nRsJ.
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.



ImageResources cannot show image as expected

2012-03-07 Thread JoseM
Maybe the ehealthlogo.png is missing from the proper folder or it is 
misspelled. Look at the logs in the GWT Jetty window it might  say something 
(make sure to set the Level to Debug). Or you can also run a gwt compile that 
usually gives warning and errors when there is something wrong. 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/ZP9QnVvf0LYJ.
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 can I run a GWT application in full screen mode

2012-03-06 Thread JoseM
Please don't post the same question on different threads.. 

But the real answer is that it can't be done anymore with modern browsers 
-- which is a good thing. I know that Chrome and/or Firefox both allow you 
to override javascript which tries to hide the address bar and other 
elements.  I personally hate when websites used to do that and I would be 
more inclined to navigate away from the page and/or block the site if it 
did. In addition, doing a window.open like that could be interpreted as a 
popup by some browsers which will trigger a popup blocker and the window 
would not open at all (unless the user instructed it to do so).

If you want full screen you can ASK the user to go into full screen mode 
(such as by pressing F11), or you can deploy the application to computers 
which you totally control and turn into kiosks that run the browser in full 
screen moe.

On Tuesday, March 6, 2012 1:55:13 PM UTC-5, Marco wrote:
>
>
> Have you found a solution in the meantime?
> @Stevko: Good to know but do you have a solution with example anyway?
>

On Tuesday, March 6, 2012 1:55:13 PM UTC-5, Marco wrote:
>
>
> Have you found a solution in the meantime?
> @Stevko: Good to know but do you have a solution with example anyway?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/bAbkPfc6NUsJ.
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.



Embedding custom components with custom components

2012-03-01 Thread JoseM
What if you just implement HasWidgets and pass those method calls on down to 
the root panel of your UiBinder which can be an HTMLPanel. 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/_xyYiOf6w3AJ.
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 POST in REST web service

2012-03-01 Thread JoseM
On the server you can use httpclient:  
http://hc.apache.org/httpcomponents-client-ga/tutorial/html/fundamentals.html#d5e169
 

On Thursday, March 1, 2012 4:35:10 AM UTC-5, jayalakshmi wrote:
>
> Thanks for the reply 
> I am making use of RPC call.I get back XML response.My server side code is 
> what i pasted in previous mail. Similarly i need some modification so that 
> i can post the request as well.Right now  i am able to get XML response 
>  from  RESTful web service.
>  
> Thanks
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/YP8p2LBrD-sJ.
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 GWT to simplify a big stack of data transformation

2012-03-01 Thread JoseM
What you are asking for is feasible doing what Sai described but I think it 
would be better for you to use ValueProxy with the @ProxyFor annotation, 
that is easier than creating a POJO just for the client side and then 
writing code to convert your server POJO to another client specific POJO. 
 Using RequestFactory and a ValueProxy ,GWT will automatically copy over 
the fields neccessary and provide other benefits that come with 
RequestFactory.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/0Kp_zM3neqEJ.
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 GWT to simplify a big stack of data transformation

2012-02-29 Thread JoseM
You can also use RequestFactory ValueProxy

On Wednesday, February 29, 2012 3:42:55 AM UTC-5, Sai wrote:
>
> Hi,
>
> As long as you provide the required source code for the generated POJO's 
> to GWT compiler for generating the JavaScript it will work. 
>
> But, I think when you generate POJO's using XMLBeans, your POJO's will 
> have some dependency on XMLBeans (Data Binding) annotations and GWT 
> compiler forces you to provide the source code of XMLBeans, I don't think 
> it's a good idea use generated POJO's in GWT client code.
>
> we also had very similar requirement, and we went on having separate view 
> beans for GWT client.
>
> I hope this helps you!
>
> Regards,
> Saida.
>
> On Tue, Feb 28, 2012 at 2:19 PM, Domenico wrote:
>
>> Hi,
>> I'm trying to simplify the stack of a web application (based on J2EE)
>> that takes an XML profile from backend convert it in a POJO (with some
>> XML data binding tool) and then throughout several data
>> transformations it becomes a view bean and then presented in
>> JavaScript. The idea is to simplify this stack using XMLBeans to
>> generate automatically the POJO and using directly this POJO in the
>> GWT application (without any intermediate transformation). Do you
>> think is it possible to use this strategy, in particular using a
>> normal POJO in the GWT application?
>>
>> Thanks a lot for your help
>>
>>
>
> -- 
> Regards,
> Saida Dhanavath
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/SgM3btbPi6sJ.
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 load an external JS-file without calling a function in there

2012-02-29 Thread JoseM
Check their API or read their javascript code, there might be a way to pass 
an id of a div which they would use to append to instead of using 
document.write.  That's what I found when trying to use Twitter's Widget 
api, it was documented but I did find it by reading their code and seeing 
what it does.

On Wednesday, February 29, 2012 9:55:13 AM UTC-5, Thomas Broyer wrote:
>
> Anything relying on document.write() must be in your HTML source when it's 
> being parsed; they can't be loaded dynamically.
>
> On Wednesday, February 29, 2012 2:14:35 PM UTC+1, newnoise wrote:
>>
>> Hi, 
>>
>> I'm trying to dynamically add advertisement to our page. Our 
>> advertisement-partner provides us a script which we have to include 
>> like this: 
>> http://www.somesource.com/ 
>> output.js?id=123 <http://www.somesource.com/output.js?id=123>"> 
>>
>> The output.js just contains one line of code like this: 
>> document.write("some html"); 
>>
>> I have no idea how I can add this JS to the page and make it 
>> execute ... I tried just adding it as a HTML-Widget, which correctly 
>> adds the code, but it isnt executed. Also the ScriptInjection doesnt 
>> help, because I need the code somewhere in the  and not in 
>> . 
>>
>> I'm happy for any help! 
>> Tom
>
>
On Wednesday, February 29, 2012 9:55:13 AM UTC-5, Thomas Broyer wrote:
>
> Anything relying on document.write() must be in your HTML source when it's 
> being parsed; they can't be loaded dynamically.
>
> On Wednesday, February 29, 2012 2:14:35 PM UTC+1, newnoise wrote:
>>
>> Hi, 
>>
>> I'm trying to dynamically add advertisement to our page. Our 
>> advertisement-partner provides us a script which we have to include 
>> like this: 
>> http://www.somesource.com/ 
>> output.js?id=123 <http://www.somesource.com/output.js?id=123>"> 
>>
>> The output.js just contains one line of code like this: 
>> document.write("some html"); 
>>
>> I have no idea how I can add this JS to the page and make it 
>> execute ... I tried just adding it as a HTML-Widget, which correctly 
>> adds the code, but it isnt executed. Also the ScriptInjection doesnt 
>> help, because I need the code somewhere in the  and not in 
>> . 
>>
>> I'm happy for any help! 
>> Tom
>
>
On Wednesday, February 29, 2012 9:55:13 AM UTC-5, Thomas Broyer wrote:
>
> Anything relying on document.write() must be in your HTML source when it's 
> being parsed; they can't be loaded dynamically.
>
> On Wednesday, February 29, 2012 2:14:35 PM UTC+1, newnoise wrote:
>>
>> Hi, 
>>
>> I'm trying to dynamically add advertisement to our page. Our 
>> advertisement-partner provides us a script which we have to include 
>> like this: 
>> http://www.somesource.com/ 
>> output.js?id=123 <http://www.somesource.com/output.js?id=123>"> 
>>
>> The output.js just contains one line of code like this: 
>> document.write("some html"); 
>>
>> I have no idea how I can add this JS to the page and make it 
>> execute ... I tried just adding it as a HTML-Widget, which correctly 
>> adds the code, but it isnt executed. Also the ScriptInjection doesnt 
>> help, because I need the code somewhere in the  and not in 
>> . 
>>
>> I'm happy for any help! 
>> Tom
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/XswmWnOLrucJ.
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 test GWT app through a proxy

2012-02-27 Thread JoseM
I don't think it's directly related to the proxy pattern that Dan 
mentioned.  It seems to be that your user doesn't have great internet 
access, or there is some issue in the connection between that user and your 
web server.  It seems that the error message happens when the browser is 
not able to communicate (reliably) with the web server.

Here is a related link that could help you out:  
http://stackoverflow.com/questions/5258434/unable-to-initiate-the-asynchronous-service-invocation
 

On Monday, February 27, 2012 1:56:32 PM UTC-5, John Malpas wrote:
>
> Thanks that is interesting. What I know is, 
> I am writing the "MyDataService" part, and somehow 
> GWT must be writing the "MyDataService_Proxy" part. 
>
> And then there is this one (thankfully) very vocal 
> user, whose access to the RPC needed by the application 
> goes through the "MyDataService_Proxy" part, 
> and it works for him only occasionally. 
>
> I would like to be able to test the "MyDataService_Proxy" 
> part from where I am developing, or at least from 
> somewhere nearby. 
>
> On Feb 26, 7:20 am, Dan  wrote: 
> > That error message suggests a different kind of proxy,
> http://en.wikipedia.org/wiki/Proxy_pattern. 
> > 
> > On Feb 25, 8:40 pm, John Malpas  wrote: 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > > I have several GWT (2.4) applications out there. 
> > 
> > > One in a while, a user writes in with a problem, 
> > > where it is clear the RPC is not working, and it 
> > > is clear there is some proxy involved in their access 
> > > to the application. 
> > 
> > > (Most recent: "Unable to initiate the asynchronous service invocation 
> > > (MyDataService_Proxy.login)") 
> > 
> > > I need to figure out some way to test access to the 
> > > applications through a proxy, so I can at least see what 
> > > these users are seeing. The same applications work fine 
> > > for me on a variety of browsers and computers. 
> > > (My own computers get to the web through ATT DSL with 
> > > no proxy involved.) 
> > 
> > > Has anyone else faced this problem (need to test through 
> > > a proxy)?


On Monday, February 27, 2012 1:56:32 PM UTC-5, John Malpas wrote:
>
> Thanks that is interesting. What I know is, 
> I am writing the "MyDataService" part, and somehow 
> GWT must be writing the "MyDataService_Proxy" part. 
>
> And then there is this one (thankfully) very vocal 
> user, whose access to the RPC needed by the application 
> goes through the "MyDataService_Proxy" part, 
> and it works for him only occasionally. 
>
> I would like to be able to test the "MyDataService_Proxy" 
> part from where I am developing, or at least from 
> somewhere nearby. 
>
> On Feb 26, 7:20 am, Dan  wrote: 
> > That error message suggests a different kind of proxy,
> http://en.wikipedia.org/wiki/Proxy_pattern. 
> > 
> > On Feb 25, 8:40 pm, John Malpas  wrote: 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > > I have several GWT (2.4) applications out there. 
> > 
> > > One in a while, a user writes in with a problem, 
> > > where it is clear the RPC is not working, and it 
> > > is clear there is some proxy involved in their access 
> > > to the application. 
> > 
> > > (Most recent: "Unable to initiate the asynchronous service invocation 
> > > (MyDataService_Proxy.login)") 
> > 
> > > I need to figure out some way to test access to the 
> > > applications through a proxy, so I can at least see what 
> > > these users are seeing. The same applications work fine 
> > > for me on a variety of browsers and computers. 
> > > (My own computers get to the web through ATT DSL with 
> > > no proxy involved.) 
> > 
> > > Has anyone else faced this problem (need to test through 
> > > a proxy)?


On Monday, February 27, 2012 1:56:32 PM UTC-5, John Malpas wrote:
>
> Thanks that is interesting. What I know is, 
> I am writing the "MyDataService" part, and somehow 
> GWT must be writing the "MyDataService_Proxy" part. 
>
> And then there is this one (thankfully) very vocal 
> user, whose access to the RPC needed by the application 
> goes through the "MyDataService_Proxy" part, 
> and it works for him only occasionally. 
>
> I would like to be able to test the "MyDataService_Proxy" 
> part from where I am developing, or at least from 
> somewhere nearby. 
>
> On Feb 26, 7:20 am, Dan  wrote: 
> > That error message suggests a different kind of proxy,
> http://en.wikipedia.org/wiki/Proxy_pattern. 
> > 
> > On Feb 25, 8:40 pm, John Malpas  wrote: 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > > I have several GWT (2.4) applications out there. 
> > 
> > > One in a while, a user writes in with a problem, 
> > > where it is clear the RPC is not working, and it 
> > > is clear there is some proxy involved in their access 
> > > to the application. 
> > 
> > > (Most recent: "Unable to initiate the asynchronous service invocation 
> > > (MyDataService_Proxy.login)") 
> > 
> > > I need to figure out some way to test access to the 
> > > applications through a proxy, so I can at least see what 
> > > the

Re: Timer AsyncCallback issue

2012-02-26 Thread JoseM
I think your issue might be that you are getting a lot of data back in
your RPC call and the browser is frozen while it is processing the
results. If this is the case maybe you should either send a smaller
amount of data to the browser (maybe break up the RPC request into
multiple smaller ones) or consider using Request Factory to transfer
the data as that is better able to keep the browser from freezing with
a bigger payload.


On Feb 24, 3:43 pm, "Peter D."  wrote:
> I have a timer set up to update an element on my UI periodically from
> a buffer.  If the buffer grows too small, I make an RPC call which
> returns the next chunk of frames.  However, I want the timer to
> continue updating the UI off the existing buffer while the RPC call is
> working.  It seems that when the buffer needs to grow, the timer calls
> calls the AsyncCallback function correctly and continues through the
> rest of the run() function, but the next scheduled execution will not
> occur until after the RPC call returns.  Is there any way around this?

-- 
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 by hand (no xml configuration, no ant, no running gwt-dev.jar)

2012-02-22 Thread JoseM
I can't help you since I myself wouldn't know how to do what you are asking 
but why?!? I'm sure they are using what they currently have because there 
are a lot of different complicated steps to do their magic. Does it not 
meet the need that you currently have?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/8GFRcBqAlAwJ.
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 efficiency

2012-02-22 Thread JoseM
Thanks for the reply.  I was thinking of doing something similar but the 
problem I can see is that the session could possible encapsulate several 
different unrelated transactions because of the way RequestFactory handles 
appending of different .fire() calls (at least from what I understand of 
the code).  I see that in one place RF is calling the actual locator 
methods for all of the different fire()s and then in another separate piece 
of code it calls the isLive method.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/exki90lVJXcJ.
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 efficiency

2012-02-21 Thread JoseM
Is there a way for us to easily do this? In other words is there one method 
which I can mark which starts and ends the session for one request?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/420IKBl9tDsJ.
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: Possible bug with ProxySerializerImpl

2012-02-18 Thread JoseM
I just realized I could have attached the file, I have attached the file to 
this message that way you don't need to go to pastbin.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/gc_wH8407NYJ.
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.

package gwtbugtest;

import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.notNullValue;
import static org.junit.Assert.assertThat;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.junit.Before;
import org.junit.Test;

import com.google.web.bindery.event.shared.SimpleEventBus;
import com.google.web.bindery.requestfactory.server.ExceptionHandler;
import com.google.web.bindery.requestfactory.server.ServiceLayer;
import com.google.web.bindery.requestfactory.server.SimpleRequestProcessor;
import com.google.web.bindery.requestfactory.server.testing.InProcessRequestTransport;
import com.google.web.bindery.requestfactory.shared.DefaultProxyStore;
import com.google.web.bindery.requestfactory.shared.EntityProxy;
import com.google.web.bindery.requestfactory.shared.Locator;
import com.google.web.bindery.requestfactory.shared.ProxyFor;
import com.google.web.bindery.requestfactory.shared.ProxySerializer;
import com.google.web.bindery.requestfactory.shared.Receiver;
import com.google.web.bindery.requestfactory.shared.Request;
import com.google.web.bindery.requestfactory.shared.RequestContext;
import com.google.web.bindery.requestfactory.shared.RequestFactory;
import com.google.web.bindery.requestfactory.shared.ServerFailure;
import com.google.web.bindery.requestfactory.shared.Service;
import com.google.web.bindery.requestfactory.vm.RequestFactorySource;

/***
 * I'm using this to set up a POC for a bug which I believe exists in GWT related
 * to their ProxySerializer.
 * 
 * Basically when trying to deserialize an proxy object from a ProxyStore twice will cause an 
 * exception, but it also causes an issue when deserializing an object with a reference to another
 * object that was already deserialized.
 * 
 * @author jmartinez
 *
 */

public class ProxySerializerBugTest {

	public static class MyEntity {
		private Integer id;
		private Integer version;
		private String name;
		private MyEntity parent;
		
		public MyEntity() {	}
		
		public MyEntity(Integer id, Integer version, String name, MyEntity parent) {
			this.id = id;
			this.version = version;
			this.name = name;
			this.parent = parent;
		}

		public Integer getId() {
			return id;
		}
		public void setId(Integer id) {
			this.id = id;
		}
		public Integer getVersion() {
			return version;
		}
		public void setVersion(Integer version) {
			this.version = version;
		}
		public String getName() {
			return name;
		}
		public void setName(String name) {
			this.name = name;
		}
		public MyEntity getParent() {
			return parent;
		}
		public void setParent(MyEntity parent) {
			this.parent = parent;
		}	
	}
	
	@ProxyFor(value=MyEntity.class, locator=MyEntityLocator.class)
	public static interface MyEntityProxy extends EntityProxy {
		Integer getId();
		Integer getVersion();
		String getName();
		MyEntityProxy getParent();
	}
	
	public static class MyEntityLocator extends Locator {
		
		private static final Map myDb;
		
		static {
			myDb = new HashMap();
			myDb.put(1, new MyEntity(1,1,"The parent",null));
			myDb.put(2, new MyEntity(2,1,"Child with id 2",myDb.get(1)));
			myDb.put(3, new MyEntity(3,1,"Child with id 3",myDb.get(1)));
			myDb.put(4, new MyEntity(4,1,"Child with id 4",myDb.get(1)));
			myDb.put(5, new MyEntity(5,1,"Parent with id 5",null));
			myDb.put(6, new MyEntity(6,1,"Parent with id 6",null));
		}
		
		public MyEntityLocator() {	}

		@Override
		public MyEntity create(Class clazz) {
			return new MyEntity();
		}

		@Override
		public MyEntity find(Class clazz, Integer id) {
			return myDb.get(id);
		}

		@Override
		public Class getDomainType() {
			return MyEntity.class;
		}

		@Override
		public Integer getId(MyEntity domainObject) {
			return domainObject.getId();
		}

		@Override
		public Class getIdType() {
			return Integer.class;
		}

		@Override
		public Object getVersion(MyEntity domainObject) {
			return domainObject.getVersion();
		}
		
		public static List getAll() {
			return new ArrayList(myDb.values());
		}
		
		public static List getAllParents() {
			List results = new ArrayList();
			results.add(myDb.get(1));
			results.add(myDb.get(5));
			results.add(myDb.get(6));
			return results;
		}
	}
	
	@Service(value = MyEntityLocator.class)
	public static interface MyEntityRequest extends RequestContext 

Possible bug with ProxySerializerImpl

2012-02-18 Thread JoseM
So after seeing one of the Google I/O presentations on how to improve the 
performance of a GWT application I was trying to do something to pre-load 
some data into our jsp page to be read and loaded into our application 
using the GWT Dictionary.  There was one set of objects that we use with 
RequestFactory proxy objects so I wanted to load them as proxy objects.  I 
found that I could use RequestFactory.getSerializer with a String payload 
provided by the DefaultProxyStore but I encountered an issue when 
deserializing a list of objects that would have a reference to other 
objects in the list.  The basic issue seems to be when calling 
ProxySerializer.deserialize(class,key) with the same key twice.  The first 
time will work but doing it a second time causes an exception saying "The 
AutoBean has been frozen".

In our application and in my test the issue occurs because we have an 
object that can have a reference to another object of the same class.  Here 
is a link to the test http://pastebin.com/NG1Xzw6h .  All of the tests pass 
except for "testGetAllProxySerializeDeserializeWithParentProxyObjectsSet".

The workaround would be to serialize each object with one payload but that 
creates a bigger overall payload since there can be a lot of duplication.

Is this really a bug? Before I filed a bug I wanted to post the question 
here.

Here is a stack trace of the exception:

java.lang.IllegalStateException: The AutoBean has been frozen
at 
com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.checkFrozen(AbstractAutoBean.java:195)
at 
com.google.web.bindery.autobean.vm.impl.ProxyAutoBean.checkFrozen(ProxyAutoBean.java:196)
at 
com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.setProperty(AbstractAutoBean.java:270)
at 
com.google.web.bindery.autobean.vm.impl.ProxyAutoBean.setProperty(ProxyAutoBean.java:253)
at 
com.google.web.bindery.autobean.vm.impl.BeanPropertyContext.set(BeanPropertyContext.java:44)
at 
com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$3.visitValueProperty(AbstractRequestContext.java:910)
at 
com.google.web.bindery.autobean.vm.impl.ProxyAutoBean.traverseProperties(ProxyAutoBean.java:289)
at 
com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.traverse(AbstractAutoBean.java:166)
at 
com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.accept(AbstractAutoBean.java:101)
at 
com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext.processReturnOperation(AbstractRequestContext.java:879)
at 
com.google.web.bindery.requestfactory.shared.impl.ProxySerializerImpl.getProxyForReturnPayloadGraph(ProxySerializerImpl.java:167)
at 
com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext.getBeanForPayload(AbstractRequestContext.java:588)
at 
com.google.web.bindery.requestfactory.shared.impl.EntityCodex.decode(EntityCodex.java:101)
at 
com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$3.visitReferenceProperty(AbstractRequestContext.java:889)
at 
com.google.web.bindery.autobean.vm.impl.ProxyAutoBean.traverseProperties(ProxyAutoBean.java:324)
at 
com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.traverse(AbstractAutoBean.java:166)
at 
com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.accept(AbstractAutoBean.java:101)
at 
com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext.processReturnOperation(AbstractRequestContext.java:879)
at 
com.google.web.bindery.requestfactory.shared.impl.ProxySerializerImpl.getProxyForReturnPayloadGraph(ProxySerializerImpl.java:167)
at 
com.google.web.bindery.requestfactory.shared.impl.ProxySerializerImpl.doDeserialize(ProxySerializerImpl.java:184)
at 
com.google.web.bindery.requestfactory.shared.impl.ProxySerializerImpl.deserialize(ProxySerializerImpl.java:80)
at 
com.rodm.gwt.requestfactory.ProxySerializerBugTest.doProxySerializerTest(ProxySerializerBugTest.java:285)
at 
com.rodm.gwt.requestfactory.ProxySerializerBugTest.testGetAllProxySerializeDeserializeWithParentProxyObjectsSet(ProxySerializerBugTest.java:259)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.lang.reflect.Method.invoke(Method.java:597)
at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/_4mdhDfJ9B0J.
To post to this group, send email to google-

Re: GWT RPC Problem

2012-02-06 Thread JoseM
You can use RequestFactory append to do a batch request  
http://code.google.com/p/google-web-toolkit/wiki/RequestFactory_2_4#Improved_request_batching

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/_F52YUhG7UUJ.
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: Diagnose GWT DMP Plugin crashes on Chrome

2012-02-01 Thread JoseM
Nobody has any ideas how we can diagnose our issue?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/HYEz_vNRF30J.
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.



Diagnose GWT DMP Plugin crashes on Chrome

2012-01-25 Thread JoseM
We are having issues testing our application in Dev Mode on the Chrome
browser.  Whenever we run our application in Dev Mode we can hardly
use Chrome to test our application because the GWT DMP Plugin crashes
within a few minutes.  I can run the same application in Firefox
without the plugin crashing or having so much issues.

Is there a way us to diagnose why the plugin crashes so easily and so
often? When we compile the application and run it in deployed mode it
works fine in Chrome and we don't have so many issues.

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