updates to enable delete to work even if no statement information is being passed in the parameters
This commit is contained in:
parent
7d91949ebe
commit
d1b17c75d1
2 changed files with 14 additions and 4 deletions
|
@ -408,9 +408,7 @@ public class EditConfigurationTemplateModel extends BaseTemplateModel {
|
|||
String subjectUri = EditConfigurationUtils.getSubjectUri(vreq);
|
||||
String predicateUri = EditConfigurationUtils.getPredicateUri(vreq);
|
||||
String objectUri = EditConfigurationUtils.getObjectUri(vreq);
|
||||
//ObjectPropertyStatementTemplate Model should pass the object key as part of the delete url
|
||||
String objectKey = vreq.getParameter("objectKey");
|
||||
statementDisplay.put(objectKey, objectUri);
|
||||
|
||||
//Set data map
|
||||
Map params = vreq.getParameterMap();
|
||||
for (Object key : params.keySet()) {
|
||||
|
@ -422,6 +420,16 @@ public class EditConfigurationTemplateModel extends BaseTemplateModel {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
//If no statement parameters being sent back, then just pass back null
|
||||
if(statementDisplay.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
//ObjectPropertyStatementTemplate Model should pass the object key as part of the delete url
|
||||
String objectKey = vreq.getParameter("objectKey");
|
||||
statementDisplay.put(objectKey, objectUri);
|
||||
|
||||
//Using object property statement template model here
|
||||
ObjectPropertyStatementTemplateModel osm = new ObjectPropertyStatementTemplateModel(
|
||||
subjectUri,
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
|
||||
<#if editConfiguration.objectProperty = true>
|
||||
<#assign toBeDeletedClass = "objProp" />
|
||||
<#assign statement = editConfiguration.objectStatementDisplay />
|
||||
<#if editConfiguration.objectStatementDisplay?has_content>
|
||||
<#assign statement = editConfiguration.objectStatementDisplay />
|
||||
</#if>
|
||||
<#else>
|
||||
<#assign statement = editConfiguration.dataStatementDisplay />
|
||||
</#if>
|
||||
|
|
Loading…
Add table
Reference in a new issue