}
try {
ForumFactory forumFactory = ForumFactory.getInstance(getAuthToken(request));
Forum forum = forumFactory.getForum(Integer.parseInt(request.getParameter("id")));
//check permission
checkPermission(request, OperationConstants.EDIT_FORUM, forum);
//first, populate
if (request.getParameter("forumBean.id") == null) {
ForumBean fb =new ForumBean();
fb.setDescription(forum.getDescription());
fb.setId(forum.getID());
fb.setModerationType(forum.getModerationType());
fb.setName(forum.getName());
String key=null;
for(Enumeration e= forum.propertyNames();e.hasMoreElements();){
key=(String)e.nextElement();
fb.setPropertie(key, forum.getProperty(key));
}
PropertyUtils.setProperty(form, "forumBean", fb);
return mapping.findForward("view");
}
//save
ForumBean fb = (ForumBean) PropertyUtils.getProperty(form, "forumBean");
forum.setModerationType(fb.getModerationType());
forum.setDescription(fb.getDescription());
//non forum.setName(fb.getDescription());
//properties
String temp = null;
for (Iterator it = fb.getProperties().keySet().iterator(); it.hasNext();) {
temp = (String) it.next();
forum.setProperty(temp, (String) fb.getProperties().get(temp));
}
} catch (NumberFormatException aee) {
errors.add("general", new ActionError("addForum.unauthorized"));
} catch (UnauthorizedException aee) {