possibility to set default navigation item
authorSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Sun, 21 Apr 2013 15:14:45 +0000 (18:14 +0300)
committerSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Sun, 21 Apr 2013 15:14:45 +0000 (18:14 +0300)
src/main/java/eu/svjatoslav/commons/network/navigation/Navigation.java

index 7a1f711..1731043 100755 (executable)
@@ -9,6 +9,10 @@ public class Navigation {
 
        private NavigationItem defaultNavigationItem;
 
+       public NavigationItem getDefaultNavigationItem() {
+               return defaultNavigationItem;
+       }
+
        public NavigationItem getRootNavigationItem() {
                return rootNavigationItem;
        }
@@ -26,7 +30,7 @@ public class Navigation {
                        e.printStackTrace();
                }
 
-               return defaultNavigationItem;
+               return getDefaultNavigationItem();
        }
 
        public String getTopMenu(final String requestUrl) {
@@ -53,6 +57,11 @@ public class Navigation {
                return result.toString();
        }
 
+       public void setDefaultNavigationItem(
+                       final NavigationItem defaultNavigationItem) {
+               this.defaultNavigationItem = defaultNavigationItem;
+       }
+
        public void setRootNavigationItem(final NavigationItem rootNavigationItem) {
                this.rootNavigationItem = rootNavigationItem;
        }