Author: thomas.heute(a)jboss.com
Date: 2007-06-26 12:30:55 -0400 (Tue, 26 Jun 2007)
New Revision: 7557
Modified:
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java
Log:
JBPORTAL-1504: Child inherited properties were not updated
Modified:
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java 2007-06-26
16:04:53 UTC (rev 7556)
+++
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java 2007-06-26
16:30:55 UTC (rev 7557)
@@ -405,24 +405,52 @@
{
declaredPropertyMap.remove(name);
- // If aggregated properties is loaded then we udpate it
- if (properties != null)
- {
- properties.remove(name);
- }
+ removeProperty(name);
}
else
{
declaredPropertyMap.put(name, value);
- // If aggregated properties is loaded then we udpate it
- if (properties != null)
+ setProperty(name, value);
+ }
+ }
+
+ private void removeProperty(String name)
+ {
+ if (properties != null)
+ {
+ properties.remove(name);
+ }
+
+ Iterator it = this.getChildren().iterator();
+ while (it.hasNext())
+ {
+ PortalObject object = (PortalObject) it.next();
+ if (object instanceof PortalObjectImpl)
{
- properties.put(name, value);
+ ((PortalObjectImpl)object).removeProperty(name);
}
}
}
+ private void setProperty(String name, String value)
+ {
+ if (properties != null)
+ {
+ properties.put(name, value);
+ }
+
+ Iterator it = this.getChildren().iterator();
+ while (it.hasNext())
+ {
+ PortalObject object = (PortalObject) it.next();
+ if (object instanceof PortalObjectImpl)
+ {
+ ((PortalObjectImpl)object).setProperty(name, value);
+ }
+ }
+ }
+
public String getProperty(String name)
{
if (name == null)
Show replies by date