You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by at...@apache.org on 2006/11/15 14:36:26 UTC
svn commit: r475231 - in /portals/jetspeed-2/trunk:
applications/demo/src/webapp/WEB-INF/portlet.xml
components/portal/src/java/org/apache/jetspeed/util/descriptor/PortletApplicationDescriptor.java
Author: ate
Date: Wed Nov 15 05:36:25 2006
New Revision: 475231
URL: http://svn.apache.org/viewvc?view=rev&rev=475231
Log:
Fixes for JS2-611: Custom Portlet Mode and Window State incorrectly handled / processed from portlet.xml
See: http://issues.apache.org/jira/browse/JS2-611
For the time being this fix provides backwards compatibility allowing both the old but incorrect custom-portlet-mode/name or custom-window-state/name definitions
as well the correct custom-portlet-mode/portlet-mode and custom-window-state/window-state definitions.
As soon as we provide portlet.xml xsd validation though the old definitions *will* break portlet-application deployment.
Modified:
portals/jetspeed-2/trunk/applications/demo/src/webapp/WEB-INF/portlet.xml
portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/util/descriptor/PortletApplicationDescriptor.java
Modified: portals/jetspeed-2/trunk/applications/demo/src/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/applications/demo/src/webapp/WEB-INF/portlet.xml?view=diff&rev=475231&r1=475230&r2=475231
==============================================================================
--- portals/jetspeed-2/trunk/applications/demo/src/webapp/WEB-INF/portlet.xml (original)
+++ portals/jetspeed-2/trunk/applications/demo/src/webapp/WEB-INF/portlet.xml Wed Nov 15 05:36:25 2006
@@ -18,11 +18,11 @@
<custom-window-state>
<!-- the custom "popup" window state is mapped to the Jetspeed-2 solo" window state in jetspeed-portlet.xml -->
- <name>popup</name>
+ <window-state>popup</window-state>
<description>a Custom Popup State</description>
</custom-window-state>
<custom-portlet-mode>
- <name>print</name>
+ <portlet-mode>print</portlet-mode>
<description>a Custom Print Mode</description>
</custom-portlet-mode>
Modified: portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/util/descriptor/PortletApplicationDescriptor.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/util/descriptor/PortletApplicationDescriptor.java?view=diff&rev=475231&r1=475230&r2=475231
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/util/descriptor/PortletApplicationDescriptor.java (original)
+++ portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/util/descriptor/PortletApplicationDescriptor.java Wed Nov 15 05:36:25 2006
@@ -146,11 +146,19 @@
digester.addObjectCreate("portlet-app/custom-portlet-mode", CustomPortletModeImpl.class);
digester.addBeanPropertySetter("portlet-app/custom-portlet-mode/description", "description");
+ // support both custom-portlet-mode/portlet-mode (correct) and custom-portlet-mode/name (incorrect but needed for backwards compatibility)
+ // see: http://issues.apache.org/jira/browse/JS2-611
+ // TODO: when portlet.xml xsd validation is added the custom-portlet-mode/name definition will no longer be needed/supported
+ digester.addBeanPropertySetter("portlet-app/custom-portlet-mode/portlet-mode", "customName");
digester.addBeanPropertySetter("portlet-app/custom-portlet-mode/name", "customName");
digester.addSetNext("portlet-app/custom-portlet-mode", "addCustomPortletMode");
digester.addObjectCreate("portlet-app/custom-window-state", CustomWindowStateImpl.class);
digester.addBeanPropertySetter("portlet-app/custom-window-state/description", "description");
+ // support both custom-window-state/window-state (correct) and custom-window-state/name (incorrect but needed for backwards compatibility)
+ // see: http://issues.apache.org/jira/browse/JS2-611
+ // TODO: when portlet.xml xsd validation is added the custom-window-state/name definition will no longer be needed/supported
+ digester.addBeanPropertySetter("portlet-app/custom-window-state/window-state", "customName");
digester.addBeanPropertySetter("portlet-app/custom-window-state/name", "customName");
digester.addSetNext("portlet-app/custom-window-state", "addCustomWindowState");
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org