Author: bdaw
Date: 2007-06-14 15:29:50 -0400 (Thu, 14 Jun 2007)
New Revision: 7416
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyBean.java
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editProperties.xhtml
Log:
minimal fix for property editor to handle inheritance
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyBean.java 2007-06-13
23:40:04 UTC (rev 7415)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PropertyBean.java 2007-06-14
19:29:50 UTC (rev 7416)
@@ -97,6 +97,16 @@
// Need to use the container as it will contain the refreshed object
PortalObject portalObject = container.pomgr.getSelectedObject();
+ //if value is inherited check if updated value is the same - if yes, don't
update to keep inheritance
+ if (isInherited())
+ {
+ String parentValue = portalObject.getProperty(getName());
+ if (value.equals(parentValue))
+ {
+ return;
+ }
+ }
+
//
portalObject.setDeclaredProperty(getName(), value.toString());
}
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editProperties.xhtml
===================================================================
---
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editProperties.xhtml 2007-06-13
23:40:04 UTC (rev 7415)
+++
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/editProperties.xhtml 2007-06-14
19:29:50 UTC (rev 7416)
@@ -37,7 +37,7 @@
</td>
<td>#{prop.inherited ? 'Yes' : 'No'}</td>
<td>
- <h:commandLink
action="#{propertyAction.removeProperty}">
+ <h:commandLink
action="#{propertyAction.removeProperty}"
rendered="#{!prop.inherited}">
<h:outputText value="Delete"/>
<f:param name="name"
value="#{prop.name}"/>
</h:commandLink>
Show replies by date