Results 1 to 2 of 2

Thread: regModel: Is it possible to give a field/variable to a fixed value in the model?

  1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    44
    Vote Rating
    0
      0  

    Default regModel: Is it possible to give a field/variable to a fixed value in the model?

    Hello all,

    its a quite simple question:
    When declaring my fields/attributes in the model, I have three "int"-fields that should always have the value "0", right from the beginning on.

    Is it possible to set this somewhere in the model? I Couldnt find something about this, neither in the tutorials nor in the model API.

    Thanks in advance,
    Florian

  2. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,062
    Answers
    3976
    Vote Rating
    1391
      0  

    Default

    A field should have a defaultValue config:

    http://docs.sencha.com/touch/1-1/#!/...g-defaultValue
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

Posting Permissions

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