flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pio...@apache.org
Subject git commit: [flex-asjs] [refs/heads/develop] - Add ItemRendererDataBinding to CustomMenuItemRenderer - make getter menuItem working, but binding is still not fixed.
Date Tue, 03 Jan 2017 07:35:19 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop de87ded96 -> 54cc4d54a


Add ItemRendererDataBinding to CustomMenuItemRenderer - make getter menuItem working, but
binding is still not fixed.


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

Branch: refs/heads/develop
Commit: 54cc4d54a38e70dfc5fddf019d3709217837ed9f
Parents: de87ded
Author: piotrz <piotrz@apache.org>
Authored: Tue Jan 3 08:35:15 2017 +0100
Committer: piotrz <piotrz@apache.org>
Committed: Tue Jan 3 08:35:15 2017 +0100

----------------------------------------------------------------------
 .../main/flex/itemRenderers/CustomMenuItemRenderer.mxml |  5 +++--
 .../flexjs/MDLExample/src/main/flex/vos/MenuItemVO.as   | 12 ++++++------
 2 files changed, 9 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/54cc4d54/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 ccbd7c7..90e3dc2 100644
--- a/examples/flexjs/MDLExample/src/main/flex/itemRenderers/CustomMenuItemRenderer.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/itemRenderers/CustomMenuItemRenderer.mxml
@@ -19,18 +19,19 @@ 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}">
     <mdl:beads>
+        <binding:ItemRendererDataBinding />
         <mdl:Disabled disabled="{menuItem.disabled}"/>
     </mdl:beads>
     <fx:Script><![CDATA[
         import vos.MenuItemVO;
 
-        [Bindable("dataChange")]
+        [Bindable("__NoChangeEvent__")]
         public function get menuItem():MenuItemVO
         {
             return data as MenuItemVO;
         }
-
         ]]></fx:Script>
 </mdl:MenuItemRenderer>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/54cc4d54/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 7baa8cc..ce8226c 100644
--- a/examples/flexjs/MDLExample/src/main/flex/vos/MenuItemVO.as
+++ b/examples/flexjs/MDLExample/src/main/flex/vos/MenuItemVO.as
@@ -21,18 +21,18 @@ package vos
     [Bindable]
     public class MenuItemVO
     {
-        private var _label:String;
-        private var _disabled:Boolean;
-        private var _hasDivider:Boolean;
+        public var label:String;
+        public var disabled:Boolean;
+        public var hasDivider:Boolean;
 
-        public function MenuItemVO(label:String, hasDivider:Boolean = false, disabled:Boolean
= false)
+        public function MenuItemVO(label:String, hasDivider:Boolean = false, disabled:Boolean
= true)
         {
            this.label = label;
            this.hasDivider = hasDivider;
            this.disabled = disabled;
         }
 
-        public function get label():String
+      /*  public function get label():String
         {
             return _label;
         }
@@ -60,6 +60,6 @@ package vos
         public function set hasDivider(value:Boolean):void
         {
             _hasDivider = value;
-        }
+        }   */
     }
 }


Mime
View raw message