folder.setMenuDefinitions(menuList);
folderAction(folder, SAVE_ACTION);
}
else if (node.getDocType() == FileType.Page)
{
Page page = getJetspeedPage(node.getNodePath());
List menuList = page.getMenuDefinitions();
if (action.equals(SAVE_ACTION))
{
menuList.remove(definition);
if(definition.getMenuElements()!=null)
{
definition.getMenuElements().remove(oldElement);
definition.getMenuElements().add(newElement);
}else{
List elements = new ArrayList();
elements.add(newElement);
definition.setMenuElements(elements);
}
menuList.add(definition);
}
else if (action.equals(REMOVE_ACTION))
{
menuList.remove(definition);
definition.getMenuElements().remove(oldElement);
menuList.add(definition);
}
page.setMenuDefinitions(menuList);
PageAction(page, SAVE_ACTION);
}
setMenuDefinition(definition);
getMenuElements(definition, MenuElement.SEPARATOR_ELEMENT_TYPE);
}