try {
Mapping.begin();
Section section = Section.getInstance(id);
String template = section.getMetaData("template")+"";
TypeBean type = SectionTypes.getSectionBean(servlet,template);
request.setAttribute("types",type.getPublicationTypes());
request.setAttribute("workflows",Workflow.listTypes());
Mapping.rollback();
} catch (Exception e) {
Mapping.rollback();
throw new ServletException(e);
}
// Forward to the view page
return (mapping.findForward("view"));
}
// fill data | errors
if (errors.size() > 0) {
try {
Mapping.begin();
Section section = Section.getInstance(id);
String template = section.getMetaData("template")+"";
TypeBean type = SectionTypes.getSectionBean(servlet,template);
request.setAttribute("types",type.getPublicationTypes());
request.setAttribute(ERROR_KEY,errors);
Mapping.rollback();
} catch (Exception e) {
Mapping.rollback();