Author: hoang_to
Date: 2011-01-14 04:01:08 -0500 (Fri, 14 Jan 2011)
New Revision: 5746
Modified:
portal/branches/branch-GTNPORTAL-1745/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIAddGadgetForm.java
Log:
GTNPORTAL-1145: Adding a rss feed in the dashboard add the wrong rss
Modified:
portal/branches/branch-GTNPORTAL-1745/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIAddGadgetForm.java
===================================================================
---
portal/branches/branch-GTNPORTAL-1745/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIAddGadgetForm.java 2011-01-14
04:48:07 UTC (rev 5745)
+++
portal/branches/branch-GTNPORTAL-1745/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIAddGadgetForm.java 2011-01-14
09:01:08 UTC (rev 5746)
@@ -97,14 +97,12 @@
//TODO make sure it's an rss feed
// TODO make sure that we did not add it already
uiGadget = uiForm.createUIComponent(context, UIGadget.class, null, null);
- uiGadget.setState(new
TransientApplicationState<org.exoplatform.portal.pom.spi.gadget.Gadget>(gadget.getName()));
- String params = "{'rssurl':'" + url +
"'}";
+ org.exoplatform.portal.pom.spi.gadget.Gadget contentState = new
org.exoplatform.portal.pom.spi.gadget.Gadget();
+ contentState.addUserPref("{'rssurl':'" + url +
"'}");
+ TransientApplicationState<org.exoplatform.portal.pom.spi.gadget.Gadget>
applicationState = new
TransientApplicationState<org.exoplatform.portal.pom.spi.gadget.Gadget>(gadget.getName(),
contentState);
- // Julien : I commented those 2 lines
- // we need to save the same way it is done in the UIGadget clas
- // UserGadgetStorage userGadgetStorage =
uiForm.getApplicationComponent(UserGadgetStorage.class);
- // userGadgetStorage.save(Util.getPortalRequestContext().getRemoteUser(),
gadget.getName(), "" + url.hashCode(), UIGadget.PREF_KEY, params);
+ uiGadget.setState(applicationState);
}
uiContainer.addUIGadget(uiGadget, 0, 0);
Show replies by date