mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Intial version of property sheet constraints support, no regex or list of values suppport yet though.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2664 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -512,25 +512,37 @@ public abstract class BaseContentWizard extends AbstractWizardBean
|
||||
{
|
||||
TypeDefinition typeDef = this.dictionaryService.getType(idQName);
|
||||
|
||||
if (typeDef != null &&
|
||||
this.dictionaryService.isSubClass(typeDef.getName(), ContentModel.TYPE_CONTENT))
|
||||
if (typeDef != null)
|
||||
{
|
||||
// try and get the display label from config
|
||||
String label = Utils.getDisplayLabel(context, child);
|
||||
|
||||
// if there wasn't a client based label try and get it from the dictionary
|
||||
if (label == null)
|
||||
if (this.dictionaryService.isSubClass(typeDef.getName(), ContentModel.TYPE_CONTENT))
|
||||
{
|
||||
label = typeDef.getTitle();
|
||||
// try and get the display label from config
|
||||
String label = Utils.getDisplayLabel(context, child);
|
||||
|
||||
// if there wasn't a client based label try and get it from the dictionary
|
||||
if (label == null)
|
||||
{
|
||||
label = typeDef.getTitle();
|
||||
}
|
||||
|
||||
// finally, just use the localname
|
||||
if (label == null)
|
||||
{
|
||||
label = idQName.getLocalName();
|
||||
}
|
||||
|
||||
this.objectTypes.add(new SelectItem(idQName.toString(), label));
|
||||
}
|
||||
|
||||
// finally, just use the localname
|
||||
if (label == null)
|
||||
else
|
||||
{
|
||||
label = idQName.getLocalName();
|
||||
logger.warn("Failed to add '" + child.getAttribute("name") +
|
||||
"' to the list of content types as the type is not a subtype of cm:content");
|
||||
}
|
||||
|
||||
this.objectTypes.add(new SelectItem(idQName.toString(), label));
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.warn("Failed to add '" + child.getAttribute("name") +
|
||||
"' to the list of content types as the type is not recognised");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user