...
Code Block |
---|
( { name = Root; directActionClass = DirectAction; directActionName = default; children = "session.navigationRootChoice"; childrenChoices = { home = ( Posts, Authors, ); }; }, { name = "Posts"; action = "session.navController.listPostsAction"; children = ("CreatePost","SearchPosts"); }, { name = CreatePost; action = "session.navController.createPostAction"; }, { name = SearchPosts; action = "session.navController.searchPostsAction"; }, { name = Authors; action = "session.navController.listAuthorsAction"; children = ("CreateAuthor","SearchAuthors"); }, { name = CreateAuthor; action = "session.navController.createAuthorAction"; }, { name = SearchAuthors; action = "session.navController.searchAuthorsAction"; } ) |
Add the following method in Session for the navigation root.
Code Block |
---|
public String navigationRootChoice() {
return "home";
}
|
The first array in the plist defines what the top level navigation is going to be, and this is where we define the two tabs (the childrenChoice dictionary). After that, we define the other parts of the navigation. You see references to action = session.navController. This is the action (method) that will be called for the specified navigation element, so let's create those methods in the MainNavigationController class.
...