HttpServletRequest request, HttpServletResponse response)
throws Exception {
if (log.isDebugEnabled()) {
log.debug("edit method called");
}
Resource currentResource = (Resource) request.getSession()
.getAttribute(ConsoleCst.CURRENT_RESOURCE);
String currentAttrId = (String) request
.getParameter(ConsoleCst.CURRENT_ATTRIBUTE_ID);
DynaActionForm attributeForm = (DynaActionForm) form;
Attribute currentAttribute = new Attribute();
if (currentAttrId != null && !"".equals(currentAttrId)) {
currentAttribute = attributeService.get(currentAttrId,
currentResource);
if (log.isDebugEnabled()) {
log.debug(currentAttribute);
}
}
attributeForm.set(ConsoleCst.ATTRIBUTE_REQUEST_BEAN, currentAttribute);
request.setAttribute(ConsoleCst.ATTRIBUTES_SESSION_BEAN,currentResource.getAttributes());
request.getSession().setAttribute(ConsoleCst.CURRENT_ATTRIBUTE,
currentAttribute);
return mapping.findForward(ConsoleCst.ATTRIBUTE_PAGE_FORWARD);
}