JBoss Portal SVN: r10803 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-05-23 02:17:56 -0400 (Fri, 23 May 2008)
New Revision: 10803
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/errorhandling.xml
Log:
8.3.1. Portal Policy Properties
- revising table/changing xml markup
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/errorhandling.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/errorhandling.xml 2008-05-23 05:17:31 UTC (rev 10802)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/errorhandling.xml 2008-05-23 06:17:56 UTC (rev 10803)
@@ -37,7 +37,7 @@
</listitem>
<listitem>
<para>
- <emphasis>Resource not available</emphasis>: the resource was found, but it is not serviceable.
+ <emphasis>Resource unavailable</emphasis>: the resource was found, but it is not serviceable.
</para>
</listitem>
</itemizedlist>
@@ -108,7 +108,7 @@
</listitem>
<listitem>
<para>
- Resource not available: <computeroutput>HTTP 404 Not Found</computeroutput>
+ Resource unavailable: <computeroutput>HTTP 404 Not Found</computeroutput>
</para>
</listitem>
</itemizedlist>
@@ -142,58 +142,57 @@
</sect2>
</sect1>
<sect1>
- <title>Configuration using the XML descriptors</title>
- <para>Since the different policies are configured using portal object properties it is possible to configure
- the error handling policy in the XML descriptors of those objects (the <literal>*-object.xml</literal> files for
- your Portal deployment).</para>
+ <title>Configuration using XML Descriptors</title>
+ <para>
+ Different policies are configured using portal object properties, allowing the error-handling policy for objects to be configured in XML descriptors, <filename>*-object.xml</filename> files, for a portal deployment.
+ </para>
<sect2>
- <title>Portal policy properties</title>
- <para>A set of properties configure the the behavior of the portal policy. Those properties will only be
- taken in account for objects of type portal.</para>
+ <title>Portal Policy Properties</title>
+ <para>A set of properties configure the the behavior of the portal policy. These properties are only taken into account for objects that use the <emphasis>portal</emphasis> type. The following table represents portal policy properties:
+ </para>
<para>
<table frame="all">
- <title>Portal policy properties</title>
<tgroup cols="3" align="left" colsep="1" rowset="1">
<colspec colname='c1'/>
<colspec colname='c2'/>
<colspec colname='c3'/>
<thead>
<row>
- <entry align="center">Property name</entry>
+ <entry align="center">Property Name</entry>
<entry align="center">Description</entry>
- <entry align="center">Possible values</entry>
+ <entry align="center">Possible Values</entry>
</row>
</thead>
<tbody>
<row>
- <entry align="center">control.portal.access_denied</entry>
- <entry align="center">On access denied</entry>
- <entry align="center"><emphasis>ignore</emphasis> and <emphasis>jsp</emphasis></entry>
- </row>
+ <entry align="center"><computeroutput>control.portal.access_denied</computeroutput></entry>
+ <entry align="center">when access is denied</entry>
+ <entry align="center"><computeroutput>ignore</computeroutput> and <computeroutput>jsp</computeroutput></entry>
+ </row>
<row>
- <entry align="center">control.portal.unavailable</entry>
- <entry align="center">On resource not available</entry>
- <entry align="center"><emphasis>ignore</emphasis> and <emphasis>jsp</emphasis></entry>
+ <entry align="center"><computeroutput>control.portal.unavailable</computeroutput></entry>
+ <entry align="center">when a resource is unavailable</entry>
+ <entry align="center"><computeroutput>ignore</computeroutput> and <computeroutput>jsp</computeroutput></entry>
</row>
<row>
- <entry align="center">control.portal.error</entry>
- <entry align="center">On an expected error</entry>
- <entry align="center"><emphasis>ignore</emphasis> and <emphasis>jsp</emphasis></entry>
+ <entry align="center"><computeroutput>control.portal.error</computeroutput></entry>
+ <entry align="center">when an expected error occurs</entry>
+ <entry align="center"><computeroutput>ignore</computeroutput> and <computeroutput>jsp</computeroutput></entry>
</row>
<row>
- <entry align="center">control.portal.internal_error</entry>
- <entry align="center">On an unexpected error</entry>
- <entry align="center"><emphasis>ignore</emphasis> and <emphasis>jsp</emphasis></entry>
+ <entry align="center"><computeroutput>control.portal.internal_error</computeroutput></entry>
+ <entry align="center">when an unexpected error occurs</entry>
+ <entry align="center"><computeroutput>ignore</computeroutput> and <computeroutput>jsp</computeroutput></entry>
</row>
<row>
- <entry align="center">control.portal.not_found</entry>
- <entry align="center">On resource not found</entry>
- <entry align="center"><emphasis>ignore</emphasis> and <emphasis>jsp</emphasis></entry>
+ <entry align="center"><computeroutput>control.portal.not_found</computeroutput></entry>
+ <entry align="center">when a resource is not found</entry>
+ <entry align="center"><computeroutput>ignore</computeroutput> and <computeroutput>jsp</computeroutput></entry>
</row>
<row>
- <entry align="center">control.portal.resource_uri</entry>
- <entry align="center">The path of the JSP used for redirections</entry>
- <entry align="center">A valid path to a JSP located in the portal-core.war file</entry>
+ <entry align="center"><computeroutput>control.portal.resource_uri</computeroutput></entry>
+ <entry align="center">the path of the JSP used for redirections</entry>
+ <entry align="center">a valid path to a JSP located in the <filename>portal-core.war/</filename> directory</entry>
</row>
</tbody>
</tgroup>
17 years, 11 months
JBoss Portal SVN: r10802 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-05-23 01:17:31 -0400 (Fri, 23 May 2008)
New Revision: 10802
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/errorhandling.xml
Log:
8.2.4. Page Policy
- revising
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/errorhandling.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/errorhandling.xml 2008-05-23 05:03:26 UTC (rev 10801)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/errorhandling.xml 2008-05-23 05:17:31 UTC (rev 10802)
@@ -121,14 +121,22 @@
</para>
</sect2>
<sect2>
- <title>Page policy</title>
- <para>The window error policy controls how the page reacts to aggregation errors. Indeed the page is most of the
- time an aggregation of several portlet windows and the action to take when an error occurs is different than
- the other policies. Whenever an error occurs, the policy can either handle it or ignore it. If the error is
- ignored then it will be treated by the portal policy. The different actions that are possible upon an error are:
+ <title>Page Policy</title>
+ <para>
+ The window error-policy controls how pages react to aggregation errors. Most of the time, pages are an aggregation of several portlet windows, and the action to take when an error occurs differs from other policies. When an error occurs, the policy can either handle it, or ignore it. If the error is ignored, it is handled by the portal policy. Possible actions taken after such errors are:
+ </para>
+ <para>
<itemizedlist>
- <listitem>Remove the window from the aggregation</listitem>
- <listitem>Replace the markup of the window by a redirection to a JSP page</listitem>
+ <listitem>
+ <para>
+ remove the window from the aggregation.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ replace the markup of the window by a redirection to a JSP page.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</sect2>
17 years, 11 months
JBoss Portal SVN: r10801 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-05-23 01:03:26 -0400 (Fri, 23 May 2008)
New Revision: 10801
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/errorhandling.xml
Log:
8.2.3. Portal Policy
- revising
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/errorhandling.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/errorhandling.xml 2008-05-23 04:57:08 UTC (rev 10800)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/errorhandling.xml 2008-05-23 05:03:26 UTC (rev 10801)
@@ -115,11 +115,10 @@
</para>
</sect2>
<sect2>
- <title>Portal policy</title>
- <para>The portal error policy controls the response that will be sent to the browser when an error occurs. There is a default
- configuration and it is reconfigurable per portal. Whenever an error occurs, the policy can either handle a redirect to
- a JSP page or ignore the error. If the error is ignored it will be handled by the default policy, otherwise a JSP page
- will be invoked with appropriate request attributes to allow page customization.</para>
+ <title>Portal Policy</title>
+ <para>
+ The portal error-policy controls the response that is sent to the Web browser when an error occurs. A default error policy exists, which can be configured per portal. If an error occurs, the policy can either handle a redirect to a JSP page, or ignore the error. If the error is ignored, it is handled by the default policy, otherwise a JSP page is invoked with appropriate request attributes, allowing page customization.
+ </para>
</sect2>
<sect2>
<title>Page policy</title>
17 years, 11 months
JBoss Portal SVN: r10800 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-05-23 00:57:08 -0400 (Fri, 23 May 2008)
New Revision: 10800
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/errorhandling.xml
Log:
8.2.2. Default Policy
- revising
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/errorhandling.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/errorhandling.xml 2008-05-23 04:35:49 UTC (rev 10799)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/errorhandling.xml 2008-05-23 04:57:08 UTC (rev 10800)
@@ -17,27 +17,27 @@
<itemizedlist>
<listitem>
<para>
- <computeroutput>Access denied</computeroutput>: the user does not have the security permissions to access the resource.
+ <emphasis>Access denied</emphasis>: the user does not have the security permissions to access the resource.
</para>
</listitem>
<listitem>
<para>
- <computeroutput>Error</computeroutput>: an anticipated error, such as when a portlet throws an exception.
+ <emphasis>Error</emphasis>: an anticipated error, such as when a portlet throws an exception.
</para>
</listitem>
<listitem>
<para>
- <computeroutput>Internal error</computeroutput>: an unexpected error.
+ <emphasis>Internal error</emphasis>: an unexpected error.
</para>
</listitem>
<listitem>
<para>
- <computeroutput>Resource not found</computeroutput>: the resource was not found.
+ <emphasis>Resource not found</emphasis>: the resource was not found.
</para>
</listitem>
<listitem>
<para>
- <computeroutput>Resource not available</computeroutput>: the resource was found, but it is not serviceable.
+ <emphasis>Resource not available</emphasis>: the resource was found, but it is not serviceable.
</para>
</listitem>
</itemizedlist>
@@ -80,15 +80,37 @@
</para>
</sect2>
<sect2>
- <title>Default policy</title>
- <para>The default policy applies when errors are not handled at other level. By default errors are translated
+ <title>Default Policy</title>
+ <para>The default policy applies when errors are not handled by another level. By default, errors are translated
into the most appropriate HTTP response:
+ </para>
+ <para>
<itemizedlist>
- <listitem>Access denied: HTTP 403 Forbidden response</listitem>
- <listitem>Error: HTTP 500 Internal Server Error response</listitem>
- <listitem>Internal error: HTTP 500 Internal Server Error response</listitem>
- <listitem>Resource not found: HTTP 404 Not Found response</listitem>
- <listitem>Resource not available: HTTP 404 Not Found response</listitem>
+ <listitem>
+ <para>
+ Access denied: <computeroutput>HTTP 403 Forbidden</computeroutput>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Error: <computeroutput>HTTP 500 Internal Server Error</computeroutput>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Internal error: <computeroutput>HTTP 500 Internal Server Error</computeroutput>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Resource not found: <computeroutput>HTTP 404 Not Found</computeroutput>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Resource not available: <computeroutput>HTTP 404 Not Found</computeroutput>
+ </para>
+ </listitem>
</itemizedlist>
</para>
</sect2>
17 years, 11 months
JBoss Portal SVN: r10799 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-05-23 00:35:49 -0400 (Fri, 23 May 2008)
New Revision: 10799
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/errorhandling.xml
Log:
8.2.1. Policy Delegation and Cascading
- revising
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/errorhandling.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/errorhandling.xml 2008-05-23 01:57:33 UTC (rev 10798)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/errorhandling.xml 2008-05-23 04:35:49 UTC (rev 10799)
@@ -44,21 +44,38 @@
</para>
</sect1>
<sect1>
- <title>Control policies</title>
- <para>When an error occurs, the request control flow changes according to the configuration. The configuration
- is also called <emphasis>control policy</emphasis>.</para>
+ <title>Control Policies</title>
+ <para>If an error occurs, the request control-flow changes according to the configuration. This configuration is known as the <emphasis>control policy</emphasis>.</para>
<sect2>
- <title>Policy delegation and cascading</title>
- <para>Whenever a control policy is invoked it is possible to change the response sent
- by the control flow. If the control policy ignores the error then the next policy will handle the error
- at this turn. However if the control policy decides to provide a new response then the next policy
- will not be invoked since the new response will not be of type error. For instance, if a portlet part of a
- page produces an exception, the following reactions are possible:
+ <title>Policy Delegation and Cascading</title>
+ <para>
+ When the control policy is invoked, the response sent by the control flow can be changed. If the control policy ignores the error, the error is handled by the next policy. If the control policy provides a new response, the next policy is not invoked, since the new response will not be an error.
+ </para>
+ <para>
+ If a portlet in a page produces an exception, the following reactions are possible:
+ </para>
+ <para>
<itemizedlist>
- <listitem>The error is displayed in the window</listitem>
- <listitem>The window is removed from the aggregation</listitem>
- <listitem>An portal error page is displayed</listitem>
- <listitem>An HTTP 500 error response is sent to the browser</listitem>
+ <listitem>
+ <para>
+ the error is displayed in the window.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ the window is removed from the aggregation.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ a portal error page is displayed.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ a HTTP 500 error response is sent to the Web browser.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</sect2>
17 years, 11 months
JBoss Portal SVN: r10798 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-05-22 21:57:33 -0400 (Thu, 22 May 2008)
New Revision: 10798
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/errorhandling.xml
Log:
8.1. Error Types
- minor revisions, making list more compatible with standard
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/errorhandling.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/errorhandling.xml 2008-05-23 01:29:22 UTC (rev 10797)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/errorhandling.xml 2008-05-23 01:57:33 UTC (rev 10798)
@@ -7,18 +7,39 @@
<email>julien.viet(a)jboss.com</email>
</author>
</chapterinfo>
- <title>Error handling configuration</title>
- <para>JBoss Portal's request pipeline allows for fine-grained, dynamic configuration of how Portal will behave when
- an error occurs at runtime.</para>
+ <title>Error Handling Configuration</title>
+ <para>
+ The JBoss Portal request pipeline allows fine-grained, dynamic configuration of how JBoss Portal behaves when errors occur at runtime.
+ </para>
<sect1>
- <title>Error types</title>
- <para>There are several kind of errors that can happen during a request:
+ <title>Error Types</title>
+ <para>There are several types of errors that can occur during a request:
<itemizedlist>
- <listitem>Access denied: the user does not have the security rights to access a resource</listitem>
- <listitem>Error: an anticipated error as when a portlet throws an exception</listitem>
- <listitem>Internal error: an unexpected error</listitem>
- <listitem>Resource not found: a resource is not found</listitem>
- <listitem>Resource not available: a resource is found but is not serviceable</listitem>
+ <listitem>
+ <para>
+ <computeroutput>Access denied</computeroutput>: the user does not have the security permissions to access the resource.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <computeroutput>Error</computeroutput>: an anticipated error, such as when a portlet throws an exception.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <computeroutput>Internal error</computeroutput>: an unexpected error.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <computeroutput>Resource not found</computeroutput>: the resource was not found.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <computeroutput>Resource not available</computeroutput>: the resource was found, but it is not serviceable.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</sect1>
17 years, 11 months
JBoss Portal SVN: r10797 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-05-22 21:29:22 -0400 (Thu, 22 May 2008)
New Revision: 10797
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/urls.xml
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml
Log:
Chapter 7. Portal URLs
- minor revisions
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/urls.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/urls.xml 2008-05-22 14:41:22 UTC (rev 10796)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/urls.xml 2008-05-23 01:29:22 UTC (rev 10797)
@@ -39,7 +39,7 @@
<sect1>
<title>Accessing a Portal</title>
<para>
- The <computeroutput>default</computeroutput> portal is used when no portal is specified. The following examples detail how the selection is done:
+ The <computeroutput>default</computeroutput> portal is used when no portal is specified. How selection is done:
</para>
<para>
<itemizedlist>
@@ -59,7 +59,7 @@
<sect1>
<title>Accessing a Page</title>
<para>
- Each portal can have multiple pages, and each portal has a default page. When a portal is selected, a page must be used, and all windows in that page are rendered. The page selection mechanism is as follows:
+ Each portal can have multiple pages, with each portal having a default page. When a portal is selected, a page must be used, and all windows in that page are rendered. The page selection mechanism is as follows:
</para>
<para>
<computeroutput>/portal/default/<replaceable>page-name</replaceable></computeroutput> renders the <replaceable>page-name</replaceable> page.
@@ -71,7 +71,7 @@
The <emphasis>CMSPortlet</emphasis> delivers content transparently, without modifying the displayed URL. It is desirable to display binary content, such as GIF, JPEG, PDF, ZIP, and so on, outside of the confines of the portal. For example, <computeroutput>/content/default/images/jboss_logo.gif</computeroutput> displays the <computeroutput>jboss_logo.gif</computeroutput> file outside of the portal.
</para>
<para>
- To display content outside of the portal, the portal interprets any path beginning with <computeroutput>/content</computeroutput> as a request for CMS content. As long as the <computeroutput><mime-type></computeroutput> is not <computeroutput>text/html</computeroutput>, or <computeroutput>text/text</computeroutput>, and the path to the content begins with <computeroutput>/content</computeroutput>, the content will be rendered independently outside of the portal.
+ To display content outside of the portal, the portal interprets any path beginning with <computeroutput>/content</computeroutput> as a request for CMS content. As long as the <computeroutput><mime-type></computeroutput> is not <computeroutput>text/html</computeroutput>, or <computeroutput>text/text</computeroutput>, and the path to the content begins with <computeroutput>/content</computeroutput>, the content is rendered independently, outside of the portal.
</para>
</sect1>
<!--
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml 2008-05-22 14:41:22 UTC (rev 10796)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/xmldescriptors.xml 2008-05-23 01:29:22 UTC (rev 10797)
@@ -1840,7 +1840,7 @@
<instance-name>
</screen>
<para>
- The <computeroutput><instance-name></computeroutput> maps to the <computeroutput><instance-ref></computeroutput> element.
+ The <computeroutput><instance-name></computeroutput> element maps to the <computeroutput><instance-ref></computeroutput> element.
</para>
</listitem>
<listitem>
17 years, 11 months
JBoss Portal SVN: r10796 - in branches/JBoss_Portal_Branch_2_7: core/src/main/org/jboss/portal/core/aspects/portlet and 9 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-05-22 10:41:22 -0400 (Thu, 22 May 2008)
New Revision: 10796
Added:
branches/JBoss_Portal_Branch_2_7/core-samples/src/bin/portal-portlet-samples-war/
branches/JBoss_Portal_Branch_2_7/core-samples/src/bin/portal-portlet-samples-war/css/
branches/JBoss_Portal_Branch_2_7/core-samples/src/bin/portal-portlet-samples-war/css/master.css
branches/JBoss_Portal_Branch_2_7/core-samples/src/bin/portal-portlet-samples-war/images/
branches/JBoss_Portal_Branch_2_7/core-samples/src/bin/portal-portlet-samples-war/images/icon-maximize.gif
branches/JBoss_Portal_Branch_2_7/core-samples/src/bin/portal-portlet-samples-war/images/icon-minimize.gif
branches/JBoss_Portal_Branch_2_7/core-samples/src/bin/portal-portlet-samples-war/images/icon-normal.gif
Modified:
branches/JBoss_Portal_Branch_2_7/core-samples/build.xml
branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/basic/TestPortlet.java
branches/JBoss_Portal_Branch_2_7/core/.classpath
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/SignOutInterceptor.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/command/response/SignOutResponse.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/CoreEventControllerContext.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/SignOutResponse.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossActionResponse.java
Log:
- Fix portlet 2.0 samples portlet
- Make the signOut event works
- Started on portlet->portal events mechanism
Modified: branches/JBoss_Portal_Branch_2_7/core/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/.classpath 2008-05-22 13:34:23 UTC (rev 10795)
+++ branches/JBoss_Portal_Branch_2_7/core/.classpath 2008-05-22 14:41:22 UTC (rev 10796)
@@ -53,8 +53,8 @@
<classpathentry kind="lib" path="/thirdparty/jboss/backport-concurrent/lib/jboss-backport-concurrent.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/test/lib/portal-test-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-federation-lib.jar"/>
- <classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar" sourcepath="/module-portlet"/>
+ <classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar" sourcepath="/module-portlet-2.0.0.CR2"/>
<classpathentry kind="lib" path="/thirdparty/portlet/lib/portlet-api.jar"/>
- <classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-controller-lib.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-controller-lib.jar" sourcepath="/module-portlet-2.0.0.CR2"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/SignOutInterceptor.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/SignOutInterceptor.java 2008-05-22 13:34:23 UTC (rev 10795)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/SignOutInterceptor.java 2008-05-22 14:41:22 UTC (rev 10796)
@@ -22,6 +22,7 @@
******************************************************************************/
package org.jboss.portal.core.aspects.portlet;
+import org.jboss.portal.core.controller.portlet.CoreEventControllerContext;
import org.jboss.portal.core.controller.portlet.SignOutResponse;
import org.jboss.portal.portlet.invocation.PortletInterceptor;
import org.jboss.portal.portlet.invocation.PortletInvocation;
@@ -41,12 +42,13 @@
protected Object invoke(PortletInvocation invocation) throws Exception
{
PortletInvocationResponse response = (PortletInvocationResponse)invocation.invokeNext();
+
if (response instanceof UpdateNavigationalStateResponse)
{
UpdateNavigationalStateResponse unsr = (UpdateNavigationalStateResponse)response;
for (UpdateNavigationalStateResponse.Event event : unsr.getEvents())
{
- if (event.getName().equals(new QName("http://www.jboss.com/portal", "signOut")))
+ if (event.getName().equals(new QName(CoreEventControllerContext.PORTAL_NAMESPACE, "signOut")))
{
String location = (String)event.getPayload();
return new SignOutResponse(location);
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/command/response/SignOutResponse.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/command/response/SignOutResponse.java 2008-05-22 13:34:23 UTC (rev 10795)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/command/response/SignOutResponse.java 2008-05-22 14:41:22 UTC (rev 10796)
@@ -40,10 +40,6 @@
public SignOutResponse(String location)
{
- if (location == null)
- {
- throw new IllegalArgumentException();
- }
this.location = location;
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/CoreEventControllerContext.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/CoreEventControllerContext.java 2008-05-22 13:34:23 UTC (rev 10795)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/CoreEventControllerContext.java 2008-05-22 14:41:22 UTC (rev 10796)
@@ -22,6 +22,8 @@
******************************************************************************/
package org.jboss.portal.core.controller.portlet;
+import java.util.LinkedList;
+
import org.jboss.portal.portlet.controller.event.EventControllerContext;
import org.jboss.portal.portlet.controller.event.EventPhaseContext;
import org.jboss.portal.portlet.controller.event.Event;
@@ -36,15 +38,22 @@
public class CoreEventControllerContext implements EventControllerContext
{
+ public final static String PORTAL_NAMESPACE = "urn:jboss:portal";
+
/** . */
private final Logger log = Logger.getLogger(CoreEventControllerContext.class);
/** . */
private final ControllerPortletControllerContext portletControllerContext;
+
+ /** Events to be consumed by the portal, unused at the moment */
+ private LinkedList<Event> toConsumeEvents;
+
public CoreEventControllerContext(ControllerPortletControllerContext portletControllerContext)
{
this.portletControllerContext = portletControllerContext;
+ this.toConsumeEvents = new LinkedList<Event>();
}
public void eventProduced(EventPhaseContext context, Event producedEvent, Event sourceEvent)
@@ -62,6 +71,12 @@
context.queueEvent(distributedEvent);
}
}
+
+ // Portal events unused at the moment
+ if (PORTAL_NAMESPACE.equals(producedEvent.getName().getNamespaceURI()))
+ {
+ toConsumeEvents.addLast(producedEvent);
+ }
}
catch (Exception e)
{
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/SignOutResponse.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/SignOutResponse.java 2008-05-22 13:34:23 UTC (rev 10795)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/SignOutResponse.java 2008-05-22 14:41:22 UTC (rev 10796)
@@ -42,10 +42,6 @@
public SignOutResponse(String location)
{
- if (location == null)
- {
- throw new IllegalArgumentException();
- }
this.location = location;
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossActionResponse.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossActionResponse.java 2008-05-22 13:34:23 UTC (rev 10795)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossActionResponse.java 2008-05-22 14:41:22 UTC (rev 10796)
@@ -38,6 +38,7 @@
import org.jboss.portal.api.node.PortalNode;
import org.jboss.portal.api.node.PortalNodeURL;
import org.jboss.portal.core.aspects.controller.node.Navigation;
+import org.jboss.portal.core.controller.portlet.CoreEventControllerContext;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -153,7 +154,8 @@
*/
public void signOut() throws IllegalStateException
{
- setEvent(new QName("http://www.jboss.com/portal", "signOut"), null);
+
+ setEvent(new QName(CoreEventControllerContext.PORTAL_NAMESPACE, "signOut"), null);
/*
if (!PortletRequest.FORM_AUTH.equals(preq.getAuthType()))
{
@@ -179,7 +181,7 @@
*/
public void signOut(String location) throws IllegalStateException
{
- setEvent(new QName("http://www.jboss.com/portal", "signOut"), location);
+ setEvent(new QName(CoreEventControllerContext.PORTAL_NAMESPACE, "signOut"), location);
// throw new NotYetImplemented();
/*
Modified: branches/JBoss_Portal_Branch_2_7/core-samples/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-samples/build.xml 2008-05-22 13:34:23 UTC (rev 10795)
+++ branches/JBoss_Portal_Branch_2_7/core-samples/build.xml 2008-05-22 14:41:22 UTC (rev 10796)
@@ -252,6 +252,7 @@
<!-- portal-portlet-samples.war -->
<copy todir="${build.resources}/portal-portlet-samples.war">
<fileset dir="${build.resources}/portal-portlet-samples-war"/>
+ <fileset dir="${source.bin}/portal-portlet-samples-war"/>
</copy>
<mkdir dir="${build.resources}/portal-portlet-samples.war/WEB-INF/lib/"/>
<copy file="${jboss.portal/modules/portlet.lib}/portal-portlet-samples-lib.jar" todir="${build.resources}/portal-portlet-samples.war/WEB-INF/lib/"/>
Added: branches/JBoss_Portal_Branch_2_7/core-samples/src/bin/portal-portlet-samples-war/css/master.css
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-samples/src/bin/portal-portlet-samples-war/css/master.css (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-samples/src/bin/portal-portlet-samples-war/css/master.css 2008-05-22 14:41:22 UTC (rev 10796)
@@ -0,0 +1,388 @@
+body,
+div.container {
+ font: normal 12px Lucida Sans, Trebuchet, tahoma, sans-serif;
+}
+
+.align-center {
+ text-align: center;
+}
+
+.align-left {
+ text-align: left;
+}
+
+.align-center-margin {
+ margin: 0 auto 0 auto;
+}
+
+.float-left {
+ float: left;
+}
+
+.float-right {
+ float: right;
+}
+
+.align-left {
+ text-align: left;
+}
+
+.align-right {
+ text-align: right;
+}
+
+.half-width {
+ width: 49%;
+}
+
+.quarter-width {
+ width: 24.9%;
+}
+
+.three-quarter-width {
+ width: 74.9%;
+}
+
+.full-width {
+ width: 100%;
+}
+
+.third-width {
+ width: 32.9%;
+}
+
+.two-third-width {
+ width: 65.5%;
+}
+
+.tenpx-top-bottom {
+ margin: 10px 0 10px 0;
+}
+
+.relative {
+ position: relative
+}
+
+.absolute {
+ position: absolute
+}
+
+p.white-padded {
+ color: #fff;
+ padding: 5px;
+}
+
+.clear {
+ clear: both;
+}
+
+img {
+ margin: 0;
+ padding: 0;
+ border: 0;
+}
+
+.zero {
+ margin: 0;
+ padding: 0;
+ border: 0;
+}
+
+body,
+ div,
+ form,
+ ul,
+ li {
+ margin: 0;
+ padding: 0;
+}
+
+ul {
+
+}
+
+ul li {
+ list-style-position:inside;
+}
+
+.hidden {
+ display: none;
+}
+
+/*--------------------------------Decoration*/
+
+h2 {
+ font-size: 1.9em;
+ color: #fff;
+ margin: 0;
+ padding: 0;
+}
+
+h2.title {
+ font-size: 1.9em;
+ color: #fff;
+ margin: 0;
+ padding: 0;
+}
+
+h3 {
+ font-size: 1.0em;
+ color: #fff;
+ margin: 0;
+ padding: 0;
+}
+
+a {
+ color: #990000;
+}
+
+p {
+ margin: 0;
+ padding: 0;
+}
+
+/*-------------------------------Container Decoration*/
+
+div#container>div.header {
+ height: 40px;
+ background-color: #000;
+}
+
+div#container div.header div.logo {
+ background-image: url( /simple-portal/images/logo-header.gif );
+ background-repeat: no-repeat;
+ background-position: top left;
+ height: 40px;
+}
+
+div#container div.header div.pc20 {
+ text-align: right;
+}
+
+div#container div.header div.secondary-nav {
+ font-size: 11px;
+ padding: 3px 5px 0 0;
+ text-align: right;
+}
+
+div#container div.header div.pc20 img {
+ margin: 5px 10px 0 0;
+}
+
+div#container div.nav {
+ background-image: url( /simple-portal/images/nav-bg.gif );
+ background-repeat: repeat-x;
+ background-position: top left;
+ border-top: 1px solid #878787;
+ border-bottom: 1px solid #383838;
+ height: 24px;
+}
+
+div#container div.nav ul {
+ height: 24px;
+ margin: 0 0 0 10px;
+}
+
+div#container div.nav ul li {
+ display: inline;
+ float: left;
+ text-align: center;
+ height: 24px; /*border: 1px solid #929292;*/
+}
+
+div#container div.nav ul li a,
+ div#container div.nav ul li a:hover {
+ display: block;
+ height: 16px;
+ padding: 5px 14px 4px 14px;
+ background-repeat: repeat-x;
+ background-position: top left;
+ text-decoration: none;
+ font: bold 11px;
+}
+
+div#container div.nav ul li a {
+ color: #fff; /*background-image: url( /simple-portal/images/inactive-button-bg.gif );*/
+}
+
+div#container div.nav ul li a:hover,
+ div#container div.nav ul li a.selected {
+ color: #fff;
+ background-image: url( /simple-portal/images/active-button2-bg.gif );
+}
+
+div#container div#content {
+ background-image: url( /simple-portal/images/portal-bg.gif );
+ background-repeat: repeat-x;
+ background-position: top left;
+ min-height: 600px;
+ padding: 10px;
+}
+
+/*-------------------------------Portlet Decoration*/
+
+div#container div#content div.portlet {
+ border: 1px solid #969696;
+ background-color: #e2e2e2;
+ padding: 2px;
+ float: left;
+ margin: 10px;
+ width: 95%;
+}
+
+div#container div#content div.portlet-frame {
+ background-color: #fff;
+ border: 1px solid #fff;
+}
+
+div#container div#content div.portlet div.header {
+ background-image: url( /simple-portal/images/portlet-titlebg.gif );
+ background-repeat: repeat-x;
+ background-position: top left;
+ height: 20px;
+}
+
+div#container div#content div.portlet div.header div.header-layer {
+ background-image: url( /simple-portal/images/portlet-title-rt-bg.gif );
+ background-repeat: no-repeat;
+ background-position: top right;
+ height: 20px;
+}
+
+div#container div#content div.portlet div.header div.header-layer div.title h2 {
+ font: bold 12px Lucida Sans, Trebuchet, tahoma, sans-serif;
+ color: #fff;
+ padding: 2px;
+}
+
+div#container div#content div.portlet div.header div.header-layer div.controls {
+ text-align: right;
+ padding: 3px 0 0 0;
+}
+
+div#container div#content div.portlet div.header div.header-layer div.controls span.mode-button {
+ text-align: right;
+ padding: 0 5px 0 0;
+}
+
+div#container div#content div.portlet div.header div.header-layer div.controls span.mode-button a {
+ color: #e1d77e;
+ font: normal 11px;
+ text-decoration: none;
+}
+
+/*----------------------------------Error portlet*/
+
+div.error-container {
+ padding: 5px;
+ background-color: #fff;
+}
+
+h3.error-header {
+ background-color: #cc1100;
+ color: #fff;
+ padding: 3px;
+}
+
+div.error-container ul {
+ list-style: none;
+ list-style-position: inside;
+}
+
+div.error-container ul li {
+ padding: 3px 0 3px 0;
+ border-bottom: 1px solid #777777;
+}
+
+div.error-container ul li span {
+ font-weight: bold;
+ color: #cc1100
+}
+
+div.exception code {
+ color: #33ff00;
+}
+
+/*-------------------------------------Remote Window*/
+
+div.remote-container {
+ padding: 8px 0 0 0;
+}
+
+div.remote-container ul {
+ list-style: none;
+ list-style-position: inside;
+ width: 90%;
+ margin: 0 auto 0 auto;
+}
+
+div.remote-container ul li {
+ padding: 3px 0 3px 0;
+ border-bottom: 1px solid #777777;
+}
+
+div.remote-container ul li a {
+ color: #332299
+}
+
+/*-------------------------------------Home page*/
+
+div#container div#content div.main-content {
+ padding: 5px;
+ width: 950px;
+ border-bottom: 1px solid #777777;
+}
+
+div#container div#content div.main-content p {
+ padding: 5px;
+}
+
+div#container div#content div.content-box {
+ background-image: url( /simple-portal/images/content-box-bg.gif );
+ background-repeat: repeat-x;
+ background-position: top right;
+ height: 200px ;
+ width: 300px;
+ margin: 0 13px 0 13px;
+}
+
+div#container div#content div.content-box div.box-header {
+ position: relative;
+ height: 28px;
+ width: 100%;
+}
+
+div#container div#content div.content-box div.box-header h3{
+ padding: 4px 0 0 10px;
+ font-size:1.2em;
+}
+
+
+div#container div#content div.content-box div.box-header img.left {
+ position: absolute;
+ top: 0;
+ left: 0;
+}
+
+div#container div#content div.content-box div.box-header img.right {
+ position: absolute;
+ top: 0;
+ right: 0;
+}
+
+div#container div#content div.content-box div.box-content {
+ padding: 5px;
+}
+
+/*-------------------------------------Wiki page*/
+
+div#container div#content div.wiki-content {
+ padding: 5px;
+ border-bottom: 1px solid #777777;
+}
+
+div#container div#content div.wiki-content p {
+ padding: 5px;
+}
+
+/*-------------------------------------Debugger*/
Added: branches/JBoss_Portal_Branch_2_7/core-samples/src/bin/portal-portlet-samples-war/images/icon-maximize.gif
===================================================================
(Binary files differ)
Property changes on: branches/JBoss_Portal_Branch_2_7/core-samples/src/bin/portal-portlet-samples-war/images/icon-maximize.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/JBoss_Portal_Branch_2_7/core-samples/src/bin/portal-portlet-samples-war/images/icon-minimize.gif
===================================================================
(Binary files differ)
Property changes on: branches/JBoss_Portal_Branch_2_7/core-samples/src/bin/portal-portlet-samples-war/images/icon-minimize.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/JBoss_Portal_Branch_2_7/core-samples/src/bin/portal-portlet-samples-war/images/icon-normal.gif
===================================================================
(Binary files differ)
Property changes on: branches/JBoss_Portal_Branch_2_7/core-samples/src/bin/portal-portlet-samples-war/images/icon-normal.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/basic/TestPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/basic/TestPortlet.java 2008-05-22 13:34:23 UTC (rev 10795)
+++ branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/basic/TestPortlet.java 2008-05-22 14:41:22 UTC (rev 10796)
@@ -37,6 +37,8 @@
import javax.portlet.PortletSecurityException;
import javax.portlet.PortletURL;
import javax.transaction.Transaction;
+import javax.xml.namespace.QName;
+
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Enumeration;
@@ -73,6 +75,19 @@
resp.setRenderParameter("name", "value");
}
+ public void testsignout(JBossActionRequest req, JBossActionResponse resp)
+ {
+ resp.setEvent(new QName("urn:jboss:portal", "signOut"), "");
+ }
+ public void testsignout2(JBossActionRequest req, JBossActionResponse resp)
+ {
+ resp.signOut();
+ }
+ public void testsignout3(JBossActionRequest req, JBossActionResponse resp)
+ {
+ resp.signOut("http://www.redhat.com");
+ }
+
protected void doView(JBossRenderRequest req, JBossRenderResponse resp) throws PortletException, PortletSecurityException, IOException
{
resp.setContentType("text/html");
@@ -245,6 +260,35 @@
writer.write("</p>");
//
+ actionURL = resp.createActionURL();
+
+ actionURL.setParameter("op", "testsignout");
+ writer.write("<p>");
+ writer.write("<div class=\"portlet-section-header\">Test sign out</div>");
+ writer.write("<div class=\"portlet-section-body\">");
+ writer.write("<div><a href=\"" + actionURL + "\">sign out with signout event</a></div>");
+ writer.write("</div>");
+
+ actionURL = resp.createActionURL();
+ actionURL.setParameter("op", "testsignout2");
+ writer.write("<div class=\"portlet-section-body\">");
+ writer.write("<div><a href=\"" + actionURL + "\">sign out with former API and no parameter</a></div>");
+ writer.write("</div>");
+
+ writer.write("</p>");
+
+ //
+
+ //
+ actionURL = resp.createActionURL();
+ actionURL.setParameter("op", "testsignout3");
+ writer.write("<p>");
+ writer.write("<div class=\"portlet-section-header\">Test sign out 3</div>");
+ writer.write("<div class=\"portlet-section-body\">");
+ writer.write("<div><a href=\"" + actionURL + "\">sign out with former API and redirect to Red Hat</a></div>");
+ writer.write("</div>");
+ writer.write("</p>");
+//
writer.close();
}
17 years, 11 months
JBoss Portal SVN: r10795 - in modules/portlet/trunk: samples/src/main/java/org/jboss/portal/portlet/samples/remotecontroller and 1 other directory.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-05-22 09:34:23 -0400 (Thu, 22 May 2008)
New Revision: 10795
Modified:
modules/portlet/trunk/.classpath
modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/remotecontroller/RemoteControllerPortlet.java
Log:
Modify the remote control to be pretty also in the whole portal.
Modified: modules/portlet/trunk/.classpath
===================================================================
--- modules/portlet/trunk/.classpath 2008-05-22 13:29:03 UTC (rev 10794)
+++ modules/portlet/trunk/.classpath 2008-05-22 13:34:23 UTC (rev 10795)
@@ -8,8 +8,8 @@
<classpathentry kind="src" path="test/src/main/java"/>
<classpathentry kind="src" path="samples/src/main/java"/>
<classpathentry kind="src" path="portlet/src/test/java"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="lib" path="/home/theute/Java/jdk1.5.0_08/lib/tools.jar"/>
+ <classpathentry kind="src" path="mc/src/main/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.5.0_15"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER/modules"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/remotecontroller/RemoteControllerPortlet.java
===================================================================
--- modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/remotecontroller/RemoteControllerPortlet.java 2008-05-22 13:29:03 UTC (rev 10794)
+++ modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/remotecontroller/RemoteControllerPortlet.java 2008-05-22 13:34:23 UTC (rev 10795)
@@ -37,7 +37,7 @@
ResourceURL resource = renderResponse.createResourceURL();
printWriter.print(resource);
printWriter.print("')\">Open remote control!</a></p>");
- }
+}
@Override
public void serveResource(ResourceRequest resourceRequest, ResourceResponse resourceResponse) throws PortletException, IOException
@@ -46,17 +46,17 @@
PrintWriter writer = resourceResponse.getWriter();
String namespace = resourceResponse.getNamespace();
writer.print("<html><head><script type='text/javascript'>function openLinkInParent(url){window.open(url,'"
- + namespace + "_parent');}</script>\n<link rel=\"stylesheet\" href='/simple-portal/css/master.css' type=\"text/css\"/></head><body>");
+ + namespace + "_parent');}</script>\n<link rel=\"stylesheet\" href='" + resourceRequest.getContextPath() + "/css/master.css' type=\"text/css\"/></head><body>");
PortletURL url = resourceResponse.createRenderURL();
url.setWindowState(WindowState.MINIMIZED);
writer.print("<div class=\"remote-container\"><ul><li><a href='#' onclick=\"" + createParentURL(url) + "\"><img\n" +
- " src=\"/simple-portal/images/icon-minimize.gif\" alt=\"\"/> minimize parent portlet</a></li>");
+ " src=\"" + resourceRequest.getContextPath() + "/images/icon-minimize.gif\" alt=\"\"/> minimize parent portlet</a></li>");
url.setWindowState(WindowState.MAXIMIZED);
writer.print("<li><a href='#' onclick=\"" + createParentURL(url) + "\"><img\n" +
- " src=\"/simple-portal/images/icon-maximize.gif\" alt=\"\"/> maximize parent portlet</a></li>");
+ " src=\"" + resourceRequest.getContextPath() + "/images/icon-maximize.gif\" alt=\"\"/> maximize parent portlet</a></li>");
url.setWindowState(WindowState.NORMAL);
writer.print("<li><a href='#' onclick=\"" + createParentURL(url) + "\"><img\n" +
- " src=\"/simple-portal/images/icon-normal.gif\" alt=\"\"/> make parent portlet normal</a></li></ul>");
+ " src=\"" + resourceRequest.getContextPath() + "/images/icon-normal.gif\" alt=\"\"/> make parent portlet normal</a></li></ul>");
writer.print("<br/><ul><li><b>'zipcode'</b> public render parameter value: " + resourceRequest.getParameter(ZIPCODE) + "<br/>");
writer.print("Set value of <b>'zipcode'</b> public render parameter to:</li>");
url.setParameter(ZIPCODE, "80201");
17 years, 11 months
JBoss Portal SVN: r10793 - in branches/JBoss_Portal_Branch_2_7: core-samples/src/resources/portal-basic-samples-war/WEB-INF and 1 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-05-22 08:56:37 -0400 (Thu, 22 May 2008)
New Revision: 10793
Modified:
branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-basic-samples-war/WEB-INF/portlet.xml
branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-portlet-samples-war/WEB-INF/default-object.xml
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/navstate/PortalObjectNavigationalStateContext.java
Log:
- Fixed 2.0 sample portlets
- Removed 2 out of 3 google map windows
(Google map window requires a portlet module upgrade to work)
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/navstate/PortalObjectNavigationalStateContext.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/navstate/PortalObjectNavigationalStateContext.java 2008-05-21 14:11:59 UTC (rev 10792)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/navstate/PortalObjectNavigationalStateContext.java 2008-05-22 12:56:37 UTC (rev 10793)
@@ -134,7 +134,10 @@
if (oldNS == null)
{
PortalObjectId id = (PortalObjectId)wantedKey.getId();
- oldNS = (WindowNavigationalState)store.getAttribute(id.toString());
+ if (store.getAttribute(id.toString()) instanceof WindowNavigationalState)
+ {
+ oldNS = (WindowNavigationalState)store.getAttribute(id.toString());
+ }
}
//
Modified: branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-basic-samples-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-basic-samples-war/WEB-INF/portlet.xml 2008-05-21 14:11:59 UTC (rev 10792)
+++ branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-basic-samples-war/WEB-INF/portlet.xml 2008-05-22 12:56:37 UTC (rev 10793)
@@ -143,6 +143,10 @@
<security-role-ref>
<role-name>Authenticated</role-name>
</security-role-ref>
+ <supported-publishing-event>
+ <qname xmlns:jbp="urn:jboss:portal">jbp:signOut</qname>
+ </supported-publishing-event>
+
</portlet>
<portlet>
<description>Portlet displaying the number of it's action/render calls</description>
@@ -467,4 +471,10 @@
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
+
+ <event-definition>
+ <qname xmlns:jbp="urn:jboss:portal">jbp:signOut</qname>
+ <value-type>java.lang.String</value-type>
+ </event-definition>
+
</portlet-app>
Modified: branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-portlet-samples-war/WEB-INF/default-object.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-portlet-samples-war/WEB-INF/default-object.xml 2008-05-21 14:11:59 UTC (rev 10792)
+++ branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-portlet-samples-war/WEB-INF/default-object.xml 2008-05-22 12:56:37 UTC (rev 10793)
@@ -61,25 +61,8 @@
<region>center</region>
<height>1</height>
</window>
+
<window>
- <window-name>GoogleWeatherPortletWindow1</window-name>
- <instance-ref>GoogleWeatherPortletInstance</instance-ref>
- <region>center</region>
- <height>2</height>
- </window>
- <window>
- <window-name>GoogleWeatherPortletWindow2</window-name>
- <instance-ref>GoogleWeatherPortletInstance</instance-ref>
- <region>center</region>
- <height>3</height>
- </window>
- <window>
- <window-name>GoogleWeatherPortletWindow3</window-name>
- <instance-ref>GoogleWeatherPortletInstance</instance-ref>
- <region>center</region>
- <height>4</height>
- </window>
- <window>
<window-name>ShoppingCatalogPortletWindow</window-name>
<instance-ref>ShoppingCatalogPortletInstance</instance-ref>
<region>center</region>
17 years, 11 months