You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-dev@portals.apache.org by ta...@apache.org on 2004/06/16 03:01:32 UTC
cvs commit: jakarta-pluto/container/src/java/org/apache/pluto/core/impl PortletURLImpl.java
taylor 2004/06/15 18:01:32
Modified: container/src/java/org/apache/pluto/core/impl
PortletURLImpl.java
Log:
This statement fails if the portlet doesn't explicitly say that it supports VIEW mode
renderURL.setPortletMode(PortletMode.VIEW);
Portlets should always support View mode even if not explicity declared in the deployment
See PLT 8.1
I could have also fixed this in Jetspeed-2 by always adding the VIEW Portlet Mode
but figured we could also ensure correct behavior in all Pluto portals
btw - Is Pluto Jahia functional now?
CVS: ----------------------------------------------------------------------
CVS: PR:
CVS: If this change addresses a PR in the problem report tracking
CVS: database, then enter the PR number(s) here.
CVS: Obtained from:
CVS: If this change has been taken from another system, such as NCSA,
CVS: then name the system in this line, otherwise delete it.
CVS: Submitted by:
CVS: If this code has been contributed to Apache by someone else; i.e.,
CVS: they sent us a patch or a new module, then include their name/email
CVS: address here. If this is your work then delete this line.
CVS: Reviewed by:
CVS: If we are doing pre-commit code reviews and someone else has
CVS: reviewed your changes, include their name(s) here.
CVS: If you have not had it reviewed then delete this line.
Revision Changes Path
1.7 +7 -1 jakarta-pluto/container/src/java/org/apache/pluto/core/impl/PortletURLImpl.java
Index: PortletURLImpl.java
===================================================================
RCS file: /home/cvs/jakarta-pluto/container/src/java/org/apache/pluto/core/impl/PortletURLImpl.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- PortletURLImpl.java 27 May 2004 11:53:43 -0000 1.6
+++ PortletURLImpl.java 16 Jun 2004 01:01:32 -0000 1.7
@@ -166,7 +166,13 @@
// --------------------------------------------------------------------------------------------
// internal methods ---------------------------------------------------------------------------
- private boolean isPortletModeSupported(PortletMode requestedPortletMode,PortletWindow referencedPortletWindow) {
+ private boolean isPortletModeSupported(PortletMode requestedPortletMode,PortletWindow referencedPortletWindow)
+ {
+ // PLT 8.1: View Portlet Mode should always be supported by a portlet, even if not defined in the descriptor
+ if (requestedPortletMode.equals(PortletMode.VIEW) || requestedPortletMode.toString().equalsIgnoreCase("view"))
+ {
+ return true;
+ }
PortletDefinition portletDefinition = referencedPortletWindow.getPortletEntity().getPortletDefinition();
ContentTypeSet contentTypes = portletDefinition.getContentTypeSet();
return contentTypes.supportsPortletMode(requestedPortletMode);