<% for (Property p : g.getPropertyList()) {%>
<% if (p instanceof ObjectProperty) {
ObjectProperty op = (ObjectProperty)p;%>
<%-- rjy7 We have a logic problem here: if the custom short view dictates that the item NOT be rendered,
and because of this there are NO items to render, we shouldn't show the label when not in edit mode.
Example: people ( = positionHistory) of an organization don't render if the position end date is in the past.
So the organization might not have any current people, in which case we shouldn't show the "people" label.
We need to compute objRows on the basis of the rendering, not the number of objectPropertyStatements.
See NIHVIVO-512. --%>
${objProp.editLabel}
<% /* arbitrary limit if value is unset, i.e. -1 */ %>
<%--
<% ObjectPropertyStatement oStmt = (ObjectPropertyStatement)request.getAttribute("opStmt");
if (oStmt!=null) {
Individual obj= (Individual)oStmt.getObject();
if (obj != null) {
if (!obj.doesFlag1Match(currentPortalId)) {%>
<% }
}
}%>
--%>
${editLinks}
(non-editable)
<% } else if (p instanceof DataProperty) {
DataProperty dp = (DataProperty)p;%>
${dataProp.editLabel}
<%-- just put in a single "edit" link, not an "add" link that expands to reveal edit/delete links --%>
${editLinks}
(non-editable)
<%-- creates an add link, even if displayLimit is unset, i.e. -1 --%>
<%-- set to an arbitrary but high positive limit if unset on property, i.e. -1 --%>
<%-- don't leave just one statement to expand --%>
<%-- c:if test="${displayLimit < 0}">
${dataPropertyStmt.data}
${editLinks}
(non-editable)
${dataPropertyStmt.data}
${editLinks}
(non-editable)
<% } else { // keyword property -- ignore
if (p instanceof KeywordProperty) {%>
Not expecting keyword properties here.
<% } else {
log.warn("unexpected unknown property type found");%>
Unknown property type found
<% }
}
%>
<%
} // end for (Property p : g.getPropertyList()
%>