1. #1
    Sencha User
    Join Date
    Jul 2009
    Posts
    64
    Vote Rating
    0
    Kalle1985 is on a distinguished road

      0  

    Default grid store update event fails

    grid store update event fails


    Hello,

    since i updated my GWT 1.7 project to GWT 2.0.4 the listener of my store won`t work.

    Here is the snippet code:

    Code:
     
    store
    
    .addStoreListener(new StoreListener<AttributeValueModel>() {
    @Override publicvoid storeDataChanged(StoreEvent<AttributeValueModel> se) { //Do something...
    }
    });
    Is there a certain reason?

  2. #2
    Sencha User
    Join Date
    Nov 2008
    Location
    Vienna - Austria
    Posts
    867
    Vote Rating
    1
    micgala is on a distinguished road

      0  

    Default


    Be aware that, since you are now using Gwt 2, you have also to use the GXT version release for GWT 2.
    Make sure that is the case.

    Regards,
    Michel.

  3. #3
    Sencha User
    Join Date
    Jul 2009
    Posts
    64
    Vote Rating
    0
    Kalle1985 is on a distinguished road

      0  

    Default


    Thank you for reply,

    i allready displaced the old gxt.jar with the new one.

    The store should listen to changes (when a new resultset was loaded).
    Is it actually a change or update event?

  4. #4
    Sencha User
    Join Date
    Nov 2008
    Location
    Vienna - Austria
    Posts
    867
    Vote Rating
    1
    micgala is on a distinguished road

      0  

    Default


    Well, actually, probably you should then take a look at the storeAdd method of the listener.
    This is fired when records have been added to the store.

  5. #5
    Sencha User
    Join Date
    Jul 2009
    Posts
    64
    Vote Rating
    0
    Kalle1985 is on a distinguished road

      0  

    Default


    Ok,
    that`s a good suggestion! "storeBeforeDataChanged" works also fine.

  6. #6
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    You are using a Loader? DataChanged would a fire after a successfull load. Try to add a Loader.LoadException event listener to your loader and see if there is any exception.

    If you use RPC, make sure you also updated your gwt-servlet.jar on the server.

  7. #7
    Sencha User
    Join Date
    Jul 2009
    Posts
    64
    Vote Rating
    0
    Kalle1985 is on a distinguished road

      0  

    Default


    This is what i`m doing:

    Code:
     [...]
    
    RpcProxy<List<AttributeValueModel>> proxy = new RpcProxy<List<AttributeValueModel>>() {
    @Override protectedvoid load(Object loadConfig, AsyncCallback<List<AttributeValueModel>> callback) { CognosLdap.cognosLdapAdministrationAsync. getUserData(userId.getRawValue().trim(), new AsyncCallback<List<AttributeValueModel>>() {
    @Override publicvoid onFailure(Throwable caught) { getMessageBox("Fehler", caught.getLocalizedMessage(), MessageBox.ERROR, MessageBoxType.ALERT, null, null); }
    @Override publicvoid onSuccess( List<AttributeValueModel> result) { store.add(result); } }); }
    }; [...]

  8. #8
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    You should not use that code at all when using a proxy with a loader. Pass the callback which you get in the load method to your service.

    Also that code would fire a Store.Add event.

  9. #9
    Sencha User
    Join Date
    Jul 2009
    Posts
    64
    Vote Rating
    0
    Kalle1985 is on a distinguished road

      0  

    Default


    i did that in the past but after the migration to GWT 2.0.4 this approach won`t work!
    So in my trouble i changed the code to that what you can now see.

  10. #10
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Have you listened to the loader.loadException event of the loader? Is that firing?

Similar Threads

  1. [2.0m2] Store.add/update for item on Grid fails if item filtered out
    By bigmountainben in forum Ext GWT: Bugs (2.x)
    Replies: 0
    Last Post: 21 May 2009, 10:04 AM
  2. ExtJS 2.2 - Grid with datastore - update fails
    By RobWilson in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 10 Mar 2009, 9:50 AM
  3. [CANCELD] In Store - how call remove event from update event
    By nitingautam in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 22 Jan 2009, 2:51 PM
  4. [SOLVED]Grid RowSelectionModel doesn't update selections on store update
    By MaximGB in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 11 Jul 2007, 3:41 AM
  5. Replies: 0
    Last Post: 8 Jun 2007, 9:13 AM

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi