1. #1
    Ext JS Premium Member
    Join Date
    Feb 2010
    Posts
    19
    Vote Rating
    0
    noimehl is on a distinguished road

      0  

    Default window hide / show with nested formpanel

    window hide / show with nested formpanel


    Hi,

    i have a window with a nested formpanel. when i hide and reopen the window the nested formpanel will not shown.

    Can anyone help me?

    here is my code for the window:

    Code:
    var win = new Ext.Window({
                     id: 'edittask'+ task
                    ,width: 560
                    ,height: 230
                    ,plain: true
                    ,title:'Title ' + task
                    ,layout:'fit'
                    ,loadMask: true
                    ,waitMsg: 'loading...'
                    ,border: false
                    ,closeAction: 'hide'
                    ,closable: true
                    ,items: EditTaskFormPanel
                });
         
            win.show();
    regards
    thorsten

  2. #2
    Sencha - Community Support Team mankz's Avatar
    Join Date
    Nov 2007
    Location
    Stockholm, Sweden
    Posts
    2,759
    Vote Rating
    108
    mankz is a name known to all mankz is a name known to all mankz is a name known to all mankz is a name known to all mankz is a name known to all mankz is a name known to all

      0  

    Default


    Please post the rest of your code involved in this UI flow...

  3. #3
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    94
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    1. How do you reopen the window?
    2. Are you only hiding the window with the [x] button or did you also program other ways?

  4. #4
    Ext JS Premium Member
    Join Date
    Feb 2010
    Posts
    19
    Vote Rating
    0
    noimehl is on a distinguished road

      0  

    Default


    Hi,

    1. win.show(); (is this wrong?)
    2. yes, i use the [x] button or win.hide();


    here is the code for the formpanel

    Code:
        var fp = new Ext.form.FormPanel({
                 id:'edittaskformpanel'
                //,bodyStyle:'padding:15px'
                //,labelWidth:70
                ,url: 'json-singletask.php'
                ,loadMask: true
                ,waitMsg: 'loading...'
                ,border:false
                ,frame:true
                ,items:[{
                     xtype:'textarea' 
                    ,fieldLabel:'Taskname'
                    ,name:'taskname'
                    ,anchor:'95%'
                    ,allowBlank: false
                    ,msgTarget: 'side'
                },{
                     xtype:'numberfield'
                    ,width:10
                    ,fieldLabel:'Soll h'
                    ,name:'sollh'
                    ,anchor:'50%'
                    ,allowBlank: false
                    ,allowNegative: false
                    ,msgTarget: 'side'
                },{
                     xtype:'datefield'
                    ,width:20
                    ,fieldLabel:'Beginn'
                    ,name:'start'
                    ,anchor:'50%'
                    ,disabledDays: [0,6]
                    ,msgTarget: 'side'
                    ,format: 'd.m.Y'
                },{
                     xtype:'datefield'
                    ,width:20
                    ,fieldLabel:'Ende'
                    ,name:'ende'
                    ,anchor:'50%'
                    ,disabledDays: [0,6]
                    ,msgTarget: 'side'
                    ,format: 'd.m.Y'
                },{
                    xtype: 'hidden'
                    ,name: 'tasknr'
                },{
                    xtype: 'hidden'
                    ,name: 'xaction'
                    ,value: 'save'
                },{
                    xtype: 'hidden'
                    ,name: 'projekt'
                },{
                    xtype: 'hidden'
                    ,name: 'global'
                }
                ]
                ,buttons:[{
                    text:'speichern',
                    handler: function() {
                        fp.getForm().submit({
                            waitMsg: 'saving...',
                            success: function(form, action) {
                                 jbudgetstore.load({params: {xaction: 'read', projekt: params[0] }})
                             
                            },
                            failure: function(form, action) {
                                Ext.Msg.alert('Warning','Error ');
                            }   
                        })
                    } 
                },{
                    text:'abbrechen',
                    handler: function() {
                        fp.getForm().reset();
                        
                        win.hide();
                    }
                }]
            });

  5. #5
    Ext JS Premium Member
    Join Date
    Feb 2010
    Posts
    19
    Vote Rating
    0
    noimehl is on a distinguished road

      0  

    Default


    HI,

    1. win.show();
    2. yes, i use the [x] button or win.hide(); i also tried win.remove(); but it was the same result

    here is the cod e of the formpanel:

    Code:
        var EditTaskFormPanel = new Ext.form.FormPanel({
                 id:'edittaskformpanel'
                ,url: 'json-singletask.php'
                ,loadMask: true
                ,waitMsg: 'loading...'
                ,border:false
                ,frame:true
                ,items:[{
                     xtype:'textarea' 
                    ,fieldLabel:'Taskname'
                    ,name:'taskname'
                    ,anchor:'95%'
                    ,allowBlank: false
                    ,msgTarget: 'side'
                },{
                     xtype:'numberfield'
                    ,width:10
                    ,fieldLabel:'Soll h'
                    ,name:'sollh'
                    ,anchor:'50%'
                    ,allowBlank: false
                    ,allowNegative: false
                    ,msgTarget: 'side'
                },{
                     xtype:'datefield'
                    ,width:20
                    ,fieldLabel:'Beginn'
                    ,name:'start'
                    ,anchor:'50%'
                    ,disabledDays: [0,6]
                    ,msgTarget: 'side'
                    ,format: 'd.m.Y'
                },{
                     xtype:'datefield'
                    ,width:20
                    ,fieldLabel:'Ende'
                    ,name:'ende'
                    ,anchor:'50%'
                    ,disabledDays: [0,6]
                    ,msgTarget: 'side'
                    ,format: 'd.m.Y'
                },{
                    xtype: 'hidden'
                    ,name: 'tasknr'
                },{
                    xtype: 'hidden'
                    ,name: 'xaction'
                    ,value: 'save'
                },{
                    xtype: 'hidden'
                    ,name: 'projekt'
                },{
                    xtype: 'hidden'
                    ,name: 'global'
                }
                ]
                ,buttons:[{
                    text:'speichern',
                    handler: function() {
                        EditTaskFormPanel.getForm().submit({
                            waitMsg: 'saving...',
                            success: function(form, action) {
                                 jbudgetstore.load({params: {xaction: 'read', projekt: params[0] }})
                            },
                            failure: function(form, action) {
                                Ext.Msg.alert('Warning','Error ');
                            }   
                        })
                    } 
                },{
                    text:'abbrechen',
                    handler: function() {
                        EditTaskFormPanel.getForm().reset();
                        
                        win.hide();
                    }
                }]
            });
    thanks
    thorsten

Similar Threads

  1. Handling 'Show' and 'Hide' events in the FormPanel
    By Mango_lier in forum Ext 3.x: Help & Discussion
    Replies: 5
    Last Post: 30 Apr 2010, 1:57 PM
  2. Replies: 2
    Last Post: 16 Jul 2009, 9:29 PM
  3. IE6 does not show FormPanel correctly if nested in Window
    By AlexH in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 2 Nov 2007, 1:22 AM

Thread Participants: 2