如何显示选中审稿人的所有属性?
How to display all the properties of the selected reviewers?
考虑业务流程"Review and Approve (one or more reviewers) - Assign a review task to multiple reviewers"。
当我choose reviewers I see only their properties cm:userName
. How to display all the properties of the type cm:person
?
例如:
cm:userName
cm:firstName
cm:middleName
cm:email
cm:organizationId
cm:jobtitle
cm:googleusername
等等...
而不是这个容器(association.ftl 的一部分):
...
<div id="${controlId}-currentValueDisplay" class="current-values"></div>
...
我想使用 table。恕我直言,我应该覆盖的某些部分
Alfresco.ObjectFinder,如:
if (this.options.displayMode == "items")
{
Dom.get(this.id + "-currentValueDisplay").innerHTML = displayValue;
}
...等但是如何显示选中的评论者所有属性?
比方说,这部分:
displayValue +=
this.options.objectRenderer.renderItem(
item,
16,
"<div class='itemtype-" + $html(item.type) +
"' style='word-wrap: break-word;'>{icon} {name}</div>"
);
我假设 属性 是 name
好的,那么在哪里可以找到映射"property in object-finder : property in the person type"
?
对象-finder.js 用于不同类型的对象,如人物、标签等
item.type
是cm:person
,但是这里没有person对象的所有person。参考下图。
要显示公司名称、电子邮件等字段,您需要在 repo 端修改以下文件。
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\extension\templates\webscripts\org\alfresco\repository\forms\pickerresults.lib.js
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\extension\templates\webscripts\org\alfresco\repository\forms\pickerresults.lib.ftl
在 pickerresults.lib.js 中,我在 CreatePersonResult(node) 方法中添加了所需的额外属性。
function createPersonResult(node)
{
var personObject =
{
typeShort: node.typeShort,
isContainer: false,
properties: {},
displayPath: node.displayPath,
nodeRef: "" + node.nodeRef
}
// define properties for person
personObject.properties.userName = node.properties.userName;
personObject.properties.name = (node.properties.firstName ? node.properties.firstName + " " : "") +
(node.properties.lastName ? node.properties.lastName : "") +
" (" + node.properties.userName + ")";
personObject.properties.jobtitle = (node.properties.jobtitle ? node.properties.jobtitle : "");
//Add the extra properties here
personObject.properties.organization =(node.properties.organization ? node.properties.organization : "");
personObject.properties.googleusername =(node.properties.googleusername ? node.properties.googleusername : "");
return personObject;
}
在 pickerresults.lib.ftl 中,我将额外的属性添加到结果集,下面是 "selectable" : ${row.selectable?string}</#if>
"nodeRef": "${row.item.nodeRef}"<#if row.selectable?exists>,
"selectable" : ${row.selectable?string}</#if>,
"company": "${row.item.properties.organization!""}",
"googleusername": "${row.item.properties.googleusername!""}",
"jobtitle": "${row.item.properties.jobtitle!""}"
希望现在对您有所帮助。
考虑业务流程"Review and Approve (one or more reviewers) - Assign a review task to multiple reviewers"。
当我choose reviewers I see only their properties cm:userName
. How to display all the properties of the type cm:person
?
例如:
cm:userName
cm:firstName
cm:middleName
cm:email
cm:organizationId
cm:jobtitle
cm:googleusername
等等...
而不是这个容器(association.ftl 的一部分):
...
<div id="${controlId}-currentValueDisplay" class="current-values"></div>
...
我想使用 table。恕我直言,我应该覆盖的某些部分 Alfresco.ObjectFinder,如:
if (this.options.displayMode == "items")
{
Dom.get(this.id + "-currentValueDisplay").innerHTML = displayValue;
}
...等但是如何显示选中的评论者所有属性?
比方说,这部分:
displayValue +=
this.options.objectRenderer.renderItem(
item,
16,
"<div class='itemtype-" + $html(item.type) +
"' style='word-wrap: break-word;'>{icon} {name}</div>"
);
我假设 属性 是 name
好的,那么在哪里可以找到映射"property in object-finder : property in the person type"
?
对象-finder.js 用于不同类型的对象,如人物、标签等
item.type
是cm:person
,但是这里没有person对象的所有person。参考下图。
要显示公司名称、电子邮件等字段,您需要在 repo 端修改以下文件。
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\extension\templates\webscripts\org\alfresco\repository\forms\pickerresults.lib.js
C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\extension\templates\webscripts\org\alfresco\repository\forms\pickerresults.lib.ftl
在 pickerresults.lib.js 中,我在 CreatePersonResult(node) 方法中添加了所需的额外属性。
function createPersonResult(node)
{
var personObject =
{
typeShort: node.typeShort,
isContainer: false,
properties: {},
displayPath: node.displayPath,
nodeRef: "" + node.nodeRef
}
// define properties for person
personObject.properties.userName = node.properties.userName;
personObject.properties.name = (node.properties.firstName ? node.properties.firstName + " " : "") +
(node.properties.lastName ? node.properties.lastName : "") +
" (" + node.properties.userName + ")";
personObject.properties.jobtitle = (node.properties.jobtitle ? node.properties.jobtitle : "");
//Add the extra properties here
personObject.properties.organization =(node.properties.organization ? node.properties.organization : "");
personObject.properties.googleusername =(node.properties.googleusername ? node.properties.googleusername : "");
return personObject;
}
在 pickerresults.lib.ftl 中,我将额外的属性添加到结果集,下面是 "selectable" : ${row.selectable?string}</#if>
"nodeRef": "${row.item.nodeRef}"<#if row.selectable?exists>,
"selectable" : ${row.selectable?string}</#if>,
"company": "${row.item.properties.organization!""}",
"googleusername": "${row.item.properties.googleusername!""}",
"jobtitle": "${row.item.properties.jobtitle!""}"
希望现在对您有所帮助。