aboutsummaryrefslogtreecommitdiff
path: root/node_modules/montage/ui/autocomplete/result-item.reel
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-05-16 15:57:19 -0700
committerNivesh Rajbhandari2012-05-16 15:57:19 -0700
commit95069173e145691b0059f2dcbbaa7332694ed778 (patch)
tree2158ede11ccbc2eb3a12f0b2f3c0233f0ece0a30 /node_modules/montage/ui/autocomplete/result-item.reel
parent727ad95f6828821f0682aa98104783e4bbda78b4 (diff)
parentfd54dabad7cbc27a0efb0957155c00d578912909 (diff)
downloadninja-95069173e145691b0059f2dcbbaa7332694ed778.tar.gz
Merge branch 'refs/heads/dom-architecture-master' into Dom-Architecture
Diffstat (limited to 'node_modules/montage/ui/autocomplete/result-item.reel')
-rw-r--r--node_modules/montage/ui/autocomplete/result-item.reel/result-item.js33
1 files changed, 33 insertions, 0 deletions
diff --git a/node_modules/montage/ui/autocomplete/result-item.reel/result-item.js b/node_modules/montage/ui/autocomplete/result-item.reel/result-item.js
new file mode 100644
index 00000000..61b71afa
--- /dev/null
+++ b/node_modules/montage/ui/autocomplete/result-item.reel/result-item.js
@@ -0,0 +1,33 @@
1/* <copyright>
2 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5 </copyright> */
6var Montage = require("montage").Montage,
7 Component = require("ui/component").Component,
8 DynamicText = require("ui/dynamic-text.reel").DynamicText;
9
10exports.ResultItem = Montage.create(DynamicText, {
11
12 textPropertyPath: {value: null},
13
14 _object: {value: null},
15 object: {
16 get: function() {
17 return this._object;
18 },
19 set: function(aValue) {
20 if(aValue) {
21 this._object = aValue;
22 }
23 if(this._object) {
24 if(this.textPropertyPath) {
25 this.value = this._object[this.textPropertyPath];
26 } else {
27 this.value = this._object;
28 }
29 }
30 }
31 }
32
33});