flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bigosma...@apache.org
Subject [28/38] git commit: [flex-asjs] [refs/heads/feature/fontawesome] - Fix Binding for MDL Menu - make Bindable each property in MenuItemVO
Date Wed, 04 Jan 2017 02:19:10 GMT
Fix Binding for MDL Menu - make Bindable each property in MenuItemVO


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/d6dec081
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/d6dec081
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/d6dec081

Branch: refs/heads/feature/fontawesome
Commit: d6dec081d0bde3f5308a43876732fc6ed55cd9b3
Parents: 5753652
Author: piotrz <piotrz@apache.org>
Authored: Tue Jan 3 13:37:03 2017 +0100
Committer: piotrz <piotrz@apache.org>
Committed: Tue Jan 3 13:37:03 2017 +0100

----------------------------------------------------------------------
 .../itemRenderers/CustomMenuItemRenderer.mxml   |  5 ++-
 .../src/main/flex/models/MenuModel.as           |  3 +-
 .../MDLExample/src/main/flex/vos/MenuItemVO.as  | 36 +++-----------------
 3 files changed, 8 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d6dec081/examples/flexjs/MDLExample/src/main/flex/itemRenderers/CustomMenuItemRenderer.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/itemRenderers/CustomMenuItemRenderer.mxml
b/examples/flexjs/MDLExample/src/main/flex/itemRenderers/CustomMenuItemRenderer.mxml
index 90e3dc2..c090660 100644
--- a/examples/flexjs/MDLExample/src/main/flex/itemRenderers/CustomMenuItemRenderer.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/itemRenderers/CustomMenuItemRenderer.mxml
@@ -19,8 +19,7 @@ limitations under the License.
 -->
 <mdl:MenuItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                       xmlns:mdl="library://ns.apache.org/flexjs/mdl"
-                      xmlns:binding="org.apache.flex.binding.*"
-                      divider="{menuItem.hasDivider}">
+                      xmlns:binding="org.apache.flex.binding.*">
     <mdl:beads>
         <binding:ItemRendererDataBinding />
         <mdl:Disabled disabled="{menuItem.disabled}"/>
@@ -28,7 +27,7 @@ limitations under the License.
     <fx:Script><![CDATA[
         import vos.MenuItemVO;
 
-        [Bindable("__NoChangeEvent__")]
+        [Bindable("dataChange")]
         public function get menuItem():MenuItemVO
         {
             return data as MenuItemVO;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d6dec081/examples/flexjs/MDLExample/src/main/flex/models/MenuModel.as
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/models/MenuModel.as b/examples/flexjs/MDLExample/src/main/flex/models/MenuModel.as
index a883130..9faa83e 100644
--- a/examples/flexjs/MDLExample/src/main/flex/models/MenuModel.as
+++ b/examples/flexjs/MDLExample/src/main/flex/models/MenuModel.as
@@ -28,7 +28,8 @@ package models
         private var _menuItems:Array = [
             new MenuItemVO("Some Action"),
             new MenuItemVO("Another Action", true),
-            new MenuItemVO("More Action", false, false)
+            new MenuItemVO("More Action"),
+            new MenuItemVO("Item Disabled", false, true)
         ];
 
         public function get menuItems():Array

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d6dec081/examples/flexjs/MDLExample/src/main/flex/vos/MenuItemVO.as
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/vos/MenuItemVO.as b/examples/flexjs/MDLExample/src/main/flex/vos/MenuItemVO.as
index ce8226c..3fc48f0 100644
--- a/examples/flexjs/MDLExample/src/main/flex/vos/MenuItemVO.as
+++ b/examples/flexjs/MDLExample/src/main/flex/vos/MenuItemVO.as
@@ -18,48 +18,20 @@
 ////////////////////////////////////////////////////////////////////////////////
 package vos
 {
-    [Bindable]
     public class MenuItemVO
     {
+        [Bindable]
         public var label:String;
+        [Bindable]
         public var disabled:Boolean;
+        [Bindable]
         public var hasDivider:Boolean;
 
-        public function MenuItemVO(label:String, hasDivider:Boolean = false, disabled:Boolean
= true)
+        public function MenuItemVO(label:String, hasDivider:Boolean = false, disabled:Boolean
= false)
         {
            this.label = label;
            this.hasDivider = hasDivider;
            this.disabled = disabled;
         }
-
-      /*  public function get label():String
-        {
-            return _label;
-        }
-
-        public function set label(value:String):void
-        {
-            _label = value;
-        }
-
-        public function get disabled():Boolean
-        {
-            return _disabled;
-        }
-
-        public function set disabled(value:Boolean):void
-        {
-            _disabled = value;
-        }
-
-        public function get hasDivider():Boolean
-        {
-            return _hasDivider;
-        }
-
-        public function set hasDivider(value:Boolean):void
-        {
-            _hasDivider = value;
-        }   */
     }
 }


Mime
View raw message