Author: ndkhoiits
Date: 2010-06-03 05:01:43 -0400 (Thu, 03 Jun 2010)
New Revision: 3230
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UICategorySelector.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetInfo.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPortletInfo.java
Log:
GTNPORTAL-1291 Set UICategorySelector's ID when added into UIPortletInfo or
UIGadgetInfo
get UIContainer instead of UIGadgetInfo when raise cancel action on UICategorySelector
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UICategorySelector.java
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UICategorySelector.java 2010-06-03
08:27:47 UTC (rev 3229)
+++
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UICategorySelector.java 2010-06-03
09:01:43 UTC (rev 3230)
@@ -164,9 +164,9 @@
public void execute(Event<UICategorySelector> event) throws Exception
{
UICategorySelector selector = event.getSource();
- UIGadgetInfo gadgetInfo = selector.getParent();
- gadgetInfo.getChild(UICategorySelector.class).setRendered(false);
- event.getRequestContext().addUIComponentToUpdateByAjax(gadgetInfo);
+ UIContainer appInfo = selector.getParent();
+ appInfo.getChild(UICategorySelector.class).setRendered(false);
+ event.getRequestContext().addUIComponentToUpdateByAjax(appInfo);
}
}
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetInfo.java
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetInfo.java 2010-06-03
08:27:47 UTC (rev 3229)
+++
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetInfo.java 2010-06-03
09:01:43 UTC (rev 3230)
@@ -54,12 +54,13 @@
@Serialized
public class UIGadgetInfo extends UIContainer
{
+ private static String CATEGORY_ID = "GadgetCategory";
private Gadget gadget_;
public UIGadgetInfo() throws Exception
{
- addChild(UICategorySelector.class, null, null);
+ addChild(UICategorySelector.class, null, CATEGORY_ID);
}
public Gadget getGadget()
@@ -186,7 +187,7 @@
Gadget gadget = gadgetInfo.getGadget();
gadgetInfo.removeChild(UICategorySelector.class);
- UICategorySelector selector = gadgetInfo.addChild(UICategorySelector.class,
null, null);
+ UICategorySelector selector = gadgetInfo.addChild(UICategorySelector.class,
null, CATEGORY_ID);
Application app = new Application();
app.setApplicationName(gadget.getName());
app.setType(ApplicationType.GADGET);
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPortletInfo.java
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPortletInfo.java 2010-06-03
08:27:47 UTC (rev 3229)
+++
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPortletInfo.java 2010-06-03
09:01:43 UTC (rev 3230)
@@ -44,11 +44,12 @@
@Serialized
public class UIPortletInfo extends UIContainer
{
+ private static String CATEGORY_ID = "PortletCategory";
private PortletExtra portlet_;
public UIPortletInfo() throws Exception
{
- addChild(UICategorySelector.class, null, null);
+ addChild(UICategorySelector.class, null, CATEGORY_ID);
}
public void setPortlet(PortletExtra portlet)
@@ -70,7 +71,7 @@
UIPortletInfo uiPortletInfo = event.getSource();
PortletExtra portlet = uiPortletInfo.getPortlet();
uiPortletInfo.removeChild(UICategorySelector.class);
- UICategorySelector selector = uiPortletInfo.addChild(UICategorySelector.class,
null, null);
+ UICategorySelector selector = uiPortletInfo.addChild(UICategorySelector.class,
null, CATEGORY_ID);
Application app = new Application();
app.setApplicationName(portlet.getName());
app.setType(ApplicationType.PORTLET);
Show replies by date