JBoss Portal SVN: r10567 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-04-13 22:08:44 -0400 (Sun, 13 Apr 2008)
New Revision: 10567
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/migration.xml
Log:
minor corrections to 4.1. Manual Upgrade
(JBPORTAL-1972)
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/migration.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/migration.xml 2008-04-14 01:50:31 UTC (rev 10566)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/migration.xml 2008-04-14 02:08:44 UTC (rev 10567)
@@ -23,7 +23,7 @@
<sect1 id="manual_migration">
<title>Manual Upgrade</title>
<para>
- The database schema has not changed since JBoss Portal 2.4; however, there are several differences when using a database created by JBoss Portal 2.4, that prevent simply deploying the latest version of JBoss Portal. For example, some portlets are no longer present in JBoss Portal 2.6, and certain existing portlets are now packaged differently. This chapter describes updating a MySQL database created by JBoss Portal 2.4 for use with JBoss Portal 2.6.
+ The database schema has not changed since JBoss Portal 2.4; however, there are several differences when using a database created by JBoss Portal 2.4, that prevent simply deploying the latest version of JBoss Portal. For example, some portlets are no longer present in JBoss Portal 2.6, and certain existing portlets are now packaged differently. This chapter describes updating a MySQL database created by JBoss Portal 2.4, for use with JBoss Portal 2.6.
</para>
<para>
The upgrade procedure can be straightforward:
@@ -53,7 +53,7 @@
<sect2>
<title>Themes</title>
<para>
- In JBoss Portal 2.6, portal pages contain additional areas, such as the <guiicon>Login</guiicon>, <guiicon>Admin</guiicon>, and <guiicon>Dashboard</guiicon> links, on the top right-hand corner:
+ In JBoss Portal 2.6, portal pages contain additional areas, such as the <guiicon>Login</guiicon>, <guiicon>Admin</guiicon>, and <guiicon>Dashboard</guiicon> links, on the top right-hand corner of portal pages:
</para>
<para>
<mediaobject>
@@ -63,7 +63,7 @@
</mediaobject>
</para>
<para>
- Since portal pages now contain additional areas, certain themes have changed. If a default theme that exists in JBoss Portal 2.6 is used, such as renaissance, no configuration should be necessary. Using old themes from JBoss Portal 2.4 may make JBoss Portal 2.6 unusable, for example, not being able to log in. To update custom themes, refer to themes bundled with JBoss Portal 2.6 as an example.
+ Since portal pages now contain additional areas, certain themes have changed. If a default theme that exists in JBoss Portal 2.6 is used, such as renaissance, no configuration should be necessary. Using old themes from JBoss Portal 2.4 may make JBoss Portal 2.6 unusable, for example, not being able to log in. To update custom themes, refer to the bundled JBoss Portal 2.6 themes as an example.
</para>
</sect2>
<sect2 id="upgrade_portal_database">
@@ -91,15 +91,12 @@
</itemizedlist>
</para>
<para>
- When running JBoss Portal 2.6 with a database created by JBoss Portal 2.4, a non-existing portlet will try to display, resulting in a <computeroutput>404</computeroutput>, <computeroutput>The requested resource() is not available</computeroutput>, error.
+ All procedures described in the following sections can performed using the JBoss Portal 2.4 <guiicon>Admin</guiicon> Portlet. Treat these directions as guidelines when migrating a large JBoss Portal deployment. Database data can be updated manually using the correct tools for your RDBMS. For example, if you are using a MySQL database, use the <ulink url="http://www.mysql.com/products/tools/query-browser/">MySQL Query Browser</ulink>.
</para>
<para>
- All procedures described in the following sections can performed using the <guiicon>Admin</guiicon> Portlet. Treat these directions as guidelines when migrating a large JBoss Portal deployment. Database data can be updated manually using the correct tools for your RDBMS. For example, if you are using a MySQL database, use the <ulink url="http://www.mysql.com/products/tools/query-browser/">MySQL Query Browser</ulink>.
+ During the upgrade process, legacy references have to be cleaned up, to either remove them, or to allow JBoss Portal 2.6 to recreate them correctly. Remove all references (instances and windows) to the portlets listed below, as they are not present in JBoss Portal 2.6. These can be done using the JBoss Portal 2.4 <guiicon>Admin</guiicon> portlet:
</para>
<para>
- During the upgrade process, legacy references have to be cleaned up, to either remove them, or to allow JBoss Portal 2.6 to recreate them correctly. Remove all references (instances and windows) to the portlets listed below, as they are not present in JBoss Portal 2.6. These can be done using the JBoss Portal 2.6 <guiicon>Admin</guiicon> portlet:
- </para>
- <para>
<itemizedlist>
<listitem>
<para>
@@ -173,6 +170,14 @@
</imageobject>
</mediaobject>
</para>
+ <para>
+ <note>
+ <title>Request Resource Error</title>
+ <para>
+ When running JBoss Portal 2.6 with a database created by JBoss Portal 2.4, a non-existing portlet will try to display, resulting in a <computeroutput>404</computeroutput>, <computeroutput>The requested resource() is not available</computeroutput>, error.
+ </para>
+ </note>
+ </para>
</sect2>
<sect2>
<title>Portlet Names</title>
18 years
JBoss Portal SVN: r10566 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-04-13 21:50:31 -0400 (Sun, 13 Apr 2008)
New Revision: 10566
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/migration.xml
Log:
-minor correction
- this revision and r10565 are for Jira (JBPORTAL-1972)
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/migration.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/migration.xml 2008-04-14 01:36:59 UTC (rev 10565)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/migration.xml 2008-04-14 01:50:31 UTC (rev 10566)
@@ -94,10 +94,10 @@
When running JBoss Portal 2.6 with a database created by JBoss Portal 2.4, a non-existing portlet will try to display, resulting in a <computeroutput>404</computeroutput>, <computeroutput>The requested resource() is not available</computeroutput>, error.
</para>
<para>
- All procedures described in the following sections can performed using the <computeroutput>Admin</computeroutput> Portlet. Treat these directions as guidelines when migrating a large JBoss Portal deployment. Database data can be updated manually using the correct tools for your RDBMS. For example, if you are using a MySQL database, use the <ulink url="http://www.mysql.com/products/tools/query-browser/">MySQL Query Browser</ulink>.
+ All procedures described in the following sections can performed using the <guiicon>Admin</guiicon> Portlet. Treat these directions as guidelines when migrating a large JBoss Portal deployment. Database data can be updated manually using the correct tools for your RDBMS. For example, if you are using a MySQL database, use the <ulink url="http://www.mysql.com/products/tools/query-browser/">MySQL Query Browser</ulink>.
</para>
<para>
- During the upgrade process, legacy references have to be cleaned up, to either remove them, or to allow JBoss Portal 2.6 to recreate them correctly. Remove all references (instances and windows) to the portlets listed below, as they are not present in JBoss Portal 2.6. These can be done using the JBoss Portal 2.6 <computeroutput>Admin</computeroutput> portlet:
+ During the upgrade process, legacy references have to be cleaned up, to either remove them, or to allow JBoss Portal 2.6 to recreate them correctly. Remove all references (instances and windows) to the portlets listed below, as they are not present in JBoss Portal 2.6. These can be done using the JBoss Portal 2.6 <guiicon>Admin</guiicon> portlet:
</para>
<para>
<itemizedlist>
@@ -177,7 +177,7 @@
<sect2>
<title>Portlet Names</title>
<para>
- Names of certain core bundled-portlets have changed. Destroy the following instances and use the <computeroutput>Admin</computeroutput> Portlet to recreate them, or, edit the <emphasis role="bold">JBP_INSTANCES</emphasis> table as follows:
+ Names of certain core bundled-portlets have changed. Destroy the following instances and use the <guiicon>Admin</guiicon> Portlet to recreate them, or, edit the <emphasis role="bold">JBP_INSTANCES</emphasis> table as follows:
</para>
<para>
<itemizedlist>
@@ -511,7 +511,7 @@
<title>Portlet Content Type and Path to the CMS Resource</title>
<para>
You can change the portlet window content type and configure the path to the CMS resource
- using the <computeroutput>Admin</computeroutput> Portlet.
+ using the <guiicon>Admin</guiicon> Portlet.
</para>
</note>
</para>
18 years
JBoss Portal SVN: r10565 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-04-13 21:36:59 -0400 (Sun, 13 Apr 2008)
New Revision: 10565
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/migration.xml
Log:
- updating 4.1. Manual Upgrade as per
http://wiki.jboss.org/wiki/Portal2_6_from_2_4_migration
- old content now in comments..
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/migration.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/migration.xml 2008-04-13 23:29:52 UTC (rev 10564)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/migration.xml 2008-04-14 01:36:59 UTC (rev 10565)
@@ -21,6 +21,503 @@
</warning>
</para>
<sect1 id="manual_migration">
+ <title>Manual Upgrade</title>
+ <para>
+ The database schema has not changed since JBoss Portal 2.4; however, there are several differences when using a database created by JBoss Portal 2.4, that prevent simply deploying the latest version of JBoss Portal. For example, some portlets are no longer present in JBoss Portal 2.6, and certain existing portlets are now packaged differently. This chapter describes updating a MySQL database created by JBoss Portal 2.4 for use with JBoss Portal 2.6.
+ </para>
+ <para>
+ The upgrade procedure can be straightforward:
+ </para>
+ <para>
+ <orderedlist>
+ <listitem>
+ <para>
+ If you are using the JBoss Portal binary, remove the <filename>$JBOSS_HOME/server/default/deploy/jboss-portal.sar/</filename> directory. If JBoss Portal was built from source, remove the <filename>$JBOSS_HOME/server/default/deploy/jboss-portal.sar</filename> file.
+ </para>
+ </listitem>
+ <!--<listitem>
+ Remove <emphasis role="bold">$JBOSS_HOME/server/default/data</emphasis> directory.
+ </listitem>-->
+ <listitem>
+ <para>
+ Update the data in the JBoss Portal database, as described in <xref linkend="upgrade_portal_database"/>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Deploy JBoss Portal 2.6.
+ </para>
+ </listitem>
+ </orderedlist>
+ </para>
+ <sect2>
+ <title>Themes</title>
+ <para>
+ In JBoss Portal 2.6, portal pages contain additional areas, such as the <guiicon>Login</guiicon>, <guiicon>Admin</guiicon>, and <guiicon>Dashboard</guiicon> links, on the top right-hand corner:
+ </para>
+ <para>
+ <mediaobject>
+ <imageobject>
+ <imagedata align="center" valign="middle" fileref="images/migration/theme.png"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ <para>
+ Since portal pages now contain additional areas, certain themes have changed. If a default theme that exists in JBoss Portal 2.6 is used, such as renaissance, no configuration should be necessary. Using old themes from JBoss Portal 2.4 may make JBoss Portal 2.6 unusable, for example, not being able to log in. To update custom themes, refer to themes bundled with JBoss Portal 2.6 as an example.
+ </para>
+ </sect2>
+ <sect2 id="upgrade_portal_database">
+ <title>Updating the Database</title>
+ <para>
+ The following tables contain all references to portlets:
+ </para>
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis>JBP_INSTANCE</emphasis>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>JBP_WINDOW</emphasis>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>JBP_OBJECT_NODE</emphasis>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ When running JBoss Portal 2.6 with a database created by JBoss Portal 2.4, a non-existing portlet will try to display, resulting in a <computeroutput>404</computeroutput>, <computeroutput>The requested resource() is not available</computeroutput>, error.
+ </para>
+ <para>
+ All procedures described in the following sections can performed using the <computeroutput>Admin</computeroutput> Portlet. Treat these directions as guidelines when migrating a large JBoss Portal deployment. Database data can be updated manually using the correct tools for your RDBMS. For example, if you are using a MySQL database, use the <ulink url="http://www.mysql.com/products/tools/query-browser/">MySQL Query Browser</ulink>.
+ </para>
+ <para>
+ During the upgrade process, legacy references have to be cleaned up, to either remove them, or to allow JBoss Portal 2.6 to recreate them correctly. Remove all references (instances and windows) to the portlets listed below, as they are not present in JBoss Portal 2.6. These can be done using the JBoss Portal 2.6 <computeroutput>Admin</computeroutput> portlet:
+ </para>
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis>HeaderContentPortlet</emphasis>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>URLPortlet</emphasis>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>TestPortlet</emphasis>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>PortletA</emphasis>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>PortletB</emphasis>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>SecuredTestPortlet</emphasis>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>CharsetPortlet</emphasis>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>CounterPortlet</emphasis>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>CachedCounterPortlet</emphasis>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>ExceptionPortlet</emphasis>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>PortletSessionPortlet</emphasis>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>EncodingPortlet</emphasis>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ The following instructions refer to a standard JBoss Portal 2.4 deployment. If you named core portlets, portlet instances, or portlet windows differently, you need to make the appropriate modifications. The following is an example of using the MySQL Query Browser:
+ </para>
+ <para>
+ <mediaobject>
+ <imageobject>
+ <imagedata align="center" valign="middle" fileref="images/migration/querybrowser1.png"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ </sect2>
+ <sect2>
+ <title>Portlet Names</title>
+ <para>
+ Names of certain core bundled-portlets have changed. Destroy the following instances and use the <computeroutput>Admin</computeroutput> Portlet to recreate them, or, edit the <emphasis role="bold">JBP_INSTANCES</emphasis> table as follows:
+ </para>
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Change <emphasis>local.samples.JSPPortlet'</emphasis> in the <emphasis>PORTLET_REF</emphasis> column to <emphasis>local./portal-jsp-samples.JSPPortlet</emphasis>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Change <emphasis>local.portal.CMSPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column to <emphasis>local./portal-cms.CMSPortlet</emphasis>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Change <emphasis>local.portal.CMSAdminPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column to <emphasis>local./portal-cms.CMSAdminPortlet</emphasis>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Change <emphasis>local.portal.ManagementPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column to <emphasis>local./portal-admin.AdminPortlet</emphasis>.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ Some portlets are no longer present in JBoss Portal 2.6, and certain existing portlets are now packaged differently. Remove the following entires in the <emphasis role="bold">JBP_INSTANCE</emphasis> table, so that JBoss Portal 2.6 can recreate them:
+ </para>
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ rows containing <emphasis>NewsPortletInstance2</emphasis> in the <emphasis>ID</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>local.portal.NavigationPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>local.samples.HeaderContentPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>local.samples.WeatherPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>local.samples.NewsPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>local.samples.URLPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>local.samples.TestPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>local.samples.PortletA</emphasis> in the <emphasis>PORTLET_REF</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>local.samples.PortletB</emphasis> in the <emphasis>PORTLET_REF</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>local.samples.SecuredTestPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>local.samples.CharsetPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>local.samples.CounterPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>local.samples.CachedCounterPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>local.samples.ExceptionPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>local.samples.PortletSessionPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>local.samples.EncodingPortlet</emphasis> in the <emphasis>PORTLET_REF</emphasis> column.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ Remove the following entires in the <emphasis role="bold">JBP_WINDOW</emphasis> table, so that JBoss Portal 2.6 can recreate them:
+ </para>
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ rows containing <emphasis>NavigationPortletInstance</emphasis> in the <emphasis>INSTANCE_REF</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>URLPortletInstance</emphasis> in the <emphasis>INSTANCE_REF</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>PortletAInstance</emphasis> in the <emphasis>INSTANCE_REF</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>PortletBInstance</emphasis> in the <emphasis>INSTANCE_REF</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>EncodingPortletInstance</emphasis> in the <emphasis>INSTANCE_REF</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>PortletSessionPortletInstance</emphasis> in the <emphasis>INSTANCE_REF</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>CachedCounterPortletInstance</emphasis> in the <emphasis>INSTANCE_REF</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>CounterPortletInstance</emphasis> in the <emphasis>INSTANCE_REF</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>CharsetPortletInstance</emphasis> in the <emphasis>INSTANCE_REF</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>SecuredTestPortletInstance</emphasis> in the <emphasis>INSTANCE_REF</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>SecuredTestPortletInstance</emphasis> in the <emphasis>INSTANCE_REF</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>ExceptionPortletinstance</emphasis> in the <emphasis>INSTANCE_REF</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>HeaderContentPortletInstance</emphasis> in the <emphasis>INSTANCE_REF</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>TestPortletInstance</emphasis> in the <emphasis>INSTANCE_REF</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>MissingPortletInstance</emphasis> in the <emphasis>INSTANCE_REF</emphasis> column.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ Remove the following entires in the <emphasis role="bold">JBP_OBJECT_NODE</emphasis> table, so that JBoss Portal 2.6 can recreate them:
+ </para>
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ rows containing <emphasis>NavigationPortletWindow</emphasis> in the <emphasis>NAME</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>URLPortletWindow</emphasis> in the <emphasis>NAME</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>PortletAWindow</emphasis> in the <emphasis>NAME</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>PortletBWindow</emphasis> in the <emphasis>NAME</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>MissingInstanceWindow</emphasis> in the <emphasis>NAME</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>EncodingPortletWindow</emphasis> in the <emphasis>NAME</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>PortletSessionPortletWindow</emphasis> in the <emphasis>NAME</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>CachedCounterPortletWindow</emphasis> in the <emphasis>NAME</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>CounterPortletWindow</emphasis> in the <emphasis>NAME</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>CharsetPortletWindow</emphasis> in the <emphasis>NAME</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>SecuredTestPortletWindow</emphasis> in the <emphasis>NAME</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>ExceptionPortletWindow</emphasis> in the <emphasis>NAME</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>MissingPortletWindow</emphasis> in the <emphasis>NAME</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>HeaderContentPortletWindow</emphasis> in the <emphasis>NAME</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ rows containing <emphasis>TestPortletWindow</emphasis> in the <emphasis>NAME</emphasis> column.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </sect2>
+ <sect2>
+ <title>CMS</title>
+ <para>
+ In JBoss Portal 2.6 versions, the way the CMS content is displayed changed significantly. For further information, please refer to <xref linkend="contentintegration"/> and <xref linkend="cmsPortlet"/>. Currently there is no need to have more than one instance of the <emphasis>CMSPortlet</emphasis>. The portlet window displays CMS content, not by referring to that portlet instance, but by having the proper <emphasis>content-type</emphasis> defined. The following configuration is in the <filename>jboss-portal.sar/conf/data/default-object.xml</filename> file:
+ </para>
+ <para>
+<screen><![CDATA[
+<window>
+ <window-name>CMSWindow</window-name>
+ <content>
+ <content-type>cms</content-type>
+ <content-uri>/default/index.html</content-uri>
+ </content>
+ <region>center</region>
+ <height>0</height>
+</window>]]>
+</screen>
+ </para>
+ <para>
+ The following example uses the MySQL Query Browser. Open the <emphasis role="bold">JBP_OBJECT_NODE</emphasis> table in your database schema. Look at the <emphasis role="bold">PATH</emphasis> column to identify any occurrences of CMS in your JBoss Portal deployment. Identify any row referring to <emphasis>CMSPortletWindow</emphasis>, and remember the number in <emphasis role="bold">PK</emphasis> column. The <emphasis role="bold">PK</emphasis> number is needed in the following steps:
+ </para>
+ <para>
+ <mediaobject>
+ <imageobject>
+ <imagedata align="center" valign="middle" fileref="images/migration/querybrowser2.png"/>
+ </imageobject>
+ </mediaobject>
+ </para>
+ <para>
+ Go to the <emphasis role="bold">JBP_WINDOW</emphasis> table and find a row with the same
+ <emphasis role="bold">PK</emphasis> value from the <emphasis role="bold">JBP_OBJECT_NODE</emphasis> table. In such a row, replace <emphasis>CMSPortletInstance</emphasis> with a path to your CMS resource. For example, by default, JBoss Portal displays <filename>/default/index.html</filename>.
+ </para>
+ <para> Go to the <emphasis role="bold">JBP_PORTAL_OBJECT_PROPS</emphasis> table and add a row containing:
+ <itemizedlist>
+ <listitem>
+ <para>
+ The <emphasis role="bold">PK</emphasis> number remembered from the <emphasis>OBJECT_KEY</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>portal.windowContentType</emphasis> in the <emphasis>NAME</emphasis> column.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>cms</emphasis> in the <emphasis>jbp_VALUE</emphasis> column.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ <note>
+ <title>Portlet Content Type and Path to the CMS Resource</title>
+ <para>
+ You can change the portlet window content type and configure the path to the CMS resource
+ using the <computeroutput>Admin</computeroutput> Portlet.
+ </para>
+ </note>
+ </para>
+ </sect2>
+</sect1>
+ <!--<sect1 id="manual_migration">
<title>Manual Upgrade</title>
<para>
Although the database schema remains the same in JBoss Portal 2.6, there are several differences that prevent simply deploying the latest version of JBoss Portal, when using a database created for JBoss Portal 2.4. This chapter describes updating a JBoss Portal 2.4 MySQL database for use with JBoss Portal 2.6.
@@ -34,11 +531,11 @@
<para>
If you are using the JBoss Portal binary, remove the <filename>$JBOSS_HOME/server/default/deploy/jboss-portal.sar/</filename> directory. If JBoss Portal was built from source, remove the <filename>$JBOSS_HOME/server/default/deploy/jboss-portal.sar</filename> file.
</para>
- </listitem>
+ </listitem> -->
<!--<listitem>
Remove <emphasis role="bold">$JBOSS_HOME/server/default/data</emphasis> directory.
</listitem>-->
- <listitem>
+ <!-- <listitem>
<para>
Update the data in the JBoss Portal database, as described in <xref linkend="upgrade_portal_database"/>.
</para>
@@ -193,7 +690,7 @@
</note>
</para>
</sect2>
-</sect1>
+</sect1> -->
<!--
<para>This chapter addresses migration issues from version 2.2 to 2.4 of JBoss Portal.</para>
<sect1 id="migrating_database">
18 years
JBoss Portal SVN: r10563 - in branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core: impl/model/content/generic and 1 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-04-13 19:22:15 -0400 (Sun, 13 Apr 2008)
New Revision: 10563
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/InternalContentProvider.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/content/ContentRendererContext.java
Log:
remove unnecessary stuff
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/InternalContentProvider.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/InternalContentProvider.java 2008-04-13 23:11:33 UTC (rev 10562)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/InternalContentProvider.java 2008-04-13 23:22:15 UTC (rev 10563)
@@ -28,7 +28,6 @@
import org.jboss.portal.common.util.MultiValuedPropertyMap;
import org.jboss.portal.core.aspects.portlet.AjaxInterceptor;
import org.jboss.portal.core.controller.ControllerResponse;
-import org.jboss.portal.core.controller.portlet.ControllerPortletControllerContext;
import org.jboss.portal.core.controller.command.response.SecurityErrorResponse;
import org.jboss.portal.core.controller.command.response.UnavailableResourceResponse;
import org.jboss.portal.core.model.content.Content;
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java 2008-04-13 23:11:33 UTC (rev 10562)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java 2008-04-13 23:22:15 UTC (rev 10563)
@@ -35,7 +35,6 @@
import org.jboss.portal.core.model.content.spi.portlet.ContentPortlet;
import org.jboss.portal.core.model.instance.Instance;
import org.jboss.portal.core.model.instance.InstanceContainer;
-import org.jboss.portal.core.model.portal.PortalObjectId;
import org.jboss.portal.core.model.portal.Window;
import org.jboss.portal.core.model.portal.command.response.MarkupResponse;
import org.jboss.portal.core.model.portal.content.WindowRendition;
@@ -50,7 +49,6 @@
import org.jboss.portal.portlet.info.ParameterInfo;
import org.apache.log4j.Logger;
-import javax.xml.namespace.QName;
import java.util.Map;
import java.util.Collections;
@@ -174,46 +172,6 @@
}
//
-
- // Initialize the navigational state with the URI when needed
- WindowNavigationalState navigationalState = rendererContext.getNavigationalState();
-
- //
-// boolean update = true;
-// if (navigationalState != null && navigationalState.getState() instanceof PortletParametersStateString)
-// {
-// PortletParametersStateString state = (PortletParametersStateString)navigationalState.getState();
-// if (content.getURI().equals(state.getValue("uri")))
-// {
-// update = false;
-// }
-// }
-
- //
-/*
- if (navigationalState == null)
- {
- ParametersStateString state = ParametersStateString.create();
-
- //
- for (Iterator i = content.getParameterNames(); i.hasNext();)
- {
- String paramName = (String)i.next();
- String paramValue = content.getParameter(paramName);
- state.setValue(paramName, paramValue);
- }
-
- //
- String uri = content.getURI();
- state.setValue("uri", uri);
-
- rendererContext
-
- // Julien : to redo!!!!
- // rendererContext.setNavigationalState(WindowNavigationalState.bilto(navigationalState, null, null, state));
- }
-*/
-
ContentRendererContext rendererContext2 = new ContentRendererContext()
{
public Window getWindow()
@@ -226,11 +184,6 @@
return rendererContext.getNavigationalState();
}
- public Map<String, String[]> getPublicNavigationalState()
- {
- return rendererContext.getPublicNavigationalState();
- }
-
public User getUser()
{
return rendererContext.getUser();
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/content/ContentRendererContext.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/content/ContentRendererContext.java 2008-04-13 23:11:33 UTC (rev 10562)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/content/ContentRendererContext.java 2008-04-13 23:22:15 UTC (rev 10563)
@@ -27,9 +27,6 @@
import org.jboss.portal.portlet.invocation.RenderInvocation;
import org.jboss.portal.portlet.controller.state.WindowNavigationalState;
-import javax.xml.namespace.QName;
-import java.util.Map;
-
/**
* Abstract the services provided to a content renderer for the render phase.
*
@@ -43,8 +40,6 @@
WindowNavigationalState getNavigationalState();
- Map<String, String[]> getPublicNavigationalState();
-
User getUser();
RenderInvocation createRenderInvocation(WindowNavigationalState navigationalState);
18 years
JBoss Portal SVN: r10562 - in branches/JBoss_Portal_Branch_2_7: core/src/main/org/jboss/portal/core/controller and 10 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-04-13 19:11:33 -0400 (Sun, 13 Apr 2008)
New Revision: 10562
Modified:
branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/portlet.xml
branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-basic-samples-war/WEB-INF/default-object.xml
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/src/main/org/jboss/portal/core/CoreConstants.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/Controller.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPageNavigationalState.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPortletControllerContext.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerStateControllerContext.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/InternalContentProvider.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowRenderCommand.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowResourceCommand.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokeWindowCommand.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderPageCommand.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderWindowCommand.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/content/ContentRendererContext.java
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/META-INF/jboss-service.xml
Log:
integrated content provider rendering using public navigational render parameters
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/CoreConstants.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/CoreConstants.java 2008-04-13 23:05:46 UTC (rev 10561)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/CoreConstants.java 2008-04-13 23:11:33 UTC (rev 10562)
@@ -22,6 +22,8 @@
******************************************************************************/
package org.jboss.portal.core;
+import javax.xml.namespace.QName;
+
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision$
@@ -51,4 +53,10 @@
public static final String PORTAL_SERVLET_PATH = "jboss.portal.servlet_path";
}
}
+
+ /** The namespace for JBoss Portal content integration framework. */
+ public static final String JBOSS_PORTAL_CONTENT_NAMESPACE = "urn:jboss:portal:content";
+
+ public static final QName JBOSS_PORTAL_CONTENT_URI = new QName(JBOSS_PORTAL_CONTENT_NAMESPACE, "uri");
+
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/Controller.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/Controller.java 2008-04-13 23:05:46 UTC (rev 10561)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/Controller.java 2008-04-13 23:11:33 UTC (rev 10562)
@@ -38,6 +38,7 @@
import org.jboss.portal.core.model.portal.PortalObjectContainer;
import org.jboss.portal.core.model.portal.content.ContentRendererRegistry;
import org.jboss.portal.core.model.portal.control.page.PageControlPolicy;
+import org.jboss.portal.core.impl.model.content.InternalContentProviderRegistry;
import org.jboss.portal.jems.as.system.AbstractJBossService;
import org.jboss.portal.security.spi.auth.PortalAuthorizationManagerFactory;
import org.jboss.portal.server.RequestController;
@@ -89,6 +90,19 @@
/** . */
protected PageControlPolicy pageControlPolicy;
+ /** . */
+ protected InternalContentProviderRegistry contentProviderRegistry;
+
+ public InternalContentProviderRegistry getContentProviderRegistry()
+ {
+ return contentProviderRegistry;
+ }
+
+ public void setContentProviderRegistry(InternalContentProviderRegistry contentProviderRegistry)
+ {
+ this.contentProviderRegistry = contentProviderRegistry;
+ }
+
public ContentRendererRegistry getContentRendererRegistry()
{
return contentRendererRegistry;
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java 2008-04-13 23:05:46 UTC (rev 10561)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java 2008-04-13 23:11:33 UTC (rev 10562)
@@ -30,6 +30,7 @@
import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.core.controller.ControllerResponse;
import org.jboss.portal.core.controller.portlet.ControllerPortletControllerContext;
+import org.jboss.portal.core.controller.portlet.ControllerPageNavigationalState;
import org.jboss.portal.core.controller.handler.AjaxResponse;
import org.jboss.portal.core.controller.handler.CommandForward;
import org.jboss.portal.core.controller.handler.HandlerResponse;
@@ -283,8 +284,8 @@
WindowContextFactory wcf = new WindowContextFactory(controllerContext);
//
- PortletControllerContext portletControllerContext = new ControllerPortletControllerContext(controllerContext, page);
- PageNavigationalState pageNavigationalState = portletControllerContext.getStateControllerContext().createPageNavigationalState(true);
+ ControllerPortletControllerContext portletControllerContext = new ControllerPortletControllerContext(controllerContext, page);
+ ControllerPageNavigationalState pageNavigationalState = portletControllerContext.getStateControllerContext().createPageNavigationalState(true);
//
for (Iterator i = refreshedWindows.iterator(); i.hasNext() && !fullRefresh;)
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPageNavigationalState.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPageNavigationalState.java 2008-04-13 23:05:46 UTC (rev 10561)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPageNavigationalState.java 2008-04-13 23:11:33 UTC (rev 10562)
@@ -147,7 +147,6 @@
}
}
-
public Set<String> getWindowIds()
{
return controllerContext.getWindowNames();
@@ -243,6 +242,26 @@
return null;
}
+ public String getPublicNavigationalParameterId(String windowName, QName name)
+ {
+ PortletInfo info = controllerContext.getPortletInfo(windowName);
+
+ //
+ if (info != null)
+ {
+ for (ParameterInfo parameterInfo : info.getNavigation().getPublicParameters())
+ {
+ if (parameterInfo.getName().equals(name))
+ {
+ return parameterInfo.getId();
+ }
+ }
+ }
+
+ //
+ return null;
+ }
+
public void setPublicNavigationalState(String windowName, Map<String, String[]> update)
{
if (!mutable)
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPortletControllerContext.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPortletControllerContext.java 2008-04-13 23:05:46 UTC (rev 10561)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPortletControllerContext.java 2008-04-13 23:11:33 UTC (rev 10562)
@@ -25,7 +25,6 @@
import org.jboss.portal.portlet.controller.PortletControllerContext;
import org.jboss.portal.portlet.controller.event.EventControllerContext;
import org.jboss.portal.portlet.controller.state.PageNavigationalState;
-import org.jboss.portal.portlet.controller.state.StateControllerContext;
import org.jboss.portal.portlet.info.PortletInfo;
import org.jboss.portal.portlet.spi.PortletInvocationContext;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
@@ -38,13 +37,15 @@
import org.jboss.portal.core.model.portal.PortalObject;
import org.jboss.portal.core.model.portal.Window;
import org.jboss.portal.core.model.content.Content;
+import org.jboss.portal.core.model.content.spi.ContentProvider;
import org.jboss.portal.core.model.instance.InstanceContainer;
import org.jboss.portal.core.model.instance.Instance;
import org.jboss.portal.core.impl.model.content.portlet.PortletContent;
+import org.jboss.portal.core.impl.model.content.InternalContentProviderRegistry;
import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.core.controller.ControllerCommand;
import org.jboss.portal.core.navstate.NavigationalStateContext;
-import org.jboss.portal.common.NotYetImplemented;
+import org.jboss.portal.Mode;
import javax.servlet.http.Cookie;
import java.util.List;
@@ -98,28 +99,33 @@
Content content = window.getContent();
//
+ String instanceId;
if (content instanceof PortletContent)
{
PortletContent portletContent = (PortletContent)content;
+ instanceId = portletContent.getInstanceRef();
+ }
+ else
+ {
+ InternalContentProviderRegistry registry = controllerContext.getController().getContentProviderRegistry();
+ ContentProvider provider = registry.getContentProvider(window.getContentType());
+ instanceId = provider.getPortletInfo().getPortletName(Mode.VIEW);
+ }
- //
- String instanceRef = portletContent.getInstanceRef();
- Instance instance = instanceContainer.getDefinition(instanceRef);
-
- //
- if (instance != null)
+ //
+ Instance instance = instanceContainer.getDefinition(instanceId);
+ if (instance != null)
+ {
+ try
{
- try
- {
- Portlet portlet = instance.getPortlet();
- infos.put(window.getName(), portlet.getInfo());
- instances.put(window.getName(), instance);
- windows.put(window.getName(), window);
- }
- catch (PortletInvokerException ignore)
- {
- }
+ Portlet portlet = instance.getPortlet();
+ infos.put(window.getName(), portlet.getInfo());
+ instances.put(window.getName(), instance);
+ windows.put(window.getName(), window);
}
+ catch (PortletInvokerException ignore)
+ {
+ }
}
}
@@ -214,7 +220,7 @@
return eventControllerContext;
}
- public StateControllerContext getStateControllerContext()
+ public ControllerStateControllerContext getStateControllerContext()
{
return stateControllerContext;
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerStateControllerContext.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerStateControllerContext.java 2008-04-13 23:05:46 UTC (rev 10561)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerStateControllerContext.java 2008-04-13 23:11:33 UTC (rev 10562)
@@ -55,7 +55,7 @@
return new ControllerPageNavigationalState((ControllerPageNavigationalState)pageNavigationalState, mutable);
}
- public PageNavigationalState createPageNavigationalState(boolean mutable)
+ public ControllerPageNavigationalState createPageNavigationalState(boolean mutable)
{
return new ControllerPageNavigationalState(navigationalStateContext, controllerContext, mutable);
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/InternalContentProvider.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/InternalContentProvider.java 2008-04-13 23:05:46 UTC (rev 10561)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/InternalContentProvider.java 2008-04-13 23:11:33 UTC (rev 10562)
@@ -181,7 +181,6 @@
if (windowNS == null)
{
windowNS = new WindowNavigationalState(null, window.getInitialMode(), window.getInitialWindowState());
- rendererContext.setNavigationalState(windowNS);
}
//
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java 2008-04-13 23:05:46 UTC (rev 10561)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/generic/InternalGenericContentProvider.java 2008-04-13 23:11:33 UTC (rev 10562)
@@ -23,7 +23,9 @@
package org.jboss.portal.core.impl.model.content.generic;
import org.jboss.portal.Mode;
+import org.jboss.portal.identity.User;
import org.jboss.portal.common.i18n.LocalizedString;
+import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.core.impl.model.content.InternalContentProvider;
import org.jboss.portal.core.model.content.Content;
import org.jboss.portal.core.model.content.ContentType;
@@ -38,11 +40,19 @@
import org.jboss.portal.core.model.portal.command.response.MarkupResponse;
import org.jboss.portal.core.model.portal.content.WindowRendition;
import org.jboss.portal.core.model.portal.content.ContentRendererContext;
-import org.jboss.portal.portlet.ParametersStateString;
+import org.jboss.portal.core.CoreConstants;
+import org.jboss.portal.portlet.invocation.RenderInvocation;
import org.jboss.portal.portlet.controller.state.WindowNavigationalState;
+import org.jboss.portal.portlet.Portlet;
+import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.info.PortletInfo;
+import org.jboss.portal.portlet.info.NavigationInfo;
+import org.jboss.portal.portlet.info.ParameterInfo;
+import org.apache.log4j.Logger;
-import java.util.Iterator;
+import javax.xml.namespace.QName;
import java.util.Map;
+import java.util.Collections;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -52,6 +62,9 @@
{
/** . */
+ private static final Logger log = Logger.getLogger(InternalGenericContentProvider.class);
+
+ /** . */
protected InstanceContainer instanceContainer;
/** . */
@@ -149,13 +162,12 @@
{
}
- public WindowRendition renderWindow(ContentRendererContext rendererContext)
+ public WindowRendition renderWindow(final ContentRendererContext rendererContext)
{
Window window = rendererContext.getWindow();
- PortalObjectId windowId = window.getId();
// No content
- Content content = window.getContent();
+ final Content content = window.getContent();
if (content == null)
{
return null;
@@ -178,6 +190,7 @@
// }
//
+/*
if (navigationalState == null)
{
ParametersStateString state = ParametersStateString.create();
@@ -194,17 +207,86 @@
String uri = content.getURI();
state.setValue("uri", uri);
+ rendererContext
+
// Julien : to redo!!!!
// rendererContext.setNavigationalState(WindowNavigationalState.bilto(navigationalState, null, null, state));
}
+*/
+ ContentRendererContext rendererContext2 = new ContentRendererContext()
+ {
+ public Window getWindow()
+ {
+ return rendererContext.getWindow();
+ }
+
+ public WindowNavigationalState getNavigationalState()
+ {
+ return rendererContext.getNavigationalState();
+ }
+
+ public Map<String, String[]> getPublicNavigationalState()
+ {
+ return rendererContext.getPublicNavigationalState();
+ }
+
+ public User getUser()
+ {
+ return rendererContext.getUser();
+ }
+
+ public RenderInvocation createRenderInvocation(WindowNavigationalState navigationalState)
+ {
+ RenderInvocation invocation = rendererContext.createRenderInvocation(navigationalState);
+
+ //
+ if (invocation.getPublicNavigationalState() == null)
+ {
+
+ String id = null;
+
+ try
+ {
+ Instance instance = getPortletInstance(rendererContext);
+ Portlet portlet = instance.getPortlet();
+ PortletInfo portletInfo = portlet.getInfo();
+ NavigationInfo navigationInfo = portletInfo.getNavigation();
+
+ // todo : remove me when there is a getParameter(String id);
+ for (ParameterInfo parameterInfo : navigationInfo.getPublicParameters())
+ {
+ if (parameterInfo.getName().equals(CoreConstants.JBOSS_PORTAL_CONTENT_URI))
+ {
+ id = parameterInfo.getId();
+ }
+ }
+ }
+ catch (PortletInvokerException e)
+ {
+ log.error("Cannot read portlet instance public navigational info", e);
+ }
+
+ //
+ if (id != null)
+ {
+ ParameterMap tmp = ParameterMap.wrap(Collections.singletonMap(id, new String[]{content.getURI()}));
+ invocation.setPublicNavigationalState(tmp);
+ }
+ }
+
+ //
+ return invocation;
+ }
+ };
+
//
- WindowRendition rendition = super.renderWindow(rendererContext);
+ WindowRendition rendition = super.renderWindow(rendererContext2);
//
if (rendition != null && rendition.getControllerResponse() instanceof MarkupResponse && !getDecorateContent())
{
- Map props = rendition.getProperties();
+ Map<String, String> props = rendition.getProperties();
if (props.get("theme.windowRendererId") == null)
{
props.put("theme.windowRendererId", "emptyRenderer");
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java 2008-04-13 23:05:46 UTC (rev 10561)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java 2008-04-13 23:11:33 UTC (rev 10562)
@@ -34,6 +34,7 @@
import org.jboss.portal.core.model.portal.Window;
import org.jboss.portal.identity.User;
import org.jboss.portal.portlet.StateString;
+import org.jboss.portal.portlet.info.PortletInfo;
import org.jboss.portal.portlet.controller.request.PortletActionRequest;
import org.jboss.portal.portlet.controller.request.ContainerRequest;
import org.jboss.portal.portlet.controller.state.PageNavigationalState;
@@ -129,7 +130,7 @@
return context.getController().getCustomizationManager().getInstance(window, user);
}
- protected ContainerRequest createPortletRequest(PageNavigationalState pageNS, WindowNavigationalState windowNS)
+ protected ContainerRequest createPortletRequest(PortletInfo portletInfo, PageNavigationalState pageNS, WindowNavigationalState windowNS)
{
return new PortletActionRequest(
window.getName(),
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowRenderCommand.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowRenderCommand.java 2008-04-13 23:05:46 UTC (rev 10561)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowRenderCommand.java 2008-04-13 23:11:33 UTC (rev 10562)
@@ -27,14 +27,9 @@
import org.jboss.portal.common.util.ParameterMap;
import org.jboss.portal.core.controller.command.info.CommandInfo;
import org.jboss.portal.core.controller.command.info.ActionCommandInfo;
-import org.jboss.portal.core.controller.NoSuchResourceException;
import org.jboss.portal.core.model.portal.PortalObjectId;
-import org.jboss.portal.core.model.instance.Instance;
-import org.jboss.portal.core.impl.model.content.portlet.PortletContent;
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.ParametersStateString;
-import org.jboss.portal.portlet.PortletInvokerException;
-import org.jboss.portal.portlet.info.NavigationInfo;
import org.jboss.portal.portlet.info.PortletInfo;
import org.jboss.portal.portlet.info.ParameterInfo;
import org.jboss.portal.portlet.controller.request.PortletRenderRequest;
@@ -61,9 +56,6 @@
/** . */
private static final CommandInfo info = new ActionCommandInfo(true);
- /** . */
- protected NavigationInfo navigationInfo;
-
public InvokePortletWindowRenderCommand(
PortalObjectId windowId,
Mode mode,
@@ -88,32 +80,10 @@
return info;
}
- public void acquireResources() throws NoSuchResourceException
+ protected ContainerRequest createPortletRequest(
+ PortletInfo portletInfo, PageNavigationalState pageNS,
+ WindowNavigationalState windowNS)
{
- super.acquireResources();
-
- //
- try
- {
- PortletContent portletContent = (PortletContent)window.getContent();
- Instance instance = context.getController().getInstanceContainer().getDefinition(portletContent.getInstanceRef());
- PortletInfo info = instance.getPortlet().getInfo();
- navigationInfo = info.getNavigation();
- }
- catch (PortletInvokerException e)
- {
- log.error("Not able to get portlet meta data for window " + targetId, e);
-
- //
- if (target == null)
- {
- throw new NoSuchResourceException(targetId.toString());
- }
- }
- }
-
- protected ContainerRequest createPortletRequest(PageNavigationalState pageNS, WindowNavigationalState windowNS)
- {
Mode newMode = null;
WindowState newWindowState = null;
StateString newNavigationalState = null;
@@ -152,7 +122,7 @@
ParameterMap parameters = navigationalParameters.getParameters();
//
- for (ParameterInfo parameterInfo : navigationInfo.getPublicParameters())
+ for (ParameterInfo parameterInfo : portletInfo.getNavigation().getPublicParameters())
{
String key = parameterInfo.getId();
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowResourceCommand.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowResourceCommand.java 2008-04-13 23:05:46 UTC (rev 10561)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowResourceCommand.java 2008-04-13 23:11:33 UTC (rev 10562)
@@ -32,6 +32,7 @@
import org.jboss.portal.portlet.controller.state.WindowNavigationalState;
import org.jboss.portal.portlet.cache.CacheLevel;
import org.jboss.portal.portlet.StateString;
+import org.jboss.portal.portlet.info.PortletInfo;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
@@ -97,7 +98,7 @@
return info;
}
- protected ContainerRequest createPortletRequest(PageNavigationalState pageNS, WindowNavigationalState windowNS)
+ protected ContainerRequest createPortletRequest(PortletInfo portletInfo, PageNavigationalState pageNS, WindowNavigationalState windowNS)
{
PortletResourceRequest.Scope scope;
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokeWindowCommand.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokeWindowCommand.java 2008-04-13 23:05:46 UTC (rev 10561)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokeWindowCommand.java 2008-04-13 23:11:33 UTC (rev 10562)
@@ -30,6 +30,7 @@
import org.jboss.portal.portlet.controller.response.PortletResponse;
import org.jboss.portal.portlet.controller.response.ResourceResponse;
import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.info.PortletInfo;
import org.jboss.portal.core.model.portal.PortalObjectId;
import org.jboss.portal.core.model.portal.command.WindowCommand;
import org.jboss.portal.core.model.portal.command.response.UpdatePageResponse;
@@ -51,7 +52,10 @@
super(windowId);
}
- protected abstract ContainerRequest createPortletRequest(PageNavigationalState pageNS, WindowNavigationalState windowNS);
+ protected abstract ContainerRequest createPortletRequest(
+ PortletInfo portletInfo,
+ PageNavigationalState pageNS,
+ WindowNavigationalState windowNS);
public ControllerResponse execute() throws ControllerException
{
@@ -68,8 +72,10 @@
//
WindowNavigationalState windowNS = pageNS.getWindowNavigationalState(window.getName());
+ PortletInfo portletInfo = cpcc.getPortletInfo(window.getName());
+
//
- ContainerRequest containerRequest = createPortletRequest(pageNS, windowNS);
+ ContainerRequest containerRequest = createPortletRequest(portletInfo, pageNS, windowNS);
//
PortletController controller = new PortletController();
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderPageCommand.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderPageCommand.java 2008-04-13 23:05:46 UTC (rev 10561)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderPageCommand.java 2008-04-13 23:11:33 UTC (rev 10562)
@@ -148,7 +148,7 @@
//
ControllerPortletControllerContext portletControllerContext = new ControllerPortletControllerContext(context, page);
- PageNavigationalState pageNavigationalState = portletControllerContext.getStateControllerContext().createPageNavigationalState(true);
+ ControllerPageNavigationalState pageNavigationalState = portletControllerContext.getStateControllerContext().createPageNavigationalState(true);
// Determine theme
if (personalizable)
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderWindowCommand.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderWindowCommand.java 2008-04-13 23:05:46 UTC (rev 10561)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/render/RenderWindowCommand.java 2008-04-13 23:11:33 UTC (rev 10562)
@@ -28,6 +28,7 @@
import org.jboss.portal.core.controller.command.info.CommandInfo;
import org.jboss.portal.core.controller.command.info.ViewCommandInfo;
import org.jboss.portal.core.controller.portlet.PortletInvocationFactory;
+import org.jboss.portal.core.controller.portlet.ControllerPageNavigationalState;
import org.jboss.portal.core.model.content.ContentType;
import org.jboss.portal.core.model.portal.PortalObjectId;
import org.jboss.portal.core.model.portal.command.WindowCommand;
@@ -41,6 +42,7 @@
import org.jboss.portal.portlet.controller.state.PageNavigationalState;
import org.jboss.portal.portlet.controller.state.WindowNavigationalState;
+import javax.xml.namespace.QName;
import java.util.Map;
/**
@@ -57,9 +59,9 @@
private WindowRendition rendition;
/** . */
- private PageNavigationalState pageNavigationalState;
+ private ControllerPageNavigationalState pageNavigationalState;
- public RenderWindowCommand(PageNavigationalState pageNavigationalState, PortalObjectId windowId) throws IllegalArgumentException
+ public RenderWindowCommand(ControllerPageNavigationalState pageNavigationalState, PortalObjectId windowId) throws IllegalArgumentException
{
super(windowId);
@@ -119,13 +121,6 @@
return pageNavigationalState.getWindowNavigationalState(window.getName());
}
- public void setNavigationalState(WindowNavigationalState navigationalState)
- {
- pageNavigationalState.setWindowNavigationalState(window.getName(), navigationalState);
-
- // probably call flush
- }
-
public User getUser()
{
return context.getUser();
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/content/ContentRendererContext.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/content/ContentRendererContext.java 2008-04-13 23:05:46 UTC (rev 10561)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/content/ContentRendererContext.java 2008-04-13 23:11:33 UTC (rev 10562)
@@ -27,6 +27,7 @@
import org.jboss.portal.portlet.invocation.RenderInvocation;
import org.jboss.portal.portlet.controller.state.WindowNavigationalState;
+import javax.xml.namespace.QName;
import java.util.Map;
/**
@@ -42,8 +43,6 @@
WindowNavigationalState getNavigationalState();
- void setNavigationalState(WindowNavigationalState navigationalState);
-
Map<String, String[]> getPublicNavigationalState();
User getUser();
Modified: branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/META-INF/jboss-service.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/META-INF/jboss-service.xml 2008-04-13 23:05:46 UTC (rev 10561)
+++ branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-sar/META-INF/jboss-service.xml 2008-04-13 23:11:33 UTC (rev 10562)
@@ -923,28 +923,17 @@
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
<depends optional-attribute-name="PageService" proxy-type="attribute">portal:service=PageService</depends>
- <depends optional-attribute-name="CommandFactory" proxy-type="attribute">portal:commandFactory=DefaultPortal
- </depends>
+ <depends optional-attribute-name="CommandFactory" proxy-type="attribute">portal:commandFactory=DefaultPortal</depends>
<depends optional-attribute-name="URLFactory" proxy-type="attribute">portal:urlFactory=Delegating</depends>
- <depends optional-attribute-name="StackFactory" proxy-type="attribute">
- portal:service=InterceptorStackFactory,type=Command
- </depends>
- <depends optional-attribute-name="PortalObjectContainer" proxy-type="attribute">portal:container=PortalObject
- </depends>
+ <depends optional-attribute-name="StackFactory" proxy-type="attribute">portal:service=InterceptorStackFactory,type=Command</depends>
+ <depends optional-attribute-name="PortalObjectContainer" proxy-type="attribute">portal:container=PortalObject</depends>
<depends optional-attribute-name="InstanceContainer" proxy-type="attribute">portal:container=Instance</depends>
- <depends optional-attribute-name="PortalAuthorizationManagerFactory" proxy-type="attribute">
- portal:service=PortalAuthorizationManagerFactory
- </depends>
- <depends optional-attribute-name="CustomizationManager" proxy-type="attribute">portal:service=CustomizationManager
- </depends>
- <depends optional-attribute-name="ContentRendererRegistry" proxy-type="attribute">
- portal:service=ContentProviderRegistry
- </depends>
- <depends optional-attribute-name="ResponseHandler" proxy-type="attribute">
- portal:service=ResponseHandler,type=Selector
- </depends>
- <depends optional-attribute-name="PageControlPolicy" proxy-type="attribute">portal:service=ControlPolicy,type=Page
- </depends>
+ <depends optional-attribute-name="PortalAuthorizationManagerFactory" proxy-type="attribute">portal:service=PortalAuthorizationManagerFactory</depends>
+ <depends optional-attribute-name="CustomizationManager" proxy-type="attribute">portal:service=CustomizationManager</depends>
+ <depends optional-attribute-name="ContentRendererRegistry" proxy-type="attribute">portal:service=ContentProviderRegistry</depends>
+ <depends optional-attribute-name="ResponseHandler" proxy-type="attribute">portal:service=ResponseHandler,type=Selector</depends>
+ <depends optional-attribute-name="PageControlPolicy" proxy-type="attribute">portal:service=ControlPolicy,type=Page</depends>
+ <depends optional-attribute-name="ContentProviderRegistry" proxy-type="attribute">portal:service=ContentProviderRegistry</depends>
</mbean>
<!-- The controller factory -->
Modified: branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/portlet.xml 2008-04-13 23:05:46 UTC (rev 10561)
+++ branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/portlet.xml 2008-04-13 23:11:33 UTC (rev 10562)
@@ -28,19 +28,6 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
version="2.0">
- <filter>
- <filter-name>JBoss Portlet Filter</filter-name>
- <filter-class>org.jboss.portlet.filter.JBossPortletFilter</filter-class>
- <lifecycle>ACTION_PHASE</lifecycle>
- <lifecycle>RENDER_PHASE</lifecycle>
- </filter>
-
- <filter-mapping>
- <filter-name>JBoss Portlet Filter</filter-name>
- <portlet-name>CMSPortlet</portlet-name>
- <portlet-name>CMSAdminPortlet</portlet-name>
- </filter-mapping>
-
<portlet>
<description>Content Management System Portlet</description>
<portlet-name>CMSPortlet</portlet-name>
@@ -65,7 +52,9 @@
<value>/default/index.html</value>
</preference>
</portlet-preferences>
+ <supported-public-render-parameter>uri</supported-public-render-parameter>
</portlet>
+
<portlet>
<description>Administration Portlet for CMS</description>
<portlet-name>CMSAdminPortlet</portlet-name>
@@ -103,4 +92,22 @@
</portlet-info>
</portlet-->
+ <filter>
+ <filter-name>JBoss Portlet Filter</filter-name>
+ <filter-class>org.jboss.portlet.filter.JBossPortletFilter</filter-class>
+ <lifecycle>ACTION_PHASE</lifecycle>
+ <lifecycle>RENDER_PHASE</lifecycle>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>JBoss Portlet Filter</filter-name>
+ <portlet-name>CMSPortlet</portlet-name>
+ <portlet-name>CMSAdminPortlet</portlet-name>
+ </filter-mapping>
+
+ <public-render-parameter>
+ <identifier>uri</identifier>
+ <qname xmlns:c="urn:jboss:portal:content">c:uri</qname>
+ </public-render-parameter>
+
</portlet-app>
Modified: branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-basic-samples-war/WEB-INF/default-object.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-basic-samples-war/WEB-INF/default-object.xml 2008-04-13 23:05:46 UTC (rev 10561)
+++ branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-basic-samples-war/WEB-INF/default-object.xml 2008-04-13 23:11:33 UTC (rev 10562)
@@ -344,6 +344,18 @@
<height>1</height>
</window>
</page>
+ <page>
+ <page-name>file system content</page-name>
+ <window>
+ <window-name>FSWindow</window-name>
+ <content>
+ <content-type>filesystem</content-type>
+ <content-uri>/dir1/bar.txt</content-uri>
+ </content>
+ <region>left</region>
+ <height>0</height>
+ </window>
+ </page>
</page>
</deployment>
<deployment>
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-04-13 23:05:46 UTC (rev 10561)
+++ branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-basic-samples-war/WEB-INF/portlet.xml 2008-04-13 23:11:33 UTC (rev 10562)
@@ -310,6 +310,7 @@
<title>File Portlet</title>
<keywords>sample,test</keywords>
</portlet-info>
+ <supported-public-render-parameter>uri</supported-public-render-parameter>
</portlet>
<portlet>
<description>File Upload Portlet</description>
@@ -413,6 +414,11 @@
<identifier>juu</identifier>
</public-render-parameter>
+ <public-render-parameter>
+ <identifier>uri</identifier>
+ <qname xmlns:c="urn:jboss:portal:content">c:uri</qname>
+ </public-render-parameter>
+
<!--
<custom-portlet-mode>
<name>ADMIN</name>
18 years
JBoss Portal SVN: r10561 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-04-13 19:05:46 -0400 (Sun, 13 Apr 2008)
New Revision: 10561
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/migration.xml
Log:
fixing spelling mistake, shouldf :(
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/migration.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/migration.xml 2008-04-13 20:21:33 UTC (rev 10560)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/migration.xml 2008-04-13 23:05:46 UTC (rev 10561)
@@ -63,7 +63,7 @@
</mediaobject>
</para>
<para>
- If you use a default theme that exists in JBoss Portal 2.6, such as renaissance, no configuration shouldf be necessary. Using old themes from JBoss Portal 2.4 may make JBoss Portal 2.6 unusable, for example, not being able to log in. To update custom themes, please refer to those bundled with JBoss Portal as an example.
+ If you use a default theme that exists in JBoss Portal 2.6, such as renaissance, no configuration should be necessary. Using old themes from JBoss Portal 2.4 may make JBoss Portal 2.6 unusable, for example, not being able to log in. To update custom themes, please refer to those bundled with JBoss Portal as an example.
</para>
</sect2>
<sect2 id="upgrade_portal_database">
18 years
JBoss Portal SVN: r10560 - in branches/JBoss_Portal_Branch_2_7: core/src/main/org/jboss/portlet and 1 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-04-13 16:21:33 -0400 (Sun, 13 Apr 2008)
New Revision: 10560
Added:
branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-portlet-samples-war/WEB-INF/jboss-portlet.xml
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/portlet-instances.xml
branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-portlet-samples-war/WEB-INF/portlet.xml
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPortletControllerContext.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/portlet/JBossPortlet.java
Log:
implicit event handling
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPortletControllerContext.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPortletControllerContext.java 2008-04-13 19:41:19 UTC (rev 10559)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPortletControllerContext.java 2008-04-13 20:21:33 UTC (rev 10560)
@@ -128,7 +128,7 @@
//
this.stateControllerContext = new ControllerStateControllerContext(nsContext, this);
- this.eventControllerContext = new CoreEventControllerContext();
+ this.eventControllerContext = new CoreEventControllerContext(this);
this.controllerContext = controllerContext;
this.windows = windows;
this.infos = infos;
@@ -178,9 +178,21 @@
return instance.invoke(actionInvocation);
}
+ /**
+ * todo : handle cookies redistribution
+ */
public PortletInvocationResponse invoke(List<Cookie> cookies, EventInvocation eventInvocation) throws PortletInvokerException
{
- throw new NotYetImplemented();
+ PortletInvocationFactory.contextualize(eventInvocation);
+
+ //
+ Window window = PortletInvocationFactory.getTargetWindow(eventInvocation);
+
+ //
+ Instance instance = instances.get(window.getName());
+
+ //
+ return instance.invoke(eventInvocation);
}
public PortletInvocationResponse invoke(ResourceInvocation resourceInvocation) throws PortletInvokerException
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-04-13 19:41:19 UTC (rev 10559)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/CoreEventControllerContext.java 2008-04-13 20:21:33 UTC (rev 10560)
@@ -26,7 +26,8 @@
import org.jboss.portal.portlet.controller.event.EventPhaseContext;
import org.jboss.portal.portlet.controller.event.Event;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
-import org.jboss.portal.common.NotYetImplemented;
+import org.jboss.portal.portlet.info.PortletInfo;
+import org.apache.log4j.Logger;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
@@ -34,23 +35,53 @@
*/
public class CoreEventControllerContext implements EventControllerContext
{
- public void eventProduced(EventPhaseContext eventPhaseContext, Event event, Event event1)
+
+ /** . */
+ private final Logger log = Logger.getLogger(CoreEventControllerContext.class);
+
+ /** . */
+ private final ControllerPortletControllerContext portletControllerContext;
+
+ public CoreEventControllerContext(ControllerPortletControllerContext portletControllerContext)
{
- throw new NotYetImplemented();
+ this.portletControllerContext = portletControllerContext;
}
- public void eventConsumed(EventPhaseContext eventPhaseContext, Event event, PortletInvocationResponse portletInvocationResponse)
+ public void eventProduced(EventPhaseContext context, Event producedEvent, Event sourceEvent)
{
- throw new NotYetImplemented();
+ try
+ {
+ for (String windowName : portletControllerContext.getWindowNames())
+ {
+ PortletInfo info = portletControllerContext.getPortletInfo(windowName);
+
+ //
+ if (info.getEventing().getConsumedEvents().containsKey(producedEvent.getName()))
+ {
+ Event distributedEvent = new Event(producedEvent.getName(), producedEvent.getPayload(), windowName);
+ context.queueEvent(distributedEvent);
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ log.error("An error occured when an event was routed", e);
+
+ //
+ context.interrupt();
+ }
}
- public void eventFailed(EventPhaseContext eventPhaseContext, Event event, Throwable throwable)
+ public void eventConsumed(EventPhaseContext context, Event consumedEvent, PortletInvocationResponse consumerResponse)
{
- throw new NotYetImplemented();
}
- public void eventDiscarded(EventPhaseContext eventPhaseContext, Event event, int i)
+ public void eventFailed(EventPhaseContext context, Event failedEvent, Throwable throwable)
{
- throw new NotYetImplemented();
+ log.error("Could not deliver event " + failedEvent.getName() + " to portlet window " + failedEvent.getWindowId(), throwable);
}
+
+ public void eventDiscarded(EventPhaseContext context, Event discardedEvent, int cause)
+ {
+ }
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossPortlet.java 2008-04-13 19:41:19 UTC (rev 10559)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossPortlet.java 2008-04-13 20:21:33 UTC (rev 10560)
@@ -386,11 +386,11 @@
public void render(RenderRequest req, RenderResponse resp) throws PortletException, PortletSecurityException, IOException
{
- try
+ if (req instanceof JBossRenderRequest && resp instanceof JBossRenderResponse)
{
render((JBossRenderRequest)req, (JBossRenderResponse)resp);
}
- catch (ClassCastException e)
+ else
{
throw new PortletException("The request isn't a JBossRenderRequest, you probably need to activate the JBoss Portlet Filter: org.jboss.portlet.filter.JBossPortletFilter on " + getPortletName());
}
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-04-13 19:41:19 UTC (rev 10559)
+++ branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-portlet-samples-war/WEB-INF/default-object.xml 2008-04-13 20:21:33 UTC (rev 10560)
@@ -43,6 +43,19 @@
</properties>
-->
<window>
+ <window-name>RemoteControlPortletWindow</window-name>
+ <instance-ref>RemoteControlPortletInstance</instance-ref>
+ <region>left</region>
+ <height>0</height>
+ </window>
+ <window>
+ <window-name>ShoppingCartPortletWindow</window-name>
+ <instance-ref>ShoppingCartPortletInstance</instance-ref>
+ <region>left</region>
+ <height>1</height>
+ </window>
+
+ <window>
<window-name>GoogleMapPortletWindow</window-name>
<instance-ref>GoogleMapPortletInstance</instance-ref>
<region>center</region>
@@ -67,8 +80,8 @@
<height>4</height>
</window>
<window>
- <window-name>RemoteControlPortletWindow</window-name>
- <instance-ref>RemoteControlPortletInstance</instance-ref>
+ <window-name>ShoppingCatalogPortletWindow</window-name>
+ <instance-ref>ShoppingCatalogPortletInstance</instance-ref>
<region>center</region>
<height>5</height>
</window>
Added: branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-portlet-samples-war/WEB-INF/jboss-portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-portlet-samples-war/WEB-INF/jboss-portlet.xml (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-portlet-samples-war/WEB-INF/jboss-portlet.xml 2008-04-13 20:21:33 UTC (rev 10560)
@@ -0,0 +1,31 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE portlet-app PUBLIC
+ "-//JBoss Portal//DTD JBoss Portlet 2.6//EN"
+ "http://www.jboss.org/portal/dtd/jboss-portlet_2_6.dtd">
+
+<portlet-app>
+ <app-id>portlet-samples</app-id>
+ <remotable>false</remotable>
+</portlet-app>
Modified: branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-portlet-samples-war/WEB-INF/portlet-instances.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-portlet-samples-war/WEB-INF/portlet-instances.xml 2008-04-13 19:41:19 UTC (rev 10559)
+++ branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-portlet-samples-war/WEB-INF/portlet-instances.xml 2008-04-13 20:21:33 UTC (rev 10560)
@@ -43,9 +43,23 @@
</deployment>
<deployment>
<instance>
- <display-name xml:lang="en">Remote Controler</display-name>
+ <display-name xml:lang="en">Remote Controller</display-name>
<instance-id>RemoteControlPortletInstance</instance-id>
<portlet-ref>RemoteControl</portlet-ref>
</instance>
</deployment>
+ <deployment>
+ <instance>
+ <display-name xml:lang="en">Catalog Portlet</display-name>
+ <instance-id>ShoppingCatalogPortletInstance</instance-id>
+ <portlet-ref>ShoppingCatalog</portlet-ref>
+ </instance>
+ </deployment>
+ <deployment>
+ <instance>
+ <display-name xml:lang="en">Cart Portlet</display-name>
+ <instance-id>ShoppingCartPortletInstance</instance-id>
+ <portlet-ref>ShoppingCart</portlet-ref>
+ </instance>
+ </deployment>
</deployments>
\ No newline at end of file
Modified: branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-portlet-samples-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-portlet-samples-war/WEB-INF/portlet.xml 2008-04-13 19:41:19 UTC (rev 10559)
+++ branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-portlet-samples-war/WEB-INF/portlet.xml 2008-04-13 20:21:33 UTC (rev 10560)
@@ -76,9 +76,9 @@
</portlet>
<portlet>
- <description>Catalog Portlet</description>
- <portlet-name>Catalog</portlet-name>
- <display-name>Catalog Portlet</display-name>
+ <description>Shopping Catalog Portlet</description>
+ <portlet-name>ShoppingCatalog</portlet-name>
+ <display-name>Shopping Catalog Portlet</display-name>
<portlet-class>org.jboss.portal.portlet.samples.shoppingcart.CatalogPortlet</portlet-class>
<supports>
<mime-type>text/html</mime-type>
@@ -117,9 +117,9 @@
</portlet>
<portlet>
- <description>Cart Portlet</description>
- <portlet-name>Cart</portlet-name>
- <display-name>Cart Portlet</display-name>
+ <description>Shopping Cart Portlet</description>
+ <portlet-name>ShoppingCart</portlet-name>
+ <display-name>Shopping Cart Portlet</display-name>
<portlet-class>org.jboss.portal.portlet.samples.shoppingcart.CartPortlet</portlet-class>
<supports>
<mime-type>text/html</mime-type>
18 years
JBoss Portal SVN: r10559 - in branches/JBoss_Portal_Branch_2_7: core-samples/src/main/org/jboss/portal/core/samples/basic and 1 other directory.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-04-13 15:41:19 -0400 (Sun, 13 Apr 2008)
New Revision: 10559
Modified:
branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/basic/PublicParametersPortlet.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java
Log:
- bug fix
- update public parameter portlet to test public render parameter removal from a render URL
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java 2008-04-13 17:51:14 UTC (rev 10558)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java 2008-04-13 19:41:19 UTC (rev 10559)
@@ -395,7 +395,7 @@
String[] value = publicChanges.get(name);
//
- if (value.length == 0)
+ if (value != null && value.length == 0)
{
continue;
}
Modified: branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/basic/PublicParametersPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/basic/PublicParametersPortlet.java 2008-04-13 17:51:14 UTC (rev 10558)
+++ branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/basic/PublicParametersPortlet.java 2008-04-13 19:41:19 UTC (rev 10559)
@@ -30,6 +30,8 @@
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
import javax.portlet.PortletURL;
+import javax.portlet.GenericPortlet;
+import javax.portlet.ProcessAction;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Enumeration;
@@ -39,20 +41,15 @@
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
* @version $Revision: 630 $
*/
-public class PublicParametersPortlet implements Portlet
+public class PublicParametersPortlet extends GenericPortlet
{
- /** . */
- private PortletConfig config;
-
- public void init(PortletConfig config) throws PortletException
+ @ProcessAction(name="update")
+ public void update(ActionRequest req, ActionResponse resp) throws PortletException, IOException
{
- this.config = config;
- }
-
- public void processAction(ActionRequest req, ActionResponse resp) throws PortletException, IOException
- {
Map<String, String[]> publicParameters = req.getPublicParameterMap();
+
+ //
for (Map.Entry<String, String[]> actionParameter : req.getPrivateParameterMap().entrySet())
{
String parameterName = actionParameter.getKey();
@@ -76,14 +73,15 @@
public void render(RenderRequest req, RenderResponse resp) throws PortletException, IOException
{
-
- PrintWriter writer = resp.getWriter();
-
PortletURL actionURL = resp.createActionURL();
+ actionURL.setParameter(ActionRequest.ACTION_NAME, "update");
+ //
+ PrintWriter writer = resp.getWriter();
writer.print("<form action=\"" + actionURL + "\" method=\"POST\"><table>");
- for (Enumeration<String> e = config.getPublicRenderParameterNames();e.hasMoreElements();)
+ //
+ for (Enumeration<String> e = getPortletConfig().getPublicRenderParameterNames();e.hasMoreElements();)
{
String parameterName = e.nextElement();
@@ -96,6 +94,11 @@
if (parameterValue != null)
{
writer.print("<input type=\"text\" name=\"" + parameterName + "\" width=\"36\" value=\"" + parameterValue + "\"/>");
+
+ //
+ PortletURL renderURL = resp.createRenderURL();
+ renderURL.removePublicRenderParameter(parameterName);
+ writer.println("<a href=\"" + renderURL + "\">Remove</>");
}
else
{
@@ -114,9 +117,4 @@
//
writer.close();
}
-
- public void destroy()
- {
- this.config = null;
- }
}
18 years
JBoss Portal SVN: r10558 - in branches/JBoss_Portal_Branch_2_7: core-samples/src/main/org/jboss/portal/core/samples/basic and 1 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-04-13 13:51:14 -0400 (Sun, 13 Apr 2008)
New Revision: 10558
Modified:
branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/basic/PublicParametersPortlet.java
branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-basic-samples-war/WEB-INF/default-object.xml
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPageNavigationalState.java
Log:
fine tune the public render parameter sample still need to add demonstration using render url
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPageNavigationalState.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPageNavigationalState.java 2008-04-13 17:33:04 UTC (rev 10557)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/ControllerPageNavigationalState.java 2008-04-13 17:51:14 UTC (rev 10558)
@@ -344,9 +344,12 @@
}
//
- if (pageUpdates != null)
+ if (pageUpdates == null)
{
- pageUpdates.put(name, REMOVAL);
+ pageUpdates = new HashMap<QName, String[]>();
}
+
+ //
+ pageUpdates.put(name, REMOVAL);
}
}
Modified: branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/basic/PublicParametersPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/basic/PublicParametersPortlet.java 2008-04-13 17:33:04 UTC (rev 10557)
+++ branches/JBoss_Portal_Branch_2_7/core-samples/src/main/org/jboss/portal/core/samples/basic/PublicParametersPortlet.java 2008-04-13 17:51:14 UTC (rev 10558)
@@ -62,7 +62,7 @@
//
if (parameterValue.length() > 0)
{
- if (publicValues == null && !publicValues[0].equals(parameterValue))
+ if (publicValues == null || !publicValues[0].equals(parameterValue))
{
resp.setRenderParameter(parameterName, parameterValue);
}
@@ -95,11 +95,11 @@
if (parameterValue != null)
{
- writer.print("<input type=\"text\" width=\"36\" value=\"" + parameterValue + "\"/>");
+ writer.print("<input type=\"text\" name=\"" + parameterName + "\" width=\"36\" value=\"" + parameterValue + "\"/>");
}
else
{
- writer.print("<input type=\"text\" width=\"36\" value=\"\"/>");
+ writer.print("<input type=\"text\" name=\"" + parameterName + "\" width=\"36\" value=\"\"/>");
}
writer.println();
Modified: branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-basic-samples-war/WEB-INF/default-object.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-basic-samples-war/WEB-INF/default-object.xml 2008-04-13 17:33:04 UTC (rev 10557)
+++ branches/JBoss_Portal_Branch_2_7/core-samples/src/resources/portal-basic-samples-war/WEB-INF/default-object.xml 2008-04-13 17:51:14 UTC (rev 10558)
@@ -323,6 +323,27 @@
<height>0</height>
</window>
</page>
+ <page>
+ <page-name>public parameters test</page-name>
+ <window>
+ <window-name>PublicParametersPortletWindow1</window-name>
+ <instance-ref>PublicParametersPortletInstance1</instance-ref>
+ <region>left</region>
+ <height>0</height>
+ </window>
+ <window>
+ <window-name>PublicParametersPortletWindow2</window-name>
+ <instance-ref>PublicParametersPortletInstance2</instance-ref>
+ <region>center</region>
+ <height>0</height>
+ </window>
+ <window>
+ <window-name>PublicParametersPortletWindow3</window-name>
+ <instance-ref>PublicParametersPortletInstance3</instance-ref>
+ <region>center</region>
+ <height>1</height>
+ </window>
+ </page>
</page>
</deployment>
<deployment>
18 years