Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    Jul 2011
    Posts
    25
    Vote Rating
    1
    IgyBoy is on a distinguished road

      0  

    Default Paging grid with RequestFactory and related entity - doesn't load related entity

    Paging grid with RequestFactory and related entity - doesn't load related entity


    Hi all,

    i have a problem with paging request factory grid.
    If I try to fetch entities that have related entities(lazily loaded) through request factory,and show results on paging grid, i run into a problem.
    The implementation is similar to this:
    http://www.sencha.com/examples/#Exam...estfactorygrid
    I have included the "with("partner") statment on request context,but according to backing database logs, partners(related entity) were never loaded from database.If I leave the PropertyAccess as is, and only replace paging loaders and proxies with straightforwart call to fire() the request to server, I get everything working as expected.
    "partner" entities are loaded as expected.
    Is there anything that I missed?
    part of the application code:



    Entity proxy:
    Code:
    @ProxyFor(value=Kupac.class, locator=EntityLocator.class)
    public interface KupacProxy extends EntityProxy {
    
        Long getVersion();
        
        Integer getId() ;
        void setId(Integer id);
        
        //nested entity
    PartnerProxy getPartner();
        void setPartner(PartnerProxy partner);
        
        String getOib();
        void setOib(String oib);
        
        String getImePrezime();
        void setImePrezime(String imePrezime);
        
        String getAdresa();
        void setAdresa(String adresa);
        
        String getMjesto();
        void setMjesto(String mjesto);
        
        Boolean getAktivan();
        void setAktivan(Boolean aktivan);
        
        String getDefaultBrojKartice();
        void setDefaultBrojKartice(String defaultBrojKartice);
        
        Date getDatumOtvaranja();
        void setDatumOtvaranja(Date datumOtvaranja);
        
        //Set<KarticaProxy> getKarticas();
        //void setKarticas(Set<KarticaProxy> karticas);
        
    }
    Code:
    Code:
        public interface KupacProxyProperties extends PropertyAccess<KupacProxy>{
            ModelKeyProvider<KupacProxy> id();
            ValueProvider<KupacProxy, String> oib();
            ValueProvider<KupacProxy, String> imePrezime();
            ValueProvider<KupacProxy, String> adresa();
            ValueProvider<KupacProxy, String> mjesto();
    //this property fails,it doesn't load related entity "partner"
    @Path("partner.naziv")
    ValueProvider<KupacProxy, String> partner();
            ValueProvider<KupacProxy, Boolean> aktivan();
            ValueProvider<KupacProxy, String> defaultBrojKartice();
            ValueProvider<KupacProxy, Date> datumOtvaranja();
        }
    Code:
    ctx = Kvitto_Card_Manager.KvittoRF.KupacRequest();
            RequestFactoryProxy<FilterPagingLoadConfig, PagingLoadResult<KupacProxy>> proxy=new RequestFactoryProxy<FilterPagingLoadConfig, PagingLoadResult<KupacProxy>>() {
                @Override
                public void load(FilterPagingLoadConfig loadConfig, Receiver<? super PagingLoadResult<KupacProxy>> receiver) {
                    List<SortInfo> sortInfo = createRequestSortInfo(ctx, loadConfig.getSortInfo());
                    List<FilterConfig> filterConfig = createRequestFilterConfig(ctx, loadConfig.getFilters());
    
    //notice the "with" parameter is included
                    ((KupacRequest)ctx).getKupci(loadConfig.getOffset(), loadConfig.getLimit(), sortInfo, filterConfig).with("partner").to(receiver);
                    
                    ctx.fire();
                }
            };
    
            
            Kupacloader = new PagingLoader<FilterPagingLoadConfig, PagingLoadResult<KupacProxy>>(proxy) 
            {
                @Override
                protected FilterPagingLoadConfig newLoadConfig() {
                    return new FilterPagingLoadConfigBean();}
                };
    Error:
    15:31:23.382 [ERROR] [kvitto_card_manager] Uncaught exception escaped
    com.google.web.bindery.event.shared.UmbrellaException: One or more exceptions caught, see full set in UmbrellaException#getCauses
    at com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$StandardPayloadDialect.processPayload(AbstractRequestContext.java:387)
    at com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$5.onTransportSuccess(AbstractRequestContext.java:1108)
    at com.google.web.bindery.requestfactory.gwt.client.DefaultRequestTransport$1.onResponseReceived(DefaultRequestTransport.java:136)
    at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:287)
    at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:395)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    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.GeneratedMethodAccessor35.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    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(Thread.java:679)
    Caused by: com.google.gwt.event.shared.UmbrellaException: One or more exceptions caught, see full set in UmbrellaException#getCauses
    at com.google.gwt.event.shared.EventBus.castFireEvent(EventBus.java:69)
    at com.google.gwt.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:57)
    at com.sencha.gxt.data.shared.loader.Loader.fireEvent(Loader.java:207)
    at com.sencha.gxt.data.shared.loader.PagingLoader.onLoadSuccess(PagingLoader.java:129)
    at com.sencha.gxt.data.shared.loader.PagingLoader.onLoadSuccess(PagingLoader.java:1)
    at com.sencha.gxt.data.shared.loader.Loader$1.onSuccess(Loader.java:228)
    at com.sencha.gxt.data.shared.loader.RequestFactoryProxy$1.onSuccess(RequestFactoryProxy.java:36)
    at com.google.web.bindery.requestfactory.shared.impl.AbstractRequest.onSuccess(AbstractRequest.java:129)
    at com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$StandardPayloadDialect.processPayload(AbstractRequestContext.java:354)
    at com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$5.onTransportSuccess(AbstractRequestContext.java:1108)
    at com.google.web.bindery.requestfactory.gwt.client.DefaultRequestTransport$1.onResponseReceived(DefaultRequestTransport.java:136)
    at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:287)
    at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:395)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    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.GeneratedMethodAccessor35.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    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(Thread.java:679)
    Caused by: com.google.gwt.event.shared.UmbrellaException: One or more exceptions caught, see full set in UmbrellaException#getCauses
    at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129)
    at com.sencha.gxt.data.shared.Store.fireEvent(Store.java:609)
    at com.sencha.gxt.data.shared.ListStore.replaceAll(ListStore.java:290)
    at com.sencha.gxt.data.shared.loader.LoadResultListStoreBinding.onLoad(LoadResultListStoreBinding.java:39)
    at com.sencha.gxt.data.shared.loader.LoadEvent.dispatch(LoadEvent.java:77)
    at com.sencha.gxt.data.shared.loader.LoadEvent.dispatch(LoadEvent.java:1)
    at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
    at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
    at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
    at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
    at com.google.gwt.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:52)
    at com.google.gwt.event.shared.EventBus.castFireEvent(EventBus.java:67)
    at com.google.gwt.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:57)
    at com.sencha.gxt.data.shared.loader.Loader.fireEvent(Loader.java:207)
    at com.sencha.gxt.data.shared.loader.PagingLoader.onLoadSuccess(PagingLoader.java:129)
    at com.sencha.gxt.data.shared.loader.PagingLoader.onLoadSuccess(PagingLoader.java:1)
    at com.sencha.gxt.data.shared.loader.Loader$1.onSuccess(Loader.java:228)
    at com.sencha.gxt.data.shared.loader.RequestFactoryProxy$1.onSuccess(RequestFactoryProxy.java:36)
    at com.google.web.bindery.requestfactory.shared.impl.AbstractRequest.onSuccess(AbstractRequest.java:129)
    at com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$StandardPayloadDialect.processPayload(AbstractRequestContext.java:354)
    at com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$5.onTransportSuccess(AbstractRequestContext.java:1108)
    at com.google.web.bindery.requestfactory.gwt.client.DefaultRequestTransport$1.onResponseReceived(DefaultRequestTransport.java:136)
    at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:287)
    at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:395)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    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.GeneratedMethodAccessor35.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    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(Thread.java:679)
    Caused by: java.lang.NullPointerException: null
    at kvitto.cardmanager.shared.KupacProxy_partner_naziv_ValueProviderImpl.getValue(KupacProxy_partner_naziv_ValueProviderImpl.java:6)
    at kvitto.cardmanager.shared.KupacProxy_partner_naziv_ValueProviderImpl.getValue(KupacProxy_partner_naziv_ValueProviderImpl.java:1)
    at com.sencha.gxt.widget.core.client.grid.GridView.getRenderedValue(GridView.java:1677)
    at com.sencha.gxt.widget.core.client.grid.GridView.doRender(GridView.java:1390)
    at com.sencha.gxt.widget.core.client.grid.GridView.renderRows(GridView.java:2566)
    at com.sencha.gxt.widget.core.client.grid.GridView.refresh(GridView.java:839)
    at com.sencha.gxt.widget.core.client.grid.GridView.onDataChanged(GridView.java:2275)
    at com.sencha.gxt.widget.core.client.grid.GridView$10.onDataChange(GridView.java:1990)
    at com.sencha.gxt.data.shared.event.StoreDataChangeEvent.dispatch(StoreDataChangeEvent.java:105)
    at com.sencha.gxt.data.shared.event.StoreDataChangeEvent.dispatch(StoreDataChangeEvent.java:1)
    at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
    at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
    at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
    at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
    at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127)
    at com.sencha.gxt.data.shared.Store.fireEvent(Store.java:609)
    at com.sencha.gxt.data.shared.ListStore.replaceAll(ListStore.java:290)
    at com.sencha.gxt.data.shared.loader.LoadResultListStoreBinding.onLoad(LoadResultListStoreBinding.java:39)
    at com.sencha.gxt.data.shared.loader.LoadEvent.dispatch(LoadEvent.java:77)
    at com.sencha.gxt.data.shared.loader.LoadEvent.dispatch(LoadEvent.java:1)
    at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
    at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
    at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
    at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
    at com.google.gwt.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:52)
    at com.google.gwt.event.shared.EventBus.castFireEvent(EventBus.java:67)
    at com.google.gwt.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:57)
    at com.sencha.gxt.data.shared.loader.Loader.fireEvent(Loader.java:207)
    at com.sencha.gxt.data.shared.loader.PagingLoader.onLoadSuccess(PagingLoader.java:129)
    at com.sencha.gxt.data.shared.loader.PagingLoader.onLoadSuccess(PagingLoader.java:1)
    at com.sencha.gxt.data.shared.loader.Loader$1.onSuccess(Loader.java:228)
    at com.sencha.gxt.data.shared.loader.RequestFactoryProxy$1.onSuccess(RequestFactoryProxy.java:36)
    at com.google.web.bindery.requestfactory.shared.impl.AbstractRequest.onSuccess(AbstractRequest.java:129)
    at com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$StandardPayloadDialect.processPayload(AbstractRequestContext.java:354)
    at com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$5.onTransportSuccess(AbstractRequestContext.java:1108)
    at com.google.web.bindery.requestfactory.gwt.client.DefaultRequestTransport$1.onResponseReceived(DefaultRequestTransport.java:136)
    at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:287)
    at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:395)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    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.GeneratedMethodAccessor35.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    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(Thread.java:679)
    Last edited by IgyBoy; 1 Nov 2012 at 6:38 AM. Reason: included error info

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,634
    Vote Rating
    80
    Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice

      0  

    Default


    I'm having a bit of trouble understand this issue. You said

    "partner" entities are loaded as expected.
    but your exception says that either the model is null, or the partner isn't loaded, causing
    Code:
    Caused by: java.lang.NullPointerException: null
    at kvitto.cardmanager.shared.KupacProxy_partner_naziv_ValueProviderImpl.getValue(KupacProxy_partner_naziv_ValueProviderImpl.java:6)
    The code that generates the ValueProvider is almost certainly writing out something like this:
    Code:
    public String getValue(KupacProxy object) {
        return object.getPartner().getNaziv();
    }
    Have you tried running through all the items in the Store and ensuring that all have a non-null value for the result in getPartner()?

    If RequestFactory isn't bringing the PartnerProxy to the client, that either means you are loading from another source (or creating new objects on the client?), or that your with() is correct, but the value is null on the server. It could also be informative to debug the server and verify that getPartner() is invoked on Kupac types, and that it never returns null.

    GXT doesnt modify RequestFactory behavior, it just calls the getters and setters you ask for in your ValueProvider.

    One last thought: Did you get any warnings from the Dev mode console, suggesting that it can't find either the getPartner() or getNaziv() methods?

  3. #3
    Sencha User
    Join Date
    Jul 2011
    Posts
    25
    Vote Rating
    1
    IgyBoy is on a distinguished road

      0  

    Default


    Quote Originally Posted by Colin Alworth View Post
    GXT doesnt modify RequestFactory behavior, it just calls the getters and setters you ask for in your ValueProvider.

    One last thought: Did you get any warnings from the Dev mode console, suggesting that it can't find either the getPartner() or getNaziv() methods?

    Hi Colin,
    thank you for prompt reply.

    As it turned out, things are a bit different when using PagingLoadResults<T>, after all.
    The problem was trivial,but I lost quite some time figuring it out.
    To explain: when calling RF without paging loaders,proxies etc., the with() method on requestContext operates directly over the entity requested(it's proxy to be exact),so on client side we have something like this(pseudo code):

    requestFactory.kupacRequest.getKupci().with("partner").fire(new Reciever<KupacProxy>...

    on server side you would interact directly with "Kupac" entity/KupacProxy, so when request factory's Resolver class tries resolving the "with("partner") it is resolving it directly on KupacProxy,and it works as expected. However, when you have PagingLoadResultBean and coresponding proxy in between,like this:

    Code from request factory grid online sample:
    Code:
    @Service(value = PostService.class, locator = PostServiceLocator.class)
    public interface PostRequest extends RequestContext {
      @ProxyFor(PostPagingLoadResultBean.class)
      public interface PostPagingLoadResultProxy extends ValueProxy, PagingLoadResult<PostProxy> {
        @Override
        public List<PostProxy> getData();
      }
       
      public static class PostPagingLoadResultBean extends PagingLoadResultBean<Post> {
        protected PostPagingLoadResultBean() {
           
        }
        public PostPagingLoadResultBean(List<Post> list, int totalLength, int offset) {
          super(list, totalLength, offset);
        }
      }
     
      Request<PostPagingLoadResultProxy> getPosts(int offset, int limit, List<? extends SortInfo> sortInfo, List<? extends FilterConfig> filterConfig);
    }
    it fails because now request factory's resolver tries resolving the "with("partner") on PostPagingLoadResultBean, and not on KupacProxy....in this case KupacProxy i encapsulated in the "data" field of PagingLoadResult<KupacProxy>.

    The resolution is straightforward: on client side,instead calling this:

    ....with("partner")...

    I call:

    ....with("data.partner")

    and everything works again.

  4. #4
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,634
    Vote Rating
    80
    Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice

      0  

    Default


    Ah! Of course, I should have worked that out on my own.

    Glad you got it working despite my 'help'!

  5. #5
    Sencha User
    Join Date
    Jul 2011
    Posts
    25
    Vote Rating
    1
    IgyBoy is on a distinguished road

      0  

    Default


    No problem. Sometimes the simplest things give you the biggest headaches.

    Tnx anyway,
    Igor

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar