示例#1
0
 @Before({AdminInterceptor.class, PostValidator.class})
 public void update() {
   Post post = getModel(Post.class);
   post.myUpdate();
   redirect("/topic/" + post.get("topicID"));
 }
示例#2
0
 @Before({LoginInterceptor.class, PostValidator.class})
 public void save() {
   Post post = getModel(Post.class);
   post.set("userID", getSessionAttr("userID")).mySave();
   redirect("/post/" + post.getInt("topicID"));
 }