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