}
try {
ForumFactory forumFactory = ForumFactory.getInstance(getAuthToken(request));
Forum forum = forumFactory.getForum(Integer.parseInt(request.getParameter("id")));
//check permission
checkPermission(request, OperationConstants.EDIT_MESSAGE,forum);
//first, populate
if (request.getParameter("messageBean.subject") == null) {
MessageBean mb = new MessageBean();
Message m =forum.getThread(Integer.parseInt(request.getParameter("threadID"))).getMessage(Integer.parseInt(request.getParameter("messageID")));
mb.setForumID( Integer.parseInt(request.getParameter("id")));
mb.setThreadID( Integer.parseInt(request.getParameter("threadID")));
mb.setMessageID( m.getID());
mb.setSubject( m.getSubject());
mb.setContent( m.getBody());
PropertyUtils.setProperty(form, "messageBean", mb);
return mapping.findForward("view");
}
//save
MessageBean mb = (MessageBean) PropertyUtils.getSimpleProperty(form, "messageBean");
Message m =forum.getThread(mb.getThreadID()).getMessage(mb.getMessageID());
m.setSubject(mb.getSubject());
m.setBody(mb.getContent());
} catch (NumberFormatException aee) {