Another step towards completion of MOB-1188. Metadata of RM container types is now grouped when viewing and editing. All built in RM fields are grouped together (albeit in a semi-random order), all RM custom fields are grouped together at the bottom and all other 'general' metadata will be grouped together at the top.

NOTE: Custom RM metadata can still be missing if you're viewing a node created before the custom property was defined.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15609 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2009-08-05 12:14:44 +00:00
parent cf05316094
commit b6c306dbf1
3 changed files with 1327 additions and 1271 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -54,7 +54,7 @@ import org.apache.commons.logging.LogFactory;
* *
* @author Gavin Cornwell * @author Gavin Cornwell
*/ */
public class TypeFormProcessor extends NodeFormProcessor public class TypeFormProcessor extends ContentModelFormProcessor
{ {
/** Logger */ /** Logger */
private static Log logger = LogFactory.getLog(TypeFormProcessor.class); private static Log logger = LogFactory.getLog(TypeFormProcessor.class);
@@ -63,6 +63,15 @@ public class TypeFormProcessor extends NodeFormProcessor
public static final String DESTINATION = "alf_destination"; public static final String DESTINATION = "alf_destination";
/*
* @see org.alfresco.repo.forms.processor.node.ContentModelFormProcessor#getLogger()
*/
@Override
protected Log getLogger()
{
return logger;
}
/* /*
* @see org.alfresco.repo.forms.processor.node.NodeFormProcessor#getTypedItem(org.alfresco.repo.forms.Item) * @see org.alfresco.repo.forms.processor.node.NodeFormProcessor#getTypedItem(org.alfresco.repo.forms.Item)
*/ */
@@ -158,6 +167,8 @@ public class TypeFormProcessor extends NodeFormProcessor
// setup field definitions and data // setup field definitions and data
generateAllPropertyFields(typeDef, form); generateAllPropertyFields(typeDef, form);
generateAllAssociationFields(typeDef, form); generateAllAssociationFields(typeDef, form);
// TODO: generate transient properties for content types?
} }
} }
@@ -173,7 +184,7 @@ public class TypeFormProcessor extends NodeFormProcessor
Map<QName, PropertyDefinition> propDefs = typeDef.getProperties(); Map<QName, PropertyDefinition> propDefs = typeDef.getProperties();
for (PropertyDefinition propDef : propDefs.values()) for (PropertyDefinition propDef : propDefs.values())
{ {
generatePropertyField(propDef, null, form); generatePropertyField(propDef, null, form, this.namespaceService);
} }
// get all default aspects for the type and iterate round their // get all default aspects for the type and iterate round their
@@ -184,7 +195,7 @@ public class TypeFormProcessor extends NodeFormProcessor
propDefs = aspect.getProperties(); propDefs = aspect.getProperties();
for (PropertyDefinition propDef : propDefs.values()) for (PropertyDefinition propDef : propDefs.values())
{ {
generatePropertyField(propDef, null, form); generatePropertyField(propDef, null, form, this.namespaceService);
} }
} }
} }
@@ -201,7 +212,7 @@ public class TypeFormProcessor extends NodeFormProcessor
Map<QName, AssociationDefinition> assocDefs = typeDef.getAssociations(); Map<QName, AssociationDefinition> assocDefs = typeDef.getAssociations();
for (AssociationDefinition assocDef : assocDefs.values()) for (AssociationDefinition assocDef : assocDefs.values())
{ {
this.generateAssociationField(assocDef, null, form); generateAssociationField(assocDef, null, form, this.namespaceService);
} }
// get all default aspects for the type and iterate round their // get all default aspects for the type and iterate round their
@@ -212,7 +223,7 @@ public class TypeFormProcessor extends NodeFormProcessor
assocDefs = aspect.getAssociations(); assocDefs = aspect.getAssociations();
for (AssociationDefinition assocDef : assocDefs.values()) for (AssociationDefinition assocDef : assocDefs.values())
{ {
this.generateAssociationField(assocDef, null, form); generateAssociationField(assocDef, null, form, this.namespaceService);
} }
} }
} }