putVal("tags", tagService.queryAll());
renderTemplate(FTL.admin.POST_EDIT);
}
public void post(int id) {
Post post = preparePost(id);
post.setTitle(getParam("title"));
post.setUrl(getParam("url"));
post.setContent(getParam("content"));
post.setTop(getIntParam("top", 0));
post.setStatus(getParam("status"));
post.setType(getParam("type"));
int[] tagIds = getIntParams("tagid");
if (id == 0) {
id = postService.add(post, tagIds);
} else {