PDA

View Full Version : Ext.ux.data.SeamRemoting



sean
14 Apr 2008, 5:13 PM
Hello all,

I've recently been playing around with integrating Ext and the Seam framework. I've seen at least one other solution posted here (http://extjs.com/forum/showthread.php?t=23533) so it looks like there are some folks out there using Seam. In any case my approach was somewhat different. For this approach I wanted to keep it simple so I elected to use JSON as the return format instead of the Seam remoting Java - JS object serialization mechanism. I have 3 postings on my site that deal with the integration. Thanks to the great design of Ext the solution was very simple.

Integrating ExtJS with Seam: Loading stores with Json (http://mcdconsultingllc.com/node/18)
Integrating ExtJS with Seam: The SeamRemotingJsonStore (http://mcdconsultingllc.com/node/20)
Integrating ExtJS with Seam: Error Handling (http://mcdconsultingllc.com/node/21)

There is still a lot for me to learn with Seam but this was a good starting point.

john.helfert
24 Sep 2010, 4:23 AM
I have a combo box with a Ext.ux.data.SeamRemotingJsonStore.
The code for both is shown below.

The problem is that the combo box cannot be loaded with the store's data more than once.

For example, when the page is rendered I manually load the store with values, and set the value of the combo box to one of the values in the store. When I then try to click the drop down on the combo box, the seam call is made correctly and the store is loaded, but the combo box never shows any values. It is stuck with "Loading" message.


{
xtype: 'combo',
id: 'purchaseOrderRuleCombo' + cat.id,
store: Ccs.Factory.getStore("purchaseOrderRule"),
width: 200,
typeAhead: true,
triggerAction: 'all',
forceSelection: true,
displayField: 'displayName',
valueField: 'uuid',
listEmptyText: "No Purchase Order rules found"
}
seamComponent = Ccs.getSeamComponent("purchaseOrderHome");
store = new Ext.ux.data.SeamRemotingJsonStore({
seamComponent: seamComponent,
remoteMethod: seamComponent.getAllPORulesJson,
root: 'list',
totalProperty: 'totalRecords',
fields: [
{name: 'uuid', type: 'string'},
{name: 'displayName', type: 'string'}
],
listeners: { beforeload: function() { store.baseParams = params; } }
});
Any ideas?

sean
24 Sep 2010, 3:23 PM
Hi John,

There was something introduced in Ext 3, I think it was in the Store class, that broke this. I've fixed it before for other users. I'll dig up the fix and shoot you the update.

Sean