Try adding @SkipInterfaceValidation to the EntityBaseRequest or make sure 
that all the interfaces that extends EntityBaseRequest have the getDataPage 
implemented in their implementing class. I noticed a problem that the 
implementing class must contain the methods that are provided. I believe 
this is a problem with the request factory validation tools. To reiterate 
the requestfactory validation tools do not check the parent class for the 
method so I either had to add List<EntityBase> getDataPage(int offset, int 
limit, String orderString){} to the implementing class. I chose to add the 
@SkipInterfaceValidation so that I could allow the requestfactory to skip 
validating my parent service and would get the error at runtime if it could 
not find the method. RequestFactory can find the parent method when it 
instantiates the service. 

The problem described in the section was a problem with generics. You can 
add generics to your EntityBaseRequest<T extends EntityBaseProxy> if you 
wish to make the service more generic. The problem there was that the 
client side code was not able to use the base service because it could not 
find the client side method. Your issue is similar but different. 

Hope this helps,
Chirs

On Sunday, October 6, 2013 11:30:51 AM UTC-5, Manuel wrote:
>
> Hi everyone,
>
> I actually try to do a Celltable-Component, that can work with any 
> Proxy-class. So the component should work with a template class T. 
> (Actually it just works with a certain type of Proxy)
>
> Inside the component, i actually got some Requests for the certain Proxy, 
> like delete(), persist(), findall().  These requests I want to make work 
> with all kinds of proxies.
> Now, instead of writing:
>
>     CertainEntityRequest request = Factory.certainEntityRequest ();
>     Request<List<CertainEntityProxy>> findAll= request.findall(
>         offset, size, orderByString);
>
> I want to have a BaseRequest, that has these services for all my proxies.
> I tried to put all service-methods that I use in my component into one 
> base-Service, similar to this post 
> http://stackoverflow.com/questions/7625692/gwt-2-4-0-requestfactory-polymorphism.
>  
>
> persist() and remove() works well. But I dont know how to implement the 
> findall() / getDataPage() service.
>
>
> @Entity class EntityBase {
>      //some methods, persist(), remove() etc
>      ...
>      public List<EntityBase> getDataPage(int offset, int limit,
>                   String orderString) {...}
> }@Entity class SomeEntity extends EntityBase {...}
> @Entity class SomeOtherEntity extends EntityBase 
> {...}...@ProxyFor(EntityBase.class) class EntityBaseProxy extends EntityProxy 
> {...}@ProxyFor(SomeEntity.class) class SomeEntity extends EntityBaseProxy 
> {...}
> @ProxyFor(SomeOtherEntity.class) class SomeEntity extends EntityBaseProxy 
> {...}
> ...
> @Service(value = EntityBase.class, locator = MyServiceLocator.class)
> @ExtraTypes({ SomeEntity.class, SomeOtherEntity.class })
> public interface EntityBaseRequest extends RequestContext {
>
>     InstanceRequest<EntityBaseProxy, Void> remove();
>
>     InstanceRequest<EntityBaseProxy, Long> persist();
>
>     //This doesnt work. And even if this would work, how to build the query ? 
> I wouldnt know the specific class, it could be SomeEntity or 
> SomeOtherEntity....
>     //Thats the error: *Could not find domain method similar to 
> java.util.List<...EntityBaseProxy> getDataPage(intintjava.lang.String)*
>     *Request<List<EntityBaseProxy>> getDataPage(int offset, int limit, String 
> orderString)*
>
> }
>
> I also found this issue, I guess thats what I try to do: 
> http://code.google.com/p/google-web-toolkit/issues/detail?id=6234
>
>
> Anyways, Im not sure if I even chose the right approach. Maybe there is 
> already an working example for this ? Or a simpler approch?
>
> Regards,
> Manuel
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to