Author: hoang_to
Date: 2009-12-23 04:41:20 -0500 (Wed, 23 Dec 2009)
New Revision: 1138
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetEditor.java
Log:
GTNPORTAL-387: Have problem when create new local gadget in Application registry portlet
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetEditor.java
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetEditor.java 2009-12-23
08:21:05 UTC (rev 1137)
+++
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetEditor.java 2009-12-23
09:41:20 UTC (rev 1138)
@@ -49,10 +49,8 @@
import java.util.Calendar;
/**
- * Created by The eXo Platform SAS
- * Author : Pham Thanh Tung
- * thanhtungty(a)gmail.com
- * Jul 29, 2008
+ * Created by The eXo Platform SAS Author : Pham Thanh Tung
+ * thanhtungty(a)gmail.com Jul 29, 2008
*/
@ComponentConfig(lifecycle = UIFormLifecycle.class, template =
"system:/groovy/webui/form/UIForm.gtmpl", initParams = @ParamConfig(name =
"SampleGadget", value =
"app:/WEB-INF/conf/uiconf/applicationregistry/component/SampleGadget.groovy"),
events = {
@EventConfig(listeners = UIGadgetEditor.SaveActionListener.class),
@@ -190,13 +188,14 @@
source.setTextContent(text);
source.setLastModified(Calendar.getInstance());
- // This will update the source and also update the gadget related cached meta
data
- // from the source
sourceStorage.saveSource(gadget, source);
- // service.saveGadget(GadgetUtil.toGadget(name,
sourceStorage.getSourceURI(dirPath + "/" + fileName), true));
+ uiManagement.removeChild(UIGadgetEditor.class);
+ // This will update the source and also update the gadget related
+ // cached meta data
+ // from the source
uiManagement.initData();
- uiManagement.setSelectedGadget(name);
+ uiManagement.setSelectedGadget(gadget.getName());
event.getRequestContext().addUIComponentToUpdateByAjax(uiManagement);
}