Hi,
I work with MVC.
I have a navigationview with a list. when you press the disclose button, an event is fired. the chosen record is passed with the event.
within the controller, I create a detailsview (this is a Panel), I add the record and then I push this detailsview onto the navigationview. the detailsview has fields which names correspond with the names from the model.
the problem is that I see the detailsview but the fields are empty.
The record isn't empty within the controller.
controller:
Code:
onMyRequestsDetails : function(record) {
//this is the navigationview which is defined within REFS
var view = this.getMyRequests();
//this is the detailsview
var request = Ext.create('LeaveRequest.view.Request' , {scrollable:true}) ;
//the record I want to add
request.setRecord(record) ;
//push details on navigationview
view.push(request);
}
Detailsview:
Code:
...
initialize : function() {
this.callParent(arguments);
var leaveType = {
xtype : 'selectfield',
name : 'AbsenceTypeName',
id : 'AbsenceTypeName',
label : 'Leave type',
store : storeAT,
valueField : 'AbsenceTypeCode',
displayField : 'AbsenceTypeName',
cls : 'requestLeaveType'
};
...
this.add([leaveType]);
...
Can somebody help?