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 pa...@apache.org on 2001/12/29 01:43:17 UTC
cvs commit: jakarta-jetspeed/webapp/WEB-INF/templates/vm/controls/html jetspeed.vm
paulsp 01/12/28 16:43:16
Modified: xdocs changes.xml portlet_config_common.xml
docs/site changes.html portlet_config_common.html
src/java/org/apache/jetspeed/portal/portlets
AbstractPortlet.java
webapp/WEB-INF/conf demo-portlets.xreg
webapp/WEB-INF/psml/user/turbine/html default.psml
webapp/WEB-INF/templates/vm/controls/html jetspeed.vm
Added: webapp LoggedInWelcome.html
Log:
o Added "_showtitlebar" parameter to control display of Title bar. This can
be used by all portlets types. (PS) Thanks to Andy Grundman. This includes:
Documentation
Demo portlet (LoggedInWelcome)
o Corrected the controller name in turbine user's default.psml
Revision Changes Path
1.1 jakarta-jetspeed/webapp/LoggedInWelcome.html
Index: LoggedInWelcome.html
===================================================================
<center><h1>Welcome to Jetspeed</h1></center>
<center><strong>Congratulations, You are logged!</strong></center>
<p>
This is an example of a portlet with the parameter "_showtitlebar" set to
false. Notice their is no Title or Minimize, Maximize, Close, or Customize
buttons. If the skin is borders the content or the portlet, then you will
see also see a frame.
</p>
1.5 +5 -1 jakarta-jetspeed/xdocs/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/xdocs/changes.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- changes.xml 28 Dec 2001 14:52:56 -0000 1.4
+++ changes.xml 29 Dec 2001 00:43:16 -0000 1.5
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
-$Id: changes.xml,v 1.4 2001/12/28 14:52:56 paulsp Exp $
+$Id: changes.xml,v 1.5 2001/12/29 00:43:16 paulsp Exp $
-->
<document>
<properties>
@@ -31,6 +31,10 @@
</li>
<li>
Add - Bug # 4142 - Password Reminder Facility (CK)
+</li>
+<li>
+ Add - Add "_showtitlebar" parameter to control display of Title bar. This can be
+ used by all portlets types. (PS) Thanks to Andy Grundman
</li>
</ul>
</section>
1.4 +26 -15 jakarta-jetspeed/xdocs/portlet_config_common.xml
Index: portlet_config_common.xml
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/xdocs/portlet_config_common.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- portlet_config_common.xml 28 Aug 2001 03:30:06 -0000 1.3
+++ portlet_config_common.xml 29 Dec 2001 00:43:16 -0000 1.4
@@ -229,39 +229,50 @@
</tr>
</table>
+ <br/>
<table>
<tr>
<th>Parameter Name</th>
<th>Description</th>
</tr>
-
<tr>
- <td>showDescription</td>
+ <td>_display</td>
<td>
- Should the portlet show the item descriptions.
- <br/>
- If not present, Default: <tt>true</tt> for HTML, <tt>false</tt> for WML
+ Initial display state of portlet.
<br/>
+ <p>
+ This parameter can only be set in PSML.
+ </p>
+ <p>
+ If not present, Default: <tt>normal</tt>
+ </p>
<table>
<tr><th>Value</th><th>Description</th></tr>
- <tr><td>true</td><td>Item Description is displayed</td></tr>
- <tr><td>false</td><td>Item Description is NOT displayed</td></tr>
+ <tr><td>closed</td><td>Portlet is closed and not visible</td></tr>
+ <tr><td>minimized</td><td>Portlet is minimized. Only title is displayed</td></tr>
+ <tr><td>normal</td><td>Portal and content is displayed</td></tr>
</table>
</td>
</tr>
<tr>
- <td>_display</td>
+ <td>_showtitlebar</td>
<td>
- Initial display state of portlet.
- <br/>
- If not present, Default: <tt>normal</tt>
- <br/>
+ Should the Portlet's title bar be displayed. The title bar
+ includes the Portlet title and the action buttons
+ (Minimize, Maximize, Customize, and Close). When the title bar is
+ disabled, i.e. value = false, the user will only be able to add or
+ remove, if permissions allow, the portlet the customizer.
+ <p>
+ This parameter can be set in PSML or in the .xreg files.
+ </p>
+ <p>
+ If not present, Default: <tt>true</tt>
+ </p>
<table>
<tr><th>Value</th><th>Description</th></tr>
- <tr><td>closed</td><td>Portlet is closed and not visible</td></tr>
- <tr><td>minimized</td><td>Portlet is minimized. Only title is displayed</td></tr>
- <tr><td>normal</td><td>Portal and content is displayed</td></tr>
+ <tr><td>true</td><td>Portlet Title Bar is displayed</td></tr>
+ <tr><td>false</td><td>Portlet Title Bar is NOT displayed</td></tr>
</table>
</td>
</tr>
1.4 +4 -0 jakarta-jetspeed/docs/site/changes.html
Index: changes.html
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/docs/site/changes.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- changes.html 28 Dec 2001 14:52:56 -0000 1.3
+++ changes.html 29 Dec 2001 00:43:16 -0000 1.4
@@ -134,6 +134,10 @@
<li>
Add - Bug # 4142 - Password Reminder Facility (CK)
</li>
+<li>
+ Add - Add "_showtitlebar" parameter to control display of Title bar. This can be
+ used by all portlets types. (PS) Thanks to Andy Grundman
+</li>
</ul>
</blockquote>
</p>
1.6 +26 -14 jakarta-jetspeed/docs/site/portlet_config_common.html
Index: portlet_config_common.html
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/docs/site/portlet_config_common.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- portlet_config_common.html 28 Dec 2001 15:42:57 -0000 1.5
+++ portlet_config_common.html 29 Dec 2001 00:43:16 -0000 1.6
@@ -506,6 +506,7 @@
</td>
</tr>
</table>
+ <br />
<table>
<tr>
<td bgcolor="#039acc" colspan="" rowspan="" valign="top" align="left">
@@ -522,20 +523,25 @@
<tr>
<td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
- showDescription
+ _display
</font>
</td>
<td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
- Should the portlet show the item descriptions.
- <br />
- If not present, Default: <tt>true</tt> for HTML, <tt>false</tt> for WML
+ Initial display state of portlet.
<br />
+ <p>
+ This parameter can only be set in PSML.
+ </p>
+ <p>
+ If not present, Default: <tt>normal</tt>
+ </p>
<table>
<tr><th>Value</th><th>Description</th></tr>
- <tr><td>true</td><td>Item Description is displayed</td></tr>
- <tr><td>false</td><td>Item Description is NOT displayed</td></tr>
+ <tr><td>closed</td><td>Portlet is closed and not visible</td></tr>
+ <tr><td>minimized</td><td>Portlet is minimized. Only title is displayed</td></tr>
+ <tr><td>normal</td><td>Portal and content is displayed</td></tr>
</table>
</font>
@@ -544,21 +550,27 @@
<tr>
<td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
- _display
+ _showtitlebar
</font>
</td>
<td bgcolor="#a0ddf0" colspan="" rowspan="" valign="top" align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
- Initial display state of portlet.
- <br />
- If not present, Default: <tt>normal</tt>
- <br />
+ Should the Portlet's title bar be displayed. The title bar
+ includes the Portlet title and the action buttons
+ (Minimize, Maximize, Customize, and Close). When the title bar is
+ disabled, i.e. value = false, the user will only be able to add or
+ remove, if permissions allow, the portlet the customizer.
+ <p>
+ This parameter can be set in PSML or in the .xreg files.
+ </p>
+ <p>
+ If not present, Default: <tt>true</tt>
+ </p>
<table>
<tr><th>Value</th><th>Description</th></tr>
- <tr><td>closed</td><td>Portlet is closed and not visible</td></tr>
- <tr><td>minimized</td><td>Portlet is minimized. Only title is displayed</td></tr>
- <tr><td>normal</td><td>Portal and content is displayed</td></tr>
+ <tr><td>true</td><td>Portlet Title Bar is displayed</td></tr>
+ <tr><td>false</td><td>Portlet Title Bar is NOT displayed</td></tr>
</table>
</font>
1.49 +16 -1 jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/AbstractPortlet.java
Index: AbstractPortlet.java
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/AbstractPortlet.java,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- AbstractPortlet.java 3 Dec 2001 05:22:30 -0000 1.48
+++ AbstractPortlet.java 29 Dec 2001 00:43:16 -0000 1.49
@@ -94,7 +94,7 @@
@author <A HREF="mailto:burton@apache.org">Kevin A. Burton</A>
@author <A HREF="mailto:raphael@apache.org">Rapha�l Luta</A>
@author <A HREF="mailto:sgala@apache.org">Santiago Gala</A>
-@version $Id: AbstractPortlet.java,v 1.48 2001/12/03 05:22:30 taylor Exp $
+@version $Id: AbstractPortlet.java,v 1.49 2001/12/29 00:43:16 paulsp Exp $
*/
public abstract class AbstractPortlet implements Portlet, PortletState, Cacheable
{
@@ -627,6 +627,21 @@
}
}
+ /**
+ Returns TRUE if the title bar in should be displayed. The title bar includes
+ the portlet title and action buttons. This
+
+ @param rundata A RunData object
+ */
+ public boolean isShowTitleBar(RunData rundata)
+ {
+ if (getPortletConfig()!=null)
+ {
+ // Parameter can exist in PSML or <portlet-entry>
+ return Boolean.valueOf(getPortletConfig().getInitParameter("_showtitlebar","true")).booleanValue();
+ }
+ return this.getAttribute("_showtitlebar", "true", rundata ).equals("true");
+ }
// utility methods
/**
1.5 +9 -0 jakarta-jetspeed/webapp/WEB-INF/conf/demo-portlets.xreg
Index: demo-portlets.xreg
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/conf/demo-portlets.xreg,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- demo-portlets.xreg 11 Dec 2001 05:23:22 -0000 1.4
+++ demo-portlets.xreg 29 Dec 2001 00:43:16 -0000 1.5
@@ -48,6 +48,15 @@
</meta-info>
<url>/welcome.html</url>
</portlet-entry>
+ <portlet-entry name="LoggedInWelcome" hidden="false" type="ref"
+ parent="HTML" application="false">
+ <meta-info>
+ <title>Welcome to Logged in user</title>
+ <description>Example of a portlet with not Titlebar</description>
+ </meta-info>
+ <parameter name="_showtitlebar" value="false" hidden="false"/>
+ <url>/LoggedInWelcome.html</url>
+ </portlet-entry>
<portlet-entry name="XMLHack" hidden="false" type="ref" parent="RSS" application="false">
<meta-info>
<title>XMLHack</title>
1.10 +3 -2 jakarta-jetspeed/webapp/WEB-INF/psml/user/turbine/html/default.psml
Index: default.psml
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/psml/user/turbine/html/default.psml,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- default.psml 23 Sep 2001 07:50:11 -0000 1.9
+++ default.psml 29 Dec 2001 00:43:16 -0000 1.10
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<portlets xmlns="http://xml.apache.org/jetspeed/2000/psml">
+ <controller name="TabController"/>
+ <control name="TabControl"/>
<skin name="orange-red"/>
- <control name="TabControl" />
- <controller name="CardPortletController"/>
<portlets>
<metainfo>
@@ -12,6 +12,7 @@
<controller name="TwoColumns"/>
+ <entry parent="LoggedInWelcome"/>
<entry parent="HelloVelocity"/>
<entry parent="StockQuote"/>
<entry parent="http://jakarta.apache.org/jetspeed/channels/jetspeed.rss"/>
1.8 +8 -0 jakarta-jetspeed/webapp/WEB-INF/templates/vm/controls/html/jetspeed.vm
Index: jetspeed.vm
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/templates/vm/controls/html/jetspeed.vm,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- jetspeed.vm 24 Nov 2001 00:34:03 -0000 1.7
+++ jetspeed.vm 29 Dec 2001 00:43:16 -0000 1.8
@@ -40,6 +40,10 @@
#if( ! $portlet.isClosed($data) )
<table border="0" cellpadding="0" cellspacing="0" width="100%" #if( ${skin.PortletStyleClass}) class="$!{skin.PortletStyleClass}" #end #if (${portletStyle}) style="${portletStyle}" #end>
+##
+## Portlet Title Bar
+##
+#if( $portlet.isShowTitleBar($data) )
<tr #if (${skin.TitleStyleClass}) class="${skin.TitleStyleClass}" #end #if (${titlestyle}) style="${titlestyle}" #end >
<td align="left" nowrap="true" valign="middle" width="100%">
$portlet.Title
@@ -50,6 +54,10 @@
#end
</td>
</tr>
+#end
+##
+## Portlet Content
+##
#if( ! $portlet.isMinimized($data) )
<tr>
<td colspan="2" align="center" valign="top" width="100%" >
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>