. JavaScript API improvements

. Template API improvements
. Fixed a couple more UTF-8 code file warnings when compiling the source

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3473 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2006-08-09 12:51:42 +00:00
parent cbe407f6b1
commit d8ba01d55e
2 changed files with 14 additions and 20 deletions

View File

@@ -243,8 +243,8 @@ public class DocumentDetailsBean extends BaseDetailsBean
{
// we know for now that the general classifiable aspect only will be
// applied so we can retrive the categories property direclty
Collection categories = (Collection)this.nodeService.getProperty(getDocument().getNodeRef(),
ContentModel.PROP_CATEGORIES);
Collection<NodeRef> categories = (Collection<NodeRef>)this.nodeService.getProperty(
getDocument().getNodeRef(), ContentModel.PROP_CATEGORIES);
if (categories == null || categories.size() == 0)
{
@@ -256,16 +256,13 @@ public class DocumentDetailsBean extends BaseDetailsBean
MSG_HAS_FOLLOWING_CATEGORIES));
builder.append("<ul>");
for (Object obj : categories)
for (NodeRef ref : categories)
{
if (obj instanceof NodeRef)
if (this.nodeService.exists(ref))
{
if (this.nodeService.exists((NodeRef)obj))
{
builder.append("<li>");
builder.append(Repository.getNameForNode(this.nodeService, (NodeRef)obj));
builder.append("</li>");
}
builder.append("<li>");
builder.append(Repository.getNameForNode(this.nodeService, ref));
builder.append("</li>");
}
}
builder.append("</ul>");

View File

@@ -306,8 +306,8 @@ public class SpaceDetailsBean extends BaseDetailsBean
{
// we know for now that the general classifiable aspect only will be
// applied so we can retrive the categories property direclty
Collection categories = (Collection)this.nodeService.getProperty(getSpace().getNodeRef(),
ContentModel.PROP_CATEGORIES);
Collection<NodeRef> categories = (Collection<NodeRef>)this.nodeService.getProperty(
getSpace().getNodeRef(), ContentModel.PROP_CATEGORIES);
if (categories == null || categories.size() == 0)
{
@@ -319,16 +319,13 @@ public class SpaceDetailsBean extends BaseDetailsBean
MSG_HAS_FOLLOWING_CATEGORIES));
builder.append("<ul>");
for (Object obj : categories)
for (NodeRef ref : categories)
{
if (obj instanceof NodeRef)
if (this.nodeService.exists(ref))
{
if (this.nodeService.exists((NodeRef)obj))
{
builder.append("<li>");
builder.append(Repository.getNameForNode(this.nodeService, (NodeRef)obj));
builder.append("</li>");
}
builder.append("<li>");
builder.append(Repository.getNameForNode(this.nodeService, ref));
builder.append("</li>");
}
}
builder.append("</ul>");