Hi ...
I've searched the forums and can't seem to see any example of this so I think I'll just ask. We've updated to latest nightly build of 2.5 from smartgwt 2.2.
We were using events from the server to update datasources on any CUD events using updateCaches in the DataSource.
To stop duplicate rows appearing the ListGrid during creates, in the DataSource I was setting the status of the dsResponse to failure and then calling processResponse. This seem to work although I admit its a bit of a hack ...
The problem is, in the latest build smartClient displays a warning, that the server returned an error ... which is great but it means my little hack doesn't work anymore :-)
So .... whats the correct way to do this ? if I set it success, I get a row from the create response and I get a row from the updateCaches. If I don't call processResponse the dialog just sits there. The dataSource does have a primaryKey set. I've looked at setPreventDuplicates but that seems to be for drag and drop.
Any help would be really appreciated ...
Mike.
I've searched the forums and can't seem to see any example of this so I think I'll just ask. We've updated to latest nightly build of 2.5 from smartgwt 2.2.
We were using events from the server to update datasources on any CUD events using updateCaches in the DataSource.
Code:
public void onNotification(String event, DomainObject object) { if((event != null) && (object != null)) { GWT.log("received "+event+" event for "+ object.getClassName()+" with name" +object.getName()); DSResponse response = createDSResponse(event, object); updateCaches(response); } }
Code:
DSResponse dsResponse = new DSResponse(); dsResponse.setStatus(RPCResponse.STATUS_FAILURE);//(-1); processResponse(requestId, dsResponse);
So .... whats the correct way to do this ? if I set it success, I get a row from the create response and I get a row from the updateCaches. If I don't call processResponse the dialog just sits there. The dataSource does have a primaryKey set. I've looked at setPreventDuplicates but that seems to be for drag and drop.
Any help would be really appreciated ...
Mike.
Comment