Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default [FIXED-25] Model boolean fields don't have a default value (0.82)

    [FIXED-25] Model boolean fields don't have a default value (0.82)


    They are always undefined, which means when they are used in Ext.Templates, an error is produced: "xxx is not defined".

  2. #2
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    This actually applies to all types of fields.

  3. #3
    Sencha - Sencha Touch Dev Team Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    21
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    Awesome feedback on the bugs rdougan, if you can do me one small favor and put in the version you are using that would be great. That way if other people have the same problem they know when it was noted and fixed.

  4. #4
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    No problem, sorry about that.

  5. #5
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    7
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    I'll be adding default value capability to all field types shortly
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  6. #6
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    7
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    This has now been added, see Model docs for details
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  7. #7
    Ext JS Premium Member watrboy00's Avatar
    Join Date
    Aug 2007
    Location
    Minneapolis, MN
    Posts
    473
    Vote Rating
    0
    watrboy00 is on a distinguished road

      0  

    Default


    Just out of curiosity when you define a model field will you be able to set the default or does it just make one up based on the field's type? I would go and look for myself but as you just commented about this Ed I don't think that version is released as of yet.
    Eric Berens
    Intranet Systems Manager @ Best Buy
    You should follow me on twitter here.

  8. #8
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    7
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    Quote Originally Posted by watrboy00 View Post
    Just out of curiosity when you define a model field will you be able to set the default or does it just make one up based on the field's type? I would go and look for myself but as you just commented about this Ed I don't think that version is released as of yet.
    You can set the default value of each field by setting its defaultValue property - like this:

    Code:
    Ext.regModel('User', {
      fields: [
        {name: 'gender', type: 'string', defaultValue: 'male'},
        {name: 'age', type: 'int'}
      ]
    });
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

Similar Threads

  1. [FIXED-94] Loading text as boolean.
    By filippo.ferrari in forum Ext Designer: Bugs
    Replies: 1
    Last Post: 7 Apr 2010, 6:01 PM
  2. Replies: 3
    Last Post: 4 Apr 2010, 4:01 PM
  3. [FIXED-7] Panels don't show default border selection
    By teknofire in forum Ext Designer: Bugs
    Replies: 1
    Last Post: 30 Mar 2010, 5:35 PM
  4. Boolean Fields Not Working in Inline Editor Grid
    By kyahne in forum Ext 1.x: Bugs
    Replies: 2
    Last Post: 5 Dec 2006, 1:26 AM

Thread Participants: 3