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 mo...@apache.org on 2003/10/29 23:25:51 UTC
cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets CustomizeSetAction.java
morciuch 2003/10/29 14:25:51
Modified: . README
src/java/org/apache/jetspeed/modules/actions/portlets
CustomizeSetAction.java
Log:
Applied patch by Olaf Romanski for selecting top level default skin failure (see Bugzilla bug# 19806).
Revision Changes Path
1.26 +18 -8 jakarta-jetspeed/README
Index: README
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/README,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- README 29 Oct 2003 21:35:14 -0000 1.25
+++ README 29 Oct 2003 22:25:51 -0000 1.26
@@ -127,7 +127,7 @@
9. XML encoding parsing in URLFetcher may fail if 'encoding="' uses a single quote or if there's space before or after '=' (see Bugzilla bug# 13255).
==============================================
-Tested configurations for release 1.4b5
+Tested configurations for release 1.4
==============================================
Servlet
@@ -140,7 +140,7 @@
Linux 1.4.1_01 Tomcat 4.0.6
==============================================
-Logging usage notes for release 1.4b5
+Logging usage notes for release 1.4
==============================================
The final release of Jetspeed uses Log4J directly, instead of commons logging or Turbine logging facilities.
@@ -156,7 +156,7 @@
For more details, see the Configuration Guide and Coding Spec.
==============================================
-DB Psml import usage notes for release 1.4b5
+DB Psml import usage notes for release 1.4
==============================================
Jetspeed comes configured with Castor Psml Manager service which uses files to store psml. However, sample
@@ -189,7 +189,7 @@
activating Torque logging will probaly change in Beta 5 but this method should still work in Beta 2 thru Beta 4.
==============================================
-References usage notes for release 1.4b5
+References usage notes for release 1.4
==============================================
PSML Reference is a method of nesting psml resource within another psml resource. This is roughly comparable to
@@ -303,14 +303,24 @@
These were tested with Eclipse 2.1.1 and JDK 1.3.
==============================================
-Jetspeed 1.4 was released on ??? ??, 2003.
+Jetspeed 1.4 was released on October 29, 2003.
==============================================
* New Features *
- - Logging converted from Turbine to Commons. Contributed by Harald Ommang
- - WebClippingPortlet. Contributed by Marco Mari.
- - MyPages functionality.
+ - Search service refactored with pluggable document handlers
+ - Added parameter style jsp tag
+ - Logging converted from Turbine to Commons + log file viewer portlet. Contributed by Harald Ommang
+ - Improved portlet skinning capabilities. Contributed by Aurelien Pernoud
+ - WebClippingPortlet. Contributed by Marco Mari
+ - MyPages functionality
+ - Java applet portlet
+ - BASICAuthIFrame portlet
+ - Implemented portlet icon functionality
+
+* Bug Fixes *
+
+ - See FIXES.html for a full list of fixes in this release
==============================================
Jetspeed 1.4b4 was released on April 25, 2003.
1.48 +47 -3 jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/CustomizeSetAction.java
Index: CustomizeSetAction.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/CustomizeSetAction.java,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- CustomizeSetAction.java 12 Sep 2003 15:28:37 -0000 1.47
+++ CustomizeSetAction.java 29 Oct 2003 22:25:51 -0000 1.48
@@ -897,6 +897,13 @@
* missing or 'blank', then the skin is set to null.
*
*/
+
+ /**
+ * Set the skin in the PSML and the current PortletConfig
+ * using the HTML parameter "skin". If the parmeter is
+ * missing or 'blank', then the skin is set to null.
+ *
+ */
public void doSkin(RunData rundata, Context context)
{
// we should first retrieve the portlet to customize and its parameters
@@ -908,6 +915,8 @@
String skin = rundata.getParameters().getString("skin");
Profile profile = ((JetspeedRunData) rundata).getCustomizedProfile();
Portlets portlets = profile.getDocument().getPortletsById(set.getID());
+
+ // skin is neither null nor zero-length
if ((skin != null) && (skin.trim().length() > 0))
{
PortletSkin s = PortalToolkit.getSkin(skin);
@@ -933,17 +942,52 @@
}
else
{
+ // skin is either null or zero-length
+ String custPortletSetID = portlets.getId();
+ String rootPortletSetID = profile.getRootSet().getID();
+
+ // set system default skin for root PSML element
+ if (custPortletSetID != null && rootPortletSetID != null &&
+ custPortletSetID.equals(rootPortletSetID))
+ {
+ // get system default skin
+ String defaultSkinName = JetspeedResources.getString("services.PortalToolkit.default.skin");
+ PortletSkin defaultSkin = PortalToolkit.getSkin(defaultSkinName);
+
+ if (defaultSkin != null)
+ {
+ set.getPortletConfig().setPortletSkin((PortletSkin) defaultSkin);
+ Skin psmlSkin = portlets.getSkin();
+
+ if (psmlSkin == null)
+ {
+ portlets.setSkin(new PsmlSkin());
+ }
+
+ portlets.getSkin().setName(defaultSkin.getName());
+ }
+ else
+ {
+ logger.warn("Unable to set default skin for root portlet set "
+ + set.getID() + " because skin " + skin
+ + " does not exist.");
+ return;
+ }
+ }
+ else
+ {
// By setting the skin to null, the parent's skin will be used.
set.getPortletConfig().setPortletSkin((PortletSkin) null);
portlets.setSkin(null);
+ }
}
}
catch (Exception e)
{
- logger.error("Exception", e);
+ logger.error(e);
}
}
-
+
/**
* Set the SecuirtyRef in the PSML and the current PortletConfig
* using the HTML parameter "securityRef". If the parmeter is
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org