Results 1 to 4 of 4

Thread: Can't use a radiogroup when model field is type boolean

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Oct 2011
    Location
    Vancouver, Canada
    Posts
    157
    Vote Rating
    14
      0  

    Default Can't use a radiogroup when model field is type boolean

    I want to use a radiogroup (Yes/No) with a Model that has a type:'boolean' Field.

    However, this does not work.

    It works with strings and ints, but not booleans

    in Ext.form.field.Radio.setValue()

    it checks whether the value i am trying to set is a boolean, and then checks that radio, whereas it should check whether then inputValue is equal to the value set.

    Is there a workaround?

    Thanks

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,551
    Vote Rating
    1271
      0  

    Default

    Can I get a locally runnable test case?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

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

  3. #3
    Sencha User
    Join Date
    Oct 2011
    Location
    Vancouver, Canada
    Posts
    157
    Vote Rating
    14
      0  

    Default

    Here is an example:

    http://jsfiddle.net/BgJ9T/1/

  4. #4
    Sencha User
    Join Date
    Nov 2009
    Posts
    15
    Vote Rating
    1
      0  

    Default

    Id experienced the exact same issue.

    To "solve" it (actually work around it) was to set

    Code:
    {name: 'boolvalue', convert: function(v) { return (v ? 1 : 0); }, defaultValue: 0 }
    and work with int val, since it worked ok with booleancolumn for instance.

    But I agree that you example should with no furter tricks, as may be expected (was by me too).

Posting Permissions

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