1. #1
    Sencha User
    Join Date
    Feb 2009
    Posts
    20
    Vote Rating
    0
    amitayh is on a distinguished road

      0  

    Default Custom picker field with menu

    Custom picker field with menu


    Hi,
    I'm trying to create my own field type which extends Ext.form.field.Picker.
    In the createPicker() method I create a menu that will be used as the picker.
    The menu has 2 levels (submenu). I'm having problems with the menu items in the second level - I can't add event handlers on them. No matter what I try the menu always closes when I interact with the submenu, and no events are fired. There are no such problems with the main menu (first level), I guess there is some event that needs to be stopped but I can't seem to find it...

    P.S the submenu is a panel component, not a regular menu item - but it doesn't work neither with regular items.

    Any ideas what can this be?
    Thanks in advance for your help!
    Amitay.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,684
    Vote Rating
    435
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    Can I see what you have tried?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Feb 2009
    Posts
    20
    Vote Rating
    0
    amitayh is on a distinguished road

      0  

    Default


    Sure: http://jsfiddle.net/amitayh/Y4cUg/1/

    As you can see, the handler for the first item is called, but not for the submenu item...

  4. #4
    Sencha User
    Join Date
    Feb 2009
    Posts
    20
    Vote Rating
    0
    amitayh is on a distinguished road

      0  

    Default


    I ended up using the regular trigger field, which displays the menu on trigger click.
    I guess this is a bug...

Tags for this Thread