Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

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 the Session class 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.

...

After login, you will see the blog entries and if you click the Authors tab, you see the list of authors. Each item in the list have has 3 actions by default: Inspect (view the object), Edit (modify the object) and the red X button to delete the object.

Click Edit on an author, and you will see that it display displays not only the author's details but also blog entries created for that user. You can even create a new blog entry directly from the author.

...

Viewing or editing a blog entry can be improveimproved. The three things we want to customize:

...

Congratulations, you are done with the D2W tutorial! The next tutorial is about creating a stateful application.