1. #1
    Sencha User
    Join Date
    Dec 2011
    Location
    CH
    Posts
    6
    Vote Rating
    0
    gugus is on a distinguished road

      0  

    Default (3.0.0 RC) Grid sort doen't seem to work correctly

    (3.0.0 RC) Grid sort doen't seem to work correctly


    I have the impression the grid sort doesn't work correctly yet.

    If I sort the grid for example with a date column I get only one row displayed (about 70 are available). But if I click on the date column header I get all columns. It looks like a refresh problem or a bug in the sorter. What do you think?

    The result is different if I change the sort key to another column but I get never the complete result with the "automatic" sort.

    Here's my code (some values renamed):
    Code:
    package client;
    
    import java.math.BigDecimal;
    import java.util.ArrayList;
    import java.util.Date;
    import java.util.List;
    
    import com.google.gwt.core.client.GWT;
    import com.google.gwt.user.client.rpc.AsyncCallback;
    import com.google.gwt.user.client.ui.DialogBox;
    import com.google.gwt.user.client.ui.IsWidget;
    import com.google.gwt.user.client.ui.Widget;
    import com.sencha.gxt.core.client.ValueProvider;
    import com.sencha.gxt.data.shared.ListStore;
    import com.sencha.gxt.data.shared.ModelKeyProvider;
    import com.sencha.gxt.data.shared.PropertyAccess;
    import com.sencha.gxt.data.shared.SortDir;
    import com.sencha.gxt.data.shared.Store.StoreSortInfo;
    import com.sencha.gxt.widget.core.client.ContentPanel;
    import com.sencha.gxt.widget.core.client.grid.ColumnConfig;
    import com.sencha.gxt.widget.core.client.grid.ColumnModel;
    import com.sencha.gxt.widget.core.client.grid.Grid;
    import com.sencha.gxt.widget.core.client.grid.GridSelectionModel;
    import com.sencha.gxt.widget.core.client.tips.QuickTip;
    import shared.dataobject.business.Voucher;
    import shared.service.Service;
    import shared.service.ServiceAsync;
    
    public class AGrid implements IsWidget {
    
      interface VoucherProperties extends PropertyAccess<Voucher> {
    
        ModelKeyProvider<Voucher> key();
        ValueProvider<Voucher, Integer> voucherId();
        ValueProvider<Voucher, BigDecimal> amount();
        ValueProvider<Voucher, BigDecimal> balance();
        ValueProvider<Voucher, Date> valDate();
        ValueProvider<Voucher, String> status();
        ValueProvider<Voucher, String> type();
      }
    
      private static final VoucherProperties props = GWT.create(VoucherProperties.class);
    
      private final ServiceAsync aService = GWT.create(Service.class);
    
      ListStore<Voucher> store;
    
      @Override
      public Widget asWidget() {
        ColumnConfig<Voucher, Integer> voucherIdCol = new ColumnConfig<Voucher, Integer>(props.voucherId(), 100, "Voucher ID");
        ColumnConfig<Voucher, BigDecimal> amountCol = new ColumnConfig<Voucher, BigDecimal>(props.amount(), 100, "Amount");
        ColumnConfig<Voucher, BigDecimal> balanceCol = new ColumnConfig<Voucher, BigDecimal>(props.balance(), 100, "Balance");
        ColumnConfig<Voucher, Date> valDateCol = new ColumnConfig<Voucher, Date>(props.valDate(), 100, "Valuta Date");
        ColumnConfig<Voucher, String> statusCol = new ColumnConfig<Voucher, String>(props.status(), 100, "Status");
        ColumnConfig<Voucher, String> typeCol = new ColumnConfig<Voucher, String>(props.type(), 100, "Type");
    
        List<ColumnConfig<Voucher, ?>> l = new ArrayList<ColumnConfig<Voucher, ?>>();
        l.add(voucherIdCol);
        l.add(valDateCol);
        l.add(amountCol);
        l.add(balanceCol);
        l.add(statusCol);
        l.add(typeCol);
        ColumnModel<Voucher> cm = new ColumnModel<Voucher>(l);
    
        store = new ListStore<Voucher>(props.key());
        store.addSortInfo(new StoreSortInfo<Voucher>(props.valDate(), SortDir.DESC));
    
        ContentPanel cp = new ContentPanel();
        cp.setHeadingText("Vouchers");
        cp.addStyleName("margin-10");
        cp.setCollapsible(true);
    
        final Grid<Voucher> grid = new Grid<Voucher>(store, cm);
        grid.getView().setAutoExpandColumn(typeCol);
        grid.setBorders(false);
        grid.setSelectionModel(new GridSelectionModel<Voucher>());
        cp.add(grid);
    
        // needed to enable quicktips (qtitle for the heading and qtip for the
        // content) that are setup in the change GridCellRenderer
        new QuickTip(grid);
        
        return cp;
      }
    
      public void getVouchers(final Integer accountId) {
    
        aService.getVouchers(accountId, new AsyncCallback<List<Voucher>>() {
    
          @Override
          public void onSuccess(List<Voucher> result) {
            loadVouchers(result);
          }
    
          @Override
          public void onFailure(Throwable caught) {
            // TODO Show the RPC error message to the user
          }
        });
    
      }
    
      private void loadVouchers(List<Voucher> vouchers) {
        store.clear();
    
        if (vouchers != null && !vouchers.isEmpty()) {
          store.addAll(vouchers);
        }
      }
    }

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,734
    Vote Rating
    90
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    Unfortunately, your example isn't complete enough for anyone to run - the RPC interfaces, servlet code, and models are all missing. Instead of including those, try to make the example simple enough to just generated data on the client.

    Without knowing the conditions that make the grid avoid drawing items, it is hard to say what the bug might be. The main things I can think of are that perhaps your key field isn't actually unique, or that there is a bug in sorting items that are exactly the same. Are you able to reproduce this behavior at http://sencha.com/examples-dev/ ?

  3. #3
    Sencha User
    Join Date
    Dec 2011
    Location
    CH
    Posts
    6
    Vote Rating
    0
    gugus is on a distinguished road

      0  

    Default Second attempt

    Second attempt


    Thanks for the input. I tried now to get working an example to show the behavior without using remote server calls. During this tries I think I got closer to the problem. It may have to do with a client side call back. We name this "SimpleCallback" to get some values from a popup. This simple callback looks like this
    Code:
    package client;
    import com.google.gwt.core.client.RunAsyncCallback;
    import com.google.gwt.user.client.rpc.AsyncCallback;
    
    public abstract class SimpleCallback<T> implements AsyncCallback<T>, RunAsyncCallback {
    
      public final void onSuccess(T result) {
        processResult(result);
      };
    
      @Override
      public void onSuccess() {
        processResult(null);
      }
    
      protected abstract void processResult(T result);
    
      protected void processFailure(Throwable caught) {
        // TODO Show the RPC error message to the user
      }
    
      public final void onFailure(Throwable caught) {
        processFailure(caught);
      }
    }
    For demonstration I've removed all things which are not needed (normally there where search fields in a form but doesn't matter for the problem):
    Code:
    package client;
    
    import com.google.gwt.editor.client.Editor;
    import com.google.gwt.user.client.rpc.AsyncCallback;
    import com.google.gwt.user.client.ui.IsWidget;
    import com.google.gwt.user.client.ui.Widget;
    import com.sencha.gxt.widget.core.client.Dialog;
    import com.sencha.gxt.widget.core.client.button.ButtonBar;
    import com.sencha.gxt.widget.core.client.button.TextButton;
    import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
    import com.sencha.gxt.widget.core.client.event.SelectEvent;
    import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
    
    public class SimpleWindow implements IsWidget, Editor<SearchCriteria> {
    
      private final AsyncCallback<SearchCriteria> callback;
    
      private Dialog panel;
    
      public SimpleWindow(AsyncCallback<SearchCriteria> callback) {
        this.callback = callback;
    
        initializeView();
        panel.show();
      }
    
      private void initializeView() {
        panel = new Dialog();
        panel.setHeadingText("Search");
        panel.setSize("300", "300");
        panel.setModal(true);
    
        VerticalLayoutContainer con = new VerticalLayoutContainer();
        panel.add(con);
    
        ButtonBar buttonBar = panel.getButtonBar();
        buttonBar.remove(0);
        TextButton searchButton = new TextButton("Search");
        searchButton.addSelectHandler(new SelectHandler() {
    
          public void onSelect(SelectEvent event) {
            initSearch();
          }
    
        });
        buttonBar.add(searchButton);
      }
    
      @Override
      public Widget asWidget() {
        if (panel == null) {
          initializeView();
        }
    
        return panel;
      }
    
      private void initSearch() {
        panel.hide();
        callback.onSuccess(null); // normally the search criteria class but null works fine for this example
      };
    }
    The class SearchCriteria is a simple class just holding some values. For this case, you can create an empty one.

    Now, again the Grid class from yesterday with some modifications:
    Code:
    package client;
    
    import java.math.BigDecimal;
    import java.util.ArrayList;
    import java.util.Date;
    import java.util.List;
    
    import com.google.gwt.core.client.GWT;
    import com.google.gwt.user.client.ui.IsWidget;
    import com.google.gwt.user.client.ui.Widget;
    import com.sencha.gxt.core.client.ValueProvider;
    import com.sencha.gxt.data.shared.ListStore;
    import com.sencha.gxt.data.shared.ModelKeyProvider;
    import com.sencha.gxt.data.shared.PropertyAccess;
    import com.sencha.gxt.data.shared.SortDir;
    import com.sencha.gxt.data.shared.Store.StoreSortInfo;
    import com.sencha.gxt.widget.core.client.ContentPanel;
    import com.sencha.gxt.widget.core.client.grid.ColumnConfig;
    import com.sencha.gxt.widget.core.client.grid.ColumnModel;
    import com.sencha.gxt.widget.core.client.grid.Grid;
    import com.sencha.gxt.widget.core.client.grid.GridSelectionModel;
    import com.sencha.gxt.widget.core.client.tips.QuickTip;
    
    public class AGrid implements IsWidget {
    
      interface VoucherProperties extends PropertyAccess<Voucher> {
        ModelKeyProvider<Voucher> key();
        ValueProvider<Voucher, Integer> voucherId();
        ValueProvider<Voucher, BigDecimal> amount();
        ValueProvider<Voucher, BigDecimal> balance();
        ValueProvider<Voucher, Date> valDate();
        ValueProvider<Voucher, String> status();
        ValueProvider<Voucher, String> type();
      }
    
      private static final VoucherProperties props = GWT.create(VoucherProperties.class);
    
      ListStore<Voucher> store;
    
      @Override
      public Widget asWidget() {
        ColumnConfig<Voucher, Integer> voucherIdCol = new ColumnConfig<Voucher, Integer>(props.voucherId(), 100, "Voucher ID");
        ColumnConfig<Voucher, BigDecimal> amountCol = new ColumnConfig<Voucher, BigDecimal>(props.amount(), 100, "Amount");
        ColumnConfig<Voucher, BigDecimal> balanceCol = new ColumnConfig<Voucher, BigDecimal>(props.balance(), 100, "Balance");
        ColumnConfig<Voucher, Date> valDateCol = new ColumnConfig<Voucher, Date>(props.valDate(), 100, "Valuta Date");
        ColumnConfig<Voucher, String> statusCol = new ColumnConfig<Voucher, String>(props.status(), 100, "Status");
        ColumnConfig<Voucher, String> typeCol = new ColumnConfig<Voucher, String>(props.type(), 100, "Type");
    
        List<ColumnConfig<Voucher, ?>> l = new ArrayList<ColumnConfig<Voucher, ?>>();
        l.add(voucherIdCol);
        l.add(valDateCol);
        l.add(amountCol);
        l.add(balanceCol);
        l.add(statusCol);
        l.add(typeCol);
        ColumnModel<Voucher> cm = new ColumnModel<Voucher>(l);
    
        store = new ListStore<Voucher>(props.key());
        store.addSortInfo(new StoreSortInfo<Voucher>(props.valDate(), SortDir.DESC));
    
        ContentPanel cp = new ContentPanel();
        cp.setHeadingText("Payments (Zahlungen)");
        cp.addStyleName("margin-10");
        cp.setCollapsible(true);
    
        final Grid<Voucher> grid = new Grid<Voucher>(store, cm);
        grid.getView().setAutoExpandColumn(typeCol);
        grid.setBorders(false);
        grid.setSelectionModel(new GridSelectionModel<Voucher>());
        cp.add(grid);
    
        new QuickTip(grid);
        return cp;
      }
    
      public void getVouchers(ArrayList<Voucher> vouchers) {
        loadVouchers(vouchers);
      }
    
      private void loadVouchers(List<Voucher> vouchers) {
        store.clear();
    
        if (vouchers != null && !vouchers.isEmpty()) {
          store.addAll(vouchers);
        }
      }
    }
    Then the voucher class (a little compressed...):
    Code:
    package client;
    
    import java.io.Serializable;
    import java.math.BigDecimal;
    import java.util.Date;
    
    public class Voucher implements Serializable {
      private static final long serialVersionUID = 1L;
    
      private Integer voucherId;
      private Integer accountId;
      private BigDecimal amount;
      private BigDecimal balance;
      private String status;
      private String type;
      private Date valDate;
    
      public Integer getKey() { return voucherId; }
      public Integer getVoucherId() { return voucherId; }
      public void setVoucherId(Integer voucherId) { this.voucherId = voucherId; }
      public Integer getAccountId() { return accountId; }
      public void setAccountId(Integer accountId) { this.accountId = accountId; }
      public BigDecimal getAmount() { return amount; }
      public void setAmount(BigDecimal amount) { this.amount = amount; }
      public BigDecimal getBalance() { return balance; }
      public void setBalance(BigDecimal balance) { this.balance = balance; }
      public String getStatus() { return status; }
      public void setStatus(String status) { this.status = status; }
      public String getType() { return type; }
      public void setType(String type) { this.type = type; }
      public Date getValDate() { return valDate; }
      public void setValDate(Date valDate) { this.valDate = valDate; }
    }
    The next class is the one which binds the grid (simplified some things too). I think here is the pain point. Have a look on the comments in the onSearch() method.
    Code:
    package client;
    
    import java.math.BigDecimal;
    import java.util.ArrayList;
    import java.util.Date;
    
    import com.google.gwt.user.client.Window;
    import com.sencha.gxt.core.client.util.Margins;
    import com.sencha.gxt.widget.core.client.container.BorderLayoutContainer;
    import com.sencha.gxt.widget.core.client.container.MarginData;
    import com.sencha.gxt.widget.core.client.container.SimpleContainer;
    import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
    import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData;
    
    public class AShell extends BorderLayoutContainer {
      private SimpleContainer center;
      private AGrid grid;
    
      public AShell() {
        grid = new AGrid();
    
        monitorWindowResize = true;
        Window.enableScrolling(false);
        setPixelSize(Window.getClientWidth(), Window.getClientHeight());
    
        MarginData centerData = new MarginData();
        centerData.setMargins(new Margins(5));
    
        VerticalLayoutData vldDetail = new VerticalLayoutData();
        vldDetail.setHeight(300);
        vldDetail.setMargins(new Margins(0, 5, 10, 5));
    
        VerticalLayoutData vldTable = new VerticalLayoutData();
        vldTable.setHeight(200);
        vldTable.setMargins(new Margins(0, 5, 10, 5));
    
        center = new SimpleContainer();
        VerticalLayoutContainer vbl = new VerticalLayoutContainer();
    
        vbl.add(grid.asWidget(), vldTable);
        
        center.add(vbl);
        setCenterWidget(center, centerData);
    
        onSearch();
      }
    
      private void onSearch() {
        // grid.getVouchers(createVouchers()); // placed here: all rows are shown and sort works.
        
        final SimpleCallback<SearchCriteria> callback = new SimpleCallback<SearchCriteria>() {
          @Override
          protected void processResult(SearchCriteria result) {
            grid.getVouchers(createVouchers()); // placed here: only one row is shown
          }
        };
        new SimpleWindow(callback).asWidget();
      }
      
      private ArrayList<Voucher> createVouchers() {
        
        ArrayList<Voucher> vouchers= new ArrayList<Voucher>();
        Voucher voucher = new Voucher();
        voucher.setAccountId(12345);
        voucher.setVoucherId(1);
        voucher.setStatus("normal");
        voucher.setValDate(new Date(2000,12,0));
        voucher.setType("A");
        voucher.setBalance(new BigDecimal(0.0));
        voucher.setAmount(new BigDecimal(10.0));
        vouchers.add(voucher);
        
        voucher = new Voucher();
        voucher.setAccountId(12345);
        voucher.setVoucherId(2);
        voucher.setStatus("normal");
        voucher.setValDate(new Date(2000,12,1));
        voucher.setType("A");
        voucher.setBalance(new BigDecimal(0.0));
        voucher.setAmount(new BigDecimal(20.0));
        vouchers.add(voucher);
        
        voucher = new Voucher();
        voucher.setAccountId(12345);
        voucher.setVoucherId(3);
        voucher.setStatus("normal");
        voucher.setValDate(new Date(2000,12,2));
        voucher.setType("A");
        voucher.setBalance(new BigDecimal(0.0));
        voucher.setAmount(new BigDecimal(30.0));
        vouchers.add(voucher);
        
        voucher = new Voucher();
        voucher.setAccountId(12345);
        voucher.setVoucherId(4);
        voucher.setStatus("normal");
        voucher.setValDate(new Date(2000,12,3));
        voucher.setType("A");
        voucher.setBalance(new BigDecimal(0.0));
        voucher.setAmount(new BigDecimal(40.0));
        vouchers.add(voucher);
        
        voucher = new Voucher();
        voucher.setAccountId(12345);
        voucher.setVoucherId(5);
        voucher.setStatus("normal");
        voucher.setValDate(new Date(2000,12,4));
        voucher.setType("A");
        voucher.setBalance(new BigDecimal(0.0));
        voucher.setAmount(new BigDecimal(50.0));
        vouchers.add(voucher);
        
        voucher = new Voucher();
        voucher.setAccountId(12345);
        voucher.setVoucherId(6);
        voucher.setStatus("normal");
        voucher.setValDate(new Date(2000,12,5));
        voucher.setType("A");
        voucher.setBalance(new BigDecimal(0.0));
        voucher.setAmount(new BigDecimal(60.0));
        vouchers.add(voucher);
        
        voucher = new Voucher();
        voucher.setAccountId(12345);
        voucher.setVoucherId(7);
        voucher.setStatus("normal");
        voucher.setValDate(new Date(2000,12,6));
        voucher.setType("A");
        voucher.setBalance(new BigDecimal(0.0));
        voucher.setAmount(new BigDecimal(30.0));
        vouchers.add(voucher);
        
        voucher = new Voucher();
        voucher.setAccountId(12345);
        voucher.setVoucherId(8);
        voucher.setStatus("normal");
        voucher.setValDate(new Date(2000,12,7));
        voucher.setType("A");
        voucher.setBalance(new BigDecimal(0.0));
        voucher.setAmount(new BigDecimal(50.0));
        vouchers.add(voucher);
        
        voucher = new Voucher();
        voucher.setAccountId(12345);
        voucher.setVoucherId(9);
        voucher.setStatus("normal");
        voucher.setValDate(new Date(2000,12,8));
        voucher.setType("A");
        voucher.setBalance(new BigDecimal(0.0));
        voucher.setAmount(new BigDecimal(50.0));
        vouchers.add(voucher);
        
        voucher = new Voucher();
        voucher.setAccountId(12345);
        voucher.setVoucherId(10);
        voucher.setStatus("normal");
        voucher.setValDate(new Date(2000,12,9));
        voucher.setType("A");
        voucher.setBalance(new BigDecimal(0.0));
        voucher.setAmount(new BigDecimal(1000.0));
        vouchers.add(voucher);
        
        return vouchers;
      }
    }
    Finally to complete the classes (also simplified and reduced). First, the one calling the AShell class...
    Code:
    package client;
    
    import com.google.gwt.core.client.GWT;
    import com.google.gwt.user.client.Window;
    import com.google.gwt.user.client.ui.RootPanel;
    
    public class AnApp {
    
      public void run() {
        init();
      }
      
      private void init() {
        AShell shell = new AShell();
        RootPanel.get().add(shell);
      }
    }
    ...and the init class
    Code:
    package client;
    
    import com.google.gwt.core.client.EntryPoint;
    import com.sencha.gxt.core.client.GXT;
    import com.sencha.gxt.state.client.CookieProvider;
    import com.sencha.gxt.state.client.StateManager;
    
    public class Start implements EntryPoint {
    
      public void onModuleLoad() {
        StateManager.get().setProvider(new CookieProvider("/", null, null, GXT.isSecure()));
        AnApp app = new AnApp();
        app.run();
      }
    }

    I hope this is enough information. Again, the problem with the sorting and display issue only happens when using the async call. If the data load is outside of the call then the data is properly displayed and sorted.

  4. #4
    Ext GWT Premium Member icfantv's Avatar
    Join Date
    Sep 2011
    Location
    Superior, CO
    Posts
    411
    Vote Rating
    21
    icfantv will become famous soon enough icfantv will become famous soon enough

      0  

    Default


    Just a tip, in your PropertyAccess, you can annotate your ModelKeyProvider line with @Editor.Path("voucherId") since your getKey() method simply returns the same value as getVoucherId(). This allows you to remove the get/setKey method in your bean.

    We're doing a ton of grid sorting and filtering in 3.0RC and it's working correctly. Can you please confirm that your server side query is actually finding and attempting to return the ~70 or so results you say should be returned? Are you using remote sort?

    Since breakpoint debugging GXT client-side is difficult (at least, I've never gotten it to work, let alone actually load in hosted mode), try setting a breakpoint in your server-side code and seeing if the data you're getting from the client is what you expect. Some gotchas that bit us initially:
    • The value provided by key() MUST provide a unique value across all your beans in the list store.
    • The name of the sort field comes from the name in the PropertyAccess interface - as this may not map directly to your database columns and you'll need to "translate," though, you should see SQL errors if this isn't fixed.
    • We found that our initial page load for our grid (and subsequent data store load) did not provide any sort info, i.e. PagingLoadConfig.getSortInfo().isEmpty() == true, so we had to specify our initial sort field and sort direction for our query.
    • The datatype in your property access may not map directly to the column type in the database, e.g., we have some numerical fields that get mapped to enums in our bean so we're dealing with concrete types everywhere.
    Let us know what your server-side method is getting and if it returns the correct data. This will help narrow the issue to either the client or server side.

  5. #5
    Sencha User
    Join Date
    Dec 2011
    Location
    CH
    Posts
    6
    Vote Rating
    0
    gugus is on a distinguished road

      0  

    Default Workaround found - but solved?

    Workaround found - but solved?


    Thanks for the tips icfantv. I use now the annotation instead of the key-getter. Looks really better since I have unique key fields in the bean.

    The server data was and is correctly transferred to the client. Background Info: The data comes only indirectly from a database. I get the data from a application server already filled up correctly. Until here, my problem still exists.

    But the point with setting the initial sort info was a good point to think about setting the sort info. I thought, why not setting the sort info every time? So I tried and here is the workaround. So my load part in the AGrid class looks now like the following snippet:
    Code:
      private void loadVouchers(List<Voucher> vouchers) {
        store.clear();
        store.clearSortInfo(); // NEW: clearing the sort info every time
    
        if (vouchers != null && !vouchers.isEmpty()) {
          store.addAll(vouchers);
          store.addSortInfo(new StoreSortInfo<Voucher>(props.valDate(), SortDir.DESC)); // NEW
        }
      }
    This workaround does its job as desired now. But I don't think this is meant to be set every time @Sencha Devs?



    P.S.: I will be out of office till april 16. Until then I can't do any tests but I will have a look in this thread from time to time.

  6. #6
    Ext GWT Premium Member icfantv's Avatar
    Join Date
    Sep 2011
    Location
    Superior, CO
    Posts
    411
    Vote Rating
    21
    icfantv will become famous soon enough icfantv will become famous soon enough

      0  

    Default


    I guess I don't understand why you're loading the vouchers manually. When you construct a grid, you can set a ListLoader on it via setLoader(...). The ListLoader is constructed with a DataProxy which handles the back and forth communication between the client and the server. It's great because all you have to do is supply the load(...) implementation and the API takes care of everything else on the client-side.

    In our code, this method implementation is a one-liner, namely the method invocation on our GWT service, i.e.:

    Code:
    @Override
    public void load(FilterPagingLoadConfig loadConfig,
                     AsyncCallback<PagingLoadResult<YOUR_MODEL_CLASS>> callback) {
      YOUR_GWT_SERVICE_REFERENCE.GWT_SERVICE_METHOD(loadConfig, callback);
    }
    Right now, we have about 15 grids and I don't think we've ever had to touch the loadConfig reference as we do all the heavy lifting on the server-side. The API takes care of constructing the LoadConfig and SortInfo objects.

  7. #7
    Sencha User
    Join Date
    Dec 2011
    Location
    CH
    Posts
    6
    Vote Rating
    0
    gugus is on a distinguished road

      0  

    Default


    Thanks for the tip. I don't load all things manually, some things are loaded automatically before loading the vouchers. May for the vouchers your proposal makes sense too.

Thread Participants: 2

Tags for this Thread