1. #1
    Ext GWT Premium Member
    Join Date
    Apr 2009
    Location
    NYC
    Posts
    111
    Answers
    2
    Vote Rating
    1
    stan229 is on a distinguished road

      0  

    Default Answered: Nesting FormPanel in Modal Window

    Answered: Nesting FormPanel in Modal Window


    What is the best way about going about nesting a Ext.form.Panel in a modal popup
    Code:
    var popup = Ext.create('Ext.Panel', {
                floating : true,
                modal : true,
                centered : true,
                width : 300,
                height : 400,
                items : [{
                    docked : 'top',
                    xtype : 'toolbar',
                    title : 'Add Borrower'
                }, {
                    xtype : 'formpanel',
                    items : [{
                        xtype : 'textfield',
                        name : 'hello',
                        label : 'hello'
                    }]
                }],
                scrollable : true
            });
    
            popup.show()
    Doesn't show the fields, renders the window with toolbar. If I make the xtype to be fieldset it draws the textfield. If I nest a fieldset xtype with the textfield in it, also doesn't work.

  2. Hi Stan.
    You just need to set your panel layout as 'fit'.
    Please even notice that the "floating" config has been deprecated, so you only need to set the "centered" config as true.

    Code:
    var popup = Ext.create('Ext.Panel', {
                modal : true,
                centered : true,
                width : 300,
                height : 400,
    	    layout: 'fit',
                items : [{
                    docked : 'top',
                    xtype : 'toolbar',
                    title : 'Add Borrower'
                }, {
                    xtype : 'formpanel',
                    items : [{
                        xtype : 'textfield',
                        name : 'hello',
                        label : 'hello'
                    }]
                }],
                scrollable : true
            });
    
    
            popup.show()
    Hope this helps.

  3. #2
    Sencha - Services Team AndreaCammarata's Avatar
    Join Date
    Jun 2009
    Posts
    1,394
    Answers
    148
    Vote Rating
    22
    AndreaCammarata has a spectacular aura about AndreaCammarata has a spectacular aura about

      0  

    Default


    Hi Stan.
    You just need to set your panel layout as 'fit'.
    Please even notice that the "floating" config has been deprecated, so you only need to set the "centered" config as true.

    Code:
    var popup = Ext.create('Ext.Panel', {
                modal : true,
                centered : true,
                width : 300,
                height : 400,
    	    layout: 'fit',
                items : [{
                    docked : 'top',
                    xtype : 'toolbar',
                    title : 'Add Borrower'
                }, {
                    xtype : 'formpanel',
                    items : [{
                        xtype : 'textfield',
                        name : 'hello',
                        label : 'hello'
                    }]
                }],
                scrollable : true
            });
    
    
            popup.show()
    Hope this helps.
    Sencha Inc
    Andrea Cammarata, Solutions Engineer
    CEO at SIMACS

    @AndreaCammarata
    www.andreacammarata.com
    github: https://github.com/AndreaCammarata

    TUX components bundle for Sencha Touch 2.x.x
    http://www.tux-components.com/


  4. #3
    Ext GWT Premium Member
    Join Date
    Apr 2009
    Location
    NYC
    Posts
    111
    Answers
    2
    Vote Rating
    1
    stan229 is on a distinguished road

      0  

    Default


    That works, thanks!

    I'm having an issue with the hideOnMaskTap (default: true) though. I'm not sure if it's a bug or not. Whenever I click anywhere, even in the Panel it hides.

    See video:

  5. #4
    Sencha - Services Team AndreaCammarata's Avatar
    Join Date
    Jun 2009
    Posts
    1,394
    Answers
    148
    Vote Rating
    22
    AndreaCammarata has a spectacular aura about AndreaCammarata has a spectacular aura about

      0  

    Default


    You are welcome.
    About your question, the "hideOnMaskTap" config should close the popup only when you tap the mask element outside the panel.
    That's a strange behaviour.
    Do you even have some other functions in your code that close this overlay panel?
    Sencha Inc
    Andrea Cammarata, Solutions Engineer
    CEO at SIMACS

    @AndreaCammarata
    www.andreacammarata.com
    github: https://github.com/AndreaCammarata

    TUX components bundle for Sencha Touch 2.x.x
    http://www.tux-components.com/


  6. #5
    Ext GWT Premium Member
    Join Date
    Apr 2009
    Location
    NYC
    Posts
    111
    Answers
    2
    Vote Rating
    1
    stan229 is on a distinguished road

      0  

    Default


    Nope. Fortunately, I don't need hideOnMaskTap for that component. I will try to make a simplified test case. If I still see the issue I'll post a bug report.

    Edit: Still there with test case, will post bug report.

Thread Participants: 1

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