return !attrib.isReadOnly();
}
});
if (!attrib.isReadOnly())
{
Link deleteLink = new Link("link", item.getModel())
{
@Override
public void onClick()
{
try
{
getPrincipal().getSecurityAttributes()
.removeAttribute(attrib.getName());
getManager()
.updatePrincipal(getPrincipal());
}
catch (SecurityException e)
{
log.error("Failed to update principal.", e);
}
setPrincipal(getPrincipal());
refreshData();
}
};
deleteLink.add(new Label("deleteLabel",
new ResourceModel("common.delete")));
item.add(deleteLink);
}
}
};