}
if (getSectionsPropertiesHandler().getDuplicateSection().booleanValue()) {
renderFragment("outputDuplicateSection");
return;
}
WorkspaceImpl workspace;
renderFragment("outputStart");
try {
workspace = (WorkspaceImpl) getSectionsPropertiesHandler().getWorkspace();
renderFragment("outputCommandsBarStart");
String preffix = (String) getParameter("preffix");
List pages = initSections(preffix == null ? "--" : preffix, workspace);
if (!pages.isEmpty()) {
renderFragment("outputStartSelect");
renderFragment("outputNoneSelected");
for (int i = 0; i < pages.size(); i++) {
Section section = (Section) pages.get(i);
String title = (String) pageTitles.get(i);
setAttribute("id", section.getId());
setAttribute("title", StringEscapeUtils.escapeHtml(title));
renderFragment("outputSelect");
}
renderFragment("outputEndSelect");
}
WorkspacePermission workspacePerm = WorkspacePermission.newInstance(getSectionsPropertiesHandler().getWorkspace(), WorkspacePermission.ACTION_ADMIN_PROVIDERS);
setAttribute("editPanels", UserStatus.lookup().hasPermission(workspacePerm));
setAttribute("workspace", workspace);
renderFragment("outputCommandsBarEnd");
renderFragment("commandsBarSeparation");
if (!getSectionsPropertiesHandler().getErrorPermission().isEmpty()) {
for (int i = 0; i < getSectionsPropertiesHandler().getErrorPermission().size(); i++) {
setAttribute("errorCommand", getSectionsPropertiesHandler().getErrorPermission().get(i));
renderFragment("outputErrorCommands");
}
getSectionsPropertiesHandler().setErrorPermission(new ArrayList());
}
renderFragment("outputTreeStart");
if (workspace.getSectionsCount() == 0)
renderFragment("outputEmptySections");
else {
setAttribute("workspaceId", workspace.getId());
renderFragment("outputTreeBody");
}
renderFragment("outputTreeEnd");
setAttribute("moveLoop", getSectionsPropertiesHandler().getMoveLoop());
renderFragment("outputEnd");