Re: RequestFactory, ValueProxy support for Email, Link, User

2012-12-31 Thread Avanish Raju
For posterity:
After setting up the Annotation Processor, I realized there were many other
issues. But User object isn't one of them. It works fine. Link, on the
other hand, does not - the reason for this is that Link object doesn't have
a default constructor. So we get errors if we try to make a LinkProxy for
it. I decided to store my link just as a String, instead of Link.

Regards,
Avanish

On Fri, Dec 21, 2012 at 11:12 PM, Avanish Raju yar...@gmail.com wrote:

 Hi GWT team,

 I've just started migrating from GWT-RPC to RequestFactory, and noticed
 that even when using ValueProxy to wrap the datastore objects, they aren't
 supported. For e.g, I created a UserProxy and a LinkProxy:

 import com.google.appengine.api.users.User;
 import com.google.web.bindery.requestfactory.shared.ProxyFor;
 import com.google.web.bindery.requestfactory.shared.ValueProxy;

 @ProxyFor(User.class)
 public interface UserProxy extends ValueProxy {
 String getUserId();
 String getEmail();
  String getNickName();
 String getAuthDomain();
 String getFederatedIdentity();
 }

 package com.kuryaat.lms.common.newdto;

 import com.google.appengine.api.datastore.Link;
 import com.google.web.bindery.requestfactory.shared.ProxyFor;
 import com.google.web.bindery.requestfactory.shared.ValueProxy;

 @ProxyFor(Link.class)
 public interface LinkProxy extends ValueProxy {
  String getValue();

 }

 And I'm using them like this:

 import com.google.web.bindery.requestfactory.shared.EntityProxy;
 import com.google.web.bindery.requestfactory.shared.ProxyFor;
 import com.kuryaat.lms.common.dto.DocRefType;
 import com.kuryaat.lms.server.jdo.DocRef;
 import com.kuryaat.lms.server.rf.DocRefLocator;

 @ProxyFor(value = DocRef.class, locator = DocRefLocator.class)
 public interface DocRefProxy extends EntityProxy {

 String getName();
  LinkProxy getLink();
 DocRefType getDocType();
 int getStackIndex();
  String getSourceService();
 }


 But I get the following error when I try to run the code:
 [ERROR] [myapp] - Line 7: User cannot be resolved to a type

 What is the right way to handle these?

 Thanks,
 Avanish

 --
 Life is what you make of it
 Y. Avanish Raju,

 BTech, Computer Science and Engineering  Biotechnology,
 ICFAI University, Dehradun

 -BEGIN GEEK CODE BLOCK-
 Version: 3.12
 GCS/S/MU d- s:- a- C+++ UL+++ P+ L+++ E- W+ N- o? K- w+w++
 !O !M !V
 PS++@ PE++ Y+@ PGP- t 5? X+ R tv b+++ DI+@ D+ G e++ h* r-- y
 --END GEEK CODE BLOCK--




-- 
Life is what you make of it
Y. Avanish Raju,

BTech, Computer Science and Engineering  Biotechnology,
ICFAI University, Dehradun

-BEGIN GEEK CODE BLOCK-
Version: 3.12
GCS/S/MU d- s:- a- C+++ UL+++ P+ L+++ E- W+ N- o? K- w+w++
!O !M !V
PS++@ PE++ Y+@ PGP- t 5? X+ R tv b+++ DI+@ D+ G e++ h* r-- y
--END GEEK CODE BLOCK--

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



RFED flushed context reaches server without nested entity changes

2012-12-28 Thread Avanish Raju
Hi GWT Gurus,

I've been trying to get GWT RequestFactoryEditorDriver working for my
entities with relationship - A contains a ListB.

My editors display my data just fine now, and changes to a.name persist
perfectly as well. Also, when I change the value of a b.name and do a
driver.flush(), on inspecting the returned context in Eclipse, my change
to b.name is present. However, when I context.fire() my saveAndReturn
method, the server-side object doesn't contain my b.name change. How
could this be happening?

(I also posted my question on StackOverflow with detailed code snippets:
http://stackoverflow.com/questions/14041275/request-factory-gwt-editor-change-isnt-persisting-related-jdo-entities
)

Please do help!

(I promise to write up a summary of my issues and solutions on my blog and
link it back here once I've figured this out and can finally save my data!)

Regards,
Avanish

-- 
Life is what you make of it
Y. Avanish Raju,

BTech, Computer Science and Engineering  Biotechnology,
ICFAI University, Dehradun

-BEGIN GEEK CODE BLOCK-
Version: 3.12
GCS/S/MU d- s:- a- C+++ UL+++ P+ L+++ E- W+ N- o? K- w+w++
!O !M !V
PS++@ PE++ Y+@ PGP- t 5? X+ R tv b+++ DI+@ D+ G e++ h* r-- y
--END GEEK CODE BLOCK--

-- 
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.2, guice and gin...

2012-12-27 Thread Avanish Raju
Hi Goktug!

(+google-gin for posterity)

Thanks for the reply! I dug deeper into this today, and nailed it. It was
indeed a Classpath issue. In specific, the ordering. Perhaps one of the
GWT/RequestFactory, or other libraries were overriding the javax.inject
imports that are provided by GIN.

Here's the order that finally worked:

aopalliance.jar
gin-2.0.jar
guice-3.0.jar
guice-assistedinject-3.0.jar
javax.inject.jar


I made the change in Eclipse: Project Build Path  Configure Build Path 
Order and Export. Select all of the above, and choose Top, and then tick
all of the JARS. Any other way, I would continue to get the error. (The
only thing I didn't try is juggling around the order of these specific JARS)

One more issue I ran into, and Thomas(tbroyer) has already answered on
StackOverflow:
https://groups.google.com/forum/?fromgroups=#!topic/google-web-toolkit/0v6gpPEzBAU

I ran into this NPE, which happens because I was injecting the
RequestFactory, and not running initialize on it. Solved by writing a
Provider in my GinModule:

   @Provides
   @Singleton
   MyAppRequestFactory provideMyAppRequestFactory(EventBus eventBus) {
  MyAppRequestFactory requestFactory =
GWT.create(MyAppRequestFactory.class);
  requestFactory.initialize(eventBus);
  return requestFactory;
   }

After that, it runs fine. :) Thanks once again!

Cheers,
Avanish


On Thu, Dec 27, 2012 at 2:23 AM, Goktug Gokdogan gok...@google.com wrote:

 This may be related to depending on multiple versions of Guice.
 As this is related to GIN, google-gin group is a better place to get
 support on this. There was even a recent question about it if you search
 there.

 Good luck and don't forget to share with the rest what worked for you for
 future reference :)

 On Sun, Dec 23, 2012 at 5:01 AM, Avanish Raju yar...@gmail.com wrote:

 GinjectorBindings


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




-- 
Life is what you make of it
Y. Avanish Raju,

BTech, Computer Science and Engineering  Biotechnology,
ICFAI University, Dehradun

-BEGIN GEEK CODE BLOCK-
Version: 3.12
GCS/S/MU d- s:- a- C+++ UL+++ P+ L+++ E- W+ N- o? K- w+w++
!O !M !V
PS++@ PE++ Y+@ PGP- t 5? X+ R tv b+++ DI+@ D+ G e++ h* r-- y
--END GEEK CODE BLOCK--

-- 
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.2, guice and gin...

2012-12-23 Thread Avanish Raju
Please help me. I've still not been able to resolve this.

At least, any pointers as to why this might be happening? I tried to search
online, but this thread is the only reference to this issue that I found.
I've even tried to build guice from svn head, and added gin- and gin-src-
jars to my project. I still get the same error about:

 No implementation for
javax.inject.Providercom.google.gwt.inject.rebind.GinjectorBindings was
bound.

Also, currently, I'm only using GIN on client side, and haven't done any
server-side Guice setup. Could this be the cause for my problem? In other
words, will Gin only work if I'm also using guiceServlet configured?

Thanks,
Avanish


On Sun, Dec 2, 2012 at 8:43 PM, Avanish Raju yar...@gmail.com wrote:

 Hi Carlo,

 How did you fix this issue? I'm running into exactly the same problem.
 When I Run as Web Application on Eclipse, I get the following exception:

  No implementation for
 javax.inject.Providercom.google.gwt.inject.rebind.GinjectorBindings was
 bound.
   while locating
 javax.inject.Providercom.google.gwt.inject.rebind.GinjectorBindings
 for parameter 4 at
 com.google.gwt.inject.rebind.GinjectorBindings.init(GinjectorBindings.java:196)
   at
 com.google.gwt.inject.rebind.GinjectorGeneratorModule.configure(GinjectorGeneratorModule.java:75)

 I've tried making a new project with the GIN source code, and adding that
 as a library to my Java project. But I still get the same error.

 I'm using gin-2.0, which appears to come with guice-3.0 bundled with it.

 Please let me know where I can look to troubleshoot this problem, or if
 there is some other library I should be including as well.

 Regards,
 Avanish

 On Tuesday, February 15, 2011 1:55:11 PM UTC+5:30, Carlo Alberto Degli
 Atti wrote:

 thanks leszek,

  but I'm experiencing this exception

  No implementation for
 javax.inject.Providercom.**google.gwt.inject.rebind.**GinjectorBindings

 was
 bound.
   while locating
 javax.inject.Providercom.**google.gwt.inject.rebind.**GinjectorBindings

 for parameter 4
 at
 com.google.gwt.inject.rebind.**GinjectorBindings.init(**GinjectorBindings.java:

 182)
   at
 com.google.gwt.inject.rebind.**GinjectorGeneratorModule.**configure(**GinjectorGeneratorModule.java:

 69)

 Do you know what does it mean?
 Is something missing?

 Thanks a lot!


 On Feb 14, 10:30 pm, leszek leszek.ptokar...@gmail.com wrote:
  I run into the same problem yesterday but finally, after taking new
  GIN snapshot and migrate to GUICE 3.0 (as is described in your post) I
  was successful and everything seems working now. The only problem I
  spent several hours on was that Nullable annotation disappeared from
  Guice internals and it took me a lot of time until I understood what
  was going on.
 
  http://groups.google.com/**group/google-guice/browse_frm/**
 thread/38859fa.http://groups.google.com/group/google-guice/browse_frm/thread/38859fa...

 
  You have to be prepared for a lot of surprises if you bank on google
  code, is it bad news, but good news is that - on the whole - it works.
 
  On 14 Lut, 16:57, Carlo Alberto Degli Atti lordk...@gmail.com wrote:
 
 
 
 
 
 
 
   Hello everybody,
 
this morning I had the (bad) idea to update my eclipse environment
 to use
   gwt 2.2... (with 2.1 everything was fine)...
 
now I'm experiencing a lot of problems... maybe it's my fault (I'm a
 new
   gwt  related techs user)...
 
My application is using gin and guice; before this morning I was
 using gin
   v1.0 and guice 2.0.
 
Now:
 
*1. after upgrading to gwt (to 2.2) I got this exception (still the
   original guice and gin versions):*
 
  [WARN] failed JettyContainerService$**ApiProxyHandler@ae281c:
   java.lang.**NoClassDefFoundError: com/google/inject/internal/**Lists
 
   [WARN] Error starting handlers
 
   java.lang.**NoClassDefFoundError: com/google/inject/internal/**Lists
 
   at com.google.inject.servlet.**FiltersModuleBuilder.init(
   FiltersModuleBuilder.java:36)
 
   at 
   com.google.inject.servlet.**ServletModule.init(**ServletModule.java:219)

 
   * 2. then I updated the guice version to 3.0-rc2 *mantaining* the
 original
   gin version (1.0), but I got this unlikely mix*:
 
   gin-1.0.jar
 
   guice-2.0.jar
 
   guice-servlet-3.0-rc2.jar
 
  as expected, my application threw this exception:
 
  [WARN] Error starting handlers
 
  java.lang.**NoClassDefFoundError:
   com/google/inject/internal/**util/$Preconditions
 
   at 
   com.google.inject.servlet.**ServletModule.configure(**ServletModule.java:44)

 
   at com.google.inject.**AbstractModule.configure(**AbstractModule.java:59)

 
   ...
 
*3. after some investigations, I discovered that gwt 3.2 requires a
 new gin
   (see this post **http://groups.google.com/**group/google-gin/browse_*
 *thread/thread/70520a.http://groups.google.com/group/google-gin/browse_thread/thread/70520a...

   ). **I also updated gin to 1.1-2.2-SNAPSHOT. *The dependencies looked
 right
   now

RequestFactory, ValueProxy support for Email, Link, User

2012-12-21 Thread Avanish Raju
Hi GWT team,

I've just started migrating from GWT-RPC to RequestFactory, and noticed
that even when using ValueProxy to wrap the datastore objects, they aren't
supported. For e.g, I created a UserProxy and a LinkProxy:

import com.google.appengine.api.users.User;
import com.google.web.bindery.requestfactory.shared.ProxyFor;
import com.google.web.bindery.requestfactory.shared.ValueProxy;

@ProxyFor(User.class)
public interface UserProxy extends ValueProxy {
String getUserId();
String getEmail();
String getNickName();
String getAuthDomain();
String getFederatedIdentity();
}

package com.kuryaat.lms.common.newdto;

import com.google.appengine.api.datastore.Link;
import com.google.web.bindery.requestfactory.shared.ProxyFor;
import com.google.web.bindery.requestfactory.shared.ValueProxy;

@ProxyFor(Link.class)
public interface LinkProxy extends ValueProxy {
 String getValue();

}

And I'm using them like this:

import com.google.web.bindery.requestfactory.shared.EntityProxy;
import com.google.web.bindery.requestfactory.shared.ProxyFor;
import com.kuryaat.lms.common.dto.DocRefType;
import com.kuryaat.lms.server.jdo.DocRef;
import com.kuryaat.lms.server.rf.DocRefLocator;

@ProxyFor(value = DocRef.class, locator = DocRefLocator.class)
public interface DocRefProxy extends EntityProxy {

String getName();
LinkProxy getLink();
DocRefType getDocType();
int getStackIndex();
String getSourceService();
}


But I get the following error when I try to run the code:
[ERROR] [myapp] - Line 7: User cannot be resolved to a type

What is the right way to handle these?

Thanks,
Avanish

-- 
Life is what you make of it
Y. Avanish Raju,

BTech, Computer Science and Engineering  Biotechnology,
ICFAI University, Dehradun

-BEGIN GEEK CODE BLOCK-
Version: 3.12
GCS/S/MU d- s:- a- C+++ UL+++ P+ L+++ E- W+ N- o? K- w+w++
!O !M !V
PS++@ PE++ Y+@ PGP- t 5? X+ R tv b+++ DI+@ D+ G e++ h* r-- y
--END GEEK CODE BLOCK--

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



Google Drive SDK for GWT

2012-12-10 Thread Avanish Raju
Hi Folks,

(Posting here since google-gwt-apis isn't accepting any new posts)

Back in April, the GWT team indicated there would be support for Drive
API/SDK coming.

Is there any progress on this?

The Drive SDK page https://developers.google.com/drive/downloads does
mention GWT(alpha) support. However, when I click through to the GWT
linkhttp://code.google.com/p/gwt-google-apis/,
there is no mention of Drive. Is this coming soon?

If not, are there any templates/examples I could follow to create a JSNI or
Javascript Overlay wrapper for Drive?


Thanks,
Avanish

-- 
Life is what you make of it
Y. Avanish Raju,
Google Inc.

BTech, Computer Science and Engineering  Biotechnology,
ICFAI University, Dehradun

-BEGIN GEEK CODE BLOCK-
Version: 3.12
GCS/S/MU d- s:- a- C+++ UL+++ P+ L+++ E- W+ N- o? K- w+w++
!O !M !V
PS++@ PE++ Y+@ PGP- t 5? X+ R tv b+++ DI+@ D+ G e++ h* r-- y
--END GEEK CODE BLOCK--

-- 
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.2, guice and gin...

2012-12-02 Thread Avanish Raju
Hi Carlo, 

How did you fix this issue? I'm running into exactly the same problem. When 
I Run as Web Application on Eclipse, I get the following exception:

 No implementation for 
javax.inject.Providercom.google.gwt.inject.rebind.GinjectorBindings was 
bound. 
  while locating 
javax.inject.Providercom.google.gwt.inject.rebind.GinjectorBindings 
for parameter 4 at 
com.google.gwt.inject.rebind.GinjectorBindings.init(GinjectorBindings.java:196)
 
  at 
com.google.gwt.inject.rebind.GinjectorGeneratorModule.configure(GinjectorGeneratorModule.java:75)
 

I've tried making a new project with the GIN source code, and adding that 
as a library to my Java project. But I still get the same error.

I'm using gin-2.0, which appears to come with guice-3.0 bundled with it.

Please let me know where I can look to troubleshoot this problem, or if 
there is some other library I should be including as well.

Regards, 
Avanish

On Tuesday, February 15, 2011 1:55:11 PM UTC+5:30, Carlo Alberto Degli Atti 
wrote:

 thanks leszek, 

  but I'm experiencing this exception 

  No implementation for 
 javax.inject.Providercom.google.gwt.inject.rebind.GinjectorBindings 
 was 
 bound. 
   while locating 
 javax.inject.Providercom.google.gwt.inject.rebind.GinjectorBindings 
 for parameter 4 
 at 
 com.google.gwt.inject.rebind.GinjectorBindings.init(GinjectorBindings.java: 

 182) 
   at 
 com.google.gwt.inject.rebind.GinjectorGeneratorModule.configure(GinjectorGeneratorModule.java:
  

 69) 

 Do you know what does it mean? 
 Is something missing? 

 Thanks a lot! 


 On Feb 14, 10:30 pm, leszek leszek.ptokar...@gmail.com wrote: 
  I run into the same problem yesterday but finally, after taking new 
  GIN snapshot and migrate to GUICE 3.0 (as is described in your post) I 
  was successful and everything seems working now. The only problem I 
  spent several hours on was that Nullable annotation disappeared from 
  Guice internals and it took me a lot of time until I understood what 
  was going on. 
  
  http://groups.google.com/group/google-guice/browse_frm/thread/38859fa... 

  
  You have to be prepared for a lot of surprises if you bank on google 
  code, is it bad news, but good news is that - on the whole - it works. 
  
  On 14 Lut, 16:57, Carlo Alberto Degli Atti lordk...@gmail.com wrote: 
  
  
  
  
  
  
  
   Hello everybody, 
  
this morning I had the (bad) idea to update my eclipse environment to 
 use 
   gwt 2.2... (with 2.1 everything was fine)... 
  
now I'm experiencing a lot of problems... maybe it's my fault (I'm a 
 new 
   gwt  related techs user)... 
  
My application is using gin and guice; before this morning I was 
 using gin 
   v1.0 and guice 2.0. 
  
Now: 
  
*1. after upgrading to gwt (to 2.2) I got this exception (still the 
   original guice and gin versions):* 
  
  [WARN] failed JettyContainerService$ApiProxyHandler@ae281c: 
   java.lang.NoClassDefFoundError: com/google/inject/internal/Lists 
  
   [WARN] Error starting handlers 
  
   java.lang.NoClassDefFoundError: com/google/inject/internal/Lists 
  
   at com.google.inject.servlet.FiltersModuleBuilder.init( 
   FiltersModuleBuilder.java:36) 
  
   at 
 com.google.inject.servlet.ServletModule.init(ServletModule.java:219) 
  
   * 2. then I updated the guice version to 3.0-rc2 *mantaining* the 
 original 
   gin version (1.0), but I got this unlikely mix*: 
  
   gin-1.0.jar 
  
   guice-2.0.jar 
  
   guice-servlet-3.0-rc2.jar 
  
  as expected, my application threw this exception: 
  
  [WARN] Error starting handlers 
  
  java.lang.NoClassDefFoundError: 
   com/google/inject/internal/util/$Preconditions 
  
   at 
 com.google.inject.servlet.ServletModule.configure(ServletModule.java:44) 
  
   at com.google.inject.AbstractModule.configure(AbstractModule.java:59) 
  
   ... 
  
*3. after some investigations, I discovered that gwt 3.2 requires a 
 new gin 
   (see this post **
 http://groups.google.com/group/google-gin/browse_thread/thread/70520a... 
   ). **I also updated gin to 1.1-2.2-SNAPSHOT. *The dependencies looked 
 right 
   now: 
  
   gin-1.1-2.2-20110211.140818-5.jar 
  
   guice-3.0-rc2.jar 
  
   guice-assistedinject-3.0-rc2.jar 
  
   guice-servlet-3.0-rc2.jar 
  
   gwt-servlet-2.2.0.jar 
  
   javax.inject-1.jar 
  
 **BUT* the application threw another exception:* 
  
 com.google.inject.CreationException: Guice creation errors: 
  
 1) No implementation for 
   javax.inject.Providercom.google.gwt.inject.rebind.GinjectorBindings 
 was 
   bound. 
  
while locating 
   javax.inject.Providercom.google.gwt.inject.rebind.GinjectorBinding 
  
for parameter 4 at 
   
 com.google.gwt.inject.rebind.GinjectorBindings.init(GinjectorBindings.jav 
 a:182) 
  
at 
   
 com.google.gwt.inject.rebind.GinjectorGeneratorModule.configure(GinjectorGe 
 neratorModule.java:69) 
  
 So: 
  
 - where am I wrong?