Results 1 to 2 of 2

Thread: buttons are not like items for panels. why?

  1. #1
    Ext User
    Join Date
    Mar 2008
    Posts
    12

    Lightbulb buttons are not like items for panels. why?

    In form panel object created like this var fp = new Ext.FormPanel... ;I have "items" and "buttons"
    items: [
    {
    xtype:'hidden',
    id: 'actiontype',
    value:''
    },{
    xtype: 'textfield',
    fieldLabel: 'Project Name',
    // name: 'pname',
    id: 'pname',
    value: ajax_pname,
    allowBlank:false
    }],
    buttons:[
    {
    text: 'Update',
    formBind: true,
    id: 'update',
    type:'submit',
    name: 'update'
    }],...
    I could access items by using fp.findById('actiontype') method, but I can't access buttons using that method.
    Have You any idea for accessing button id='update'? fp.findById('update') won't work.

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    You can just use Ext.getCmp('id-of-component') for both.

    ps. You can also get buttons using fp.buttons[index-of-button]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •