Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added check on resource id

git-svn-id: file:///opt/svn/repos-elessar/jAPS2/trunk@33493 7c63eed8-93cd-11dc-84e7-3b7bcc207536
  • Loading branch information...
commit 22b165e7908e9ccafa51a0cb8b926d891ae42a61 1 parent 9b17f8e
e.santoboni authored
View
4 WebContent/WEB-INF/plugins/jacms/apsadmin/jsp/resource/entryResource.jsp
@@ -58,7 +58,9 @@
<s:iterator value="categoryCodes" id="categoryCode" status="rowstatus">
<input type="hidden" name="categoryCodes" value="<s:property value="#categoryCode" />" id="categoryCodes-<s:property value="#rowstatus.index" />"/>
</s:iterator>
+<s:if test="strutsAction != 1">
<wpsf:hidden name="resourceId" />
+</s:if>
<s:if test="#categoryTreeStyleVar == 'request'">
<s:iterator value="treeNodesToOpen" var="treeNodeToOpenVar"><wpsf:hidden name="treeNodesToOpen" value="%{#treeNodeToOpenVar}"></wpsf:hidden></s:iterator>
</s:if>
@@ -91,7 +93,7 @@
<wpsf:checkbox name="normalizeFileName" id="normalizeFileName" cssClass="radiocheck" />&#32;<label for="normalizeFileName"><s:text name="label.normalize" />&#32;<s:text name="label.filename" /></label>
</p>
-<s:if test="getStrutsAction() == 2">
+<s:if test="strutsAction == 2">
<div class="subsection-light">
<s:set var="referencingContentsId" value="references['jacmsContentManagerUtilizers']" />
<s:include value="/WEB-INF/plugins/jacms/apsadmin/jsp/portal/include/referencingContents.jsp" />
View
2  src/com/agiletec/plugins/jacms/aps/system/services/resource/ResourceManager.java
@@ -155,7 +155,7 @@ protected ResourceInterface saveResource(ResourceDataBean bean) throws ApsSystem
resource.setCategories(bean.getCategories());
resource.setMasterFileName(bean.getFileName());
resource.saveResourceInstances(bean);
- if (null != bean.getResourceId()) {
+ if (null != bean.getResourceId() && bean.getResourceId().trim().length() > 0) {
resource.setId(bean.getResourceId());
this.getResourceDAO().updateResource(resource);
this.notifyResourceChanging(resource);
Please sign in to comment.
Something went wrong with that request. Please try again.