Association and Category Pickers (experimental)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14132 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mike Hatfield
2009-04-30 10:10:25 +00:00
parent 7d4d488c4a
commit 8a01781907
3 changed files with 27 additions and 11 deletions

View File

@@ -262,22 +262,22 @@ public class NodeHandler extends AbstractHandler
else else
{ {
// look for association defined for the type // look for association defined for the type
AssociationDefinition assocDef = assocDefs.get(fullQName); ChildAssociationDefinition childAssocDef = childAssocDefs.get(fullQName);
if (assocDef != null) if (childAssocDef != null)
{ {
// generate the association field // generate the association field
generateAssociationField(assocDef, // TODO: see if we can get just the specific child assoc data
this.nodeService.getTargetAssocs(nodeRef, fullQName), form); generateAssociationField(childAssocDef,
this.nodeService.getChildAssocs(nodeRef), form);
} }
else else
{ {
ChildAssociationDefinition childAssocDef = childAssocDefs.get(fullQName); AssociationDefinition assocDef = assocDefs.get(fullQName);
if (childAssocDef != null) if (assocDef != null)
{ {
// generate the association field // generate the association field
// TODO: see if we can get just the specific child assoc data generateAssociationField(assocDef,
generateAssociationField(childAssocDef, this.nodeService.getTargetAssocs(nodeRef, fullQName), form);
this.nodeService.getChildAssocs(nodeRef), form);
} }
else else
{ {

View File

@@ -307,7 +307,15 @@ public class ScriptNode implements Serializable, Scopeable, NamespacePrefixResol
{ {
return getQNameType().toString(); return getQNameType().toString();
} }
/**
* @return Returns the type in short format.
*/
public String getTypeShort()
{
return this.getShortQName(getQNameType());
}
/** /**
* @return Helper to return the 'name' property for the node * @return Helper to return the 'name' property for the node
*/ */

View File

@@ -176,7 +176,15 @@ public class TemplateNode extends BasePermissionsNode implements NamespacePrefix
return type; return type;
} }
/**
* @return Returns the type in short format.
*/
public String getTypeShort()
{
return this.getType().toPrefixString(this.services.getNamespaceService());
}
/** /**
* @return The display name for the node * @return The display name for the node
*/ */