GWT RequestFactory: implementing InstanceRequest methods in separate services -
i using class separate dao handle access requests, don't know how implement instancerequest methods:
public class service { public static dao finddao(long id); } @service(service.class) public interface daorequestcontext extends requestcontext { request<proxyfordao> finddao(long id); instancerequest<proxyfordao, long> persist(); }
i define public long persist()
in dao
implementation, because gwt docs say, "on server, instance methods must implemented non-static methods in entity type," request factory can't seem find it:
severe: not find methods named persist in com.activegrade.server.data.service feb 23, 2011 10:03:02 pm com.google.gwt.requestfactory.server.servicelayerdecorator die
how implement instance method in service
? don't know how transform instancerequest
. need connect dao
class service
way, code generator knows in service
methods skip on dao
instancerequest
calls?
asaik it's not possible because instancerequest
methods bound class specified in @service
annotation. request
methods possible have method multiple data classes 1 service class, using locators. understand of request factory not possible instancerequest
methods. see project, uses locators, methods in 1 place: http://code.google.com/p/listwidget/
edit: i've rewritten answer based after update/and comment below.
Comments
Post a Comment