我在Wonder网站的一个例子中有一个非常简单的navigationMenu.plist
:
(
{
name = Root;
directActionClass = DirectAction;
directActionName = default;
children = "session.navigationRootChoice";
childrenChoices = {
home = (
Posts,
Authors,
);
};
},
{
name = "Posts";
action = "session.navController.listPostsAction";
children = ("CreatePost","SearchPosts");
conditions = ("context.hasSession");
},
{
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";
}
)
但是,当我运行应用程序时,子菜单不会显示。我很确定这必须是一个需要打开的属性。任何想法将不胜感激。
感谢。
答案 0 :(得分:0)
我认为孩子是一串字符串。来自我的一个NavigationMenu.plist
{
name = Root;
children = ("Home","Person","Computer", "ComputerModels");
},
{
name = "Home";
action = "session.navController.homeAction";
},
{
name = Person;
action = "session.navController.listPersonAction";
children = ("createPerson", "findPerson", "Logout");
},
{
name = createPerson;
action = "session.navController.createPersonAction";
},
{
name = findPerson;
action = "session.navController.findPersonAction";
}
不要忘记在规则模型中设置navigationState规则。
50:pageConfiguration如'* Person'=> navigationState =“人物”[com.webobjects.directtoweb.Assignment]