Ext.define('TradePortal.store.CommentInfo', {
	extend:  'Ext.data.Store',
	model:   'TradePortal.model.DrillDownInfo',
	storeId: 'CommentInfo',
	proxy : {
		type : 'jsonajax',
		url: BASE_URL  + '/fluid/FluidAppServerProxy?ipApi=presenter&ipService=Frameworks.Interfaces.Mobile.TradePortal&ipFunction=getTransactionTP',
		reader : {
			type : 'json',
			root : 'dataset.TransactionDetailsTP'
		}
	},
	listeners: {
		load: {
			fn: function (store, records, options) {
				Ext.getCmp('viewport').setLoading(false);
				Ext.widget('commentwindow');
				Ext.getCmp('commentField').setValue(records[0].data.comment_tportal);
				Ext.getCmp('hiddenCommentTransaction').setValue(records[0].data.transactionNumber);
				Ext.getCmp('hiddenCommentSuffix').setValue(records[0].data.transactionSuffix);
				if (Ext.customParam.transactionNumbers != undefined && Ext.customParam.transactionNumbers.length > 1) {
					Ext.getCmp('applyField').show();
				}
				else{
					Ext.getCmp('applyField').hide();
				}
			}
		}
	}

});
