Hybrid View

  1. #1
    Ext User
    Join Date
    Nov 2008
    Posts
    9
    Vote Rating
    1
    frankys9 is on a distinguished road

      1  

    Default set button hidden to false

    set button hidden to false


    Hello,

    i created a ExtJS formpanel with 2 hidden buttons. How can i change the hidden value from true to false?

    Code:
    buttons:[{
                text:'speichern',
                id:'create',
                hidden:true,
                handler:function(){
                    myContacts.getForm().submit({
                        method:'POST',
                        params:{'event':'createContact'},
                        success:function(r){
                            win.hide()
                        }
                    })
                }
            }]
    Thanks for your Help!!
    Frank

  2. #2
    Ext User zhegwood's Avatar
    Join Date
    Dec 2007
    Location
    Boulder, CO Suburbia (Lafayette)
    Posts
    388
    Vote Rating
    1
    zhegwood is on a distinguished road

      0  

    Default


    Code:
    buttons[0].setVisibility(true)

  3. #3
    Ext User
    Join Date
    Nov 2008
    Posts
    9
    Vote Rating
    1
    frankys9 is on a distinguished road

      0  

    Default


    I tryed your code and become an error: 'button is not defined'

    My complete form:
    Code:
    var myContacts = new Ext.FormPanel({
            url:'view/userContacts.cfm',
            bodyStyle:'padding:5px',
            defaults: {width: 230},
            id:'myContacts',
            items:[{
                xtype:'hidden',
                name:'ident',
                id:'ident',
                fieldLabel:'',
            },{
                xtype:'textfield',
                name:'vorname',
                id:'vorname',
                fieldLabel:'Vorname'
            },{
                xtype:'textfield',
                name:'nachname',
                id:'nachname',
                fieldLabel:'Nachname'
            },{
                xtype:'textfield',
                name:'mobil',
                id:'mobil',
                fieldLabel:'Handy'
            },{
                xtype:'combo',
                name:'type',
                id:'type',
                mode: 'local',
                store: type,
                displayField:'type',
                fieldLabel:'Kontakttype'
            },{
                xtype:'textarea',
                name:'memo',
                id:'memo',
                fieldLabel:'Info'
            }],
            buttons:[{
                text:'speichern',
                id:'create',
                hidden:true,
                handler:function(){
                    myContacts.getForm().submit({
                        method:'POST',
                        params:{'event':'createContact'},
                        success:function(r){
                            win.hide()
                        }
                    })
                }
            }]
        });
    Any other solution?

    Thanks
    Frank

  4. #4
    Ext User zhegwood's Avatar
    Join Date
    Dec 2007
    Location
    Boulder, CO Suburbia (Lafayette)
    Posts
    388
    Vote Rating
    1
    zhegwood is on a distinguished road

      1  

    Default


    Code:
    myContacts.buttons[0].setVisible(true);
    Whoops... It's setVisible, not setVisibility for buttons. Also, if you're getting undefined errors, check the rendered property. If it's false, that's probably the problem. When are you trying to show the button, anyway?

  5. #5
    Ext User
    Join Date
    Nov 2008
    Posts
    9
    Vote Rating
    1
    frankys9 is on a distinguished road

      0  

    Default


    Hello zhegwood,

    thanks for your Help. My Problem is fixed now.

    Frank

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