"menuOptions"))
{
public void populateItem(final ListItem listItem)
{
final MenuIncludeDefinition option = (MenuIncludeDefinition) listItem
.getModelObject();
listItem.add(new Label("name", option.getName()));
listItem.add(new Label("nest", Boolean.toString(option
.isNest())));
AjaxLink editLink =new AjaxLink("edit")
{
@Override
public void onClick(AjaxRequestTarget target)
{
metaDataModalWindow.setContent(new IncludesWindow(
metaDataModalWindow.getContentId(),option, ajaxPanel));
metaDataModalWindow.show(target);
}
};
editLink.add(new Label("editLabel",new ResourceModel("common.edit")));
listItem.add(editLink);
AjaxLink deleteLink = new AjaxLink("delete")
{
@Override
public void onClick(AjaxRequestTarget target)
{
menuActions(REMOVE_ACTION,option.getName(),new IncludesDefinitionBean());
target.addComponent(ajaxPanel);
}
};
deleteLink.add(new JavascriptEventConfirmation("onclick",new ResourceModel("action.delete.confirm")));
deleteLink.add(new Label("deleteLabel",new ResourceModel("common.delete")));
listItem.add(deleteLink);
}
});
add(new AjaxLink("new")
{
@Override
public void onClick(AjaxRequestTarget target)
{
MenuIncludeDefinition includeDefinition = null;
if (getUserSelectedNode().getDocType() == FileType.Folder)
{
includeDefinition = getServiceLocator()
.getPageManager()
.newFolderMenuIncludeDefinition();