View Full Version : Loading detailed view based on selected view

1 Aug 2011, 7:27 PM
Hey Guys,

I am trying to load a detail view by selecting an item in the list. So far, I have populated the list, and when the user taps (disclose) on an item, it also loads the view, which is static data.

Now, I am trying to load the dynamic data from the record to the detailed view. But, it does not propagate properly.

Here is my code for the list view:

app.views.CompaniesCard = Ext.extend(Ext.Panel, {
title: "Merchants",
layout: "card",
id: 'idCompany',
iconCls: "favorites",
dockedItems: [
xtype: "toolbar",
title: "Companies",
items: [
xtype : 'list',
fullscreen : true,
grouped : true,
store : app.merchantStore,
itemTpl : '<div> {company_name} </div>',
onItemDisclosure: function(record){
getCmp('idCompanyDetail').update(record.data); /// LOOKS LIKE IT IS NOT GRABBING THE CORRECT OBJECT ON THIS LINE.
xtype : 'companydetail',
title : 'titleCompanyDetail',
id: 'idCompanyDetail'

Here is my code for the detail View:

app.views.CompanyDetail = Ext.extend(Ext.Panel, {
title: "Company Detail",
layout: 'card',
//tpl: 'Hello {first_name}',

Ext.reg('companydetail', app.views.CompanyDetail);

I have tried all sorts of combination to grab the correct CompanyDetail object where I can apply the update() function. But, so far not successful. Please let me know, if you can identify the issue, here.

Let's have advance =D>=D>=D>=D> for the person who will fix this.