-
27 Oct 2010 11:35 PM #1
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?
-
28 Oct 2010 1:01 AM #2
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.
-
28 Oct 2010 1:23 AM #3
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?
-
28 Oct 2010 1:32 AM #4
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.
-
28 Oct 2010 3:06 AM #5
Ok,
that`s a good suggestion! "storeBeforeDataChanged" works also fine.
-
28 Oct 2010 3:09 AM #6
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.
-
28 Oct 2010 3:36 AM #7
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); } }); }}; [...]
-
28 Oct 2010 3:42 AM #8
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.
-
28 Oct 2010 3:51 AM #9
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.
-
28 Oct 2010 3:52 AM #10
Have you listened to the loader.loadException event of the loader? Is that firing?
Similar Threads
-
[2.0m2] Store.add/update for item on Grid fails if item filtered out
By bigmountainben in forum Ext GWT: Bugs (2.x)Replies: 0Last Post: 21 May 2009, 10:04 AM -
ExtJS 2.2 - Grid with datastore - update fails
By RobWilson in forum Ext 2.x: Help & DiscussionReplies: 4Last Post: 10 Mar 2009, 9:50 AM -
[CANCELD] In Store - how call remove event from update event
By nitingautam in forum Ext 2.x: Help & DiscussionReplies: 3Last Post: 22 Jan 2009, 2:51 PM -
[SOLVED]Grid RowSelectionModel doesn't update selections on store update
By MaximGB in forum Ext 1.x: Help & DiscussionReplies: 3Last Post: 11 Jul 2007, 3:41 AM -
Best event to use for error checking fields (grid's validateedit or store's update)
By xphilius in forum Ext 1.x: Help & DiscussionReplies: 0Last Post: 8 Jun 2007, 9:13 AM


Reply With Quote