diff options
author | Nivesh Rajbhandari | 2012-03-27 09:32:53 -0700 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-03-27 09:32:53 -0700 |
commit | 406bbfc63f8ed42d7da105dbd068a49ff8fb5f09 (patch) | |
tree | 3a8b45f4802f002269ff1bcf596f94cee4679a07 /node_modules/montage/ui/text-input.js | |
parent | bda9f8f5829c943486f8850e68c991e83f8fb8c8 (diff) | |
parent | 309dde5a8c4599cef6a1052c1ff9ee1ad8ec5858 (diff) | |
download | ninja-406bbfc63f8ed42d7da105dbd068a49ff8fb5f09.tar.gz |
Merge branch 'refs/heads/ninja-internal' into WebGLMaterials
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'node_modules/montage/ui/text-input.js')
-rw-r--r-- | node_modules/montage/ui/text-input.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/node_modules/montage/ui/text-input.js b/node_modules/montage/ui/text-input.js index cdd20c78..d707fa69 100644 --- a/node_modules/montage/ui/text-input.js +++ b/node_modules/montage/ui/text-input.js | |||
@@ -79,6 +79,28 @@ var TextInput = exports.TextInput = Montage.create(NativeControl, { | |||
79 | } | 79 | } |
80 | }, | 80 | }, |
81 | 81 | ||
82 | _valueBinding: { | ||
83 | value: null | ||
84 | }, | ||
85 | |||
86 | valueBinding: { | ||
87 | get: function() { | ||
88 | return this._valueBinding; | ||
89 | }, | ||
90 | set: function(value) { | ||
91 | if (this._valueBinding !== value) { | ||
92 | if (this._valueBinding !== null) { | ||
93 | Object.deleteBinding(this, "value"); | ||
94 | } | ||
95 | this._valueBinding = value; | ||
96 | if (String.isString(value)) { | ||
97 | Object.defineBinding(this, "value", {boundObject: this.ownerComponent, boundObjectPropertyPath: value}); | ||
98 | |||
99 | } | ||
100 | } | ||
101 | } | ||
102 | }, | ||
103 | |||
82 | // set value from user input | 104 | // set value from user input |
83 | /** | 105 | /** |
84 | @private | 106 | @private |