Author: theute
Date: 2011-09-15 07:14:05 -0400 (Thu, 15 Sep 2011)
New Revision: 7438
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIAddGadgetForm.java
Log:
JBEPP-1179: Adding a rss feed int he dashboard add the wrong rss
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIAddGadgetForm.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIAddGadgetForm.java 2011-09-15
11:03:11 UTC (rev 7437)
+++
epp/portal/branches/EPP_5_2_Branch/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIAddGadgetForm.java 2011-09-15
11:14:05 UTC (rev 7438)
@@ -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