- Added ability to hide actions

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2862 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2006-05-12 09:34:43 +00:00
parent 38f88da91b
commit bac4f6f892
5 changed files with 76 additions and 23 deletions

View File

@@ -56,7 +56,7 @@ public class ActionsElementReader implements ConfigElementReader
public static final String ATTRIBUTE_IDREF = "idref";
public static final String ATTRIBUTE_NAME = "name";
public static final String ATTRIBUTE_ALLOW = "allow";
public static final String ATTRIBUTE_HIDE = "hide";
/**
* @see org.alfresco.config.xml.elementreader.ConfigElementReader#parse(org.dom4j.Element)
@@ -123,8 +123,17 @@ public class ActionsElementReader implements ConfigElementReader
}
else
{
// add the action definition ID to the group
actionGroup.addAction(idRef);
// look for the hide attribute
String hide = actionRefElement.attributeValue(ATTRIBUTE_HIDE);
if (hide != null && Boolean.parseBoolean(hide))
{
actionGroup.hideAction(idRef);
}
else
{
// add the action definition ID to the group
actionGroup.addAction(idRef);
}
}
}