Repository: flex-asjs
Updated Branches:
  refs/heads/develop 1550ee685 -> f80b3d4a3


Change Drawer Navigation Example to List


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

Branch: refs/heads/develop
Commit: f80b3d4a3698be386e5fbf004a1906e868542ebc
Parents: 1550ee6
Author: Carlos Rovira <[email protected]>
Authored: Sat Jan 7 14:09:14 2017 +0100
Committer: Carlos Rovira <[email protected]>
Committed: Sat Jan 7 14:09:14 2017 +0100

----------------------------------------------------------------------
 .../MDLExample/src/main/flex/MainNavigation.mxml    | 16 +++++++---------
 .../src/main/flex/models/MainNavigationModel.as     | 16 ++++++++++++++++
 2 files changed, 23 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f80b3d4a/examples/flexjs/MDLExample/src/main/flex/MainNavigation.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/MainNavigation.mxml 
b/examples/flexjs/MDLExample/src/main/flex/MainNavigation.mxml
index 08b0bf9..ef59f71 100644
--- a/examples/flexjs/MDLExample/src/main/flex/MainNavigation.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/MainNavigation.mxml
@@ -61,15 +61,13 @@ limitations under the License.
     <mdl:Drawer>
         <mdl:LayoutTitle text="Drawer"/>
         <mdl:Navigation>
-            <mdl:NavigationLink text="About" 
href="https://getmdl.io/index.html"/>
-            <mdl:NavigationLink text="Getting Started" 
href="https://getmdl.io/started/index.html"/>
-            <mdl:NavigationLink text="Templates" 
href="https://getmdl.io/templates/index.html"/>
-            <mdl:NavigationLink text="Components" 
href="https://getmdl.io/components/index.html"/>
-            <mdl:NavigationLink text="Styles" 
href="https://getmdl.io/styles/index.html"/>
-            <mdl:NavigationLink text="Customize" 
href="https://getmdl.io/customize/index.html"/>
-            <mdl:NavigationLink text="Showcase" 
href="https://getmdl.io/showcase/index.html"/>
-            <mdl:NavigationLink text="FAQ" 
href="https://getmdl.io/faq/index.html"/>
-        </mdl:Navigation>
+                <mdl:beads>
+                    <js:ConstantBinding
+                            sourceID="mainNavigationModel"
+                            sourcePropertyName="drawerNavigation"
+                            destinationPropertyName="dataProvider" />
+                </mdl:beads>
+            </mdl:Navigation>
     </mdl:Drawer>
     
     <mdl:NavigationLayoutContent>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f80b3d4a/examples/flexjs/MDLExample/src/main/flex/models/MainNavigationModel.as
----------------------------------------------------------------------
diff --git 
a/examples/flexjs/MDLExample/src/main/flex/models/MainNavigationModel.as 
b/examples/flexjs/MDLExample/src/main/flex/models/MainNavigationModel.as
index 5e599ac..c75b954 100644
--- a/examples/flexjs/MDLExample/src/main/flex/models/MainNavigationModel.as
+++ b/examples/flexjs/MDLExample/src/main/flex/models/MainNavigationModel.as
@@ -35,5 +35,21 @@ package models
         {
             return _mainNavigation;
         }
+
+        private var _drawerNavigation:Array = [
+                new NavigationLinkVO("About", "https://getmdl.io/index.html";),
+                new NavigationLinkVO("Getting Started", 
"https://getmdl.io/started/index.html";),
+                new NavigationLinkVO("Templates", 
"https://getmdl.io/templates/index.html";),
+                new NavigationLinkVO("Components", 
"https://getmdl.io/components/index.html";),
+                new NavigationLinkVO("Styles", 
"https://getmdl.io/styles/index.html";),
+                new NavigationLinkVO("Customize", 
"https://getmdl.io/customize/index.html";),
+                new NavigationLinkVO("Showcase", 
"https://getmdl.io/showcase/index.html";),
+                new NavigationLinkVO("FAQ", "https://getmdl.io/faq/index.html";)
+        ];
+
+        public function get drawerNavigation():Array
+        {
+            return _drawerNavigation;
+        }
     }
 }

Reply via email to