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] - FLEX-35256 - Fix issue with rendering TabBarButtonTabsItemRenderer in case of Binding with brackets - Brackets binding is executing later, so items in model was not in place where TabBar was adding to layout
Date Sun, 12 Feb 2017 17:37:16 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop ea06a78f0 -> 51cdd613d


FLEX-35256 - Fix issue with rendering TabBarButtonTabsItemRenderer in case of Binding with
brackets
- Brackets binding is executing later, so items in model was not in place where TabBar was
adding to layout - I am checking whether dataProvider is ready in ITabModel


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

Branch: refs/heads/develop
Commit: 51cdd613de1879c3fbe99bb6c3e07b845517ffe1
Parents: ea06a78
Author: piotrz <piotrz@apache.org>
Authored: Sun Feb 12 18:37:06 2017 +0100
Committer: piotrz <piotrz@apache.org>
Committed: Sun Feb 12 18:37:06 2017 +0100

----------------------------------------------------------------------
 .../org/apache/flex/mdl/beads/views/TabsView.as    | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/51cdd613/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/views/TabsView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/views/TabsView.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/views/TabsView.as
index a9ea2e4..8138b95 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/views/TabsView.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/views/TabsView.as
@@ -25,6 +25,7 @@ package org.apache.flex.mdl.beads.views
     import org.apache.flex.core.IStrand;
     import org.apache.flex.mdl.TabBar;
     import org.apache.flex.mdl.TabBarPanel;
+    import org.apache.flex.mdl.beads.models.ITabModel;
     import org.apache.flex.mdl.supportClasses.ITabItemRenderer;
 
     /**
@@ -108,6 +109,22 @@ package org.apache.flex.mdl.beads.views
         {
             host.removeEventListener("initComplete", initCompleteHandler);
 
+            var model:ITabModel = (_strand as IStrandWithModel).model as ITabModel;
+            if (!model.dataProvider)
+            {
+                model.addEventListener("dataProviderChanged", onTabsDataProviderChangedHandler);
+            }
+            else
+            {
+                completeSetup();
+            }
+        }
+
+        private function onTabsDataProviderChangedHandler(event:Event):void
+        {
+            var model:ITabModel = (_strand as IStrandWithModel).model as ITabModel;
+            model.removeEventListener("dataProviderChanged", onTabsDataProviderChangedHandler);
+
             completeSetup();
         }
 


Mime
View raw message