InfoSection currentSection = (InfoSection) session.getAttribute(SessionConstants.INFO_SECTION); List all = (List) session.getAttribute(SessionConstants.SECTIONS); List allSections = new ArrayList(); allSections.addAll(allSections);
InfoSection currentSection = (InfoSection) session.getAttribute(SessionConstants.INFO_SECTION); List all = (List) session.getAttribute(SessionConstants.SECTIONS); List allSections = new ArrayList(); allSections.addAll(allSections);  session.removeAttribute("ALL_SECTIONS");   allSections.remove(currentSection.getSuperiorInfoSection()); allSections.remove(currentSection);  try { allSections = this.removeDaughters( userView, infoSite, currentSection, allSections); } catch (FenixActionException fenixActionException) { throw fenixActionException; }   session.setAttribute("ALL_SECTIONS", allSections);    ArrayList sections; Object args[] = { infoSite, currentSection.getSuperiorInfoSection()}; GestorServicos manager = GestorServicos.manager();  try { sections = (ArrayList) manager.executar( userView, "ReadSectionsBySiteAndSuperiorSection", args); } catch (FenixServiceException fenixServiceException) { throw new FenixActionException(fenixServiceException.getMessage()); }  if (sections.size() != 0) { sections.remove(currentSection); Collections.sort(sections); session.setAttribute(SessionConstants.CHILDREN_SECTIONS, sections); } else session.removeAttribute(SessionConstants.CHILDREN_SECTIONS);
	public ActionForward prepareEdit(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)		throws FenixActionException {			HttpSession session = request.getSession();			UserView userView = (UserView) session.getAttribute(SessionConstants.U_VIEW);			InfoSite infoSite = (InfoSite) session.getAttribute(SessionConstants.INFO_SITE);			InfoSection currentSection = (InfoSection) session.getAttribute(SessionConstants.INFO_SECTION);			List all = (List) session.getAttribute(SessionConstants.SECTIONS);			List allSections = new ArrayList();			allSections.addAll(allSections);						session.removeAttribute("ALL_SECTIONS");						//remove parent section, current section and all of it's daughters			allSections.remove(currentSection.getSuperiorInfoSection());			allSections.remove(currentSection);						try {				allSections = this.removeDaughters(userView, infoSite, currentSection, allSections);			} catch (FenixActionException fenixActionException) {				throw fenixActionException;			}			//TODO: add to SessionConstants w/different name			session.setAttribute("ALL_SECTIONS", allSections);			return mapping.findForward("editSection");		}