1. #21
    Ext GWT Premium Member
    Join Date
    Jul 2008
    Posts
    33
    Vote Rating
    0
    Adam Ward is on a distinguished road

      0  

    Default


    Hi Grant,

    Again, really great work here. Ok, on to the issue at hand, I'm attempting to call reconfigure on the ActiveGrid and supplying it with a new ListStore and ColumnModel (essentially I want to show data from a different table in my D. This doesn't work right out of the box, and was hoping you might have some suggestions on where some of the pain points may lie... I realize that you are no longer developing this widget, but any guidance or suggestions that you can provide would be much appreciated!

    Cheers!
    Adam

  2. #22
    Ext GWT Premium Member
    Join Date
    Jul 2008
    Posts
    33
    Vote Rating
    0
    Adam Ward is on a distinguished road

      0  

    Default


    Another tid bit of info to add to my last post is that it appears that the load method on the BasePagingLoader is never getting called during the reconfigure() process.

  3. #23
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    4
    gslender is on a distinguished road

      0  

    Default


    yep - best to produce a test case showing issues - that way I can easily compare and fix it.

    I hate having to think up a test case to reproduce something... that sux and I'm lazy ;-)

  4. #24
    Ext User paco_online's Avatar
    Join Date
    Jan 2009
    Location
    Vienna
    Posts
    65
    Vote Rating
    0
    paco_online is on a distinguished road

      0  

    Default


    hi gslender,

    very good work (saw the ActiveGrid working in the online demo).

    but for me it's not working, because it seems, that the Constructor for com.extjs.gxt.ui.client.event.SelectionEvent changed and so the code for ext.ux.activegrid.client.ActiveGridSelectionModel is not working any more for the line fireEvent(Events.SelectionChange, new SelectionEvent(this, new ArrayList(selected)));

    is there an update for the ActiveGrid or can you say what time this feature goes to the Ext GWT standard?

    greetings
    paco

    edit: i imported your testproject (Test.gwt.xml) into my eclipse (with the older version of gxt 1.2.1 - so the error described above not occured). but it seems that the service call is repeatingly called and never stops. so the items where never shown.

  5. #25
    Ext GWT Premium Member
    Join Date
    Jul 2008
    Posts
    33
    Vote Rating
    0
    Adam Ward is on a distinguished road

      0  

    Default


    Paco,

    I had the same problem. You can work around this by adding the following class to your src tree (make sure you create the exact package that is included at the top of this file). Essentially it is the SelectionEvent class from gxt 1.1.3, which to my knowledge, is the version that the ActiveGrid was written against, and it includes an additional constructor. I do not know why the GXT team removed the constructor, but the ActiveGrid seems to work when I include the older version of the file.

    Code:
    /*
     * Ext GWT - Ext for GWT
     * Copyright(c) 2007, 2008, Ext JS, LLC.
     * licensing@extjs.com
     * 
     * http://extjs.com/license
     */
    package com.extjs.gxt.ui.client.event;
    
    import java.util.List;
    
    import com.extjs.gxt.ui.client.data.ModelData;
    
    /**
     * Selection event type.
     * 
     * @param <M> the model data type
     */
    public class SelectionEvent<M extends ModelData> extends BaseEvent {
    
      /**
       * The selection.
       */
      public List<M> selection;
    
      /**
       * The model.
       */
      public M model;
    
      /**
       * The index.
       */
      public int index;
    
      public SelectionEvent(Object source, List<M> selection) {
        super(source);
        this.selection = selection;
      }
    
      public SelectionEvent(Object source, M model) {
        super(source);
        this.model = model;
      }
    
    }
    Again, just create a package "com.extjs.gx.ui.client.event" in your source tree, drop that source into the new package, and the Java compiler will pick up your version of SelectionEvent instead of the one included in the gxt jar.

  6. #26
    Ext User paco_online's Avatar
    Join Date
    Jan 2009
    Location
    Vienna
    Posts
    65
    Vote Rating
    0
    paco_online is on a distinguished road

      0  

    Default


    hi,

    thx for this suggestion. if i do, what you say, all the compiler errors are resolved and i can run the sample with the version 1.2.3 oif EXT GWT.

    After fixing an error in the HugeData.java in the line setDate(new Date(s[2])); in the Constructor Just setting it to setDate(new Date());. This should also work for the Example "Test.java".

    Now the service is loading the data and it seems, also returning them. The Grid comes from the mask() state to the unmask() state. But no data where shown in the Grid

    What's wrong with my code? I run the example in Eclipse 3.4.1.

    greetings
    paco

    @edit:
    i tried the version 1.1.4 from GXT (with 1.1.3 there are some errors - some Events constants where not found). And what can i say - it's working with 1.1.4 - the data is now shown in the grid. So can anyone tell my what changed, that with the current version of GXT it's not working?

    @edit2:
    After some more testing i found out, that it's working to version 1.2.2 (inclusive). From version 1.2.3, the data where not shown in the grid after loading from service.

  7. #27
    Ext GWT Premium Member
    Join Date
    Jul 2008
    Posts
    33
    Vote Rating
    0
    Adam Ward is on a distinguished road

      0  

    Default


    I have confirmed Paco's findings. 1.2.2 seemed to be good.

  8. #28
    Ext User paco_online's Avatar
    Join Date
    Jan 2009
    Location
    Vienna
    Posts
    65
    Vote Rating
    0
    paco_online is on a distinguished road

      0  

    Default


    Hi all,

    after some debugging and testing i found out, what makes the ActiveGrid not working with GXT 1.2.3.

    It is the ListStore in the method public void remove(M model) at Line 292. The line modified.remove(getRecord(model)); does not work with GXT 1.2.3. If you change the line to the version of GXT 1.2.2 modified.remove(model); it's working!

    Yet i have no idea why it's so (i have to digg into more), but with this code change it's working. Maybe someone, who is more familiar with the GXT code can say more.

    Greetings Paco


    edit:
    some more testing - i found out the error.

    the line modified.remove(getRecord(model)); is calling the getRecord(M model) from the Store Class. Ths wraps the model to a Record. But if the model is null, the method throws a java.lang.RuntimeException: Record cannot wrap a null model Exception which is handelt in the onSuccess(...) method of the RpcProxy. But i never saw this Exception in a StackTrace or so ... maybe my fault.

    Adding the following lines to the ListStore Class in the method public void remove(M model) at Line 292 are helping to prevent wrapping a null Object.

    if (model != null) {
    modified.remove(getRecord(model));
    }

  9. #29
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    4
    gslender is on a distinguished road

      0  

    Default


    paco_online - you are correct but also wrong...

    the bug is in ListStore, but the solution is not what you've shown.

    the lines
    Code:
    modified.remove(getRecord(model));
          if (isFiltered()) {
            snapshot.remove(model);
          }
    needs to be up before the lines
    Code:
          unregisterModel(model);
    in the if/then case

    the unregister was removing the model before it was removed from modified

    this has been fixed in SVN

  10. #30
    Ext User paco_online's Avatar
    Join Date
    Jan 2009
    Location
    Vienna
    Posts
    65
    Vote Rating
    0
    paco_online is on a distinguished road

      0  

    Default


    somebody know what the SVN url is?