Author: mageshbk(a)jboss.com
Date: 2009-09-24 06:18:46 -0400 (Thu, 24 Sep 2009)
New Revision: 13808
Modified:
branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/main/org/jboss/portal/widget/AbstractWidgetPortlet.java
branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java
branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java
branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/resources/portal-widget-netvibes-war/WEB-INF/portlet.xml
branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml
Log:
[JBEPP-120] - Additional parameters for gadgets are lost when the gadgets are displayed -
merged from EPP branch
Modified:
branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/main/org/jboss/portal/widget/AbstractWidgetPortlet.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/main/org/jboss/portal/widget/AbstractWidgetPortlet.java 2009-09-24
05:04:24 UTC (rev 13807)
+++
branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/main/org/jboss/portal/widget/AbstractWidgetPortlet.java 2009-09-24
10:18:46 UTC (rev 13808)
@@ -28,6 +28,7 @@
import javax.portlet.PortletConfig;
import javax.portlet.PortletException;
import javax.portlet.PortletMode;
+import javax.xml.namespace.QName;
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
@@ -53,6 +54,10 @@
/** .*/
protected final PortletMode EDIT_CONTENT = new PortletMode("edit_content");
+ protected static final QName CONTENT_SELECT = new
QName("urn:jboss:portal:content", "select");
+
+ public static final String CONTENT_PARAMETER_PREFIX = "content.param.";
+
/**
* @return WidgetProvider
*/
Modified:
branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java 2009-09-24
05:04:24 UTC (rev 13807)
+++
branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/main/org/jboss/portal/widget/google/GGWidgetPortlet.java 2009-09-24
10:18:46 UTC (rev 13808)
@@ -35,7 +35,6 @@
import javax.portlet.PortletSecurityException;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
-import javax.xml.namespace.QName;
import java.io.IOException;
import java.io.PrintWriter;
@@ -50,8 +49,6 @@
*/
public class GGWidgetPortlet extends AbstractWidgetPortlet
{
- private static final QName CONTENT_SELECT = new
QName("urn:jboss:portal:content", "select");
-
/** . */
private GGProvider provider = new GGProvider();
@@ -81,11 +78,11 @@
{
Map.Entry<String, String[]> entry = (Map.Entry<String,
String[]>)i.next();
String contentParamName = (String)entry.getKey();
- if (contentParamName.startsWith("content.param"))
+ if (contentParamName.startsWith(CONTENT_PARAMETER_PREFIX))
{
String[] contentParamValue = (String[])entry.getValue();
params.put(contentParamName, contentParamValue);
- widgetParams.put(contentParamName, contentParamValue[0]);
+
widgetParams.put(contentParamName.substring(CONTENT_PARAMETER_PREFIX.length()),
contentParamValue[0]);
}
}
Modified:
branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java 2009-09-24
05:04:24 UTC (rev 13807)
+++
branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/main/org/jboss/portal/widget/netvibes/NetvibesWidgetPortlet.java 2009-09-24
10:18:46 UTC (rev 13808)
@@ -36,7 +36,6 @@
import javax.portlet.PortletSecurityException;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
-import javax.xml.namespace.QName;
import org.jboss.portal.api.content.SelectedContent;
import org.jboss.portal.widget.AbstractWidgetPortlet;
@@ -51,8 +50,6 @@
public class NetvibesWidgetPortlet extends AbstractWidgetPortlet
{
- private static final QName CONTENT_SELECT = new
QName("urn:jboss:portal:content", "select");
-
/** . */
private static final org.jboss.logging.Logger log =
org.jboss.logging.Logger.getLogger(NetvibesWidgetPortlet.class);
@@ -112,11 +109,11 @@
{
Map.Entry<String, String[]> entry = (Map.Entry<String,
String[]>)i.next();
String contentParamName = (String)entry.getKey();
- if (contentParamName.startsWith("content.param"))
+ if (contentParamName.startsWith(CONTENT_PARAMETER_PREFIX))
{
String[] contentParamValue = (String[])entry.getValue();
params.put(contentParamName, contentParamValue);
-
widgetParams.put(contentParamName.substring("content.param.".length()),
contentParamValue[0]);
+
widgetParams.put(contentParamName.substring(CONTENT_PARAMETER_PREFIX.length()),
contentParamValue[0]);
}
}
Modified:
branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/resources/portal-widget-netvibes-war/WEB-INF/portlet.xml
===================================================================
---
branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/resources/portal-widget-netvibes-war/WEB-INF/portlet.xml 2009-09-24
05:04:24 UTC (rev 13807)
+++
branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/resources/portal-widget-netvibes-war/WEB-INF/portlet.xml 2009-09-24
10:18:46 UTC (rev 13808)
@@ -66,7 +66,7 @@
<title>Netvibes Widget</title>
<keywords>widget,netvibes</keywords>
</portlet-info>
- <supported-publishing-event
xmlns:x="urn:jboss:portal:content">x:select</supported-publishing-event>
+ <supported-publishing-event><qname
xmlns:x="urn:jboss:portal:content">x:select</qname></supported-publishing-event>
<supported-public-render-parameter>uri</supported-public-render-parameter>
<supported-public-render-parameter>parameters</supported-public-render-parameter>
</portlet>
Modified:
branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml
===================================================================
---
branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml 2009-09-24
05:04:24 UTC (rev 13807)
+++
branches/Enterprise_Portal_Platform_4_3_GA_CP02_JBEPP-120/widget/src/resources/portal-widget-war/WEB-INF/portlet.xml 2009-09-24
10:18:46 UTC (rev 13808)
@@ -61,8 +61,9 @@
<title>Google Widget</title>
<keywords>widget,google</keywords>
</portlet-info>
- <supported-publishing-event
xmlns:x="urn:jboss:portal:content">x:select</supported-publishing-event>
+ <supported-publishing-event><qname
xmlns:x="urn:jboss:portal:content">x:select</qname></supported-publishing-event>
<supported-public-render-parameter>uri</supported-public-render-parameter>
+
<supported-public-render-parameter>parameters</supported-public-render-parameter>
</portlet>
<event-definition>
@@ -75,4 +76,8 @@
<qname xmlns:c="urn:jboss:portal:content">c:uri</qname>
</public-render-parameter>
+ <public-render-parameter>
+ <identifier>parameters</identifier>
+ <qname
xmlns:c="urn:jboss:portal:content">c:parameters</qname>
+ </public-render-parameter>
</portlet-app>