Threaded View

  1. #1
    Sencha User
    Join Date
    Sep 2012
    Posts
    29
    Vote Rating
    0
    cassiopeia is on a distinguished road

      0  

    Default Answered: Problem setting record to panel from controller

    Answered: Problem setting record to panel from controller


    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?

  2. Is LeaveRequest.view.Request a form panel?

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar