PDA

View Full Version : Question about MVC structure



rafaelrp
27 Jun 2013, 5:28 AM
Hello !

I have a question about ExtJS MVC structure.

Well, i have to create a filter to a report, in the form have a client combo, the question is, in this combo can i use a store that already exists? How i use correctly this model and store that already exists?

The second question is how the strucutre i need to create this form? i need to creat a new store for the report?

Model
Client.js
Report.js
Store
Client.js
Report.js
View
ReportForm.js
ReportResult.js
Controller
Report


Form code:


this.items = [
{
xtype: 'form',
layout: 'form',
bodyPadding: 5,
items: [
{
xtype: 'combo',
name: 'clientId',
store: 'Client',
queryMode: 'remote',
fieldLabel: 'Client',
valueField: 'clientId',
displayField: 'clientName',
allowBlank: false
}
]
}
];


Thanks!!! ~o)

friend
27 Jun 2013, 5:39 AM
The answers to your questions can be found here: MVC Application Architecture (http://docs.sencha.com/extjs/4.2.1/#!/guide/application_architecture)

rafaelrp
27 Jun 2013, 5:41 AM
Yes, but i have this issue, because, if i use a store that i already have created, the form sends all the store fields. This structure i've created is correct?

Thanks!