fix build problem with message bundles, changed list to map in wizard config, added null checks when using custom types and fixed topic.gif

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2560 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2006-03-21 15:45:04 +00:00
parent ebf71bf211
commit 6d7516ecd1
6 changed files with 66 additions and 52 deletions

View File

@@ -508,38 +508,41 @@ public abstract class BaseContentWizard extends AbstractWizardBean
for (ConfigElement child : typesCfg.getChildren())
{
QName idQName = Repository.resolveToQName(child.getAttribute("name"));
TypeDefinition typeDef = this.dictionaryService.getType(idQName);
if (typeDef != null &&
this.dictionaryService.isSubClass(typeDef.getName(), ContentModel.TYPE_CONTENT))
if (idQName != null)
{
// look for a client localized string
String label = null;
String msgId = child.getAttribute("displayLabelId");
if (msgId != null)
{
label = Application.getMessage(context, msgId);
}
TypeDefinition typeDef = this.dictionaryService.getType(idQName);
// if there wasn't an externalized string look for one in the config
if (label == null)
if (typeDef != null &&
this.dictionaryService.isSubClass(typeDef.getName(), ContentModel.TYPE_CONTENT))
{
label = child.getAttribute("displayLabel");
// look for a client localized string
String label = null;
String msgId = child.getAttribute("displayLabelId");
if (msgId != null)
{
label = Application.getMessage(context, msgId);
}
// if there wasn't an externalized string look for one in the config
if (label == null)
{
label = child.getAttribute("displayLabel");
}
// 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));
}
// 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));
}
}