Author: phuong_vu
Date: 2010-11-23 21:17:07 -0500 (Tue, 23 Nov 2010)
New Revision: 5242
Modified:
portal/branches/branch-GTNPORTAL-1643/webui/framework/src/main/java/org/exoplatform/webui/core/UIComponentDecorator.java
Log:
GTNPORTAL-1682 Set null for old uicomponent parent
Modified:
portal/branches/branch-GTNPORTAL-1643/webui/framework/src/main/java/org/exoplatform/webui/core/UIComponentDecorator.java
===================================================================
---
portal/branches/branch-GTNPORTAL-1643/webui/framework/src/main/java/org/exoplatform/webui/core/UIComponentDecorator.java 2010-11-23
23:48:21 UTC (rev 5241)
+++
portal/branches/branch-GTNPORTAL-1643/webui/framework/src/main/java/org/exoplatform/webui/core/UIComponentDecorator.java 2010-11-24
02:17:07 UTC (rev 5242)
@@ -51,11 +51,18 @@
public UIComponent setUIComponent(UIComponent uicomponent)
{
UIComponent oldOne = uicomponent_;
-// if (uicomponent_ != null)
-// uicomponent_.setParent(null);
+ if (uicomponent_ != null)
+ uicomponent_.setParent(null);
uicomponent_ = uicomponent;
if (uicomponent_ != null)
+ {
+ UIComponent oldParent = uicomponent_.getParent();
+ if (oldParent != null && oldParent != this && oldParent
instanceof UIComponentDecorator)
+ {
+ ((UIComponentDecorator)oldParent).setUIComponent(null);
+ }
uicomponent_.setParent(this);
+ }
return oldOne;
}
Show replies by date