PDA

View Full Version : not updating panel at runtime



Amarjeetbiet
12 Jun 2012, 9:57 PM
i have two panel. when i'm click on the left panel items its calling web service and populating the right panel and same time its updating the number of items in the right panel to the left panel item which is clicked. for first time its updating the left panel items but when i click on the other items in the left panel item its calling web service and populating right panel with the update valuebut its not updating left panel items again. its updating only first time.my code is:
onInboxListTap:function (dataview, index, item, record) {

console.log('Inside onInboxListTap function');
var queuestore = dataview.getStore();
var rec = queuestore.getAt(index);
console.log(rec.data.workSetName);
var store = Ext.getStore('InboxWorkitemStore');
store.clearData();

//creating object of InboxQueueServices class var inboxQueueServiceObject = Ext.create('InfoImage.common.services.InboxQueueServices',
{ config:{ scope:this } },
this.onQueueContentRetrievalSuccess, this.onQueueContentRetrievalFailure());
// calling loadQueueContent function to load queue contents inboxQueueServiceObject.loadQueueContent(rec.data.workSetName); },
//To call Function onQueueContentRetrievalSuccess after loadQueueContent successful onQueueContentRetrievalSuccess:function ()
{
console.log('Inside onQueueContent Retrieval Success function');
var store = Ext.getStore('InboxWorkitemStore');
//Getting componenet queueDetails list
var inboxWorkitemList = Ext.getCmp('inboxWorkitemList');
var queueDetails = Ext.getCmp('queueDetails');
var queueList = Ext.getCmp('queuelist'); //Getting component list
var queueViewPanel = Ext.getCmp('queueViewPanel'); //Getting queueViewPanel queueDetails.setStore(store); store.sync();
var queueCount = store.getCount();
if (queueCount > 0)
{ var queueItem = store.getAt(0);
var queueStore = queueList.getStore();
queueStore.each(function (record)
{

if (record.get('workSetName') == queueItem.get('sourceWorkstep')) { record.data.queueName = queueItem.get('sourceWorkstep') + '(' + queueCount + ')'; } }); queueList.setStore(queueStore);
queueStore.sync();
queueList.getStore().each(function (record) {
console.log('queueList:' + record.data.queueName); });
console.log('store UPDATED'); }
queueList.refresh(); console.log('store count: ' + store.getCount()); console.log(queueDetails);
// navigates the panel queueViewPanel.animateActiveItem( inboxWorkitemList, { type:'slide', direction:'up', duration:250 });
},
onQueueContentRetrievalFailure:function () {
console.log('Inside onQueueContentRetrievalFailure function');


},

scottmartin
23 Jun 2012, 3:00 PM
Seems like a duplicate of:
http://www.sencha.com/forum/showthread.php?218199

Scott.