Contexts.getPageContext().set("currentDirectory", forumDir);
Contexts.getPageContext().set("currentDocument", forumDir.getDefaultFile());
}
protected void invokeApplication() throws Exception {
TopicHome home = (TopicHome)getInstance(TopicHome.class);
home.newTopic();
}
}.run();
new FacesRequest() {
protected void beforeRequest() {
setParameter("cid", conversationId);
}
protected void updateModelValues() throws Exception {
WikiNodeDAO nodeDAO = (WikiNodeDAO)getInstance(WikiNodeDAO.class);
WikiDirectory forumDir = nodeDAO.findWikiDirectory(102l);
Contexts.getPageContext().set("currentDirectory", forumDir);
Contexts.getPageContext().set("currentDocument", forumDir.getDefaultFile());
}
protected void invokeApplication() throws Exception {
TopicHome home = (TopicHome)getInstance(TopicHome.class);
home.getInstance().setName("New Topic");
home.getTextEditor().setValue("This is a new topic.");
home.getInstance().setEnableComments(false);
assert invokeMethod("#{topicHome.persist}") == null;
Long newId = (Long)getValue("#{topicHome.instance.id}");