From cedcc20a4c8be886cc881f095330907adc806b29 Mon Sep 17 00:00:00 2001 From: Gavin Cornwell Date: Thu, 13 Aug 2009 09:58:02 +0000 Subject: [PATCH] MOB-1208 & MOB-1214: Form customisation improvements, generated form UI model now creates a 'map' of fields so that they can be directly accessed in custom templates (this provides the groundwork required to fix the RM record metadata screen). Default controls mapping have dropped the "d:" prefix as this is a repo detail and should be generic. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15723 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../processor/node/ContentModelFormProcessor.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/source/java/org/alfresco/repo/forms/processor/node/ContentModelFormProcessor.java b/source/java/org/alfresco/repo/forms/processor/node/ContentModelFormProcessor.java index 7547b88e05..b253623a17 100644 --- a/source/java/org/alfresco/repo/forms/processor/node/ContentModelFormProcessor.java +++ b/source/java/org/alfresco/repo/forms/processor/node/ContentModelFormProcessor.java @@ -206,8 +206,7 @@ public abstract class ContentModelFormProcessor extends FilteredFormProcessor String propName = propDef.getName().toPrefixString(namespaceService); String[] nameParts = QName.splitPrefixedQName(propName); PropertyFieldDefinition fieldDef = new PropertyFieldDefinition( - propName, propDef.getDataType().getName().toPrefixString( - namespaceService)); + propName, propDef.getDataType().getName().getLocalName()); String title = propDef.getTitle(); if (title == null) @@ -697,8 +696,7 @@ public abstract class ContentModelFormProcessor extends FilteredFormProcessor { String dataKeyName = PROP_DATA_PREFIX + TRANSIENT_MIMETYPE; PropertyFieldDefinition mimetypeField = new PropertyFieldDefinition( - TRANSIENT_MIMETYPE, DataTypeDefinition.TEXT.toPrefixString( - this.namespaceService)); + TRANSIENT_MIMETYPE, DataTypeDefinition.TEXT.getLocalName()); mimetypeField.setLabel(I18NUtil.getMessage(MSG_MIMETYPE_LABEL)); mimetypeField.setDescription(I18NUtil.getMessage(MSG_MIMETYPE_DESC)); mimetypeField.setDataKeyName(dataKeyName); @@ -720,8 +718,7 @@ public abstract class ContentModelFormProcessor extends FilteredFormProcessor { String dataKeyName = PROP_DATA_PREFIX + TRANSIENT_ENCODING; PropertyFieldDefinition encodingField = new PropertyFieldDefinition( - TRANSIENT_ENCODING, DataTypeDefinition.TEXT.toPrefixString( - this.namespaceService)); + TRANSIENT_ENCODING, DataTypeDefinition.TEXT.getLocalName()); encodingField.setLabel(I18NUtil.getMessage(MSG_ENCODING_LABEL)); encodingField.setDescription(I18NUtil.getMessage(MSG_ENCODING_DESC)); encodingField.setDataKeyName(dataKeyName); @@ -743,8 +740,7 @@ public abstract class ContentModelFormProcessor extends FilteredFormProcessor { String dataKeyName = PROP_DATA_PREFIX + TRANSIENT_SIZE; PropertyFieldDefinition sizeField = new PropertyFieldDefinition( - TRANSIENT_SIZE, DataTypeDefinition.LONG.toPrefixString( - this.namespaceService)); + TRANSIENT_SIZE, DataTypeDefinition.LONG.getLocalName()); sizeField.setLabel(I18NUtil.getMessage(MSG_SIZE_LABEL)); sizeField.setDescription(I18NUtil.getMessage(MSG_SIZE_DESC)); sizeField.setDataKeyName(dataKeyName);