Author: julien(a)jboss.com
Date: 2007-05-15 17:05:56 -0400 (Tue, 15 May 2007)
New Revision: 7257
Modified:
docs/trunk/referenceGuide/en/modules/themeandlayouts.xml
Log:
modified doc to include the PortalURL request attributes doc
Modified: docs/trunk/referenceGuide/en/modules/themeandlayouts.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/themeandlayouts.xml 2007-05-15 21:01:36 UTC (rev
7256)
+++ docs/trunk/referenceGuide/en/modules/themeandlayouts.xml 2007-05-15 21:05:56 UTC (rev
7257)
@@ -185,14 +185,17 @@
<listitem><literal>org.jboss.portal.header.COPY_TO_DASHBOARD_URL</literal>:
URL to copy a page from a portal to the personal dashboard, null if the user is on the
dashboard.</listitem>
<listitem><literal>org.jboss.portal.header.SIGN_OUT_URL</literal>: URL
to log out the portal.</listitem>
</itemizedlist>
+ Every attribute that is an URL attribute is an object implementing the
<emphasis>org.jboss.portal.api.PortalURL</emphasis> interface.
+ Therefore it is possible to generate the URL using the
<emphasis>toString()</emphasis> method and change various things related
+ to the URL.
With that in hand, if someone just wanted to display the logged-in
username and a link to log out, he could write:
<programlisting><![CDATA[
<%@ page import="org.jboss.portal.identity.User" %>
<%
User user = (User) request.getAttribute("org.jboss.portal.header.USER");
- String signOutURL = (String)
request.getAttribute("org.jboss.portal.header.SIGN_OUT_URL");
- String loginURL = (String)
request.getAttribute("org.jboss.portal.header.LOGIN_URL");
+ PortalURL signOutURL =
(PortalURL)request.getAttribute("org.jboss.portal.header.SIGN_OUT_URL");
+ PortalURL loginURL =
(PortalURL)request.getAttribute("org.jboss.portal.header.LOGIN_URL");
if (user == null)
Show replies by date