Author: smumford
Date: 2010-02-14 20:20:35 -0500 (Sun, 14 Feb 2010)
New Revision: 1674
Modified:
portal/trunk/docs/reference-guide/en/modules/Configuration.xml
portal/trunk/docs/reference-guide/en/modules/Development.xml
portal/trunk/docs/reference-guide/en/modules/Gadgets.xml
portal/trunk/docs/reference-guide/en/modules/Integration.xml
portal/trunk/docs/reference-guide/en/modules/Introduction.xml
portal/trunk/docs/reference-guide/en/modules/Portlets.xml
portal/trunk/docs/reference-guide/en/modules/SSO.xml
portal/trunk/docs/reference-guide/en/modules/configuration/Authentication_Token_Configuration.xml
portal/trunk/docs/reference-guide/en/modules/configuration/Dashboard_Configuration.xml
portal/trunk/docs/reference-guide/en/modules/configuration/Data_Injector_Configuration.xml
portal/trunk/docs/reference-guide/en/modules/configuration/Database_Configuration.xml
portal/trunk/docs/reference-guide/en/modules/configuration/Default_Portal_Configuration.xml
portal/trunk/docs/reference-guide/en/modules/configuration/IDM_Configuration.xml
portal/trunk/docs/reference-guide/en/modules/configuration/JavaScript_Configuration.xml
portal/trunk/docs/reference-guide/en/modules/configuration/Portal_Default_Permission_Configuration.xml
portal/trunk/docs/reference-guide/en/modules/configuration/Portal_Navigation_Configuration.xml
portal/trunk/docs/reference-guide/en/modules/configuration/Predefined_User_Configuration.xml
portal/trunk/docs/reference-guide/en/modules/configuration/Skin_Configuration.xml
portal/trunk/docs/reference-guide/en/modules/development/Accessing_User_Profile.xml
portal/trunk/docs/reference-guide/en/modules/development/Ajax_Loading_Mask_Layer_Deactivation.xml
portal/trunk/docs/reference-guide/en/modules/development/Dynamic_Layouts.xml
portal/trunk/docs/reference-guide/en/modules/development/Internationalization_Configuration.xml
portal/trunk/docs/reference-guide/en/modules/development/JavaScript_Inter_Application_Communication.xml
portal/trunk/docs/reference-guide/en/modules/development/Portal_Lifecycle.xml
portal/trunk/docs/reference-guide/en/modules/development/Right_To_Left_Framework.xml
portal/trunk/docs/reference-guide/en/modules/development/Upload_Component.xml
portal/trunk/docs/reference-guide/en/modules/development/XML_Resource_Bundles.xml
portal/trunk/docs/reference-guide/en/modules/gadgets/Gadgets.xml
portal/trunk/docs/reference-guide/en/modules/gadgets/Setup_a_Gadget_Server.xml
portal/trunk/docs/reference-guide/en/modules/portlets/AJAX_in_GateIn_Framework.xml
portal/trunk/docs/reference-guide/en/modules/portlets/Create_a_WebUI_Portlet.xml
portal/trunk/docs/reference-guide/en/modules/portlets/Groovy_Templates.xml
portal/trunk/docs/reference-guide/en/modules/portlets/Portlet_Lifecycle.xml
portal/trunk/docs/reference-guide/en/modules/portlets/Standard.xml
portal/trunk/docs/reference-guide/en/modules/portlets/WebUI.xml
Log:
commit clean sect ids
Modified: portal/trunk/docs/reference-guide/en/modules/Configuration.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/Configuration.xml 2010-02-15 01:19:14 UTC
(rev 1673)
+++ portal/trunk/docs/reference-guide/en/modules/Configuration.xml 2010-02-15 01:20:35 UTC
(rev 1674)
@@ -1,7 +1,5 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<chapter id="chap-Reference_Guide-Configuration">
<title>Configuration</title>
@@ -10,11 +8,9 @@
<xi:include href="configuration/Portal_Navigation_Configuration.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="configuration/Predefined_User_Configuration.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include
href="configuration/Portal_Default_Permission_Configuration.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
- <!-- Kernel/Service_Configuration_for_Beginners --><!--
Kernel/Service_Configuration_in_Detail -->
- <xi:include href="configuration/Database_Configuration.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <!-- Kernel/Service_Configuration_for_Beginners --><!--
Kernel/Service_Configuration_in_Detail --><xi:include
href="configuration/Database_Configuration.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="configuration/Data_Injector_Configuration.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
- <!-- Core/LDAP_Configuration -->
- <xi:include href="configuration/Skin_Configuration.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <!-- Core/LDAP_Configuration --><xi:include
href="configuration/Skin_Configuration.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="configuration/JavaScript_Configuration.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="configuration/Dashboard_Configuration.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="configuration/Authentication_Token_Configuration.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
Modified: portal/trunk/docs/reference-guide/en/modules/Development.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/Development.xml 2010-02-15 01:19:14 UTC
(rev 1673)
+++ portal/trunk/docs/reference-guide/en/modules/Development.xml 2010-02-15 01:20:35 UTC
(rev 1674)
@@ -1,7 +1,5 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<chapter id="chap-Reference_Guide-Development">
<title>Development</title>
Modified: portal/trunk/docs/reference-guide/en/modules/Gadgets.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/Gadgets.xml 2010-02-15 01:19:14 UTC (rev
1673)
+++ portal/trunk/docs/reference-guide/en/modules/Gadgets.xml 2010-02-15 01:20:35 UTC (rev
1674)
@@ -1,10 +1,8 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<chapter id="chap-Reference_Guide-Gadget_development">
- <!--
+ <!--
Copyright (C) 2009 eXo Platform SAS.
@@ -23,7 +21,7 @@
Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- --><title>Gadget development</title>
+ --><title>Gadget development</title>
<xi:include href="gadgets/Gadgets.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="gadgets/Setup_a_Gadget_Server.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
</chapter>
Modified: portal/trunk/docs/reference-guide/en/modules/Integration.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/Integration.xml 2010-02-15 01:19:14 UTC
(rev 1673)
+++ portal/trunk/docs/reference-guide/en/modules/Integration.xml 2010-02-15 01:20:35 UTC
(rev 1674)
@@ -1,10 +1,8 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<chapter id="chap-Reference_Guide-Integration">
- <!--
+ <!--
Copyright (C) 2009 eXo Platform SAS.
@@ -23,16 +21,16 @@
Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- --><title>Integration</title>
+ --><title>Integration</title>
<para>
Stuff Goes Here?
</para>
- <!--
+ <!--
<xi:include
xmlns:xi="http://www.w3.org/2001/XInclude"
href="integration/Use_an_Existing_Portlet_Application.xml" />
<xi:include
xmlns:xi="http://www.w3.org/2001/XInclude"
href="integration/Package_Gadgets.xml" />
<xi:include
xmlns:xi="http://www.w3.org/2001/XInclude"
href="integration/JSF1_2_JBossPortletBridge_Richfaces.xml" />
<xi:include
xmlns:xi="http://www.w3.org/2001/XInclude"
href="integration/JSF1_1_MyFaces_Spring.xml" />
<xi:include
xmlns:xi="http://www.w3.org/2001/XInclude"
href="integration/Changing_GateIn_URL.xml" />
- -->
+ -->
</chapter>
Modified: portal/trunk/docs/reference-guide/en/modules/Introduction.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/Introduction.xml 2010-02-15 01:19:14 UTC
(rev 1673)
+++ portal/trunk/docs/reference-guide/en/modules/Introduction.xml 2010-02-15 01:20:35 UTC
(rev 1674)
@@ -1,10 +1,8 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<chapter id="chap-Reference_Guide-Introduction">
- <!--
+ <!--
Copyright (C) 2009 eXo Platform SAS.
@@ -23,7 +21,7 @@
Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- --><title>Introduction</title>
+ --><title>Introduction</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/Frontpage.png" format="PNG"
scalefit="1" width="444" />
@@ -45,7 +43,7 @@
Further documentation about the Red Hat &PRODUCT; and other Red Hat products can
be found at <ulink type="http"
url="www.redhat.com/docs" />
</para>
</listitem>
- <!-- <listitem>
+ <!-- <listitem>
<para>
GateIn videos: <ulink
url="http://www.jboss.org/gatein/videos.html">www.jboss.org/...
</para>
@@ -59,7 +57,7 @@
<para>
GateIn downloads: <ulink
url="http://www.jboss.org/gatein/downloads.html">www.jboss.o...
</para>
- </listitem> -->
+ </listitem> -->
</itemizedlist>
</section>
Modified: portal/trunk/docs/reference-guide/en/modules/Portlets.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/Portlets.xml 2010-02-15 01:19:14 UTC (rev
1673)
+++ portal/trunk/docs/reference-guide/en/modules/Portlets.xml 2010-02-15 01:20:35 UTC (rev
1674)
@@ -1,7 +1,5 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<chapter id="chap-Reference_Guide-Portlet_development">
<title>Portlet development</title>
@@ -10,6 +8,6 @@
<xi:include href="portlets/Groovy_Templates.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="portlets/Portlet_Lifecycle.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="portlets/Standard.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
-<!-- Unedited pending new example --> <xi:include
href="portlets/Create_a_WebUI_Portlet.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <!-- Unedited pending new example --> <xi:include
href="portlets/Create_a_WebUI_Portlet.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
</chapter>
Modified: portal/trunk/docs/reference-guide/en/modules/SSO.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/SSO.xml 2010-02-15 01:19:14 UTC (rev
1673)
+++ portal/trunk/docs/reference-guide/en/modules/SSO.xml 2010-02-15 01:20:35 UTC (rev
1674)
@@ -1,740 +1,640 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../Reference_Guide.ent">
-%BOOK_ENTITIES;
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
]>
-<chapter>
+<chapter id="chap-Reference_Guide-Single_Sign_On">
<title>Single Sign On</title>
-
- <section>
+ <section id="sect-Reference_Guide-Single_Sign_On-Overview_of_SSO">
<title>Overview of SSO</title>
-
- <para>Portal as an integration and aggregation platform provides
- some form
- of SSO by itself. When you log into the portal you gain
- access to many
- systems through portlets using a single identity. Still
- in many cases
- you
- need to integrate the portal infrastructure with
- other SSO enabled
- systems. There are many different Identity
- Management solutions on
- the
- market. In most cases each SSO framework
- provides its own way to plug into
- Java EE application.</para>
-
- <section>
+ <para>
+ Portal as an integration and aggregation platform provides some form of Single Sign On
(<literal>SSO</literal>) by itself. When you log into the portal you gain
access to many systems through portlets using a single identity. Still in many cases you
need to integrate the portal infrastructure with other SSO enabled systems. There are many
different Identity Management solutions on the market. In most cases each SSO framework
provides its own way to plug into Java EE application.
+ </para>
+ <section id="sect-Reference_Guide-Overview_of_SSO-Prerequisite">
<title>Prerequisite</title>
-
- <para>In this tutorial, the SSO server is installed in a Tomcat
- installation, you can obtain Tomcat from:
-
http://tomcat.apache.org
+ <para>
+ In this tutorial, the SSO server is installed in a Tomcat installation, you can
obtain Tomcat from:
http://tomcat.apache.org
</para>
-
- <para>Various files are required to setup the integration, all
- the
- packages can be found in a zip file located at:
-
http://repository.jboss.org/maven2/org/gatein/sso/sso-packaging
+ <para>
+ Various files are required to setup the integration, all the packages can be found in
a zip file located at:
http://repository.jboss.org/maven2/org/gatein/sso/sso-packaging
</para>
-
- <para>As we are manipulating gatein.ear directly it's better to not
- run
- any portal extension that could override some of the data, make
- sure
- you
- remove
- $JBOSS_HOME/server/default/deploy/gatein-sample-extension.ear and
- $JBOSS_HOME/server/default/deploy/gatein-sample-portal.ear as they
- ship
- by default with GateIn.</para>
+ <para>
+ As we are manipulating gatein.ear directly it's better to not run any portal
extension that could override some of the data, make sure you remove
$JBOSS_HOME/server/default/deploy/gatein-sample-extension.ear and
$JBOSS_HOME/server/default/deploy/gatein-sample-portal.ear as they ship by default with
GateIn.
+ </para>
</section>
- </section>
- <section>
+ </section>
+
+ <section
id="sect-Reference_Guide-Single_Sign_On-CAS_Central_Authentication_Service">
<title>CAS - Central Authentication Service</title>
-
<para>
- This Single Sign On plugin enables seamless integration between
- GateIn Portal and the CAS Single Sign On Framework. Details about CAS
- can
- be found
- <ulink
url="http://www.ja-sig.org/products/cas/">here.</ulink>
+ This Single Sign On plugin enables seamless integration between GateIn Portal and the
CAS Single Sign On Framework. Details about CAS can be found <ulink
url="http://www.ja-sig.org/products/cas/">here.</ulink>
</para>
-
- <para>The integration consitsts in two parts, the first part
- consists of
- installing or configuring a CAS server, the second part
- consists of
- setting up the portal to use the CAS server.</para>
-
- <section>
+ <para>
+ The integration consitsts in two parts, the first part consists of installing or
configuring a CAS server, the second part consists of setting up the portal to use the CAS
server.
+ </para>
+ <section
id="sect-Reference_Guide-CAS_Central_Authentication_Service-CAS_server">
<title>CAS server</title>
-
- <para>First we will set up the server to authenticate against
- the portal
- login module. You can find more information about setting
- up the server
- by reading the official CAS documentation, here we will
- install the
- CAS
- server on Tomcat</para>
-
- <section>
+ <para>
+ First we will set up the server to authenticate against the portal login module. You
can find more information about setting up the server by reading the official CAS
documentation, here we will install the CAS server on Tomcat
+ </para>
+ <section id="sect-Reference_Guide-CAS_server-Obtaining_CAS">
<title>Obtaining CAS</title>
-
- <para>You can download CAS from
-
http://www.jasig.org/cas/download.</para>
-
- <para>Once downloaded extract it in what we will call $CAS_HOME
- from
- now.</para>
+ <para>
+ You can download CAS from
http://www.jasig.org/cas/download.
+ </para>
+ <para>
+ Once downloaded extract it in what we will call $CAS_HOME from now.
+ </para>
</section>
-
- <section>
+
+ <section id="sect-Reference_Guide-CAS_server-Modifying_CAS_server">
<title>Modifying CAS server</title>
-
- <para>To simplify we will directly modify the sources so that the
- produced web archive is configured the way we want.</para>
-
- <para>First we will want to change the authenticaton handler to
- use
- the portal authentication handler:</para>
-
<para>
- The CAS Server Plugin makes secure authentication callbacks to a
- RESTful service installed on the remote GateIn server in order to
- authenticate a user. In order for the plugin to function correctly,
- it
- needs to be properly configured to connect to this service. This
- configuration is done via the
- <emphasis>cas.war/WEB-INF/deployerConfigContext.xml
- </emphasis>
- file.
+ To simplify we will directly modify the sources so that the produced web archive is
configured the way we want.
</para>
-
+ <para>
+ First we will want to change the authenticaton handler to use the portal
authentication handler:
+ </para>
+ <para>
+ The CAS Server Plugin makes secure authentication callbacks to a RESTful service
installed on the remote GateIn server in order to authenticate a user. In order for the
plugin to function correctly, it needs to be properly configured to connect to this
service. This configuration is done via the
<emphasis>cas.war/WEB-INF/deployerConfigContext.xml </emphasis> file.
+ </para>
<orderedlist>
<listitem>
- <para>Open
- $CAS_HOME/cas-server-webapp/src/main/webapp/WEB-INF/deployerConfigContext.xml
+ <para>
+ Open
$CAS_HOME/cas-server-webapp/src/main/webapp/WEB-INF/deployerConfigContext.xml
</para>
</listitem>
-
<listitem>
<para>
- Replace:
- <programlisting> <!--
+ Replace:
+<programlisting> <!--
| Whereas CredentialsToPrincipalResolvers identify who it is some Credentials might
authenticate,
| AuthenticationHandlers actually authenticate credentials. Here e declare the
AuthenticationHandlers that
| authenticate the Principals that the CredentialsToPrincipalResolvers identified. CAS
will try these handlers in turn
| until it finds one that both supports the Credentials presented and succeeds in
authenticating.
- +-->
- <property name="authenticationHandlers">
- <list>
- <!--
+ +-->
+ <property name="authenticationHandlers">
+ <list>
+ <!--
| This is the authentication handler that authenticates services by means of
callback via SSL, thereby validating
| a server side SSL certificate.
- +-->
- <bean
class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler"
- p:httpClient-ref="httpClient" />
- <!--
+ +-->
+ <bean
class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler"
+ p:httpClient-ref="httpClient" />
+ <!--
| This is the authentication handler declaration that every CAS deployer will need
to change before deploying CAS
| into production. The default SimpleTestUsernamePasswordAuthenticationHandler
authenticates UsernamePasswordCredentials
| where the username equals the password. You will need to replace this with an
AuthenticationHandler that implements your
| local authentication strategy. You might accomplish this by coding a new such
handler and declaring
| edu.someschool.its.cas.MySpecialHandler here, or you might use one of the
handlers provided in the adaptors modules.
- +-->
- <bean
-
class="org.jasig.cas.authentication.handler.support.SimpleTestUsernamePasswordAuthenticationHandler"
/>
- </list>
- </property></programlisting></para>
- </listitem>
-
- <listitem>
- <para>With the following (Make sure to set the host, port and
- context with the values corresponding to your portal). Also
- available in
- $GATEIN_SSO/cas/plugin/WEB-INF/deployerConfigContext.xml</para>
-
- <para><programlisting><!--
+ +-->
+ <bean
+
class="org.jasig.cas.authentication.handler.support.SimpleTestUsernamePasswordAuthenticationHandler"
/>
+ </list>
+ </property>
+</programlisting>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ With the following (Make sure to set the host, port and context with the values
corresponding to your portal). Also available in
$GATEIN_SSO/cas/plugin/WEB-INF/deployerConfigContext.xml
+ </para>
+ <para>
+
+<programlisting><!--
| Whereas CredentialsToPrincipalResolvers identify who it is some Credentials might
authenticate,
| AuthenticationHandlers actually authenticate credentials. Here we declare the
AuthenticationHandlers that
| authenticate the Principals that the CredentialsToPrincipalResolvers identified. CAS
will try these handlers in turn
| until it finds one that both supports the Credentials presented and succeeds in
authenticating.
- +-->
- <property name="authenticationHandlers">
- <list>
- <!--
+ +-->
+ <property name="authenticationHandlers">
+ <list>
+ <!--
| This is the authentication handler that authenticates services by means of
callback via SSL, thereby validating
| a server side SSL certificate.
- +-->
- <bean
class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler"
- p:httpClient-ref="httpClient" />
- <!--
+ +-->
+ <bean
class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler"
+ p:httpClient-ref="httpClient" />
+ <!--
| This is the authentication handler declaration that every CAS deployer will need
to change before deploying CAS
| into production. The default SimpleTestUsernamePasswordAuthenticationHandler
authenticates UsernamePasswordCredentials
| where the username equals the password. You will need to replace this with an
AuthenticationHandler that implements your
| local authentication strategy. You might accomplish this by coding a new such
handler and declaring
| edu.someschool.its.cas.MySpecialHandler here, or you might use one of the
handlers provided in the adaptors modules.
- +-->
- <!-- Integrates with the Gatein Authentication Service to perform
authentication -->
- <!--
+ +-->
+ <!-- Integrates with the Gatein Authentication Service to perform
authentication -->
+ <!--
| Note: Modify the Plugin Configuration based on the actual information of a GateIn
instance.
| The instance can be anywhere on the internet...Not necessarily on localhost where
CAS is running
- +-->
- <bean
class="org.gatein.sso.cas.plugin.AuthenticationPlugin">
- <property
name="gateInHost"><value>localhost</value></property>
- <property
name="gateInPort"><value>8080</value></property>
- <property
name="gateInContext"><value>portal</value></property>
- </bean>
- </list>
- </property></programlisting></para>
- </listitem>
+ +-->
+ <bean
class="org.gatein.sso.cas.plugin.AuthenticationPlugin">
+ <property
name="gateInHost"><value>localhost</value></property>
+ <property
name="gateInPort"><value>8080</value></property>
+ <property
name="gateInContext"><value>portal</value></property>
+ </bean>
+ </list>
+ </property>
+</programlisting>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Copy
$GATEIN_SSO/cas/plugin/WEB-INF/lib/sso-cas-plugin-<VERSION>.jar and
$GATEIN_SSO/cas/plugin/WEB-INF/lib/commons-httpclient-<VERSION>.jar into
the newly created directory $CAS_HOME/cas-server-webapp/src/main/webapp/WEB-INF/lib
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Get an installation of Tomcat and extract it in what we will call $TOMCAT_HOME.
Change the default port to avoid a conflict with the default GateIn (for testing
purposes). Edit $TOMCAT_HOME/conf/server.xml and replace the 8080 port to 8888.
+ <note>
+ <para>
+ If you are running GateIn with Tomcat on the same machine you will also need to
change the port 8005 to something else to avoid port conflicts.
+ </para>
+ </note>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Go to $CAS_HOME/cas-server-webapp and do 'mvn install'
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Copy $CAS_HOME/cas-server-webapp/target/cas.war into $TOMCAT_HOME/webapps
+ </para>
+ <para>
+ Now you should be able to start Tomcat and access
http://localhost:8888/cas but at
this stage you won't be able to login.
+ </para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/cas.png" format="PNG"
width="444" />
+ </imageobject>
+ </mediaobject>
+ </listitem>
+ </orderedlist>
+ </section>
- <listitem>
- <para>Copy
-
$GATEIN_SSO/cas/plugin/WEB-INF/lib/sso-cas-plugin-<VERSION>.jar
- and
-
$GATEIN_SSO/cas/plugin/WEB-INF/lib/commons-httpclient-<VERSION>.jar
- into the newly created directory
- $CAS_HOME/cas-server-webapp/src/main/webapp/WEB-INF/lib</para>
- </listitem>
-
- <listitem>
- <para>Get an installation of Tomcat and extract it in what we will
- call $TOMCAT_HOME. Change the default port to avoid a conflict
- with the default GateIn (for testing purposes). Edit
- $TOMCAT_HOME/conf/server.xml and replace the 8080 port to
- 8888.<note>
- <para>If you are running GateIn with Tomcat on the same
- machine you will also need to change the port 8005 to
- something else to avoid port conflicts.</para>
- </note></para>
- </listitem>
-
- <listitem>
- <para>Go to $CAS_HOME/cas-server-webapp and do 'mvn
- install'</para>
- </listitem>
-
- <listitem>
- <para>Copy $CAS_HOME/cas-server-webapp/target/cas.war into
- $TOMCAT_HOME/webapps</para>
-
- <para>Now you should be able to start Tomcat and access
-
http://localhost:8888/cas but at this stage you won't be able to
- login.</para>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/cas.png" format="PNG"
/>
- </imageobject>
- </mediaobject>
- </listitem>
- </orderedlist>
- </section>
- </section>
-
- <section>
- <title>Setup the CAS client</title>
-
- <orderedlist>
- <listitem>
- <para>Copy all libraries from $GATEIN_SSO/cas/gatein.ear/lib into
- $JBOSS_HOME/server/default/deploy/gatein.ear/lib (Or if you are
- running GateIn in Tomcat, in $GATEIN_HOME/lib)</para>
- </listitem>
-
- <listitem>
- <para>In JBoss AS, edit gatein.ear/META-INF/gatein-jboss-beans.xml
- and uncomment this section</para>
-
- <para><programlisting><authentication>
- <login-module code="org.gatein.sso.agent.login.SSOLoginModule"
flag="required">
- </login-module>
- <login-module
code="org.exoplatform.services.security.j2ee.JbossLoginModule"
flag="required">
- <module-option
name="portalContainerName">portal</module-option>
- <module-option
name="realmName">gatein-domain</module-option>
- </login-module>
-</authentication></programlisting></para>
-
- <para>If you are running GateIn in Tomcat, edit
- $GATEIN_HOME/conf/jaas.conf and uncomment this section</para>
-
- <para><programlisting>org.gatein.sso.agent.login.SSOLoginModule
required
+ </section>
+
+ <section
id="sect-Reference_Guide-CAS_Central_Authentication_Service-Setup_the_CAS_client">
+ <title>Setup the CAS client</title>
+ <orderedlist>
+ <listitem>
+ <para>
+ Copy all libraries from $GATEIN_SSO/cas/gatein.ear/lib into
$JBOSS_HOME/server/default/deploy/gatein.ear/lib (Or if you are running GateIn in Tomcat,
in $GATEIN_HOME/lib)
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ In JBoss AS, edit gatein.ear/META-INF/gatein-jboss-beans.xml and uncomment this
section
+ </para>
+ <para>
+
+<programlisting><authentication>
+ <login-module code="org.gatein.sso.agent.login.SSOLoginModule"
flag="required">
+ </login-module>
+ <login-module
code="org.exoplatform.services.security.j2ee.JbossLoginModule"
flag="required">
+ <module-option
name="portalContainerName">portal</module-option>
+ <module-option
name="realmName">gatein-domain</module-option>
+ </login-module>
+</authentication>
+</programlisting>
+ </para>
+ <para>
+ If you are running GateIn in Tomcat, edit $GATEIN_HOME/conf/jaas.conf and uncomment
this section
+ </para>
+ <para>
+
+<programlisting>org.gatein.sso.agent.login.SSOLoginModule required
org.exoplatform.services.security.j2ee.JbossLoginModule required
portalContainerName=portal
-realmName=gatein-domain</programlisting>At this point, you can test the
- installation, start GateIn (assuming that the CAS server using
- Tomcat is still running) by going to
http://localhost:8888/cas you
- should be able to login with username 'root' and password 'gtn'
or
- any account created through the portal.</para>
- </listitem>
- </orderedlist>
- </section>
+realmName=gatein-domain
+</programlisting>
+ At this point, you can test the installation, start GateIn (assuming that the CAS
server using Tomcat is still running) by going to
http://localhost:8888/cas you should be
able to login with username 'root' and password 'gtn' or
any account created through the portal.
+ </para>
+ </listitem>
+ </orderedlist>
+ </section>
+
+ <section
id="sect-Reference_Guide-CAS_Central_Authentication_Service-Setup_the_portal_to_redirect_to_CAS">
+ <title>Setup the portal to redirect to CAS</title>
+ <para>
+ Now we want to tell GateIn to redirect all user authentication to the CAS server.
+ </para>
+ <para>
+ The CAS server can be located anywhere on the Internet, and this information must be
properly configured within the GateIn instance. This configuration needs to be done in 3
files
+ <itemizedlist>
+ <listitem>
+ <emphasis>In gatein.ear/02portal.war/groovy/portal/webui/UILoginForm.gtmpl
replace the javascript at the bottom by:</emphasis>
+ <para>
+
+<programlisting><script>
+<%=uicomponent.event("Close");%>
+ window.location =
'http://localhost:8888/cas/login?service=http://localhost:8080/portal/private/classic';
+</script>
+</programlisting>
+ </para>
+ </listitem>
+ <listitem>
+ <emphasis>In gatein.ear/02portal.war/login/jsp/login.jsp replace everything
by:</emphasis>
+ <para>
+
+<programlisting><html>
+ <head>
+ <script type="text/javascript">
+ window.location =
'http://localhost:8888/cas/login?service=http://localhost:8080/portal/private/classic';
+ </script>
+ </head>
+ <body>
+ </body>
+</html>
+</programlisting>
+ </para>
+ </listitem>
+ <listitem>
+ <emphasis>In gatein.ear/02portal.war/WEB-INF/web.xml replace the
InitiateLoginServlet declaration by:</emphasis>
+ <para>
+
+<programlisting><servlet>
+ <servlet-name>InitiateLoginServlet</servlet-name>
+
<servlet-class>org.gatein.sso.agent.GenericSSOAgent</servlet-class>
+ <init-param>
+ <param-name>ssoServerUrl</param-name>
+ <param-value>http://localhost:8888/cas</param-value>
+ </init-param>
+</servlet>
+</programlisting>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ From now on, all links redirecting to the user authentication pages will redirect to
the CAS centralized authentication form.
+ </para>
+ </section>
- <section>
- <title>Setup the portal to redirect to CAS</title>
+ </section>
+
+ <section id="sect-Reference_Guide-Single_Sign_On-JOSSO">
+ <title>JOSSO</title>
+ <para>
+ This Single Sign On plugin enables seamless integration between GateIn Portal and the
JOSSO Single Sign On Framework. Details about OpenSSO can be found <ulink
url="http://www.ja-sig.org/products/cas/">here.</ulink>
+ </para>
+ <para>
+ The integration consitsts in two parts, the first part consists of installing or
configuring a JOSSO server, the second part consists of setting up the portal to use the
JOSSO server.
+ </para>
+ <section id="sect-Reference_Guide-JOSSO-JOSSO_server">
+ <title>JOSSO server</title>
+ <para>
+ First we will set up the server to authenticate against the portal login module. You
can find more information about setting up the server by reading the official JOSSO
documentation, here we will install the JOSSO server on Tomcat
+ </para>
+ <section id="sect-Reference_Guide-JOSSO_server-Obtaining_JOSSO">
+ <title>Obtaining JOSSO</title>
+ <para>
+ You can download JOSSO from
http://sourceforge.net/projects/josso/files/ We will use
the package that embeds Apache Tomcat.
+ </para>
+ <para>
+ Once downloaded extract it in what we will call $JOSSO_HOME from now.
+ </para>
+ </section>
+
+ <section
id="sect-Reference_Guide-JOSSO_server-Modifying_JOSSO_server">
+ <title>Modifying JOSSO server</title>
+ <orderedlist>
+ <listitem>
+ <para>
+ Copy the files from $GATEIN_SSO/josso/plugin into the Tomcat directory
($JOSSO_HOME).
+ </para>
+ <para>
+ It should replace or add $JOSSO_HOME/lib/josso-gateway-config.xml
$JOSSO_HOME/lib/josso-gateway-gatein-stores.xml
$JOSSO_HOME/webapps/josso/WEB-INF/classes/gatein.properties and add required jars into
$JOSSO_HOME/webapps/josso/WEB-INF/lib
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Change the default Tomcat ports to avoid a conflict with the default GateIn (for
testing purposes). Edit $TOMCAT_HOME/conf/server.xml and replace the 8080 port to 8888.
+ <note>
+ <para>
+ If you are running GateIn with Tomcat on the same machine you will also need to
change other ports to something else to avoid port conflicts.
+ </para>
+ </note>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Now you should be able to start Tomcat and access
http://localhost:8888/josso/signon/login.do but at this stage you won't be able to
login.
+ </para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/opensso.png" format="PNG"
width="444" />
+ </imageobject>
+ </mediaobject>
+ </listitem>
+ </orderedlist>
+ </section>
- <para>Now we want to tell GateIn to redirect all user authentication to
- the CAS server.</para>
-
- <para>The CAS server can be located anywhere on the Internet, and this
- information must be properly configured within the GateIn instance. This
- configuration needs to be done in 3 files <itemizedlist>
- <listitem>
- <emphasis>In
- gatein.ear/02portal.war/groovy/portal/webui/UILoginForm.gtmpl
- replace the javascript at the bottom by:</emphasis>
-
- <para>
- <programlisting><script>
-<%=uicomponent.event("Close");%>
- window.location =
'http://localhost:8888/cas/login?service=http://localhost:8080/portal/private/classic';
-</script></programlisting>
- </para>
- </listitem>
-
- <listitem>
- <emphasis>In gatein.ear/02portal.war/login/jsp/login.jsp replace
- everything by:</emphasis>
-
- <para>
- <programlisting><html>
- <head>
- <script type="text/javascript">
- window.location =
'http://localhost:8888/cas/login?service=http://localhost:8080/portal/private/classic';
- </script>
- </head>
- <body>
- </body>
-</html></programlisting>
- </para>
- </listitem>
-
- <listitem>
- <emphasis>In gatein.ear/02portal.war/WEB-INF/web.xml replace the
- InitiateLoginServlet declaration by:</emphasis>
-
- <para>
- <programlisting><servlet>
- <servlet-name>InitiateLoginServlet</servlet-name>
-
<servlet-class>org.gatein.sso.agent.GenericSSOAgent</servlet-class>
- <init-param>
- <param-name>ssoServerUrl</param-name>
- <param-value>http://localhost:8888/cas</param-value>
- </init-param>
-</servlet></programlisting>
- </para>
- </listitem>
- </itemizedlist></para>
-
- <para>From now on, all links redirecting to the user authentication
- pages will redirect to the CAS centralized authentication form.</para>
- </section>
- </section>
-
- <section>
- <title>JOSSO</title>
-
- <para>This Single Sign On plugin enables seamless integration between
- GateIn Portal and the JOSSO Single Sign On Framework. Details about
- OpenSSO can be found <ulink
-
url="http://www.ja-sig.org/products/cas/">here.</ulink>...
-
- <para>The integration consitsts in two parts, the first part consists of
- installing or configuring a JOSSO server, the second part consists of
- setting up the portal to use the JOSSO server.</para>
-
- <section>
- <title>JOSSO server</title>
-
- <para>First we will set up the server to authenticate against the portal
- login module. You can find more information about setting up the server
- by reading the official JOSSO documentation, here we will install the
- JOSSO server on Tomcat</para>
-
- <section>
- <title>Obtaining JOSSO</title>
-
- <para>You can download JOSSO from
-
http://sourceforge.net/projects/josso/files/ We will use the package
- that embeds Apache Tomcat.</para>
-
- <para>Once downloaded extract it in what we will call $JOSSO_HOME from
- now.</para>
- </section>
-
- <section>
- <title>Modifying JOSSO server</title>
-
- <orderedlist>
- <listitem>
- <para>Copy the files from $GATEIN_SSO/josso/plugin into the Tomcat
- directory ($JOSSO_HOME).</para>
-
- <para>It should replace or add
- $JOSSO_HOME/lib/josso-gateway-config.xml
- $JOSSO_HOME/lib/josso-gateway-gatein-stores.xml
- $JOSSO_HOME/webapps/josso/WEB-INF/classes/gatein.properties and
- add required jars into
- $JOSSO_HOME/webapps/josso/WEB-INF/lib</para>
- </listitem>
-
- <listitem>
- <para>Change the default Tomcat ports to avoid a conflict with the
- default GateIn (for testing purposes). Edit
- $TOMCAT_HOME/conf/server.xml and replace the 8080 port to
- 8888.<note>
- <para>If you are running GateIn with Tomcat on the same
- machine you will also need to change other ports to something
- else to avoid port conflicts.</para>
- </note></para>
- </listitem>
-
- <listitem>
- <para>Now you should be able to start Tomcat and access
-
http://localhost:8888/josso/signon/login.do but at this stage you
- won't be able to login.</para>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/opensso.png"
format="PNG" />
- </imageobject>
- </mediaobject>
- </listitem>
- </orderedlist>
- </section>
- </section>
-
- <section>
- <title>Setup the JOSSO client</title>
-
- <orderedlist>
- <listitem>
- <para>Copy the libs from $GATEIN_SS)/josso/gatein.ear/lib into
- gatein.ear/lib (Or if you are running GateIn in Tomcat, in
- $GATEIN_HOME/lib)</para>
- </listitem>
-
- <listitem>
- <para>In JBoss AS, edit gatein.ear/META-INF/gatein-jboss-beans.xml
- and uncomment this section</para>
-
- <para><programlisting><authentication>
- <login-module code="org.gatein.sso.agent.login.SSOLoginModule"
flag="required">
- </login-module>
- <login-module
code="org.exoplatform.services.security.j2ee.JbossLoginModule"
flag="required">
- <module-option
name="portalContainerName">portal</module-option>
- <module-option
name="realmName">gatein-domain</module-option>
- </login-module>
-</authentication></programlisting></para>
-
- <para>If you are running GateIn in Tomcat, edit
- $GATEIN_HOME/conf/jaas.conf and uncomment this section</para>
-
- <para><programlisting>org.gatein.sso.agent.login.SSOLoginModule
required
+ </section>
+
+ <section id="sect-Reference_Guide-JOSSO-Setup_the_JOSSO_client">
+ <title>Setup the JOSSO client</title>
+ <orderedlist>
+ <listitem>
+ <para>
+ Copy the libs from $GATEIN_SS)/josso/gatein.ear/lib into gatein.ear/lib (Or if you
are running GateIn in Tomcat, in $GATEIN_HOME/lib)
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ In JBoss AS, edit gatein.ear/META-INF/gatein-jboss-beans.xml and uncomment this
section
+ </para>
+ <para>
+
+<programlisting><authentication>
+ <login-module code="org.gatein.sso.agent.login.SSOLoginModule"
flag="required">
+ </login-module>
+ <login-module
code="org.exoplatform.services.security.j2ee.JbossLoginModule"
flag="required">
+ <module-option
name="portalContainerName">portal</module-option>
+ <module-option
name="realmName">gatein-domain</module-option>
+ </login-module>
+</authentication>
+</programlisting>
+ </para>
+ <para>
+ If you are running GateIn in Tomcat, edit $GATEIN_HOME/conf/jaas.conf and uncomment
this section
+ </para>
+ <para>
+
+<programlisting>org.gatein.sso.agent.login.SSOLoginModule required
org.exoplatform.services.security.j2ee.JbossLoginModule required
portalContainerName=portal
-realmName=gatein-domain</programlisting>At this point, you can test the
- installation, start GateIn (assuming that the JOSSO server using
- Tomcat is still running) by going to
-
http://localhost:8888/josso/signon/login.do you should be able to
- login with username 'root' and password 'gtn' or any account
created
- through the portal.</para>
- </listitem>
- </orderedlist>
- </section>
+realmName=gatein-domain
+</programlisting>
+ At this point, you can test the installation, start GateIn (assuming that the JOSSO
server using Tomcat is still running) by going to
http://localhost:8888/josso/signon/login.do you should be able to login with username
'root' and password 'gtn' or any account created through
the portal.
+ </para>
+ </listitem>
+ </orderedlist>
+ </section>
+
+ <section
id="sect-Reference_Guide-JOSSO-Setup_the_portal_to_redirect_to_JOSSO">
+ <title>Setup the portal to redirect to JOSSO</title>
+ <para>
+ Now we want to tell GateIn to redirect all user authentication to the CAS server.
+ </para>
+ <para>
+ The CAS server can be located anywhere on the Internet, and this information must be
properly configured within the GateIn instance. This configuration needs to be done in 3
files
+ <itemizedlist>
+ <listitem>
+ <emphasis>In gatein.ear/02portal.war/groovy/portal/webui/UILoginForm.gtmpl
replace the javascript at the bottom by:</emphasis>
+ <para>
+
+<programlisting><script>
+ <%=uicomponent.event("Close");%>
+ window.location =
'http://localhost:8888/josso/signon/login.do?josso_back_to=http://localhost:8080/portal/private/classic';
+</script>
+</programlisting>
+ </para>
+ </listitem>
+ <listitem>
+ <emphasis>In gatein.ear/02portal.war/login/jsp/login.jsp replace everything
by:</emphasis>
+ <para>
+
+<programlisting><html>
+ <head>
+ <script type="text/javascript">
+ window.location =
'http://localhost:8888/josso/signon/login.do?josso_back_to=http://localhost:8080/portal/private/classic';
+ </script>
+ </head>
+ <body>
+ </body>
+</html>
+</programlisting>
+ </para>
+ </listitem>
+ <listitem>
+ <emphasis>In gatein.ear/02portal.war/WEB-INF/web.xml replace the
InitiateLoginServlet declaration by:</emphasis>
+ <para>
+
+<programlisting><servlet>
+ <servlet-name>InitiateLoginServlet</servlet-name>
+
<servlet-class>org.gatein.sso.agent.GenericSSOAgent</servlet-class>
+ <init-param>
+ <param-name>ssoServerUrl</param-name>
+ <param-value>http://localhost:8888/cas</param-value>
+ </init-param>
+</servlet>
+</programlisting>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ In gatein.ear/02portal.war/WEB-INF/web.xml remove the PortalLoginController
servlet declaration and mapping
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ From now on, all links redirecting to the user authentication pages will redirect to
the JOSSO centralized authentication form.
+ </para>
+ </section>
- <section>
- <title>Setup the portal to redirect to JOSSO</title>
+ </section>
+
+ <section
id="sect-Reference_Guide-Single_Sign_On-OpenSSO_The_Open_Web_SSO_project">
+ <title>OpenSSO - The Open Web SSO project</title>
+ <para>
+ This Single Sign On plugin enables seamless integration between GateIn Portal and the
OpenSSO Single Sign On Framework. Details about OpenSSO can be found <ulink
url="https://opensso.dev.java.net/">here.</ulink>
+ </para>
+ <para>
+ The integration consitsts in two parts, the first part consists of installing or
configuring an OpenSSO server, the second part consists of setting up the portal to use
the OpenSSO server.
+ </para>
+ <section
id="sect-Reference_Guide-OpenSSO_The_Open_Web_SSO_project-OpenSSO_server">
+ <title>OpenSSO server</title>
+ <para>
+ First we will set up the server to authenticate against the portal login module. You
can find more information about setting up the server by reading the official OpenSSO
documentation, here we will install the OpenSSO server on Tomcat
+ </para>
+ <section id="sect-Reference_Guide-OpenSSO_server-Obtaining_OpenSSO">
+ <title>Obtaining OpenSSO</title>
+ <para>
+ You can download OpenSSO from
https://opensso.dev.java.net/public/use/index.html.
+ </para>
+ <para>
+ Once downloaded extract it in what we will call $OPENSSO_HOME from now.
+ </para>
+ </section>
+
+ <section
id="sect-Reference_Guide-OpenSSO_server-Modifying_OpenSSO_server">
+ <title>Modifying OpenSSO server</title>
+ <para>
+ To simplify we will directly modify the sources so that the produced web archive is
configured the way we want.
+ </para>
+ <para>
+ First we will want to add the GateIn Authentication Plugin:
+ </para>
+ <para>
+ The plugin makes secure authentication callbacks to a RESTful service installed on
the remote GateIn server in order to authenticate a user. In order for the plugin to
function correctly, it needs to be properly configured to connect to this service. This
configuration is done via the
<emphasis>opensso.war/config/auth/default/AuthenticationPlugin.xml</emphasis>
file.
+ </para>
+ <orderedlist>
+ <listitem>
+ <para>
+ Get an installation of Tomcat and extract it in what we will call $TOMCAT_HOME.
Change the default port to avoid a conflict with the default GateIn (for testing
purposes). Edit $TOMCAT_HOME/conf/server.xml and replace the 8080 port to 8888.
+ <note>
+ <para>
+ If you are running GateIn with Tomcat on the same machine you will also need to
change the port 8005 to something else to avoid port conflicts.
+ </para>
+ </note>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ This is what the
$TOMCAT_HOME/webapps/opensso/config/auth/default/AuthenticationPlugin.xml file should look
like:
+<programlisting>
+<?xml version='1.0' encoding="UTF-8"?>
- <para>Now we want to tell GateIn to redirect all user authentication to
- the CAS server.</para>
+<!DOCTYPE ModuleProperties PUBLIC "=//iPlanet//Authentication Module
Properties XML Interface 1.0 DTD//EN"
+
"jar://com/sun/identity/authentication/Auth_Module_Properties.dtd">
- <para>The CAS server can be located anywhere on the Internet, and this
- information must be properly configured within the GateIn instance. This
- configuration needs to be done in 3 files <itemizedlist>
- <listitem>
- <emphasis>In
- gatein.ear/02portal.war/groovy/portal/webui/UILoginForm.gtmpl
- replace the javascript at the bottom by:</emphasis>
-
- <para>
- <programlisting><script>
- <%=uicomponent.event("Close");%>
- window.location =
'http://localhost:8888/josso/signon/login.do?josso_back_to=http://localhost:8080/portal/private/classic';
-</script></programlisting>
- </para>
- </listitem>
-
- <listitem>
- <emphasis>In gatein.ear/02portal.war/login/jsp/login.jsp replace
- everything by:</emphasis>
-
- <para>
- <programlisting><html>
- <head>
- <script type="text/javascript">
- window.location =
'http://localhost:8888/josso/signon/login.do?josso_back_to=http://localhost:8080/portal/private/classic';
- </script>
- </head>
- <body>
- </body>
-</html></programlisting>
- </para>
- </listitem>
-
- <listitem>
- <emphasis>In gatein.ear/02portal.war/WEB-INF/web.xml replace the
- InitiateLoginServlet declaration by:</emphasis>
-
- <para>
- <programlisting><servlet>
- <servlet-name>InitiateLoginServlet</servlet-name>
-
<servlet-class>org.gatein.sso.agent.GenericSSOAgent</servlet-class>
- <init-param>
- <param-name>ssoServerUrl</param-name>
- <param-value>http://localhost:8888/cas</param-value>
- </init-param>
-</servlet></programlisting>
- </para>
- </listitem>
-
- <listitem>
- <para>In gatein.ear/02portal.war/WEB-INF/web.xml remove the
- PortalLoginController servlet declaration and mapping</para>
- </listitem>
- </itemizedlist></para>
-
- <para>From now on, all links redirecting to the user authentication
- pages will redirect to the JOSSO centralized authentication form.</para>
- </section>
- </section>
-
- <section>
- <title>OpenSSO - The Open Web SSO project</title>
-
- <para>This Single Sign On plugin enables seamless integration between
- GateIn Portal and the OpenSSO Single Sign On Framework. Details about OpenSSO can
- be found <ulink
-
url="https://opensso.dev.java.net/">here.</ulink></...
-
- <para>The integration consitsts in two parts, the first part consists of
- installing or configuring an OpenSSO server, the second part consists of
- setting up the portal to use the OpenSSO server.</para>
-
- <section>
- <title>OpenSSO server</title>
-
- <para>First we will set up the server to authenticate against the portal
- login module. You can find more information about setting up the server
- by reading the official OpenSSO documentation, here we will install the OpenSSO
- server on Tomcat</para>
-
- <section>
- <title>Obtaining OpenSSO</title>
-
- <para>You can download OpenSSO from
-
https://opensso.dev.java.net/public/use/index.html.</para>
-
- <para>Once downloaded extract it in what we will call $OPENSSO_HOME from
- now.</para>
- </section>
-
- <section>
- <title>Modifying OpenSSO server</title>
-
- <para>To simplify we will directly modify the sources so that the
- produced web archive is configured the way we want.</para>
-
- <para>First we will want to add the GateIn Authentication
Plugin:</para>
-
- <para>The plugin makes secure authentication callbacks to a
- RESTful service installed on the remote GateIn server in order to
- authenticate a user. In order for the plugin to function correctly, it
- needs to be properly configured to connect to this service. This
- configuration is done via the
-
<emphasis>opensso.war/config/auth/default/AuthenticationPlugin.xml</emphasis>
- file.</para>
-
- <orderedlist>
- <listitem>
- <para>Get an installation of Tomcat and extract it in what we will
- call $TOMCAT_HOME. Change the default port to avoid a conflict
- with the default GateIn (for testing purposes). Edit
- $TOMCAT_HOME/conf/server.xml and replace the 8080 port to
- 8888.<note>
- <para>If you are running GateIn with Tomcat on the same
- machine you will also need to change the port 8005 to
- something else to avoid port conflicts.</para>
- </note></para>
- </listitem>
-
- <listitem>
- <para>This is what the
$TOMCAT_HOME/webapps/opensso/config/auth/default/AuthenticationPlugin.xml file should look
like:
- <programlisting><![CDATA[
-<?xml version='1.0' encoding="UTF-8"?>
-
-<!DOCTYPE ModuleProperties PUBLIC "=//iPlanet//Authentication Module Properties
XML Interface 1.0 DTD//EN"
-
"jar://com/sun/identity/authentication/Auth_Module_Properties.dtd">
-
-<ModuleProperties moduleName="AuthenticationPlugin" version="1.0"
>
- <Callbacks length="2" order="1" timeout="60"
- header="GateIn OpenSSO Login" >
- <NameCallback>
- <Prompt>
+<ModuleProperties moduleName="AuthenticationPlugin"
version="1.0" >
+ <Callbacks length="2" order="1"
timeout="60"
+ header="GateIn OpenSSO Login" >
+ <NameCallback>
+ <Prompt>
Username
- </Prompt>
- </NameCallback>
- <PasswordCallback echoPassword="false" >
- <Prompt>
+ </Prompt>
+ </NameCallback>
+ <PasswordCallback echoPassword="false" >
+ <Prompt>
Password
- </Prompt>
- </PasswordCallback>
- </Callbacks>
-</ModuleProperties>
- ]]></programlisting>
- </para>
- </listitem>
-
-
+ </Prompt>
+ </PasswordCallback>
+ </Callbacks>
+</ModuleProperties>
+</programlisting>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Copy
$GATEIN_SSO/opensso/plugin/WEB-INF/lib/sso-opensso-plugin-<VERSION>.jar ,
$GATEIN_SSO/opensso/plugin/WEB-INF/lib/commons-httpclient-<VERSION>.jar,
and $GATEIN_SSO/opensso/plugin/WEB-INF/lib/commons-logging-<VERSION>.jar
into the Tomcat Installation at: $TOMCAT_HOME/webapps/opensso/WEB-INF/lib
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Copy $GATEIN_SSO/opensso/plugin/WEB-INF/classes/gatein.properties into the Tomcat
Installation at: $TOMCAT_HOME/webapps/opensso/WEB-INF/classes
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Now you should be able to start Tomcat and access
http://localhost:8888/opensso/UI/Login?realm=gatein but at this stage you won't be
able to login.
+ </para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/opensso-shot.png" format="PNG"
/>
+ </imageobject>
+ </mediaobject>
+ </listitem>
+ </orderedlist>
+ </section>
- <listitem>
- <para>Copy
-
$GATEIN_SSO/opensso/plugin/WEB-INF/lib/sso-opensso-plugin-<VERSION>.jar
- ,
-
$GATEIN_SSO/opensso/plugin/WEB-INF/lib/commons-httpclient-<VERSION>.jar,
and
-
$GATEIN_SSO/opensso/plugin/WEB-INF/lib/commons-logging-<VERSION>.jar
- into the Tomcat Installation at:
- $TOMCAT_HOME/webapps/opensso/WEB-INF/lib</para>
- </listitem>
-
- <listitem>
- <para>Copy
- $GATEIN_SSO/opensso/plugin/WEB-INF/classes/gatein.properties
- into the Tomcat Installation at:
- $TOMCAT_HOME/webapps/opensso/WEB-INF/classes</para>
- </listitem>
-
- <listitem>
- <para>Now you should be able to start Tomcat and access
-
http://localhost:8888/opensso/UI/Login?realm=gatein but at this stage you
won't be able to
- login.</para>
-
- <mediaobject>
- <imageobject>
-
- <imagedata fileref="images/opensso-shot.png"
format="PNG" />
- </imageobject>
- </mediaobject>
- </listitem>
- </orderedlist>
- </section>
- </section>
-
- <section>
- <title>Setup the OpenSSO client</title>
-
- <orderedlist>
- <listitem>
- <para>Copy all libraries from $GATEIN_SSO/opensso/gatein.ear/lib into
- $JBOSS_HOME/server/default/deploy/gatein.ear/lib (Or if you are
- running GateIn in Tomcat, in $GATEIN_HOME/lib)</para>
- </listitem>
-
- <listitem>
- <para>In JBoss AS, edit gatein.ear/META-INF/gatein-jboss-beans.xml
- and uncomment this section</para>
-
- <para><programlisting><authentication>
- <login-module code="org.gatein.sso.agent.login.SSOLoginModule"
flag="required">
- </login-module>
- <login-module
code="org.exoplatform.services.security.j2ee.JbossLoginModule"
flag="required">
- <module-option
name="portalContainerName">portal</module-option>
- <module-option
name="realmName">gatein-domain</module-option>
- </login-module>
-</authentication></programlisting></para>
-
- <para>If you are running GateIn in Tomcat, edit
- $GATEIN_HOME/conf/jaas.conf and uncomment this section</para>
-
- <para><programlisting>org.gatein.sso.agent.login.SSOLoginModule
required
+ </section>
+
+ <section
id="sect-Reference_Guide-OpenSSO_The_Open_Web_SSO_project-Setup_the_OpenSSO_client">
+ <title>Setup the OpenSSO client</title>
+ <orderedlist>
+ <listitem>
+ <para>
+ Copy all libraries from $GATEIN_SSO/opensso/gatein.ear/lib into
$JBOSS_HOME/server/default/deploy/gatein.ear/lib (Or if you are running GateIn in Tomcat,
in $GATEIN_HOME/lib)
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ In JBoss AS, edit gatein.ear/META-INF/gatein-jboss-beans.xml and uncomment this
section
+ </para>
+ <para>
+
+<programlisting><authentication>
+ <login-module code="org.gatein.sso.agent.login.SSOLoginModule"
flag="required">
+ </login-module>
+ <login-module
code="org.exoplatform.services.security.j2ee.JbossLoginModule"
flag="required">
+ <module-option
name="portalContainerName">portal</module-option>
+ <module-option
name="realmName">gatein-domain</module-option>
+ </login-module>
+</authentication>
+</programlisting>
+ </para>
+ <para>
+ If you are running GateIn in Tomcat, edit $GATEIN_HOME/conf/jaas.conf and uncomment
this section
+ </para>
+ <para>
+
+<programlisting>org.gatein.sso.agent.login.SSOLoginModule required
org.exoplatform.services.security.j2ee.JbossLoginModule required
portalContainerName=portal
-realmName=gatein-domain</programlisting>At this point, you can test the
- installation, start GateIn (assuming that the OpenSSO server using
- Tomcat is still running) by going to
http://localhost:8888/opensso/UI/Login?realm=gatein you
- should be able to login with username 'root' and password 'gtn'
or
- any account created through the portal.</para>
- </listitem>
- </orderedlist>
- </section>
+realmName=gatein-domain
+</programlisting>
+ At this point, you can test the installation, start GateIn (assuming that the
OpenSSO server using Tomcat is still running) by going to
http://localhost:8888/opensso/UI/Login?realm=gatein you should be able to login with
username 'root' and password 'gtn' or any account created
through the portal.
+ </para>
+ </listitem>
+ </orderedlist>
+ </section>
+
+ <section
id="sect-Reference_Guide-OpenSSO_The_Open_Web_SSO_project-Setup_the_portal_to_redirect_to_OpenSSO">
+ <title>Setup the portal to redirect to OpenSSO</title>
+ <para>
+ Now we want to tell GateIn to redirect all user authentication to the OpenSSO
server.
+ </para>
+ <para>
+ The OpenSSO server can be located anywhere on the Internet, and this information must
be properly configured within the GateIn instance. This configuration needs to be done in
3 files
+ <itemizedlist>
+ <listitem>
+ <emphasis>In gatein.ear/02portal.war/groovy/portal/webui/UILoginForm.gtmpl
replace the javascript at the bottom by:</emphasis>
+ <para>
+
+<programlisting><script>
+<%=uicomponent.event("Close");%>
+ window.location =
'http://localhost:8888/opensso/UI/Login?realm=gatein&goto=http://localhost:8080/portal/private/classic';
+</script>
+</programlisting>
+ </para>
+ </listitem>
+ <listitem>
+ <emphasis>In gatein.ear/02portal.war/login/jsp/login.jsp replace everything
by:</emphasis>
+ <para>
+
+<programlisting><html>
+ <head>
+ <script type="text/javascript">
+ window.location =
'http://localhost:8888/opensso/UI/Login?realm=gatein&goto=http://localhost:8080/portal/private/classic';
+ </script>
+ </head>
+ <body>
+ </body>
+</html>
+</programlisting>
+ </para>
+ </listitem>
+ <listitem>
+ <emphasis>In gatein.ear/02portal.war/WEB-INF/web.xml replace the
InitiateLoginServlet declaration by:</emphasis>
+ <para>
+
+<programlisting><servlet>
+ <servlet-name>InitiateLoginServlet</servlet-name>
+
<servlet-class>org.gatein.sso.agent.GenericSSOAgent</servlet-class>
+ <init-param>
+ <param-name>ssoServerUrl</param-name>
+
<param-value>http://localhost:8888/opensso</param-value>
+ </init-param>
+ <init-param>
+ <param-name>ssoCookieName</param-name>
+ <param-value>iPlanetDirectoryPro</param-value>
+ </init-param>
+</servlet>
+</programlisting>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ From now on, all links redirecting to the user authentication pages will redirect to
the OpenSSO centralized authentication form.
+ </para>
+ </section>
- <section>
- <title>Setup the portal to redirect to OpenSSO</title>
+ </section>
- <para>Now we want to tell GateIn to redirect all user authentication to
- the OpenSSO server.</para>
-
- <para>The OpenSSO server can be located anywhere on the Internet, and this
- information must be properly configured within the GateIn instance. This
- configuration needs to be done in 3 files <itemizedlist>
- <listitem>
- <emphasis>In
- gatein.ear/02portal.war/groovy/portal/webui/UILoginForm.gtmpl
- replace the javascript at the bottom by:</emphasis>
-
- <para>
- <programlisting><script>
-<%=uicomponent.event("Close");%>
- window.location =
'http://localhost:8888/opensso/UI/Login?realm=gatein&goto=http://localhost:8080/portal/private/classic';
-</script></programlisting>
- </para>
- </listitem>
-
- <listitem>
- <emphasis>In gatein.ear/02portal.war/login/jsp/login.jsp replace
- everything by:</emphasis>
-
- <para>
- <programlisting><html>
- <head>
- <script type="text/javascript">
- window.location =
'http://localhost:8888/opensso/UI/Login?realm=gatein&goto=http://localhost:8080/portal/private/classic';
- </script>
- </head>
- <body>
- </body>
-</html></programlisting>
- </para>
- </listitem>
-
- <listitem>
- <emphasis>In gatein.ear/02portal.war/WEB-INF/web.xml replace the
- InitiateLoginServlet declaration by:</emphasis>
-
- <para>
- <programlisting><servlet>
- <servlet-name>InitiateLoginServlet</servlet-name>
-
<servlet-class>org.gatein.sso.agent.GenericSSOAgent</servlet-class>
- <init-param>
- <param-name>ssoServerUrl</param-name>
- <param-value>http://localhost:8888/opensso</param-value>
- </init-param>
- <init-param>
- <param-name>ssoCookieName</param-name>
- <param-value>iPlanetDirectoryPro</param-value>
- </init-param>
-</servlet></programlisting>
- </para>
- </listitem>
- </itemizedlist></para>
-
- <para>From now on, all links redirecting to the user authentication
- pages will redirect to the OpenSSO centralized authentication form.</para>
- </section>
- </section>
</chapter>
+
Modified:
portal/trunk/docs/reference-guide/en/modules/configuration/Authentication_Token_Configuration.xml
===================================================================
---
portal/trunk/docs/reference-guide/en/modules/configuration/Authentication_Token_Configuration.xml 2010-02-15
01:19:14 UTC (rev 1673)
+++
portal/trunk/docs/reference-guide/en/modules/configuration/Authentication_Token_Configuration.xml 2010-02-15
01:20:35 UTC (rev 1674)
@@ -1,18 +1,15 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Authentication_Token_Configuration">
<title>Authentication Token Configuration</title>
-
<section
id="sect-Reference_Guide-Authentication_Token_Configuration-What_is_token_service">
<title>What is token service</title>
<para>
<emphasis>Token service</emphasis> is used in authentication.
</para>
<para>
- The token system prevents user account information being sent in clear text mode for
inbound requests. This increases authentication security.
+ The token system prevents user account information being sent in clear text mode for
inbound requests. This increases authentication security.
</para>
<para>
Token service allows adminitrators to create, delete, retrieve and clean tokens as
required. The service also defines the validity period of any given token. The token
becomes invalid once this period has expired, . The life-time definition must be
configured.
@@ -20,9 +17,9 @@
</section>
<section
id="sect-Reference_Guide-Authentication_Token_Configuration-Implement_token_services_API">
- <title>Implement token service's API</title>
+ <title>Implement token service's API</title>
<para>
- All token services used in &PRODUCT;'s authentication must be a subclass of an
abstract class <emphasis
role="bold">AbstractTokenService</emphasis>. The following example
shows how the token-service manipulates its tokens.
+ All token services used in &PRODUCT;'s authentication must be a subclass
of an abstract class <emphasis
role="bold">AbstractTokenService</emphasis>. The following example
shows how the token-service manipulates its tokens.
</para>
<programlisting role="JAVA">
@@ -34,7 +31,6 @@
public Credentials validateToken(String tokenKey, boolean remove) throws
NullPointerException;
</programlisting>
<para>
-
</para>
</section>
@@ -44,10 +40,10 @@
Token services configuration includes specifying the validity period time of token in
the configuration file. The token service is configured as a portal component.
</para>
<para>
- In the example below, <emphasis>CookieTokenService</emphasis> is a subclass
of <emphasis role="bold">AbstractTokenService</emphasis> so it has a
property which specifies the validity period of the token.
+ In the example below, <emphasis>CookieTokenService</emphasis> is a
subclass of <emphasis role="bold">AbstractTokenService</emphasis> so
it has a property which specifies the validity period of the token.
</para>
<para>
- The token service will initiate this validity property by looking for an
<parameter>init-param</parameter> named "<emphasis
role="bold">service.configuration</emphasis>".
+ The token service will initiate this validity property by looking for an
<parameter>init-param</parameter> named "<emphasis
role="bold">service.configuration</emphasis>".
</para>
<para>
This property must have three values.
@@ -58,22 +54,21 @@
<area coords="8"
id="area-Reference_Guide-Authentication_Token_Configuration-Configure_token_services-time"
/>
<area coords="9"
id="area-Reference_Guide-Authentication_Token_Configuration-Configure_token_services-unit"
/>
</areaspec>
-
-<programlisting role="XML"><component>
-
<key>org.exoplatform.web.security.security.CookieTokenService</key>
-
<type>org.exoplatform.web.security.security.CookieTokenService</type>
- <init-params>
- <values-param>
- <name>tokenTimeout</name>
- <value>jcr-token</value>
- <value>7</value>
- <value>DAY</value>
- </values-param>
- </init-params>
-</component>
+
+<programlisting role="XML"><component>
+
<key>org.exoplatform.web.security.security.CookieTokenService</key>
+
<type>org.exoplatform.web.security.security.CookieTokenService</type>
+ <init-params>
+ <values-param>
+ <name>tokenTimeout</name>
+ <value>jcr-token</value>
+ <value>7</value>
+ <value>DAY</value>
+ </values-param>
+ </init-params>
+</component>
</programlisting>
-
- <calloutlist>
+ <calloutlist>
<callout
arearefs="area-Reference_Guide-Authentication_Token_Configuration-Configure_token_services-name">
<para>
Service name
@@ -89,13 +84,14 @@
Unit of time
</para>
</callout>
- </calloutlist>
+ </calloutlist>
</programlistingco>
+
<para>
- In this case, the service's name is "<emphasis
role="bold">jcr-token</emphasis>" and the token's expiration
time is a week.
+ In this case, the service's name is "<emphasis
role="bold">jcr-token</emphasis>" and the token's
expiration time is a week.
</para>
<para>
- &PRODUCT; supports <emphasis>four</emphasis> timing units:
+ &PRODUCT; supports <emphasis>four</emphasis> timing units:
</para>
<orderedlist numeration="arabic">
<listitem>
@@ -120,6 +116,7 @@
</listitem>
</orderedlist>
</section>
+
</section>
Modified:
portal/trunk/docs/reference-guide/en/modules/configuration/Dashboard_Configuration.xml
===================================================================
---
portal/trunk/docs/reference-guide/en/modules/configuration/Dashboard_Configuration.xml 2010-02-15
01:19:14 UTC (rev 1673)
+++
portal/trunk/docs/reference-guide/en/modules/configuration/Dashboard_Configuration.xml 2010-02-15
01:20:35 UTC (rev 1674)
@@ -1,52 +1,50 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Dashboard_configuration">
<title>Dashboard configuration</title>
- <para>
- The following parameters are available controll the Dashboard configuration (when in
edit mode):
- </para>
- <formalpara>
- <title>owner</title>
- <para>
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- if empty, everyone share the same dashboard and can edit it
- </para>
- </listitem>
- <listitem>
- <para>
- if set to <emphasis>CURRENTUSER</emphasis> , every user has his own
dashboard
- </para>
- </listitem>
- <listitem>
- <para>
- if set to a username, everyone will see the dashboard of this person
- </para>
- </listitem>
- </orderedlist>
- </para>
- </formalpara>
- <formalpara>
- <title>isPrivate</title>
- <para>
- <orderedlist numeration="arabic">
- <listitem>
- <para>
- if set to 1, only the owner of the dashboard can edit it
- </para>
- </listitem>
- <listitem>
- <para>
- if set to 0, everyone can edit it
- </para>
- </listitem>
- </orderedlist>
- </para>
- </formalpara>
+ <para>
+ The following parameters are available controll the Dashboard configuration (when in
edit mode):
+ </para>
+ <formalpara id="form-Reference_Guide-Dashboard_configuration-owner">
+ <title>owner</title>
+ <para>
+ <orderedlist numeration="arabic">
+ <listitem>
+ <para>
+ if empty, everyone share the same dashboard and can edit it
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ if set to <emphasis>CURRENTUSER</emphasis> , every user has his own
dashboard
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ if set to a username, everyone will see the dashboard of this person
+ </para>
+ </listitem>
+ </orderedlist>
+ </para>
+ </formalpara>
+ <formalpara
id="form-Reference_Guide-Dashboard_configuration-isPrivate">
+ <title>isPrivate</title>
+ <para>
+ <orderedlist numeration="arabic">
+ <listitem>
+ <para>
+ if set to 1, only the owner of the dashboard can edit it
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ if set to 0, everyone can edit it
+ </para>
+ </listitem>
+ </orderedlist>
+ </para>
+ </formalpara>
</section>
Modified:
portal/trunk/docs/reference-guide/en/modules/configuration/Data_Injector_Configuration.xml
===================================================================
---
portal/trunk/docs/reference-guide/en/modules/configuration/Data_Injector_Configuration.xml 2010-02-15
01:19:14 UTC (rev 1673)
+++
portal/trunk/docs/reference-guide/en/modules/configuration/Data_Injector_Configuration.xml 2010-02-15
01:20:35 UTC (rev 1674)
@@ -1,18 +1,15 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Data_Injector_Configuration">
<title>Data Injector Configuration</title>
<section
id="sect-Reference_Guide-Data_Injector_Configuration-Data_Injector">
<title>Data Injector</title>
<para>
- <emphasis>Data-injector</emphasis> is a utility to initialize enterprise
data for &PRODUCT;. It is packed as a .jar.
-<!--
+ <emphasis>Data-injector</emphasis> is a utility to initialize enterprise
data for &PRODUCT;. It is packed as a .jar. <!--
and deployed under $TOMCATHOME/lib. It is started
automatically when Tomcat starts.
- -->
+ -->
</para>
</section>
@@ -21,73 +18,74 @@
<para>
<emphasis>OrganizationInitializer</emphasis> is the service that allows
creating a large organization with many groups and users. It also creates portal
navigation and page(s) for each group and each user.
</para>
- <formalpara >
- <title>Service configuration file</title>
+ <formalpara
id="form-Reference_Guide-OrganizationInitializer-Service_configuration_file">
+ <title>Service configuration file</title>
<para>
-<programlisting role="XML"><configuration>
- <component>
-
<key>org.exoplatform.portal.initializer.organization.OrganizationInitializer</key>
-
<type>org.exoplatform.portal.initializer.organization.OrganizationInitializer</type>
- <init-params>
- <value-param>
- <name>auto.create.group.page.navigation</name>
- <description>true or false</description>
- <value>true</value>
- </value-param>
+
+<programlisting role="XML"><configuration>
+ <component>
+
<key>org.exoplatform.portal.initializer.organization.OrganizationInitializer</key>
+
<type>org.exoplatform.portal.initializer.organization.OrganizationInitializer</type>
+ <init-params>
+ <value-param>
+ <name>auto.create.group.page.navigation</name>
+ <description>true or false</description>
+ <value>true</value>
+ </value-param>
- <value-param>
- <name>auto.create.user.page.navigation</name>
- <description>number of pages per user</description>
- <value>10</value>
- </value-param>
+ <value-param>
+ <name>auto.create.user.page.navigation</name>
+ <description>number of pages per
user</description>
+ <value>10</value>
+ </value-param>
- <object-param>
- <name>organization</name>
- <description>description</description>
- <object
type="org.exoplatform.portal.initializer.organization.OrganizationConfig">
- <field name="groups">
- <collection type="java.util.ArrayList">
- <value>
- <object
type="org.exoplatform.portal.initializer.organization.OrganizationConfig$GroupsConfig">
- <field name="group">
- <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field
name="name"><string>province</string></field>
- <field
name="parentId"><string>/africa/tanzania</string></field>
- <field
name="description"><string>Tanzania's
province</string></field>
- <field
name="label"><string>Province</string></field>
- </object>
- </field>
- <field
name="from"><string>1</string></field>
- <field
name="to"><string>10</string></field>
- </object>
- </value>
- </collection>
- </field>
- <field name="users">
- <collection type="java.util.ArrayList">
- <value>
- <object
type="org.exoplatform.portal.initializer.organization.OrganizationConfig$UsersConfig">
- <field name="user">
- <object
type="org.exoplatform.services.organization.OrganizationConfig$User">
- <field
name="userName"><string>user</string></field>
- <field
name="password"><string>GateInPlatform</string></field>
- <field
name="firstName"><string>First-Name</string></field>
- <field
name="lastName"><string>Last-Name</string></field>
- <field
name="email"><string>exo@localhost</string></field>
- <field
name="groups"><string>member:/africa</string></field>
- </object>
- </field>
- <field
name="from"><string>0</string></field>
- <field
name="to"><string>9</string></field>
- </object>
- </value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component>
-</configuration>
+ <object-param>
+ <name>organization</name>
+ <description>description</description>
+ <object
type="org.exoplatform.portal.initializer.organization.OrganizationConfig">
+ <field name="groups">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object
type="org.exoplatform.portal.initializer.organization.OrganizationConfig$GroupsConfig">
+ <field name="group">
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field
name="name"><string>province</string></field>
+ <field
name="parentId"><string>/africa/tanzania</string></field>
+ <field
name="description"><string>Tanzania's
province</string></field>
+ <field
name="label"><string>Province</string></field>
+ </object>
+ </field>
+ <field
name="from"><string>1</string></field>
+ <field
name="to"><string>10</string></field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ <field name="users">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object
type="org.exoplatform.portal.initializer.organization.OrganizationConfig$UsersConfig">
+ <field name="user">
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$User">
+ <field
name="userName"><string>user</string></field>
+ <field
name="password"><string>GateInPlatform</string></field>
+ <field
name="firstName"><string>First-Name</string></field>
+ <field
name="lastName"><string>Last-Name</string></field>
+ <field
name="email"><string>exo@localhost</string></field>
+ <field
name="groups"><string>member:/africa</string></field>
+ </object>
+ </field>
+ <field
name="from"><string>0</string></field>
+ <field
name="to"><string>9</string></field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component>
+</configuration>
</programlisting>
</para>
</formalpara>
@@ -96,118 +94,117 @@
<section
id="sect-Reference_Guide-Data_Injector_Configuration-Group_Parameters">
<title>Group Parameters</title>
<variablelist>
- <varlistentry>
- <term>Name</term>
- <listitem>
- <para>
- The name of the group.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>ParentId</term>
- <listitem>
- <para>
- The ID of the parent group. If the parent ID is null the group is at the first
level. If parent groups do not exist, this ID will be created automatically.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Description</term>
- <listitem>
- <para>
- A description of the group.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Label</term>
- <listitem>
- <para>
- A label for the group.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>From and to</term>
- <listitem>
- <para>
- This group can be cloned to may copies and each copy is marked with a number.
- </para>
- </listitem>
- </varlistentry>
+ <varlistentry>
+ <term>Name</term>
+ <listitem>
+ <para>
+ The name of the group.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>ParentId</term>
+ <listitem>
+ <para>
+ The ID of the parent group. If the parent ID is null the group is at the first
level. If parent groups do not exist, this ID will be created automatically.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Description</term>
+ <listitem>
+ <para>
+ A description of the group.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Label</term>
+ <listitem>
+ <para>
+ A label for the group.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>From and to</term>
+ <listitem>
+ <para>
+ This group can be cloned to may copies and each copy is marked with a number.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</section>
<section
id="sect-Reference_Guide-Data_Injector_Configuration-User_Parameters">
<title>User Parameters</title>
<variablelist>
- <varlistentry>
- <term>UserName</term>
- <listitem>
- <para>
- The user's ID.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Password</term>
- <listitem>
- <para>
- The user's password.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>FirstName</term>
- <listitem>
- <para>
-
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>LastName</term>
- <listitem>
- <para>
- last name.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Email</term>
- <listitem>
- <para>
- The user's email address.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Groups</term>
-
- <listitem>
- <para>
- A list of the groups that user belongs to.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>From and to</term>
- <listitem>
- <para>
- Users can be cloned and each copy is assigned a number. This allows the creation of
a range of users that can be put into various groups based on the range value.
- </para>
- </listitem>
- </varlistentry>
+ <varlistentry>
+ <term>UserName</term>
+ <listitem>
+ <para>
+ The user's ID.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Password</term>
+ <listitem>
+ <para>
+ The user's password.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>FirstName</term>
+ <listitem>
+ <para>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>LastName</term>
+ <listitem>
+ <para>
+ last name.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Email</term>
+ <listitem>
+ <para>
+ The user's email address.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Groups</term>
+ <listitem>
+ <para>
+ A list of the groups that user belongs to.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>From and to</term>
+ <listitem>
+ <para>
+ Users can be cloned and each copy is assigned a number. This allows the creation of
a range of users that can be put into various groups based on the range value.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</section>
- <section>
- <title>Automatic Navigation Creation</title>
+
+ <section
id="sect-Reference_Guide-Data_Injector_Configuration-Automatic_Navigation_Creation">
+ <title>Automatic Navigation Creation</title>
<para>
- The " <literal>auto.create.group.page.navigation</literal>"
parameter value is <parameter>true</parameter> or
<parameter>false</parameter>. If this value is set to
<parameter>true</parameter> it automatically creates portal navigations and
pages for each group. If <parameter>false</parameter> it does not.
+ The "
<literal>auto.create.group.page.navigation</literal>" parameter value
is <parameter>true</parameter> or <parameter>false</parameter>. If
this value is set to <parameter>true</parameter> it automatically creates
portal navigations and pages for each group. If <parameter>false</parameter>
it does not.
</para>
<para>
- The "<literal>auto.create.user.page.navigation</literal>"
parameter value is the number of pages that are automatically created for each user.
+ The "<literal>auto.create.user.page.navigation</literal>"
parameter value is the number of pages that are automatically created for each user.
</para>
</section>
Modified:
portal/trunk/docs/reference-guide/en/modules/configuration/Database_Configuration.xml
===================================================================
---
portal/trunk/docs/reference-guide/en/modules/configuration/Database_Configuration.xml 2010-02-15
01:19:14 UTC (rev 1673)
+++
portal/trunk/docs/reference-guide/en/modules/configuration/Database_Configuration.xml 2010-02-15
01:20:35 UTC (rev 1674)
@@ -1,7 +1,5 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Database_Configuration">
<title>Database Configuration</title>
@@ -21,73 +19,73 @@
<section
id="sect-Reference_Guide-Database_Configuration-DB_and_datasource_configuration">
<title>DB and datasource configuration</title>
<para>
- You can find the database configuration in the
portal/WEB-INF/conf/database/database-configuration.xml file (located in your application
server's web application directory).
+ You can find the database configuration in the
portal/WEB-INF/conf/database/database-configuration.xml file (located in your application
server's web application directory).
</para>
-<programlisting role="XML"><?xml version="1.0"
encoding="ISO-8859-1"?>
-<configuration>
+<programlisting role="XML"><?xml version="1.0"
encoding="ISO-8859-1"?>
+<configuration>
[...]
- <component>
-
<key>org.exoplatform.services.database.HibernateService</key>
- <jmx-name>database:type=HibernateService</jmx-name>
-
<type>org.exoplatform.services.database.impl.HibernateServiceImpl</type>
- <init-params>
- <properties-param>
- <name>hibernate.properties</name>
- <description>Default Hibernate Service</description>
- <property name="hibernate.show_sql"
value="false"/>
- <property name="hibernate.cglib.use_reflection_optimizer"
value="true"/>
- <property name="hibernate.connection.url"
value="jdbc:hsqldb:file:../temp/data/exodb"/>
- <property name="hibernate.connection.driver_class"
value="org.hsqldb.jdbcDriver"/>
- <property name="hibernate.connection.autocommit"
value="true"/>
- <property name="hibernate.connection.username"
value="sa"/>
- <property name="hibernate.connection.password"
value=""/>
- <property name="hibernate.dialect"
value="org.hibernate.dialect.HSQLDialect"/>
- <property name="hibernate.c3p0.min_size"
value="5"/>
- <property name="hibernate.c3p0.max_size"
value="20"/>
- <property name="hibernate.c3p0.timeout"
value="1800"/>
- <property name="hibernate.c3p0.max_statements"
value="50"/>
- </properties-param>
- </init-params>
- </component>
- <external-component-plugins>
-
<target-component>org.exoplatform.services.naming.InitialContextInitializer</target-component>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
-
<type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcexo</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
-
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName"
value="org.hsqldb.jdbcDriver"/>
- <property name="url"
value="jdbc:hsqldb:file:../temp/data/exodb"/>
- <property name="username" value="sa"/>
- <property name="password" value=""/>
- </properties-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
+ <component>
+
<key>org.exoplatform.services.database.HibernateService</key>
+ <jmx-name>database:type=HibernateService</jmx-name>
+
<type>org.exoplatform.services.database.impl.HibernateServiceImpl</type>
+ <init-params>
+ <properties-param>
+ <name>hibernate.properties</name>
+ <description>Default Hibernate
Service</description>
+ <property name="hibernate.show_sql"
value="false"/>
+ <property name="hibernate.cglib.use_reflection_optimizer"
value="true"/>
+ <property name="hibernate.connection.url"
value="jdbc:hsqldb:file:../temp/data/exodb"/>
+ <property name="hibernate.connection.driver_class"
value="org.hsqldb.jdbcDriver"/>
+ <property name="hibernate.connection.autocommit"
value="true"/>
+ <property name="hibernate.connection.username"
value="sa"/>
+ <property name="hibernate.connection.password"
value=""/>
+ <property name="hibernate.dialect"
value="org.hibernate.dialect.HSQLDialect"/>
+ <property name="hibernate.c3p0.min_size"
value="5"/>
+ <property name="hibernate.c3p0.max_size"
value="20"/>
+ <property name="hibernate.c3p0.timeout"
value="1800"/>
+ <property name="hibernate.c3p0.max_statements"
value="50"/>
+ </properties-param>
+ </init-params>
+ </component>
+ <external-component-plugins>
+
<target-component>org.exoplatform.services.naming.InitialContextInitializer</target-component>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+
<type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcexo</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName"
value="org.hsqldb.jdbcDriver"/>
+ <property name="url"
value="jdbc:hsqldb:file:../temp/data/exodb"/>
+ <property name="username"
value="sa"/>
+ <property name="password"
value=""/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
[...]
-</configuration>
+</configuration>
</programlisting>
<para>
- The first component configuration is for the Hibernate service. You can enter any
additional properties in a <literal>hibernate.properties</literal> file, but
&PRODUCT; will override <literal>hibernate.properties</literal> with
values read in from this configuration file.
+ The first component configuration is for the Hibernate service. You can enter any
additional properties in a <literal>hibernate.properties</literal> file, but
&PRODUCT; will override <literal>hibernate.properties</literal> with
values read in from this configuration file.
</para>
<para>
- The second component configuration is for the JCR datasource. The
<literal>InitialContextInitializer</literal> component will load the factory
class, use the factory object to create a datasource, and bind that datasource in the JNDI
tree with the value of the "bind-name" parameter. If you want to change the
bind-name, for example "<parameter>jdbcexo</parameter>" to
"<parameter>myjdbc</parameter>", you also need to change JCR
repository configuration in order that the service picks up the right datasource.
+ The second component configuration is for the JCR datasource. The
<literal>InitialContextInitializer</literal> component will load the factory
class, use the factory object to create a datasource, and bind that datasource in the JNDI
tree with the value of the "bind-name" parameter. If you want to change
the bind-name, for example "<parameter>jdbcexo</parameter>" to
"<parameter>myjdbc</parameter>", you also need to change JCR
repository configuration in order that the service picks up the right datasource.
</para>
<para>
Make sure you update the database connection properties and dialect for both of these
component configurations.
@@ -104,24 +102,24 @@
</para>
<programlisting>[...]
- <component>
-
<key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
-
<type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
- <init-params>
- <value-param>
- <name>conf-path</name>
- <description>JCR configuration file</description>
-
<value>war:/conf/jcr/repository-configuration.xml</value>
- </value-param>
- <properties-param>
- <name>working-conf</name>
- <description>working-conf</description>
- <property name="persisterClassName"
value="org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister"/>
- <property name="sourceName" value="jdbcexo"/>
- <property name="dialect" value="hsqldb"/>
- </properties-param>
- </init-params>
- </component>
+ <component>
+
<key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
+
<type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
+ <init-params>
+ <value-param>
+ <name>conf-path</name>
+ <description>JCR configuration file</description>
+
<value>war:/conf/jcr/repository-configuration.xml</value>
+ </value-param>
+ <properties-param>
+ <name>working-conf</name>
+ <description>working-conf</description>
+ <property name="persisterClassName"
value="org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister"/>
+ <property name="sourceName"
value="jdbcexo"/>
+ <property name="dialect"
value="hsqldb"/>
+ </properties-param>
+ </init-params>
+ </component>
[...]
</programlisting>
<para>
@@ -129,52 +127,52 @@
</para>
<programlisting role="XML"> ...]
- <workspaces>
- <workspace name="system"
auto-init-root-nodetype="nt:unstructured"
- auto-init-permissions="*:/platform/administrators
read;*:/platform/administrators add_node;*:/platform/administrators
set_property;*:/platform/administrators remove" >
- <!-- for system storage -->
- <container
class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
- <properties>
- <property name="sourceName"
value="jdbcexo"/>
- <property name="dialect" value="hsql"/>
- <!-- property name="db-type" value="mysql"/
-->
- <property name="multi-db"
value="false"/>
- <property name="update-storage"
value="true"/>
- <property name="max-buffer-size"
value="204800"/>
- <property name="swap-directory"
value="../temp/swap/system"/>
- </properties>
+ <workspaces>
+ <workspace name="system"
auto-init-root-nodetype="nt:unstructured"
+ auto-init-permissions="*:/platform/administrators
read;*:/platform/administrators add_node;*:/platform/administrators
set_property;*:/platform/administrators remove" >
+ <!-- for system storage -->
+ <container
class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
+ <properties>
+ <property name="sourceName"
value="jdbcexo"/>
+ <property name="dialect"
value="hsql"/>
+ <!-- property name="db-type"
value="mysql"/ -->
+ <property name="multi-db"
value="false"/>
+ <property name="update-storage"
value="true"/>
+ <property name="max-buffer-size"
value="204800"/>
+ <property name="swap-directory"
value="../temp/swap/system"/>
+ </properties>
[...]
- </workspace>
- <workspace name="collaboration"
auto-init-root-nodetype="nt:unstructured"
- auto-init-permissions="any read;*:/platform/administrators
read;*:/platform/administrators add_node;*:/platform/administrators
set_property;*:/platform/administrators remove" >
- <!-- for system storage -->
- <container
class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
- <properties>
- <property name="sourceName"
value="jdbcexo"/>
- <property name="dialect"
value="hsqldb"/>
- <property name="multi-db"
value="false"/>
- <property name="update-storage"
value="true"/>
- <property name="max-buffer-size"
value="204800"/>
- <property name="swap-directory"
value="../temp/swap/collaboration"/>
- </properties>
+ </workspace>
+ <workspace name="collaboration"
auto-init-root-nodetype="nt:unstructured"
+ auto-init-permissions="any read;*:/platform/administrators
read;*:/platform/administrators add_node;*:/platform/administrators
set_property;*:/platform/administrators remove" >
+ <!-- for system storage -->
+ <container
class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
+ <properties>
+ <property name="sourceName"
value="jdbcexo"/>
+ <property name="dialect"
value="hsqldb"/>
+ <property name="multi-db"
value="false"/>
+ <property name="update-storage"
value="true"/>
+ <property name="max-buffer-size"
value="204800"/>
+ <property name="swap-directory"
value="../temp/swap/collaboration"/>
+ </properties>
[...]
- </workspace>
- <workspace name="backup"
auto-init-root-nodetype="nt:unstructured"
- auto-init-permissions="any read;*:/platform/administrators
read;*:/platform/administrators add_node;*:/platform/administrators
set_property;*:/platform/administrators remove" >
- <!-- for system storage -->
- <container
class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
- <properties>
- <property name="sourceName"
value="jdbcexo"/>
- <property name="dialect" value="mysql"/>
- <!-- property name="db-type" value="mysql"/
-->
- <property name="multi-db"
value="false"/>
- <property name="update-storage"
value="true"/>
- <property name="max-buffer-size"
value="204800"/>
- <property name="swap-directory"
value="../temp/swap/backup"/>
- </properties>
- </workspace>
+ </workspace>
+ <workspace name="backup"
auto-init-root-nodetype="nt:unstructured"
+ auto-init-permissions="any read;*:/platform/administrators
read;*:/platform/administrators add_node;*:/platform/administrators
set_property;*:/platform/administrators remove" >
+ <!-- for system storage -->
+ <container
class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
+ <properties>
+ <property name="sourceName"
value="jdbcexo"/>
+ <property name="dialect"
value="mysql"/>
+ <!-- property name="db-type"
value="mysql"/ -->
+ <property name="multi-db"
value="false"/>
+ <property name="update-storage"
value="true"/>
+ <property name="max-buffer-size"
value="204800"/>
+ <property name="swap-directory"
value="../temp/swap/backup"/>
+ </properties>
+ </workspace>
[...]
- </workspaces>
+ </workspaces>
[...]
</programlisting>
</section>
Modified:
portal/trunk/docs/reference-guide/en/modules/configuration/Default_Portal_Configuration.xml
===================================================================
---
portal/trunk/docs/reference-guide/en/modules/configuration/Default_Portal_Configuration.xml 2010-02-15
01:19:14 UTC (rev 1673)
+++
portal/trunk/docs/reference-guide/en/modules/configuration/Default_Portal_Configuration.xml 2010-02-15
01:20:35 UTC (rev 1674)
@@ -1,43 +1,41 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Default_Portal_Configuration">
<title>Default Portal Configuration</title>
<section
id="sect-Reference_Guide-Default_Portal_Configuration-Overview">
<title>Overview</title>
<para>
- The default portal will be accessed if the user doesn't specify another portal.
For example: <literal>http://hostname:port/portal/</literal>. The default
portal also be used at startup to determine if the tomcat database is empty or not.
+ The default portal will be accessed if the user doesn't specify another
portal. For example: <literal>http://hostname:port/portal/</literal>. The
default portal also be used at startup to determine if the tomcat database is empty or
not.
</para>
</section>
<section
id="sect-Reference_Guide-Default_Portal_Configuration-Configuration">
<title>Configuration</title>
<para>
- The example configuration file below is found at:
"<filename>02portal.war:/WEB-INF/conf/portal/portal-configuration.xml</filename>".
+ The example configuration file below is found at:
"<filename>02portal.war:/WEB-INF/conf/portal/portal-configuration.xml</filename>".
</para>
-<programlisting role="XML"><component>
-
<key>org.exoplatform.portal.config.UserPortalConfigService</key>
-
<type>org.exoplatform.portal.config.UserPortalConfigService</type>
- <component-plugins>
- <component-plugin>
- <name>new.portal.config.user.listener</name>
- <set-method>initListener</set-method>
-
<type>org.exoplatform.portal.config.NewPortalConfigListener</type>
- <description>this listener init the portal
configuration</description>
- <init-params>
- <value-param>
- <name>default.portal</name>
- <description>The default portal for checking db is empty or
not</description>
- <value>classic</value>
- </value-param>
+<programlisting role="XML"><component>
+
<key>org.exoplatform.portal.config.UserPortalConfigService</key>
+
<type>org.exoplatform.portal.config.UserPortalConfigService</type>
+ <component-plugins>
+ <component-plugin>
+ <name>new.portal.config.user.listener</name>
+ <set-method>initListener</set-method>
+
<type>org.exoplatform.portal.config.NewPortalConfigListener</type>
+ <description>this listener init the portal
configuration</description>
+ <init-params>
+ <value-param>
+ <name>default.portal</name>
+ <description>The default portal for checking db is empty or
not</description>
+ <value>classic</value>
+ </value-param>
..........
- </init-params>
- </component-plugin>
- </component-plugins>
- </component>
+ </init-params>
+ </component-plugin>
+ </component-plugins>
+ </component>
</programlisting>
<para>
In this example the <emphasis role="bold">classic</emphasis>
portal has been set as the default. Note that the definition should be as a initial
parameter of the NewPortalConfigListener component-plugin.
Modified:
portal/trunk/docs/reference-guide/en/modules/configuration/IDM_Configuration.xml
===================================================================
---
portal/trunk/docs/reference-guide/en/modules/configuration/IDM_Configuration.xml 2010-02-15
01:19:14 UTC (rev 1673)
+++
portal/trunk/docs/reference-guide/en/modules/configuration/IDM_Configuration.xml 2010-02-15
01:20:35 UTC (rev 1674)
@@ -1,7 +1,5 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-PicketLink_IDM_integration">
<title>PicketLink IDM integration</title>
@@ -9,7 +7,7 @@
&PRODUCT; uses the PicketLink IDM component to retain necessary identity
information (user, groups, memberships, etc.). While legacy interfaces are still used
(org.exoplatform.services.organization) for identity management, the wrapper
implementation delegates to the PicketLink IDM framework.
</para>
<para>
- This section doesn't provide information about PicketLink IDM and its
configuration. Please refer to the appropriate project documentation (<ulink
url="http://jboss.org/picketlink/IDM.html" />) for further information.
+ This section doesn't provide information about PicketLink IDM and its
configuration. Please refer to the appropriate project documentation (<ulink
url="http://jboss.org/picketlink/IDM.html" />) for further information.
</para>
<note>
<para>
@@ -17,8 +15,8 @@
</para>
</note>
<para>
- The identity model represented in '<emphasis
role="bold">org.exoplatform.services.organization</emphasis>'
interfaces and the one used in <emphasis role="bold">JBoss Identity
IDM</emphasis> have some major differences.
- </para>
+ The identity model represented in '<emphasis
role="bold">org.exoplatform.services.organization</emphasis>'
interfaces and the one used in <emphasis role="bold">JBoss Identity
IDM</emphasis> have some major differences.
+ </para>
<para>
For example: the <emphasis role="bold">JBoss Identity
IDM</emphasis> provides greater abstraction. It is possible for groups in the
<emphasis role="bold">IDM</emphasis> framework to form memberships
with many parents (which requires recursive ID translation) while the GateIn model allows
only pure tree like membership structures.
</para>
@@ -32,79 +30,77 @@
</para>
<programlistingco>
<areaspec>
- <area coords="7"
id="area-Reference_Guide--PicketLink_IDM_integration-Configuration_files-JBossIDMServiceImpl"
/>
- <area coords="52"
id="area-Reference_Guide--PicketLink_IDM_integration-Configuration_files-JBossIDMOrganizationServiceImpl"
/>
+ <area coords="7"
id="area-Reference_Guide-PicketLink_IDM_integration-Configuration_files-JBossIDMServiceImpl"
/>
+ <area coords="52"
id="area-Reference_Guide-PicketLink_IDM_integration-Configuration_files-JBossIDMOrganizationServiceImpl"
/>
</areaspec>
+
+<programlisting role="XML"><configuration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd
http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"&a...;
-<programlisting role="XML"><configuration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd
http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
-
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+ <component>
+
<key>org.exoplatform.services.organization.jbidm.JBossIDMService</key>
+
<type>org.exoplatform.services.organization.jbidm.JBossIDMServiceImpl</type>
+ <init-params>
+ <value-param>
+ <name>config</name>
+
<value>war:/conf/organization/idm-config.xml</value>
+ </value-param>
+ <values-param>
+ <name>hibernate.annotations</name>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObject</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectAttribute</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectBinaryAttribute</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectBinaryAttributeValue</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredential</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredentialType</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationship</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipType</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectTextAttribute</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectType</value>
+
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateRealm</value>
+ </values-param>
+ <properties-param>
+ <name>hibernate.properties</name>
+ <property name="hibernate.hbm2ddl.auto"
value="update"/>
+ <property
name="hibernate.current_session_context_class"
value="thread"/>
+ <property name="hibernate.show_sql"
value="false"/>
+ <property
name="hibernate.cglib.use_reflection_optimizer"
value="true"/>
+ <property name="hibernate.connection.url"
value="jdbc:hsqldb:file:../temp/data/exodb${container.name.suffix}"/>
+ <property name="hibernate.connection.driver_class"
value="org.hsqldb.jdbcDriver"/>
+ <property name="hibernate.connection.autocommit"
value="true"/>
+ <property name="hibernate.connection.username"
value="sa"/>
+ <property name="hibernate.connection.password"
value=""/>
+ <property name="hibernate.dialect"
value="org.hibernate.dialect.HSQLDialect"/>
+ <property name="hibernate.c3p0.min_size"
value="5"/>
+ <property name="hibernate.c3p0.max_size"
value="20"/>
+ <property name="hibernate.c3p0.timeout"
value="1800"/>
+ <property name="hibernate.c3p0.max_statements"
value="50"/>
+ <property name="hibernate.connection.provider_class"
value="org.hibernate.connection.C3P0ConnectionProvider" />
+ </properties-param>
- <component>
-
<key>org.exoplatform.services.organization.jbidm.JBossIDMService</key>
-
<type>org.exoplatform.services.organization.jbidm.JBossIDMServiceImpl</type>
- <init-params>
- <value-param>
- <name>config</name>
-
<value>war:/conf/organization/idm-config.xml</value>
- </value-param>
- <values-param>
- <name>hibernate.annotations</name>
-
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObject</value>
-
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectAttribute</value>
-
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectBinaryAttribute</value>
-
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectBinaryAttributeValue</value>
-
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredential</value>
-
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredentialType</value>
-
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationship</value>
-
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName</value>
-
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipType</value>
-
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectTextAttribute</value>
-
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectType</value>
-
<value>org.jboss.identity.idm.impl.model.hibernate.HibernateRealm</value>
- </values-param>
- <properties-param>
- <name>hibernate.properties</name>
- <property name="hibernate.hbm2ddl.auto"
value="update"/>
- <property name="hibernate.current_session_context_class"
value="thread"/>
- <property name="hibernate.show_sql"
value="false"/>
- <property name="hibernate.cglib.use_reflection_optimizer"
value="true"/>
- <property name="hibernate.connection.url"
value="jdbc:hsqldb:file:../temp/data/exodb${container.name.suffix}"/>
- <property name="hibernate.connection.driver_class"
value="org.hsqldb.jdbcDriver"/>
- <property name="hibernate.connection.autocommit"
value="true"/>
- <property name="hibernate.connection.username"
value="sa"/>
- <property name="hibernate.connection.password"
value=""/>
- <property name="hibernate.dialect"
value="org.hibernate.dialect.HSQLDialect"/>
- <property name="hibernate.c3p0.min_size"
value="5"/>
- <property name="hibernate.c3p0.max_size"
value="20"/>
- <property name="hibernate.c3p0.timeout"
value="1800"/>
- <property name="hibernate.c3p0.max_statements"
value="50"/>
- <property name="hibernate.connection.provider_class"
value="org.hibernate.connection.C3P0ConnectionProvider" />
- </properties-param>
+ </init-params>
+ </component>
- </init-params>
- </component>
+ <component>
+
<key>org.exoplatform.services.organization.OrganizationService</key>
+
<type>org.exoplatform.services.organization.jbidm.JBossIDMOrganizationServiceImpl</type>
+ </component>
- <component>
-
<key>org.exoplatform.services.organization.OrganizationService</key>
-
<type>org.exoplatform.services.organization.jbidm.JBossIDMOrganizationServiceImpl</type>
- </component>
-
-</configuration>
+</configuration>
</programlisting>
<calloutlist>
- <callout
arearefs="area-Reference_Guide--PicketLink_IDM_integration-Configuration_files-JBossIDMServiceImpl">
+ <callout
arearefs="area-Reference_Guide-PicketLink_IDM_integration-Configuration_files-JBossIDMServiceImpl">
<para>
The <emphasis
role="bold">org.exoplatform.services.organization.jbidm.JBossIDMServiceImpl</emphasis>
service has following options:
</para>
-
-
-<!-- Included in calloutlist <para>
+ <!-- Included in calloutlist <para>
The <emphasis
role="bold">org.exoplatform.services.organization.jbidm.JBossIDMOrganizationServiceImpl</emphasis>
is a main entrypoint implementing <emphasis
role="bold">org.exoplatform.services.organization.OrganizationService</emphasis>
and is dependant on <emphasis
role="bold">org.exoplatform.services.organization.jbidm.JBossIDMService</emphasis>
</para>
<para>
The <emphasis
role="bold">org.exoplatform.services.organization.jbidm.JBossIDMServiceImpl</emphasis>
service has following options:
- </para> -->
+ </para> -->
<itemizedlist>
<listitem>
<para>
@@ -128,17 +124,17 @@
</listitem>
<listitem>
<para>
- <emphasis role="bold">jndiName</emphasis> - (value-param) -
in case 'config' parameter is not provided this will be used to perform JNDI
lookup for IdentitySessionFactory
+ <emphasis role="bold">jndiName</emphasis> - (value-param) -
in case 'config' parameter is not provided this will be used to perform
JNDI lookup for IdentitySessionFactory
</para>
</listitem>
<listitem>
<para>
- <emphasis role="bold">PortalRealm</emphasis> -
(value-param) - name of a realm that should be used to obtain proper IdentitySession -
default is 'PortalRealm'.
+ <emphasis role="bold">PortalRealm</emphasis> -
(value-param) - name of a realm that should be used to obtain proper IdentitySession -
default is 'PortalRealm'.
</para>
</listitem>
</itemizedlist>
</callout>
- <callout
arearefs="area-Reference_Guide--PicketLink_IDM_integration-Configuration_files-JBossIDMOrganizationServiceImpl">
+ <callout
arearefs="area-Reference_Guide-PicketLink_IDM_integration-Configuration_files-JBossIDMOrganizationServiceImpl">
<para>
The <emphasis
role="bold">org.exoplatform.services.organization.jbidm.JBossIDMOrganizationServiceImpl</emphasis>
key is a main entrypoint implementing <emphasis
role="bold">org.exoplatform.services.organization.OrganizationService</emphasis>
and is dependant on <emphasis
role="bold">org.exoplatform.services.organization.jbidm.JBossIDMService</emphasis>
</para>
@@ -148,17 +144,17 @@
<itemizedlist>
<listitem>
<para>
- <emphasis role="bold">exoGroupTypeName</emphasis> -
(value-param) - Name of JBoss Identity IDM GroupType that will be used to store groups.
Default is 'EXO_GROUP_TYPE'
+ <emphasis role="bold">exoGroupTypeName</emphasis> -
(value-param) - Name of JBoss Identity IDM GroupType that will be used to store groups.
Default is 'EXO_GROUP_TYPE'
</para>
</listitem>
<listitem>
<para>
- <emphasis role="bold">exoRootGroupName</emphasis> -
(value-param) - Name of JBoss Identity IDM Group that will be used as a root parent.
Default is 'EXO_ROOT_GROUP'
+ <emphasis role="bold">exoRootGroupName</emphasis> -
(value-param) - Name of JBoss Identity IDM Group that will be used as a root parent.
Default is 'EXO_ROOT_GROUP'
</para>
</listitem>
<listitem>
<para>
- <emphasis role="bold">exoRootGroupTypeName</emphasis> -
(value-param) - Name of JBoss Identity IDM GroupType of a Group used as a parent root.
Default is 'EXO_GROUP_TYPE'
+ <emphasis role="bold">exoRootGroupTypeName</emphasis> -
(value-param) - Name of JBoss Identity IDM GroupType of a Group used as a parent root.
Default is 'EXO_GROUP_TYPE'
</para>
</listitem>
<listitem>
@@ -189,9 +185,9 @@
</itemizedlist>
</callout>
</calloutlist>
- </programlistingco>
-
-<!-- In calloutlist above <para>
+ </programlistingco>
+
+ <!-- In calloutlist above <para>
<emphasis
role="bold">org.exoplatform.services.organization.jbidm.JBossIDMOrganizationServiceImpl</emphasis>
service has following options:
</para>
<itemizedlist>
@@ -235,85 +231,84 @@
GateIn MembershipType interface properties fields are persisted in JBoss Identity
IDM using those RoleType properties: description, owner, create_date, modified_date
</para>
</listitem>
- </itemizedlist> -->
-
+ </itemizedlist> -->
<para>
A sample <emphasis role="bold">JBoss Identity IDM</emphasis>
configuration file is shown below. To understand all the options present in it please
refer to the JBoss Identity IDM Reference Guide
</para>
-<programlisting><jboss-identity
xmlns="urn:jboss:identity:idm:config:v1_0_beta"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:identity:idm:config:v1_0_alpha
identity-config.xsd">
- <realms>
- <realm>
- <id>PortalRealm</id>
-
<repository-id-ref>PortalRepository</repository-id-ref>
- <identity-type-mappings>
- <user-mapping>USER</user-mapping>
- </identity-type-mappings>
- </realm>
- </realms>
- <repositories>
- <repository>
- <id>PortalRepository</id>
-
<class>org.jboss.identity.idm.impl.repository.WrapperIdentityStoreRepository</class>
- <external-config/>
-
<default-identity-store-id>HibernateStore</default-identity-store-id>
-
<default-attribute-store-id>HibernateStore</default-attribute-store-id>
- </repository>
- </repositories>
- <stores>
- <attribute-stores/>
- <identity-stores>
- <identity-store>
- <id>HibernateStore</id>
-
<class>org.jboss.identity.idm.impl.store.hibernate.HibernateIdentityStoreImpl</class>
- <external-config/>
- <supported-relationship-types>
-
<relationship-type>JBOSS_IDENTITY_MEMBERSHIP</relationship-type>
-
<relationship-type>JBOSS_IDENTITY_ROLE</relationship-type>
- </supported-relationship-types>
- <supported-identity-object-types>
- <identity-object-type>
- <name>USER</name>
- <relationships/>
- <credentials>
-
<credential-type>PASSWORD</credential-type>
- </credentials>
- <attributes/>
- <options/>
- </identity-object-type>
- </supported-identity-object-types>
- <options>
- <option>
-
<name>hibernateSessionFactoryRegistryName</name>
-
<value>hibernateSessionFactory</value>
- </option>
- <option>
-
<name>allowNotDefinedIdentityObjectTypes</name>
- <value>true</value>
- </option>
- <option>
-
<name>populateRelationshipTypes</name>
- <value>true</value>
- </option>
- <option>
-
<name>populateIdentityObjectTypes</name>
- <value>true</value>
- </option>
- <option>
-
<name>allowNotDefinedAttributes</name>
- <value>true</value>
- </option>
- <option>
- <name>isRealmAware</name>
- <value>true</value>
- </option>
- </options>
- </identity-store>
- </identity-stores>
- </stores>
-</jboss-identity>
+<programlisting><jboss-identity
xmlns="urn:jboss:identity:idm:config:v1_0_beta"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:identity:idm:config:v1_0_alpha
identity-config.xsd">
+ <realms>
+ <realm>
+ <id>PortalRealm</id>
+
<repository-id-ref>PortalRepository</repository-id-ref>
+ <identity-type-mappings>
+ <user-mapping>USER</user-mapping>
+ </identity-type-mappings>
+ </realm>
+ </realms>
+ <repositories>
+ <repository>
+ <id>PortalRepository</id>
+
<class>org.jboss.identity.idm.impl.repository.WrapperIdentityStoreRepository</class>
+ <external-config/>
+
<default-identity-store-id>HibernateStore</default-identity-store-id>
+
<default-attribute-store-id>HibernateStore</default-attribute-store-id>
+ </repository>
+ </repositories>
+ <stores>
+ <attribute-stores/>
+ <identity-stores>
+ <identity-store>
+ <id>HibernateStore</id>
+
<class>org.jboss.identity.idm.impl.store.hibernate.HibernateIdentityStoreImpl</class>
+ <external-config/>
+ <supported-relationship-types>
+
<relationship-type>JBOSS_IDENTITY_MEMBERSHIP</relationship-type>
+
<relationship-type>JBOSS_IDENTITY_ROLE</relationship-type>
+ </supported-relationship-types>
+ <supported-identity-object-types>
+ <identity-object-type>
+ <name>USER</name>
+ <relationships/>
+ <credentials>
+
<credential-type>PASSWORD</credential-type>
+ </credentials>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ </supported-identity-object-types>
+ <options>
+ <option>
+
<name>hibernateSessionFactoryRegistryName</name>
+
<value>hibernateSessionFactory</value>
+ </option>
+ <option>
+
<name>allowNotDefinedIdentityObjectTypes</name>
+ <value>true</value>
+ </option>
+ <option>
+
<name>populateRelationshipTypes</name>
+ <value>true</value>
+ </option>
+ <option>
+
<name>populateIdentityObjectTypes</name>
+ <value>true</value>
+ </option>
+ <option>
+
<name>allowNotDefinedAttributes</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>isRealmAware</name>
+ <value>true</value>
+ </option>
+ </options>
+ </identity-store>
+ </identity-stores>
+ </stores>
+</jboss-identity>
</programlisting>
</section>
Modified:
portal/trunk/docs/reference-guide/en/modules/configuration/JavaScript_Configuration.xml
===================================================================
---
portal/trunk/docs/reference-guide/en/modules/configuration/JavaScript_Configuration.xml 2010-02-15
01:19:14 UTC (rev 1673)
+++
portal/trunk/docs/reference-guide/en/modules/configuration/JavaScript_Configuration.xml 2010-02-15
01:20:35 UTC (rev 1674)
@@ -1,7 +1,5 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Javascript_Configuration">
<title>Javascript Configuration</title>
@@ -10,77 +8,77 @@
</para>
<para>
Every portlet can have its own javscript code but in many cases it is more convenient
to reuse some existing shared libraries. For that reason, &PRODUCT; has a mechanism to
easily register the libraries that will be loaded when the first page will be rendered.
- </para>
+ </para>
<para>
- To do so, every WAR deployed in &PRODUCT; can register the
<filename>js</filename> files with the groovy script
"<filename>WEB-INF/conf/script/groovy/JavascriptScript.groovy</filename>".
+ To do so, every WAR deployed in &PRODUCT; can register the
<filename>js</filename> files with the groovy script
"<filename>WEB-INF/conf/script/groovy/JavascriptScript.groovy</filename>".
</para>
<para>
The example file below is found in the 01eXoResources.war
</para>
-<programlisting>JavascriptService.addJavascript("eXo",
"/javascript/eXo.js", ServletContext);
+<programlisting>JavascriptService.addJavascript("eXo",
"/javascript/eXo.js", ServletContext);
/* Animation Javascripts */
-JavascriptService.addJavascript("eXo.animation.ImplodeExplode",
"/javascript/eXo/animation/ImplodeExplode.js", ServletContext);
+JavascriptService.addJavascript("eXo.animation.ImplodeExplode",
"/javascript/eXo/animation/ImplodeExplode.js", ServletContext);
/* Application descriptor */
-JavascriptService.addJavascript("eXo.application.ApplicationDescriptor",
"/javascript/eXo/application/ApplicationDescriptor.js", ServletContext);
+JavascriptService.addJavascript("eXo.application.ApplicationDescriptor",
"/javascript/eXo/application/ApplicationDescriptor.js", ServletContext);
/* CORE Javascripts */
-JavascriptService.addJavascript("eXo.core.Utils",
"/javascript/eXo/core/Util.js", ServletContext);
-JavascriptService.addJavascript("eXo.core.DOMUtil",
"/javascript/eXo/core/DOMUtil.js", ServletContext);
-JavascriptService.addJavascript("eXo.core.Browser",
"/javascript/eXo/core/Browser.js", ServletContext);
-JavascriptService.addJavascript("eXo.core.MouseEventManager",
"/javascript/eXo/core/MouseEventManager.js", ServletContext);
-JavascriptService.addJavascript("eXo.core.UIMaskLayer",
"/javascript/eXo/core/UIMaskLayer.js", ServletContext);
-JavascriptService.addJavascript("eXo.core.Skin",
"/javascript/eXo/core/Skin.js", ServletContext);
-JavascriptService.addJavascript("eXo.core.DragDrop",
"/javascript/eXo/core/DragDrop.js", ServletContext);
-JavascriptService.addJavascript("eXo.core.TemplateEngine",
"/javascript/eXo/core/TemplateEngine.js", ServletContext);
+JavascriptService.addJavascript("eXo.core.Utils",
"/javascript/eXo/core/Util.js", ServletContext);
+JavascriptService.addJavascript("eXo.core.DOMUtil",
"/javascript/eXo/core/DOMUtil.js", ServletContext);
+JavascriptService.addJavascript("eXo.core.Browser",
"/javascript/eXo/core/Browser.js", ServletContext);
+JavascriptService.addJavascript("eXo.core.MouseEventManager",
"/javascript/eXo/core/MouseEventManager.js", ServletContext);
+JavascriptService.addJavascript("eXo.core.UIMaskLayer",
"/javascript/eXo/core/UIMaskLayer.js", ServletContext);
+JavascriptService.addJavascript("eXo.core.Skin",
"/javascript/eXo/core/Skin.js", ServletContext);
+JavascriptService.addJavascript("eXo.core.DragDrop",
"/javascript/eXo/core/DragDrop.js", ServletContext);
+JavascriptService.addJavascript("eXo.core.TemplateEngine",
"/javascript/eXo/core/TemplateEngine.js", ServletContext);
/* Widget Javascripts */
-JavascriptService.addJavascript("eXo.widget.UIWidget",
"/javascript/eXo/widget/UIWidget.js", ServletContext);
-JavascriptService.addJavascript("eXo.widget.UIAddWidget",
"/javascript/eXo/widget/UIAddWidget.js", ServletContext);
-JavascriptService.addJavascript("eXo.widget.UIExoWidget",
"/javascript/eXo/widget/UIExoWidget.js", ServletContext);
+JavascriptService.addJavascript("eXo.widget.UIWidget",
"/javascript/eXo/widget/UIWidget.js", ServletContext);
+JavascriptService.addJavascript("eXo.widget.UIAddWidget",
"/javascript/eXo/widget/UIAddWidget.js", ServletContext);
+JavascriptService.addJavascript("eXo.widget.UIExoWidget",
"/javascript/eXo/widget/UIExoWidget.js", ServletContext);
/* Desktop Javascripts */
-JavascriptService.addJavascript("eXo.desktop.UIDockbar",
"/javascript/eXo/desktop/UIDockbar.js", ServletContext);
-JavascriptService.addJavascript("eXo.desktop.UIDesktop",
"/javascript/eXo/desktop/UIDesktop.js", ServletContext);
+JavascriptService.addJavascript("eXo.desktop.UIDockbar",
"/javascript/eXo/desktop/UIDockbar.js", ServletContext);
+JavascriptService.addJavascript("eXo.desktop.UIDesktop",
"/javascript/eXo/desktop/UIDesktop.js", ServletContext);
/* WebUI Javascripts */
-JavascriptService.addJavascript("eXo.webui.UIItemSelector",
"/javascript/eXo/webui/UIItemSelector.js", ServletContext);
-JavascriptService.addJavascript("eXo.webui.UIForm",
"/javascript/eXo/webui/UIForm.js", ServletContext);
-JavascriptService.addJavascript("eXo.webui.UIPopup",
"/javascript/eXo/webui/UIPopup.js", ServletContext);
-JavascriptService.addJavascript("eXo.webui.UIPopupSelectCategory",
"/javascript/eXo/webui/UIPopupSelectCategory.js", ServletContext);
-JavascriptService.addJavascript("eXo.webui.UIPopupWindow",
"/javascript/eXo/webui/UIPopupWindow.js", ServletContext);
-JavascriptService.addJavascript("eXo.webui.UIVerticalScroller",
"/javascript/eXo/webui/UIVerticalScroller.js", ServletContext);
-JavascriptService.addJavascript("eXo.webui.UIHorizontalTabs",
"/javascript/eXo/webui/UIHorizontalTabs.js", ServletContext);
-JavascriptService.addJavascript("eXo.webui.UIPopupMenu",
"/javascript/eXo/webui/UIPopupMenu.js", ServletContext);
-JavascriptService.addJavascript("eXo.webui.UIDropDownControl",
"/javascript/eXo/webui/UIDropDownControl.js", ServletContext);
+JavascriptService.addJavascript("eXo.webui.UIItemSelector",
"/javascript/eXo/webui/UIItemSelector.js", ServletContext);
+JavascriptService.addJavascript("eXo.webui.UIForm",
"/javascript/eXo/webui/UIForm.js", ServletContext);
+JavascriptService.addJavascript("eXo.webui.UIPopup",
"/javascript/eXo/webui/UIPopup.js", ServletContext);
+JavascriptService.addJavascript("eXo.webui.UIPopupSelectCategory",
"/javascript/eXo/webui/UIPopupSelectCategory.js", ServletContext);
+JavascriptService.addJavascript("eXo.webui.UIPopupWindow",
"/javascript/eXo/webui/UIPopupWindow.js", ServletContext);
+JavascriptService.addJavascript("eXo.webui.UIVerticalScroller",
"/javascript/eXo/webui/UIVerticalScroller.js", ServletContext);
+JavascriptService.addJavascript("eXo.webui.UIHorizontalTabs",
"/javascript/eXo/webui/UIHorizontalTabs.js", ServletContext);
+JavascriptService.addJavascript("eXo.webui.UIPopupMenu",
"/javascript/eXo/webui/UIPopupMenu.js", ServletContext);
+JavascriptService.addJavascript("eXo.webui.UIDropDownControl",
"/javascript/eXo/webui/UIDropDownControl.js", ServletContext);
/* Portal Javascripts */
-JavascriptService.addJavascript("eXo.portal.PortalHttpRequest",
"/javascript/eXo/portal/PortalHttpRequest.js", ServletContext);
-JavascriptService.addJavascript("eXo.portal.UIPortal",
"/javascript/eXo/portal/UIPortal.js", ServletContext);
-JavascriptService.addJavascript("eXo.portal.UIWorkspace",
"/javascript/eXo/portal/UIWorkspace.js", ServletContext);
-JavascriptService.addJavascript("eXo.portal.UIPortalControl",
"/javascript/eXo/portal/UIPortalControl.js", ServletContext);
-JavascriptService.addJavascript("eXo.portal.PortalDragDrop",
"/javascript/eXo/portal/PortalDragDrop.js", ServletContext);
-JavascriptService.addJavascript("eXo.portal.UIPortalNavigation",
"/javascript/eXo/portal/UIPortalNavigation.js", ServletContext);
-JavascriptService.addJavascript("eXo.portal.UIMaskWorkspace",
"/javascript/eXo/portal/UIMaskWorkspace.js", ServletContext);
-JavascriptService.addJavascript("eXo.portal.UIExoStartMenu",
"/javascript/eXo/portal/UIExoStartMenu.js", ServletContext);
+JavascriptService.addJavascript("eXo.portal.PortalHttpRequest",
"/javascript/eXo/portal/PortalHttpRequest.js", ServletContext);
+JavascriptService.addJavascript("eXo.portal.UIPortal",
"/javascript/eXo/portal/UIPortal.js", ServletContext);
+JavascriptService.addJavascript("eXo.portal.UIWorkspace",
"/javascript/eXo/portal/UIWorkspace.js", ServletContext);
+JavascriptService.addJavascript("eXo.portal.UIPortalControl",
"/javascript/eXo/portal/UIPortalControl.js", ServletContext);
+JavascriptService.addJavascript("eXo.portal.PortalDragDrop",
"/javascript/eXo/portal/PortalDragDrop.js", ServletContext);
+JavascriptService.addJavascript("eXo.portal.UIPortalNavigation",
"/javascript/eXo/portal/UIPortalNavigation.js", ServletContext);
+JavascriptService.addJavascript("eXo.portal.UIMaskWorkspace",
"/javascript/eXo/portal/UIMaskWorkspace.js", ServletContext);
+JavascriptService.addJavascript("eXo.portal.UIExoStartMenu",
"/javascript/eXo/portal/UIExoStartMenu.js", ServletContext);
/* Desktop Javascripts 2 */
-JavascriptService.addJavascript("eXo.desktop.UIWindow",
"/javascript/eXo/desktop/UIWindow.js", ServletContext);
+JavascriptService.addJavascript("eXo.desktop.UIWindow",
"/javascript/eXo/desktop/UIWindow.js", ServletContext);
</programlisting>
<para>
Note that even registered dedicated javascripts will be merged into a single
<literal>merged.js</literal> file when the server loads. This reduces the
number of HTTP calls as seen in the home page source code:
</para>
-<programlisting><script type="text/javascript"
src="/portal/javascript/merged.js"></script>
+<programlisting><script type="text/javascript"
src="/portal/javascript/merged.js"></script>
</programlisting>
<para>
- Although this optimization is useful for a production environment, it may be easier to
deactivate this optimization while debugging javascript problems.
+ Although this optimization is useful for a production environment, it may be easier to
deactivate this optimization while debugging javascript problems.
</para>
<para>
- To do this, set the java system property
<literal>exo.product.developing</literal> to
<literal>true</literal>.
+ To do this, set the java system property
<literal>exo.product.developing</literal> to
<literal>true</literal>.
</para>
<para>
- To see or use the merged file set this property to
<literal>false</literal>.
+ To see or use the merged file set this property to
<literal>false</literal>.
</para>
<para>
The property can be passed as a JVM parameter with the
<literal>-D</literal> option in your <literal>GateIn.sh</literal>
or <literal>GateIn.bat</literal> startup script.
</para>
<para>
- Every javascript file is referenced with a module name of
"<literal>eXo.core.DragDrop</literal>" which acts as a namespace.
Inside the associated files, global javascript functions are used following the same
namespace convention:
+ Every javascript file is referenced with a module name of
"<literal>eXo.core.DragDrop</literal>" which acts as a
namespace. Inside the associated files, global javascript functions are used following the
same namespace convention:
</para>
<programlisting>eXo.core.DragDrop = new DragDrop() ;
Modified:
portal/trunk/docs/reference-guide/en/modules/configuration/Portal_Default_Permission_Configuration.xml
===================================================================
---
portal/trunk/docs/reference-guide/en/modules/configuration/Portal_Default_Permission_Configuration.xml 2010-02-15
01:19:14 UTC (rev 1673)
+++
portal/trunk/docs/reference-guide/en/modules/configuration/Portal_Default_Permission_Configuration.xml 2010-02-15
01:20:35 UTC (rev 1674)
@@ -1,7 +1,5 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<section
id="sect-Reference_Guide-Portal_Default_Permission_Configuration">
<title>Portal Default Permission Configuration</title>
@@ -14,107 +12,108 @@
It defines 5 permissions types:
</para>
<variablelist>
- <varlistentry>
- <term>super.user</term>
- <listitem>
- <para>
- The super user has all the rights on the platform, this user is referred to as
<emphasis>root</emphasis>.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>portal.creator.groups</term>
- <listitem>
- <para>
- This list defines all groups that will be able to manage the different portals.
Members of this group also have the permission to create new portals. The format is
"<literal>membership:/group/subgroup</literal> ".
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>navigation.creator.membership.type</term>
- <listitem>
- <para>
- Defines the membership type of the group managers. The group managers have the
permission to create and edit group pages and they can modify the group navigation.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>guests.group</term>
- <listitem>
- <para>
- Any anonymous user automatically becomes a member of this group whent they enter the
public pages.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>access.control.workspace</term>
- <listitem>
- <para>
- Defines the users that have access to the control workspace. In the demo version the
control workspace is accessible only to 'root' and 'john'. They can
expand/collapse the workspace at the left hand side. The format is
"membership:/group/subgroup", An asterisk '' gives permission to all
memberships.
- </para>
- </listitem>
- </varlistentry>
+ <varlistentry>
+ <term>super.user</term>
+ <listitem>
+ <para>
+ The super user has all the rights on the platform, this user is referred to as
<emphasis>root</emphasis>.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>portal.creator.groups</term>
+ <listitem>
+ <para>
+ This list defines all groups that will be able to manage the different portals.
Members of this group also have the permission to create new portals. The format is
"<literal>membership:/group/subgroup</literal> ".
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>navigation.creator.membership.type</term>
+ <listitem>
+ <para>
+ Defines the membership type of the group managers. The group managers have the
permission to create and edit group pages and they can modify the group navigation.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>guests.group</term>
+ <listitem>
+ <para>
+ Any anonymous user automatically becomes a member of this group whent they enter
the public pages.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>access.control.workspace</term>
+ <listitem>
+ <para>
+ Defines the users that have access to the control workspace. In the demo version
the control workspace is accessible only to 'root' and
'john'. They can expand/collapse the workspace at the left hand side. The
format is "membership:/group/subgroup", An asterisk ''
gives permission to all memberships.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
-<programlisting role="XML"><component>
- <key>org.exoplatform.portal.config.UserACL</key>
- <type>org.exoplatform.portal.config.UserACL</type>
- <init-params>
- <value-param>
- <name>super.user</name>
- <description>administrator</description>
- <value>root</value>
- </value-param>
+
+<programlisting role="XML"><component>
+ <key>org.exoplatform.portal.config.UserACL</key>
+ <type>org.exoplatform.portal.config.UserACL</type>
+ <init-params>
+ <value-param>
+ <name>super.user</name>
+ <description>administrator</description>
+ <value>root</value>
+ </value-param>
- <value-param>
- <name>portal.creator.groups</name>
- <description>groups with membership type have permission to manage
portal</description>
-
<value>*:/platform/administrators,*:/organization/management/executive-board</value>
- </value-param>
+ <value-param>
+ <name>portal.creator.groups</name>
+ <description>groups with membership type have permission to manage
portal</description>
+
<value>*:/platform/administrators,*:/organization/management/executive-board</value>
+ </value-param>
- <value-param>
- <name>navigation.creator.membership.type</name>
- <description>specific membership type have full permission with group
navigation</description>
- <value>manager</value>
- </value-param>
- <value-param>
- <name>guests.group</name>
- <description>guests group</description>
- <value>/platform/guests</value>
- </value-param>
- <value-param>
- <name>access.control.workspace</name>
- <description>groups with memberships that have the right to access
the User Control Workspace</description>
-
<value>*:/platform/administrators,*:/organization/management/executive-board</value>
- </value-param>
- </init-params>
-</component>
+ <value-param>
+ <name>navigation.creator.membership.type</name>
+ <description>specific membership type have full permission with
group navigation</description>
+ <value>manager</value>
+ </value-param>
+ <value-param>
+ <name>guests.group</name>
+ <description>guests group</description>
+ <value>/platform/guests</value>
+ </value-param>
+ <value-param>
+ <name>access.control.workspace</name>
+ <description>groups with memberships that have the right to access
the User Control Workspace</description>
+
<value>*:/platform/administrators,*:/organization/management/executive-board</value>
+ </value-param>
+ </init-params>
+</component>
</programlisting>
</section>
<section
id="sect-Reference_Guide-Portal_Default_Permission_Configuration-Overwrite_Portal_Default_Permissions">
<title>Overwrite Portal Default Permissions</title>
-<programlisting role="XML"><external-component-plugins>
-
<target-component>org.exoplatform.portal.config.UserACL</target-component>
- <component-plugin>
- <name>addPortalACLPlugin</name>
- <set-method>addPortalACLPlugin</set-method>
-
<type>org.exoplatform.portal.config.PortalACLPlugin</type>
- <description>setting some permission for
portal</description>
- <init-params>
- <values-param>
- <name>access.control.workspace.roles</name>
- <value>*:/platform/administrators</value>
-
<value>*:/organization/management/executive-board</value>
- </values-param>
- <values-param>
- <name>portal.creation.roles</name>
- <value>*:/platform/administrators</value>
-
<value>*:/organization/management/executive-board</value>
- </values-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
+<programlisting role="XML"><external-component-plugins>
+
<target-component>org.exoplatform.portal.config.UserACL</target-component>
+ <component-plugin>
+ <name>addPortalACLPlugin</name>
+ <set-method>addPortalACLPlugin</set-method>
+
<type>org.exoplatform.portal.config.PortalACLPlugin</type>
+ <description>setting some permission for
portal</description>
+ <init-params>
+ <values-param>
+ <name>access.control.workspace.roles</name>
+ <value>*:/platform/administrators</value>
+
<value>*:/organization/management/executive-board</value>
+ </values-param>
+ <values-param>
+ <name>portal.creation.roles</name>
+ <value>*:/platform/administrators</value>
+
<value>*:/organization/management/executive-board</value>
+ </values-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
</programlisting>
</section>
Modified:
portal/trunk/docs/reference-guide/en/modules/configuration/Portal_Navigation_Configuration.xml
===================================================================
---
portal/trunk/docs/reference-guide/en/modules/configuration/Portal_Navigation_Configuration.xml 2010-02-15
01:19:14 UTC (rev 1673)
+++
portal/trunk/docs/reference-guide/en/modules/configuration/Portal_Navigation_Configuration.xml 2010-02-15
01:20:35 UTC (rev 1674)
@@ -1,7 +1,5 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Portal_Navigation_Configuration">
<title>Portal Navigation Configuration</title>
@@ -13,88 +11,88 @@
<itemizedlist>
<listitem>
<para>
- <xref
linkend="sect-Reference_Guide-Portal_Navigation_Configuration-Portal_Navigation"/>
+ <xref
linkend="sect-Reference_Guide-Portal_Navigation_Configuration-Portal_Navigation"
/>
</para>
</listitem>
<listitem>
<para>
- <xref
linkend="sect-Reference_Guide-Portal_Navigation_Configuration-Group_Navigation"/>
+ <xref
linkend="sect-Reference_Guide-Portal_Navigation_Configuration-Group_Navigation"
/>
</para>
</listitem>
<listitem>
<para>
- <xref
linkend="sect-Reference_Guide-Portal_Navigation_Configuration-User_Navigation"/>
+ <xref
linkend="sect-Reference_Guide-Portal_Navigation_Configuration-User_Navigation"
/>
</para>
</listitem>
</itemizedlist>
<para>
- These navigations are configured with standard XML syntax in the file;
"<filename>02portal.war:/WEB-INF/conf/portal/portal-configuration.xml</filename>".
+ These navigations are configured with standard XML syntax in the file;
"<filename>02portal.war:/WEB-INF/conf/portal/portal-configuration.xml</filename>".
</para>
-<programlisting role="XML"><component>
-
<key>org.exoplatform.portal.config.UserPortalConfigService</key>
-
<type>org.exoplatform.portal.config.UserPortalConfigService</type>
- <component-plugins>
- <component-plugin>
- <name>new.portal.config.user.listener</name>
- <set-method>initListener</set-method>
-
<type>org.exoplatform.portal.config.NewPortalConfigListener</type>
- <description>this listener init the portal
configuration</description>
- <init-params>
- <value-param>
- <name>default.portal</name>
- <description>The default portal for checking db is empty or
not</description>
- <value>classic</value>
- </value-param>
- <object-param>
- <name>portal.configuration</name>
- <description>description</description>
- <object
type="org.exoplatform.portal.config.NewPortalConfig">
- <field name="predefinedOwner">
- <collection type="java.util.HashSet">
-
<value><string>classic</string></value>
-
<value><string>webos</string></value>
- </collection>
- </field>
- <field
name="ownerType"><string>portal</string></field>
- <field
name="templateLocation"><string>war:/conf/portal</string></field>
- </object>
- </object-param>
- <object-param>
- <name>group.configuration</name>
- <description>description</description>
- <object
type="org.exoplatform.portal.config.NewPortalConfig">
- <field name="predefinedOwner">
- <collection type="java.util.HashSet">
-
<value><string>platform/administrators</string></value>
-
<value><string>platform/users</string></value>
-
<value><string>platform/guests</string></value>
-
<value><string>organization/management/executive-board</string></value>
- </collection>
- </field>
- <field
name="ownerType"><string>group</string></field>
- <field
name="templateLocation"><string>war:/conf/portal</string></field>
- </object>
- </object-param>
- <object-param>
- <name>user.configuration</name>
- <description>description</description>
- <object
type="org.exoplatform.portal.config.NewPortalConfig">
- <field name="predefinedOwner">
- <collection type="java.util.HashSet">
-
<value><string>root</string></value>
-
<value><string>john</string></value>
-
<value><string>mary</string></value>
-
<value><string>demo</string></value>
- </collection>
- </field>
- <field
name="ownerType"><string>user</string></field>
- <field
name="templateLocation"><string>war:/conf/portal</string></field>
- </object>
- </object-param>
- </init-params>
- </component-plugin>
-</component-plugins>
+<programlisting role="XML"><component>
+
<key>org.exoplatform.portal.config.UserPortalConfigService</key>
+
<type>org.exoplatform.portal.config.UserPortalConfigService</type>
+ <component-plugins>
+ <component-plugin>
+ <name>new.portal.config.user.listener</name>
+ <set-method>initListener</set-method>
+
<type>org.exoplatform.portal.config.NewPortalConfigListener</type>
+ <description>this listener init the portal
configuration</description>
+ <init-params>
+ <value-param>
+ <name>default.portal</name>
+ <description>The default portal for checking db is empty or
not</description>
+ <value>classic</value>
+ </value-param>
+ <object-param>
+ <name>portal.configuration</name>
+ <description>description</description>
+ <object
type="org.exoplatform.portal.config.NewPortalConfig">
+ <field name="predefinedOwner">
+ <collection type="java.util.HashSet">
+
<value><string>classic</string></value>
+
<value><string>webos</string></value>
+ </collection>
+ </field>
+ <field
name="ownerType"><string>portal</string></field>
+ <field
name="templateLocation"><string>war:/conf/portal</string></field>
+ </object>
+ </object-param>
+ <object-param>
+ <name>group.configuration</name>
+ <description>description</description>
+ <object
type="org.exoplatform.portal.config.NewPortalConfig">
+ <field name="predefinedOwner">
+ <collection type="java.util.HashSet">
+
<value><string>platform/administrators</string></value>
+
<value><string>platform/users</string></value>
+
<value><string>platform/guests</string></value>
+
<value><string>organization/management/executive-board</string></value>
+ </collection>
+ </field>
+ <field
name="ownerType"><string>group</string></field>
+ <field
name="templateLocation"><string>war:/conf/portal</string></field>
+ </object>
+ </object-param>
+ <object-param>
+ <name>user.configuration</name>
+ <description>description</description>
+ <object
type="org.exoplatform.portal.config.NewPortalConfig">
+ <field name="predefinedOwner">
+ <collection type="java.util.HashSet">
+
<value><string>root</string></value>
+
<value><string>john</string></value>
+
<value><string>mary</string></value>
+
<value><string>demo</string></value>
+ </collection>
+ </field>
+ <field
name="ownerType"><string>user</string></field>
+ <field
name="templateLocation"><string>war:/conf/portal</string></field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+</component-plugins>
</programlisting>
<para>
This XML file defines, for the three navigations, which sets of portals, groups or
users will have XML files inside the apprpriate <literal>war</literal>. Those
files will be used to create an initial navigation the first time the portal is launched.
That information will then be stored in the JCR and is then modifiable from the portal
UI.
@@ -109,204 +107,207 @@
<para>
The <emphasis role="bold">classic</emphasis> portal is
configured by four XML files in the
<filename>portal/WEBINF/conf/portal/portal/classic</filename> directory:
</para>
-
- <variablelist>
- <varlistentry>
- <term>Portal.xml</term>
- <listitem>
- <para>
- This file describes the layout and portlets that will be shown on all pages. Usually
the layout contains the banner, footer, menu and breadcrumbs portlets. &PRODUCT; is
extremely configurable as every area (even the banner and footer) is a portlet.
- </para>
-<programlisting role="XML"><?xml version="1.0"
encoding="ISO-8859-1"?>
-<portal-config>
- <portal-name>classic</portal-name>
- <locale>en</locale>
- <factory-id>office</factory-id>
- <access-permissions>Everyone</access-permissions>
-
<edit-permission>*:/platform/administrators</edit-permission>
- <creator>root</creator>
+ <variablelist>
+ <varlistentry>
+ <term>Portal.xml</term>
+ <listitem>
+ <para>
+ This file describes the layout and portlets that will be shown on all pages.
Usually the layout contains the banner, footer, menu and breadcrumbs portlets.
&PRODUCT; is extremely configurable as every area (even the banner and footer) is a
portlet.
+ </para>
+
+<programlisting role="XML"><?xml version="1.0"
encoding="ISO-8859-1"?>
+<portal-config>
+ <portal-name>classic</portal-name>
+ <locale>en</locale>
+ <factory-id>office</factory-id>
+ <access-permissions>Everyone</access-permissions>
+
<edit-permission>*:/platform/administrators</edit-permission>
+ <creator>root</creator>
- <portal-layout>
- <application>
-
<instance-id>portal#classic:/web/BannerPortlet/banner</instance-id>
- <show-info-bar>false</show-info-bar>
- </application>
- <application>
-
<instance-id>portal#classic:/web/NavigationPortlet/toolbar</instance-id>
- <show-info-bar>false</show-info-bar>
- </application>
+ <portal-layout>
+ <application>
+
<instance-id>portal#classic:/web/BannerPortlet/banner</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ <application>
+
<instance-id>portal#classic:/web/NavigationPortlet/toolbar</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
- <application>
-
<instance-id>portal#classic:/web/BreadcumbsPortlet/breadcumbs</instance-id>
- <show-info-bar>false</show-info-bar>
- </application>
+ <application>
+
<instance-id>portal#classic:/web/BreadcumbsPortlet/breadcumbs</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
- <page-body> </page-body>
+ <page-body> </page-body>
- <application>
-
<instance-id>portal#classic:/web/FooterPortlet/footer</instance-id>
- <show-info-bar>false</show-info-bar>
- </application>
- </portal-layout>
+ <application>
+
<instance-id>portal#classic:/web/FooterPortlet/footer</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </portal-layout>
-</portal-config>
+</portal-config>
</programlisting>
- <para>
- It is also possible to apply a nested container that can also contain portlets. Row,
column or tab containers are then responsible of the layout of their child portlets.
- </para>
- <para>
- Each application references a portlet using the id
<literal>portal#{portalName}:/{portletWarName}/{portletName}/{uniqueId}</literal>
- </para>
- <para>
- Use the <literal>page-body</literal> tag to define where &PRODUCT;
should render the current page.
- </para>
- <para>
- The defined <emphasis role="bold">classic</emphasis> portal is
accessible to "Everyone" (at
<literal>/portal/public/classic</literal>) but only members of the group
<literal>/platform/administrators</literal> can edit it.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Navigation.xml</term>
- <listitem>
- <para>
- This file defines all the navigation nodes the portal will have. The syntax is
simple, using nested node tags. Each node references a page that is defined in the next
XML file.
- </para>
- <para>
- If the label <literal>#{}</literal> node label is used, the
internationalization mechanism is activated and the actual label to render is taken from
an associated properties file for the current locale.
- </para>
-<programlisting role="XML"><?xml version="1.0"
encoding="UTF-8"?>
-<node-navigation>
- <owner-type>portal</owner-type>
- <owner-id>classic</owner-id>
- <priority>1</priority>
- <page-nodes>
- <node>
- <uri>home</uri>
- <name>home</name>
- <label>#{portal.classic.home}</label>
-
<page-reference>portal::classic::homepage</page-reference>
- </node>
- <node>
- <uri>webexplorer</uri>
- <name>webexplorer</name>
- <label>#{portal.classic.webexplorer}</label>
-
<page-reference>portal::classic::webexplorer</page-reference>
- </node>
- </page-nodes>
-</node-navigation>
+ <para>
+ It is also possible to apply a nested container that can also contain portlets.
Row, column or tab containers are then responsible of the layout of their child portlets.
+ </para>
+ <para>
+ Each application references a portlet using the id
<literal>portal#{portalName}:/{portletWarName}/{portletName}/{uniqueId}</literal>
+ </para>
+ <para>
+ Use the <literal>page-body</literal> tag to define where &PRODUCT;
should render the current page.
+ </para>
+ <para>
+ The defined <emphasis role="bold">classic</emphasis> portal
is accessible to "Everyone" (at
<literal>/portal/public/classic</literal>) but only members of the group
<literal>/platform/administrators</literal> can edit it.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Navigation.xml</term>
+ <listitem>
+ <para>
+ This file defines all the navigation nodes the portal will have. The syntax is
simple, using nested node tags. Each node references a page that is defined in the next
XML file.
+ </para>
+ <para>
+ If the label <literal>#{}</literal> node label is used, the
internationalization mechanism is activated and the actual label to render is taken from
an associated properties file for the current locale.
+ </para>
+
+<programlisting role="XML"><?xml version="1.0"
encoding="UTF-8"?>
+<node-navigation>
+ <owner-type>portal</owner-type>
+ <owner-id>classic</owner-id>
+ <priority>1</priority>
+ <page-nodes>
+ <node>
+ <uri>home</uri>
+ <name>home</name>
+ <label>#{portal.classic.home}</label>
+
<page-reference>portal::classic::homepage</page-reference>
+ </node>
+ <node>
+ <uri>webexplorer</uri>
+ <name>webexplorer</name>
+ <label>#{portal.classic.webexplorer}</label>
+
<page-reference>portal::classic::webexplorer</page-reference>
+ </node>
+ </page-nodes>
+</node-navigation>
</programlisting>
- <para>
- This navigation tree can have multiple views inside portlets (such as the breadcrumbs
portlet) that render the current view node, the site map or the menu portlets.
- </para>
- <warning>
- <para>
- For top nodes, the <emphasis role="bold">uri</emphasis> and
the <emphasis role="bold">name</emphasis> of your navigation nodes
must have the <emphasis>same</emphasis> value. For the other nodes the
<emphasis role="bold">uri</emphasis> is composed like
<emphasis><uri>contentmanagement/fileexplorer</uri></emphasis>
where '<literal>contentmanagement</literal> ' is the name of the
parent node and '<literal>fileexplorer</literal>' is the name of the
node ( <emphasis><name>fileexplorer</name>
</emphasis> ).
- </para>
- </warning>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Pages.xml</term>
- <listitem>
- <para>
- This XML file structure is very similar to
<filename>portal.xml</filename> and it can also contain container tags. Each
application can decide whether to render the portlet border, the window state icons or the
mode.
- </para>
-<programlisting role="XML"><?xml version="1.0"
encoding="ISO-8859-1"?>
-<page-set>
- <page>
- <page-id>portal::classic::homepage</page-id>
- <owner-type>portal</owner-type>
- <owner-id>classic</owner-id>
- <name>homepage</name>
- <title>Home Page</title>
- <access-permissions>Everyone</access-permissions>
-
<edit-permission>*:/platform/administrators</edit-permission>
- <application>
-
<instance-id>portal#classic:/web/HomePagePortlet/homepageportlet</instance-id>
- <title>Home Page portlet</title>
- <show-info-bar>false</show-info-bar>
- <show-application-state>false</show-application-state>
- <show-application-mode>false</show-application-mode>
- </application>
- </page>
+ <para>
+ This navigation tree can have multiple views inside portlets (such as the
breadcrumbs portlet) that render the current view node, the site map or the menu
portlets.
+ </para>
+ <warning>
+ <para>
+ For top nodes, the <emphasis role="bold">uri</emphasis> and
the <emphasis role="bold">name</emphasis> of your navigation nodes
must have the <emphasis>same</emphasis> value. For the other nodes the
<emphasis role="bold">uri</emphasis> is composed like
<emphasis><uri>contentmanagement/fileexplorer</uri></emphasis>
where '<literal>contentmanagement</literal> ' is the name of
the parent node and '<literal>fileexplorer</literal>' is the
name of the node (
<emphasis><name>fileexplorer</name>
</emphasis> ).
+ </para>
+ </warning>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Pages.xml</term>
+ <listitem>
+ <para>
+ This XML file structure is very similar to
<filename>portal.xml</filename> and it can also contain container tags. Each
application can decide whether to render the portlet border, the window state icons or the
mode.
+ </para>
+
+<programlisting role="XML"><?xml version="1.0"
encoding="ISO-8859-1"?>
+<page-set>
+ <page>
+ <page-id>portal::classic::homepage</page-id>
+ <owner-type>portal</owner-type>
+ <owner-id>classic</owner-id>
+ <name>homepage</name>
+ <title>Home Page</title>
+ <access-permissions>Everyone</access-permissions>
+
<edit-permission>*:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>portal#classic:/web/HomePagePortlet/homepageportlet</instance-id>
+ <title>Home Page portlet</title>
+ <show-info-bar>false</show-info-bar>
+
<show-application-state>false</show-application-state>
+
<show-application-mode>false</show-application-mode>
+ </application>
+ </page>
- <page>
- <page-id>portal::classic::webexplorer</page-id>
- <owner-type>portal</owner-type>
- <owner-id>classic</owner-id>
- <name>webexplorer</name>
- <title>Web Explorer</title>
-
<access-permissions>*:/platform/users</access-permissions>
-
<edit-permission>*:/platform/administrators</edit-permission>
- <application>
-
<instance-id>group#platform/users:/web/BrowserPortlet/WebExplorer</instance-id>
- <title>Web Explorer</title>
- <show-info-bar>false</show-info-bar>
- </application>
- </page>
-</page-set>
+ <page>
+ <page-id>portal::classic::webexplorer</page-id>
+ <owner-type>portal</owner-type>
+ <owner-id>classic</owner-id>
+ <name>webexplorer</name>
+ <title>Web Explorer</title>
+
<access-permissions>*:/platform/users</access-permissions>
+
<edit-permission>*:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>group#platform/users:/web/BrowserPortlet/WebExplorer</instance-id>
+ <title>Web Explorer</title>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </page>
+</page-set>
</programlisting>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Portlet-preferences.xml</term>
- <listitem>
- <para>
- Porlet instances can be associated with
<literal>portlet-preferences</literal> that override the one defined in
<filename>portlet.xml </filename>file of the portlet application
<literal>war</literal> .
- </para>
-<programlisting role="XML"><?xml version="1.0"
encoding="ISO-8859-1"?>
-<portlet-preferences-set>
- <portlet-preferences>
- <owner-type>portal</owner-type>
- <owner-id>classic</owner-id>
-
<window-id>portal#classic:/web/BannerPortlet/banner</window-id>
- <preference>
- <name>template</name>
-
<value>par:/groovy/groovy/webui/component/UIBannerPortlet.gtmpl</value>
- <read-only>false</read-only>
- </preference>
- </portlet-preferences>
- <portlet-preferences>
- <owner-type>portal</owner-type>
- <owner-id>classic</owner-id>
-
<window-id>portal#classic:/web/NavigationPortlet/toolbar</window-id>
- <preference>
- <name>useAJAX</name>
- <value>true</value>
- <read-only>false</read-only>
- </preference>
- </portlet-preferences>
- <portlet-preferences>
- <owner-type>portal</owner-type>
- <owner-id>classic</owner-id>
-
<window-id>portal#classic:/web/FooterPortlet/footer</window-id>
- <preference>
- <name>template</name>
-
<value>par:/groovy/groovy/webui/component/UIFooterPortlet.gtmpl</value>
- <read-only>false</read-only>
- </preference>
- </portlet-preferences>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Portlet-preferences.xml</term>
+ <listitem>
+ <para>
+ Porlet instances can be associated with
<literal>portlet-preferences</literal> that override the one defined in
<filename>portlet.xml </filename>file of the portlet application
<literal>war</literal> .
+ </para>
+
+<programlisting role="XML"><?xml version="1.0"
encoding="ISO-8859-1"?>
+<portlet-preferences-set>
+ <portlet-preferences>
+ <owner-type>portal</owner-type>
+ <owner-id>classic</owner-id>
+
<window-id>portal#classic:/web/BannerPortlet/banner</window-id>
+ <preference>
+ <name>template</name>
+
<value>par:/groovy/groovy/webui/component/UIBannerPortlet.gtmpl</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+ <portlet-preferences>
+ <owner-type>portal</owner-type>
+ <owner-id>classic</owner-id>
+
<window-id>portal#classic:/web/NavigationPortlet/toolbar</window-id>
+ <preference>
+ <name>useAJAX</name>
+ <value>true</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+ <portlet-preferences>
+ <owner-type>portal</owner-type>
+ <owner-id>classic</owner-id>
+
<window-id>portal#classic:/web/FooterPortlet/footer</window-id>
+ <preference>
+ <name>template</name>
+
<value>par:/groovy/groovy/webui/component/UIFooterPortlet.gtmpl</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
- <portlet-preferences>
- <owner-type>portal</owner-type>
- <owner-id>classic</owner-id>
-
<window-id>portal#classic:/web/GroovyPortlet/groovyportlet</window-id>
- <preference>
- <name>template</name>
-
<value>par:/groovy/groovy/webui/component/UIGroovyPortlet.gtmpl</value>
- <read-only>false</read-only>
- </preference>
- </portlet-preferences>
-</portlet-preferences-set>
+ <portlet-preferences>
+ <owner-type>portal</owner-type>
+ <owner-id>classic</owner-id>
+
<window-id>portal#classic:/web/GroovyPortlet/groovyportlet</window-id>
+ <preference>
+ <name>template</name>
+
<value>par:/groovy/groovy/webui/component/UIGroovyPortlet.gtmpl</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+</portlet-preferences-set>
</programlisting>
-
- </listitem>
- </varlistentry>
- </variablelist>
+ </listitem>
+ </varlistentry>
+ </variablelist>
</section>
-<!-- <section
id="sect-Reference_Guide-Portal_Navigation_Configuration-Portal.xml">
+
+ <!-- <section
id="sect-Reference_Guide-Portal_Navigation_Configuration-Portal.xml">
<title>Portal.xml</title>
<para>
That file describes the layout and portlets that will be shown for all pages. Usually
the layout contains the banner, footer, menu, breadcrumbs portlets. Indeed, in GateIn,
every area is a portlet even the banner and footer which makes the platform extremely
configurable.
@@ -496,73 +497,73 @@
</portlet-preferences>
</portlet-preferences-set>
</programlisting>
- </section> -->
-
+ </section> -->
<section
id="sect-Reference_Guide-Portal_Navigation_Configuration-Group_Navigation">
<title>Group Navigation</title>
<para>
Group navigations are dynamically added to the user navigation at login. This allows
users to see all the pages assigned to any groups they belong to in the menu.
</para>
<para>
- The group navigation menu is configured by three XML files
(<filename>navigation.xml</filename>,
<filename>pages.xml</filename> and
<filename>portlet-preferences.xml</filename>). The syntax used in these files
is the same as those covered in <xref
linkend="sect-Reference_Guide-Portal_Navigation_Configuration-Portal_Navigation"/>.
- </para>
+ The group navigation menu is configured by three XML files
(<filename>navigation.xml</filename>,
<filename>pages.xml</filename> and
<filename>portlet-preferences.xml</filename>). The syntax used in these files
is the same as those covered in <xref
linkend="sect-Reference_Guide-Portal_Navigation_Configuration-Portal_Navigation"
/>.
+ </para>
<para>
- They are located in the
<filename>portal/WEB-INF/conf/portal/group<replaceable>/group-name-path/</replaceable></filename>
directory (For example;
<filename>portal/WEB-INF/conf/portal/group/platform/administrators/</filename>).
+ They are located in the
<filename>portal/WEB-INF/conf/portal/group<replaceable>/group-name-path/</replaceable></filename>
directory (For example;
<filename>portal/WEB-INF/conf/portal/group/platform/administrators/</filename>).
</para>
</section>
<section
id="sect-Reference_Guide-Portal_Navigation_Configuration-User_Navigation">
<title>User Navigation</title>
<para>
- The user navigation is the set of nodes and pages that are owned by a user. They are
part of the user dashboard.
- </para>
+ The user navigation is the set of nodes and pages that are owned by a user. They are
part of the user dashboard.
+ </para>
<para>
- Three files configure the user navigation
(<filename>navigation.xml</filename>,
<filename>pages.xml</filename> and
<filename>portlet-preferences.xml</filename>). They are located in the
directory
"<filename>portal/WEB-INF/conf/portal/users/{userName}</filename>".
+ Three files configure the user navigation
(<filename>navigation.xml</filename>,
<filename>pages.xml</filename> and
<filename>portlet-preferences.xml</filename>). They are located in the
directory
"<filename>portal/WEB-INF/conf/portal/users/{userName}</filename>".
</para>
<para>
This directory also contains a <filename>gadgets.xml</filename> file
(which was formerly called <filename>widgets.xml</filename>). This file
defines the gadgets located in the user workspace.
- </para>
+ </para>
<para>
The user workspace is located at the left hand side of the page and access is
restricted to some privileged users, see <xref
linkend="sect-Reference_Guide-Predefined_User_Configuration" />
</para>
-<programlisting role="XML"><?xml version="1.0"
encoding="ISO-8859-1"?>
-<widgets>
- <owner-type>user</owner-type>
- <owner-id>root</owner-id>
+
+<programlisting role="XML"><?xml version="1.0"
encoding="ISO-8859-1"?>
+<widgets>
+ <owner-type>user</owner-type>
+ <owner-id>root</owner-id>
- <container id="Information">
- <name>Information</name>
- <description>Information's Description</description>
- <application>
-
<instance-id>user#root:/GateInWidgetWeb/WelcomeWidget/WelcomeWidget1</instance-id>
- <application-type>GateInWidget</application-type>
- </application>
+ <container id="Information">
+ <name>Information</name>
+ <description>Information's
Description</description>
+ <application>
+
<instance-id>user#root:/GateInWidgetWeb/WelcomeWidget/WelcomeWidget1</instance-id>
+ <application-type>GateInWidget</application-type>
+ </application>
- <application>
-
<instance-id>user#root:/GateInWidgetWeb/StickerWidget/StickerWidget</instance-id>
- <application-type>GateInWidget</application-type>
- </application>
+ <application>
+
<instance-id>user#root:/GateInWidgetWeb/StickerWidget/StickerWidget</instance-id>
+ <application-type>GateInWidget</application-type>
+ </application>
- <application>
-
<instance-id>user#root:/GateInWidgetWeb/InfoWidget/InfoWidget1</instance-id>
- <application-type>GateInWidget</application-type>
- </application>
- </container>
+ <application>
+
<instance-id>user#root:/GateInWidgetWeb/InfoWidget/InfoWidget1</instance-id>
+ <application-type>GateInWidget</application-type>
+ </application>
+ </container>
- <container id="Calendar">
- <name>Calendar</name>
- <description>Calendar's Description</description>
- <application>
-
<instance-id>user#root:/GateInWidgetWeb/CalendarWidget/CalendarWidget</instance-id>
- <application-type>GateInWidget</application-type>
- </application>
- </container>
+ <container id="Calendar">
+ <name>Calendar</name>
+ <description>Calendar's
Description</description>
+ <application>
+
<instance-id>user#root:/GateInWidgetWeb/CalendarWidget/CalendarWidget</instance-id>
+ <application-type>GateInWidget</application-type>
+ </application>
+ </container>
-</widgets>
+</widgets>
</programlisting>
-<!-- <para>
+ <!-- <para>
Note that when you develop a portal, we advise you to use the XML instead of the User
Interface as XML will allow you to provide a preconfigured package to your customer. But
as each time you start the server the first time, the XML files are stored in the JCR, it
will be necessary to remove the database (the jcr leverages a database). During the
development phase using tomcat it simply means to delete the directory: exo-tomcat/temp
- </para> -->
+ </para> -->
</section>
<section
id="sect-Reference_Guide-Portal_Navigation_Configuration-Tips">
@@ -570,40 +571,42 @@
<section id="sect-Reference_Guide-Tips-Direct_External_Links">
<title>Direct External Links</title>
<para>
- If you wish to add a link to a URL outside the portal you you first have to define a
"page" which will not be used. Then add the URL to the navigation.
+ If you wish to add a link to a URL outside the portal you you first have to define a
"page" which will not be used. Then add the URL to the navigation.
</para>
<variablelist>
- <varlistentry>
- <term>pages.xml</term>
- <listitem>
- <para>
-<programlisting><page>
- <owner-type>portal</owner-type>
- <owner-id>website</owner-id>
- <name>documentation</name>
- <title>Documentation</title>
- <access-permissions>Everyone</access-permissions>
-
<edit-permission>*:/platform/administrators</edit-permission>
-</page>
+ <varlistentry>
+ <term>pages.xml</term>
+ <listitem>
+ <para>
+
+<programlisting><page>
+ <owner-type>portal</owner-type>
+ <owner-id>website</owner-id>
+ <name>documentation</name>
+ <title>Documentation</title>
+ <access-permissions>Everyone</access-permissions>
+
<edit-permission>*:/platform/administrators</edit-permission>
+</page>
</programlisting>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>navigation.xml</term>
- <listitem>
- <para>
-<programlisting><node>
-
<uri>http://wiki.exoplatform.com/xwiki/bin/view/Main/WebHome</uri>
- <name>documentation</name>
- <label>#{portal.classic.documentation}</label>
-
<page-reference>portal::website::documentation</page-reference>
-</node>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>navigation.xml</term>
+ <listitem>
+ <para>
+
+<programlisting><node>
+
<uri>http://wiki.exoplatform.com/xwiki/bin/view/Main/WebHome</uri>
+ <name>documentation</name>
+ <label>#{portal.classic.documentation}</label>
+
<page-reference>portal::website::documentation</page-reference>
+</node>
</programlisting>
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
<warning>
<title>Direct external links were not a design goal</title>
<para>
Modified:
portal/trunk/docs/reference-guide/en/modules/configuration/Predefined_User_Configuration.xml
===================================================================
---
portal/trunk/docs/reference-guide/en/modules/configuration/Predefined_User_Configuration.xml 2010-02-15
01:19:14 UTC (rev 1673)
+++
portal/trunk/docs/reference-guide/en/modules/configuration/Predefined_User_Configuration.xml 2010-02-15
01:20:35 UTC (rev 1674)
@@ -1,7 +1,5 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Predefined_User_Configuration">
<title>Predefined User Configuration</title>
@@ -12,140 +10,139 @@
</para>
</section>
- <section
id="sect-Reference_Guide-Predefined_User_Configuration-Plugin_for_adding_users_groups_and_membership_types_">
+ <section
id="sect-Reference_Guide-Predefined_User_Configuration-Plugin_for_adding_users_groups_and_membership_types">
<title>Plugin for adding users, groups and membership types</title>
<para>
- The plugin of type
<literal>org.exoplatform.services.organization.OrganizationDatabaseInitializer</literal>
specifies the list of users, groups and membership types to be created.
- </para>
+ The plugin of type
<literal>org.exoplatform.services.organization.OrganizationDatabaseInitializer</literal>
specifies the list of users, groups and membership types to be created.
+ </para>
<para>
- The initialization parameter
"<parameter>checkDatabaseAlgorithm</parameter>" determines how the
creation is triggered.
+ The initialization parameter
"<parameter>checkDatabaseAlgorithm</parameter>" determines how
the creation is triggered.
</para>
-
<para>
- The value "<literal>entry</literal>" means that each user, group
and membership listed in the configuration file is checked each time &PRODUCT; is
started. If the entry doesn't exist, it is created. The value
"<literal>empty</literal>" sets the configuration file to be
processed only if the database is empty.
+ The value "<literal>entry</literal>" means that each user,
group and membership listed in the configuration file is checked each time &PRODUCT;
is started. If the entry doesn't exist, it is created. The value
"<literal>empty</literal>" sets the configuration file to be
processed only if the database is empty.
</para>
</section>
<section
id="sect-Reference_Guide-Predefined_User_Configuration-Membership_types">
<title>Membership types</title>
<para>
- The predefined membership types are specified in the
"<parameter>membershipType</parameter>" field of the
"<parameter>OrganizationConfig</parameter>" plugin parameter.
+ The predefined membership types are specified in the
"<parameter>membershipType</parameter>" field of the
"<parameter>OrganizationConfig</parameter>" plugin parameter.
</para>
-<programlisting role="XML"><field
name="membershipType">
- <collection type="java.util.ArrayList">
- <value>
- <object
type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
- <field name="type">
- <string>member</string>
- </field>
- <field name="description">
- <string>member membership type</string>
- </field>
- </object>
- </value>
- <value>
- <object
type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
- <field name="type">
- <string>owner</string>
- </field>
- <field name="description">
- <string>owner membership type</string>
- </field>
- </object>
- </value>
- <value>
- <object
type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
- <field name="type">
- <string>validator</string>
- </field>
- <field name="description">
- <string>validator membership type</string>
- </field>
- </object>
- </value>
- </collection>
-</field>
+<programlisting role="XML"><field
name="membershipType">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
+ <field name="type">
+ <string>member</string>
+ </field>
+ <field name="description">
+ <string>member membership type</string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
+ <field name="type">
+ <string>owner</string>
+ </field>
+ <field name="description">
+ <string>owner membership type</string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
+ <field name="type">
+ <string>validator</string>
+ </field>
+ <field name="description">
+ <string>validator membership type</string>
+ </field>
+ </object>
+ </value>
+ </collection>
+</field>
</programlisting>
</section>
<section
id="sect-Reference_Guide-Predefined_User_Configuration-Groups">
<title>Groups</title>
<para>
- The predefined groups are specified in the "group" field of the
"<parameter>OrganizationConfig</parameter>" plugin parameter.
+ The predefined groups are specified in the "group" field of the
"<parameter>OrganizationConfig</parameter>" plugin parameter.
</para>
-<programlisting role="XML"><field name="group">
- <collection type="java.util.ArrayList">
- <value>
- <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name">
- <string>portal</string>
- </field>
- <field name="parentId">
- <string></string>
- </field>
- <field name="type">
- <string>hierachy</string>
- </field>
- <field name="description">
- <string>the /portal group</string>
- </field>
- </object>
- </value>
- <value>
- <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name">
- <string>community</string>
- </field>
- <field name="parentId">
- <string>/portal</string>
- </field>
- <field name="type">
- <string>hierachy</string>
- </field>
- <field name="description">
- <string>the /portal/community group</string>
- </field>
- </object>
- </value>
+<programlisting role="XML"><field
name="group">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name">
+ <string>portal</string>
+ </field>
+ <field name="parentId">
+ <string></string>
+ </field>
+ <field name="type">
+ <string>hierachy</string>
+ </field>
+ <field name="description">
+ <string>the /portal group</string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name">
+ <string>community</string>
+ </field>
+ <field name="parentId">
+ <string>/portal</string>
+ </field>
+ <field name="type">
+ <string>hierachy</string>
+ </field>
+ <field name="description">
+ <string>the /portal/community group</string>
+ </field>
+ </object>
+ </value>
...
- </collection>
-</field>
+ </collection>
+</field>
</programlisting>
</section>
<section id="sect-Reference_Guide-Predefined_User_Configuration-Users">
<title>Users</title>
<para>
- The predefined users are specified in the
"<parameter>membershipType</parameter>" field of the
"<parameter>OrganizationConfig</parameter>" plugin parameter.
+ The predefined users are specified in the
"<parameter>membershipType</parameter>" field of the
"<parameter>OrganizationConfig</parameter>" plugin parameter.
</para>
-<programlisting role="XML"><field name="user">
- <collection type="java.util.ArrayList">
- <value>
- <object
type="org.exoplatform.services.organization.OrganizationConfig$User">
- <field
name="userName"><string>root</string></field>
- <field
name="password"><string>exo</string></field>
- <field
name="firstName"><string>root</string></field>
- <field
name="lastName"><string>root</string></field>
- <field
name="email"><string>exoadmin@localhost</string></field>
- <field
name="groups"><string>member:/admin,member:/user,owner:/portal/admin</string></field>
- </object>
- </value>
- <value>
- <object
type="org.exoplatform.services.organization.OrganizationConfig$User">
- <field
name="userName"><string>exo</string></field>
- <field
name="password"><string>exo</string></field>
- <field
name="firstName"><string>site</string></field>
- <field
name="lastName"><string>site</string></field>
- <field
name="email"><string>exo@localhost</string></field>
- <field
name="groups"><string>member:/user</string></field>
- </object>
- </value>
+<programlisting role="XML"><field
name="user">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$User">
+ <field
name="userName"><string>root</string></field>
+ <field
name="password"><string>exo</string></field>
+ <field
name="firstName"><string>root</string></field>
+ <field
name="lastName"><string>root</string></field>
+ <field
name="email"><string>exoadmin@localhost</string></field>
+ <field
name="groups"><string>member:/admin,member:/user,owner:/portal/admin</string></field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$User">
+ <field
name="userName"><string>exo</string></field>
+ <field
name="password"><string>exo</string></field>
+ <field
name="firstName"><string>site</string></field>
+ <field
name="lastName"><string>site</string></field>
+ <field
name="email"><string>exo@localhost</string></field>
+ <field
name="groups"><string>member:/user</string></field>
+ </object>
+ </value>
...
- </collection>
-</field>
+ </collection>
+</field>
</programlisting>
</section>
@@ -155,38 +152,38 @@
The plugin of type
<literal>org.exoplatform.services.organization.impl.NewUserEventListener
</literal> specifies which groups should join all newly created users. It notably
specifies the groups and memberships to be used. It also specifies a list of users that
should be excepted.
</para>
-<programlisting role="XML"><component-plugin>
- <name>new.user.event.listener</name>
- <set-method>addListenerPlugin</set-method>
-
<type>org.exoplatform.services.organization.impl.NewUserEventListener</type>
- <description>this listener assign group and membership to a new created
user</description>
- <init-params>
- <object-param>
- <name>configuration</name>
- <description>description</description>
- <object
type="org.exoplatform.services.organization.impl.NewUserConfig">
- <field name="group">
- <collection type="java.util.ArrayList">
- <value>
- <object
type="org.exoplatform.services.organization.impl.NewUserConfig$JoinGroup">
- <field
name="groupId"><string>/user</string></field>
- <field
name="membership"><string>member</string></field>
- </object>
- </value>
- </collection>
- </field>
- <field name="ignoredUser">
- <collection type="java.util.HashSet">
-
<value><string>exo</string></value>
-
<value><string>root</string></value>
-
<value><string>company</string></value>
-
<value><string>community</string></value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
-</component-plugin>
+<programlisting role="XML"><component-plugin>
+ <name>new.user.event.listener</name>
+ <set-method>addListenerPlugin</set-method>
+
<type>org.exoplatform.services.organization.impl.NewUserEventListener</type>
+ <description>this listener assign group and membership to a new created
user</description>
+ <init-params>
+ <object-param>
+ <name>configuration</name>
+ <description>description</description>
+ <object
type="org.exoplatform.services.organization.impl.NewUserConfig">
+ <field name="group">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object
type="org.exoplatform.services.organization.impl.NewUserConfig$JoinGroup">
+ <field
name="groupId"><string>/user</string></field>
+ <field
name="membership"><string>member</string></field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ <field name="ignoredUser">
+ <collection type="java.util.HashSet">
+
<value><string>exo</string></value>
+
<value><string>root</string></value>
+
<value><string>company</string></value>
+
<value><string>community</string></value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+</component-plugin>
</programlisting>
</section>
Modified:
portal/trunk/docs/reference-guide/en/modules/configuration/Skin_Configuration.xml
===================================================================
---
portal/trunk/docs/reference-guide/en/modules/configuration/Skin_Configuration.xml 2010-02-15
01:19:14 UTC (rev 1673)
+++
portal/trunk/docs/reference-guide/en/modules/configuration/Skin_Configuration.xml 2010-02-15
01:20:35 UTC (rev 1674)
@@ -1,7 +1,5 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Skin_Configuration">
<title>Skin Configuration</title>
@@ -30,7 +28,7 @@
<section
id="sect-Reference_Guide-Skin_Configuration-Skins_in_Page_Markups">
<title>Skins in Page Markups</title>
<para>
- A &PRODUCT; skin contains css styles for the portal's components but also
shares components that may be reused in portlets. When &PRODUCT; generates a portal
page markup, it inserts stylesheet links in the page's
<literal>head</literal> tag.
+ A &PRODUCT; skin contains css styles for the portal's components but also
shares components that may be reused in portlets. When &PRODUCT; generates a portal
page markup, it inserts stylesheet links in the page's
<literal>head</literal> tag.
</para>
<para>
In the snipped code below you can see two types of links:
@@ -40,21 +38,21 @@
<area coords="3"
id="area-Reference_Guide-Skin_Configuration-Coreskin" />
<area coords="4"
id="area-Reference_Guide-Skin_Configuration-Stylesheets" />
</areaspec>
-<programlisting><head>
+
+<programlisting><head>
...
-<link id="CoreSkin" rel="stylesheet" type="text/css"
href="/eXoResources/skin/Stylesheet.css" />
-<link id="web_FooterPortlet" rel="stylesheet"
type="text/css" href=
"/web/skin/portal/webui/component/UIFooterPortlet/DefaultStylesheet.css"
/>
-<link id="web_NavigationPortlet" rel="stylesheet"
type="text/css" href=
"/web/skin/portal/webui/component/UINavigationPortlet/DefaultStylesheet.css"
/>
-<link id="web_HomePagePortlet" rel="stylesheet"
type="text/css" href=
"/portal/templates/skin/webui/component/UIHomePagePortlet/DefaultStylesheet.css"
/>
-<link id="web_BannerPortlet" rel="stylesheet"
type="text/css" href=
"/web/skin/portal/webui/component/UIBannerPortlet/DefaultStylesheet.css"
/>
+<link id="CoreSkin" rel="stylesheet"
type="text/css" href="/eXoResources/skin/Stylesheet.css"
/>
+<link id="web_FooterPortlet" rel="stylesheet"
type="text/css" href=
"/web/skin/portal/webui/component/UIFooterPortlet/DefaultStylesheet.css"
/>
+<link id="web_NavigationPortlet" rel="stylesheet"
type="text/css" href=
"/web/skin/portal/webui/component/UINavigationPortlet/DefaultStylesheet.css"
/>
+<link id="web_HomePagePortlet" rel="stylesheet"
type="text/css" href=
"/portal/templates/skin/webui/component/UIHomePagePortlet/DefaultStylesheet.css"
/>
+<link id="web_BannerPortlet" rel="stylesheet"
type="text/css" href=
"/web/skin/portal/webui/component/UIBannerPortlet/DefaultStylesheet.css"
/>
...
-</head>
+</head>
</programlisting>
-
- <calloutlist>
+ <calloutlist>
<callout
arearefs="area-Reference_Guide-Skin_Configuration-Coreskin">
<para>
- Portal skin stylesheet (<literal>id="CoreSkin"</literal>).
+ Portal skin stylesheet
(<literal>id="CoreSkin"</literal>).
</para>
</callout>
<callout
arearefs="area-Reference_Guide-Skin_Configuration-Stylesheets">
@@ -62,39 +60,40 @@
Portlets skin stylesheets (<emphasis role="bold">all
others</emphasis>). Each portlet within the page may contribute its own style(s).
</para>
</callout>
- </calloutlist>
+ </calloutlist>
</programlistingco>
+
</section>
<section id="sect-Reference_Guide-Skin_Configuration-Types_of_Styles">
<title>Types of Styles</title>
- <para>
- The portal skin is typically made of 3 types of styles:
- </para>
+ <para>
+ The portal skin is typically made of 3 types of styles:
+ </para>
<variablelist>
<varlistentry>
<term>Portlet themes</term>
- <listitem>
- <para>
- Decorations for portlet windows.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ Decorations for portlet windows.
+ </para>
+ </listitem>
</varlistentry>
<varlistentry>
<term>Portal styles</term>
- <listitem>
- <para>
- Default styles for html tags (ex div,th,td...) and the portal UI (including the
sidebar and portal admin screens).
- </para>
- </listitem>
+ <listitem>
+ <para>
+ Default styles for html tags (ex div,th,td...) and the portal UI (including the
sidebar and portal admin screens).
+ </para>
+ </listitem>
</varlistentry>
<varlistentry>
<term>Shared styles</term>
- <listitem>
- <para>
- &PRODUCT; WebUI components styles are reused among different portlets.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ &PRODUCT; WebUI components styles are reused among different portlets.
+ </para>
+ </listitem>
</varlistentry>
</variablelist>
<para>
@@ -113,11 +112,9 @@
Portlets often require additionnal styles that may not be defined by the portal skin.
&PRODUCT; allows portlets to define additional stylesheets for each portlet and will
append the corresponding <literal>link</literal> tags to the
<literal>head</literal>.
</para>
<para>
- The link ID will be of the form
<parameter>{portletAppName}{}$$PortletName</parameter>. For example:
<literal>ContentPortlet</literal> in
<literal>content.war</literal>, will give
<parameter>id="content<literal>ContentPortlet"</literal></parameter>
+ The link ID will be of the form
<parameter>{portletAppName}{}$$PortletName</parameter>. For example:
<literal>ContentPortlet</literal> in
<literal>content.war</literal>, will give
<parameter>id="content<literal>ContentPortlet"</literal></parameter>
</para>
-
-<!-- #################### TODO: give some rules to follow in order to avoid overriding
portal styles #####################-->
-
+ <!-- #################### TODO: give some rules to follow in order to avoid
overriding portal styles ##################### -->
</section>
<section
id="sect-Reference_Guide-Skin_Configuration-How_to_Configure_a_Portal_Skin">
@@ -132,18 +129,18 @@
* Register the stylesheet for a portal Skin.
* @param module skin module identifier
* @param skinName skin name
- * @param cssPath path uri to the css file. This is relative to the root context, use
leading '/'
- * @param scontext the webapp's {@link ServletContext}
+ * @param cssPath path uri to the css file. This is relative to the root context, use
leading '/'
+ * @param scontext the webapp's {@link ServletContext}
*/
public void addPortalSkin(String module, String skinName, String cssPath,
ServletContext scontext) {
[...]
}
/**
* Register a portlet stylesheet for a Skin.
- * @param module skin module. Typically of the form
'portletAppName/portletName' .
+ * @param module skin module. Typically of the form
'portletAppName/portletName' .
* @param skinName Name of the skin
- * @param cssPath path uri to the css file. This is relative to the root context, use
leading '/'
- * @param scontext the webapp's {@link ServletContext}
+ * @param cssPath path uri to the css file. This is relative to the root context, use
leading '/'
+ * @param scontext the webapp's {@link ServletContext}
*/
public void addSkin(String module, String skinName, String cssPath, ServletContext
scontext) {
[...]
@@ -162,7 +159,7 @@
* @param categoryName portlet theme category
* @param themesName names of the themes
*/
- public void addTheme(String categoryName, List<String> themesName) {
+ public void addTheme(String categoryName, List<String> themesName) {
[...]
}
</programlisting>
@@ -177,13 +174,13 @@
&PRODUCT; provides a servlet listener that allows you to register your own skins
and styles when your webapp starts up. The first step is to add the listener to your
portlet app <literal>web.xml</literal>.
</para>
-<programlisting role="XML"><web-app>
+<programlisting role="XML"><web-app>
[::]
- <listener>
-
<listener-class>org.exoplatform.portal.webui.skin.SkinConfigListener</listener-class>
- </listener>
+ <listener>
+
<listener-class>org.exoplatform.portal.webui.skin.SkinConfigListener</listener-class>
+ </listener>
[::]
- </web-app>
+ </web-app>
</programlisting>
</section>
@@ -196,21 +193,21 @@
This script allows full access to the <literal>SkinService</literal> and
<literal>ServletContext</literal> which are bound as scripting variables under
the same name. The following script is an example. It can be found in the
<literal>GateInResources.war</literal> and is used by &PRODUCT; to
register the <literal>Default</literal> portal skin and some portlet themes.
</para>
-<programlisting>SkinService.addPortalSkin("CoreSkin","Default",
"/GateInResources/skin/Stylesheet.css", ServletContext);
-SkinService.addTheme("Simple",
["SimpleBlue","SimpleViolet","SimpleOrange","SimplePink","SimpleGreen"]);
-SkinService.addTheme("RoundConer",
["RoundConerBlue","RoundConerViolet","RoundConerOrange","RoundConerPink","RoundConerGreen"]);
-SkinService.addTheme("Shadow",
["ShadowBlue","ShadowViolet","ShadowOrange","ShadowPink","ShadowGreen"]);
-SkinService.addTheme("MacStyle",
["MacTheme","MacGray","MacGreenSteel","MacBlack"]);
-SkinService.addTheme("VistaStyle",
["VistaTheme","VistaBlue"]);
+<programlisting>SkinService.addPortalSkin("CoreSkin","Default",
"/GateInResources/skin/Stylesheet.css", ServletContext);
+SkinService.addTheme("Simple",
["SimpleBlue","SimpleViolet","SimpleOrange","SimplePink","SimpleGreen"]);
+SkinService.addTheme("RoundConer",
["RoundConerBlue","RoundConerViolet","RoundConerOrange","RoundConerPink","RoundConerGreen"]);
+SkinService.addTheme("Shadow",
["ShadowBlue","ShadowViolet","ShadowOrange","ShadowPink","ShadowGreen"]);
+SkinService.addTheme("MacStyle",
["MacTheme","MacGray","MacGreenSteel","MacBlack"]);
+SkinService.addTheme("VistaStyle",
["VistaTheme","VistaBlue"]);
</programlisting>
<para>
The syntax of addTheme() is:
-<programlisting>addTheme(String categoryName, List<String>
themesName)
+<programlisting>addTheme(String categoryName, List<String>
themesName)
</programlisting>
</para>
<para>
So, to provide your own skin you could use the following:
-<programlisting>SkinService.addSkin("mywebapp/MyPortlet",
"MyPortalSkin", "/mywebapp/skin/Stylesheet.css", ServletContext);
+<programlisting>SkinService.addSkin("mywebapp/MyPortlet",
"MyPortalSkin", "/mywebapp/skin/Stylesheet.css",
ServletContext);
</programlisting>
</para>
<para>
@@ -222,13 +219,13 @@
</programlisting>
</para>
<para>
- '<literal>overwrite</literal>' is optional, its default value is
"<parameter>false</parameter>". If its value is
<parameter>true</parameter>, the later call of
<parameter>addSkin()</parameter> for the same skin key (combination of module
+ skinName) replaces the skin of the previous call.
+ '<literal>overwrite</literal>' is optional, its default
value is "<parameter>false</parameter>". If its value is
<parameter>true</parameter>, the later call of
<parameter>addSkin()</parameter> for the same skin key (combination of module
+ skinName) replaces the skin of the previous call.
</para>
<para>
Similarly, use the following to configure a particular portal:
</para>
-<programlisting>SkinService.addSkin("myportalname", "skin",
"/path/to/skin/Stylesheet.css", ServletContext);
+<programlisting>SkinService.addSkin("myportalname",
"skin", "/path/to/skin/Stylesheet.css", ServletContext);
</programlisting>
<para>
The syntax of addPortalSkin() is:
@@ -241,7 +238,7 @@
<section id="sect-Reference_Guide-Skin_Configuration-Tips_and_Tricks">
<title>Tips and Tricks</title>
- <section
id="sect-Reference_Guide-Tips_and_Tricks-Easier_css_debuggin">
+ <section
id="sect-Reference_Guide-Tips_and_Tricks-Easier_css_debugging">
<title>Easier css debugging</title>
<para>
By default, CSS files are cached and their imports are merged into a single CSS file
at the server side. This reduces the number of HTTP requests from the browser to the
server.
@@ -250,7 +247,7 @@
The <literal>ServletContext</literal> parameter allows direct access to
the CSS files from the <literal>SkinService</literal>. The optimization code
is quite simple as all the CSS files are parsed at the server startup time and all the
@import and url(...) references are rewritten to support a single flat file. The result is
stored in a cache directly used from the
<literal>ResourceRequestFilter</literal>.
</para>
<para>
- Although the optimization is useful for a production environments, it may be easier
to deactivate this optimization while debugging stylesheets. To do so, set the java
system property <literal>exo.product.developing</literal> to
<literal>true</literal>.
+ Although the optimization is useful for a production environments, it may be easier
to deactivate this optimization while debugging stylesheets. To do so, set the java system
property <literal>exo.product.developing</literal> to
<literal>true</literal>.
</para>
<para>
For example, the property can passed as a JVM parameter with the
<literal>-D</literal> option in the <literal>GateIn.sh</literal>
startup script: {code} EXO{code}
@@ -258,13 +255,13 @@
<orderedlist numeration="arabic">
<listitem>
<para>
- warning("This is option may cause display bugs with certain browsers like
Internet Explorer")
+ warning("This is option may cause display bugs with certain browsers like
Internet Explorer")
</para>
</listitem>
</orderedlist>
</section>
- <section
id="sect-Reference_Guide-Tips_and_Tricks-Change_portlet_icons">
+ <section
id="sect-Reference_Guide-Tips_and_Tricks-_Change_portlet_icons_">
<title> Change portlet icons </title>
<para>
Each portlet is represented by an icon that you can see in the portlet registry, or
the webos dock. This icon can be changed by adding an image to the directory:
@@ -272,7 +269,7 @@
<itemizedlist>
<listitem>
<para>
- <filename>$project/portlet/myportlets/src/main/webapp/skin/DefaultSkin/portletIcons<replaceable>icon_name.png</replaceable></filename>.
To be used correctly the icon must be named after the portlet.
+ <filename>$project/portlet/myportlets/src/main/webapp/skin/DefaultSkin/portletIcons<replaceable>icon_name.png</replaceable></filename>.
To be used correctly the icon must be named after the portlet.
</para>
</listitem>
</itemizedlist>
@@ -294,13 +291,13 @@
The default skin of portal is called Default. To change this value (to a Mac-like
skin, a Windows Vista-like skin, or an original skin), add a skin tag in the
<literal>portal.xml</literal> that defines your portal:
</para>
-<programlisting role="XML"><portal-config>
- <portal-name>classic</portal-name>
- <locale>en</locale>
- <access-permissions>Everyone</access-permissions>
-
<edit-permission>*:/platform/administrators</edit-permission>
- <skin>Mac</skin>
- <creator>root</creator>
+<programlisting role="XML"><portal-config>
+ <portal-name>classic</portal-name>
+ <locale>en</locale>
+ <access-permissions>Everyone</access-permissions>
+
<edit-permission>*:/platform/administrators</edit-permission>
+ <skin>Mac</skin>
+ <creator>root</creator>
...
</programlisting>
</section>
@@ -308,10 +305,10 @@
<section
id="sect-Reference_Guide-Tips_and_Tricks-Some_CSS_techniques">
<title>Some CSS techniques</title>
<para>
- It is recommended that users have some experience with CSS before studying
&PRODUCT; CSS. ALso, pleased read the CSS specification at <ulink
type="http"
url="http://www.w3.org/TR/REC-CSS2/selector.html"></ulink...
+ It is recommended that users have some experience with CSS before studying
&PRODUCT; CSS. ALso, pleased read the CSS specification at <ulink
type="http"
url="http://www.w3.org/TR/REC-CSS2/selector.html" />
</para>
<para>
- &PRODUCT; relies heavily on CSS to create the layout and effects for the UI. Some
common techniques for customizing &PRODUCT;'s CSS are explained below.
+ &PRODUCT; relies heavily on CSS to create the layout and effects for the UI. Some
common techniques for customizing &PRODUCT;'s CSS are explained below.
</para>
<section
id="sect-Reference_Guide-Some_CSS_techniques-Decorator_pattern">
<title>Decorator pattern</title>
@@ -333,23 +330,23 @@
| BottomLeft | BottomCenter | BottomRight |
| | | |
-----------------------------------------------------------------------
-<div class="Parent">
- <div class="TopLeft">
- <div class="TopRight">
- <div
class="TopCenter"><span></span></div>
- </div>
- </div>
- <div class="CenterLeft">
- <div class="CenterRight">
- <div class="CenterCenter">BODY</div>
- </div>
- </div>
- <div class="BottomLeft">
- <div class="BottomRight">
- <div
class="BottomCenter"><span></span></div>
- </div>
- <div>
-</div>
+<div class="Parent">
+ <div class="TopLeft">
+ <div class="TopRight">
+ <div
class="TopCenter"><span></span></div>
+ </div>
+ </div>
+ <div class="CenterLeft">
+ <div class="CenterRight">
+ <div
class="CenterCenter">BODY</div>
+ </div>
+ </div>
+ <div class="BottomLeft">
+ <div class="BottomRight">
+ <div
class="BottomCenter"><span></span></div>
+ </div>
+ <div>
+</div>
</programlisting>
</section>
@@ -362,18 +359,18 @@
<programlisting role="HTML">
| | |
| | |
-| |<--- fixed width --->| | will expand to right
----> |
+| |<--- fixed width --->| | will expand to right
----> |
| | |
| | |
| | |
----
-<div class="Parent">
- <div style="float: left; width: 100px">
- </div>
- <div style="margin-left: 105px;">
- <div>
- <div style="clear:
left"><span></span></div>
-</div>
+<div class="Parent">
+ <div style="float: left; width: 100px">
+ </div>
+ <div style="margin-left: 105px;">
+ <div>
+ <div style="clear:
left"><span></span></div>
+</div>
</programlisting>
</section>
@@ -388,21 +385,21 @@
<para>
Define the new skin in the
<literal>WEB-INF/conf/script/groovy/SkinConfigScript.groovy</literal> file as
a <literal>Resource</literal> (for example, in the project
<replaceable>MyPortal</replaceable>, the resource would read;
<literal>GateInResourcesMyPortal</literal>).
</para>
-<warning>
-<para>
- The <literal>WEB-INF/conf/script/groovy/SkinConfigScript.groovy</literal>
file mentioned above does not exist in EPP-5.0.ER2. The closest match is
<literal>./jboss-as/server/default/tmp/<replaceable>instance</replaceable>/02portal.war/WEB-INF/conf/uiconf/portal/webui/portal/SkinConfigOption.groovy
-</literal>
-</para>
-</warning>
+ <warning>
+ <para>
+ The
<literal>WEB-INF/conf/script/groovy/SkinConfigScript.groovy</literal> file
mentioned above does not exist in EPP-5.0.ER2. The closest match is
<literal>./jboss-as/server/default/tmp/<replaceable>instance</replaceable>/02portal.war/WEB-INF/conf/uiconf/portal/webui/portal/SkinConfigOption.groovy
</literal>
+ </para>
+ </warning>
+
<programlisting>
-SkinService.addPortalSkin("MyPortalSkin","MyPortal","/GateInResourcesMyPortal/skin/Stylesheet.css",ServletContext);
+SkinService.addPortalSkin("MyPortalSkin","MyPortal","/GateInResourcesMyPortal/skin/Stylesheet.css",ServletContext);
</programlisting>
</step>
<step>
<para>
Place the new skin files into the
<replaceable>skinyourSkin</replaceable> folder and create a new
<literal>Stylesheet.css</literal> file in the same directory. This file should
include lines to import all links to your CSS. For example in
<replaceable>MyPortal</replaceable> project:
- </para>
-
+ </para>
+
<programlisting>
@import url(MyPortalSkin/portal/webui/component/UIPortalApplicationSkin.css) ;
@import url(MyPortalSkin/webui/component/Stylesheet.css) ;
@@ -411,26 +408,24 @@
<step>
<para>
Finally, define the name of new skin and the image preview for the
<emphasis>Skin Settings</emphasis> action. The image preview can be set in the
file:<filename>ressource/skin/DefaultSkin/portal/webui/component/customization/UIChangeSkinForm/Stylesheet.css</filename>
-
<programlisting>
.UIChangeSkinForm .UIItemSelector .TemplateContainer .MyPortalImage {
margin: auto;
width: 329px; height:204px;
- background: url('background/MyPortal.jpg') no-repeat top;
+ background: url('background/MyPortal.jpg') no-repeat top;
cursor: pointer ;
}
</programlisting>
</para>
<para>
- If no name is set for the new skin, it will be named
<literal>label></literal>. The skin name is defined in the
<literal>./jboss-as/server/default/tmp<replaceable>instance</replaceable>/<replaceable>resource</replaceable>/skin/DefaultSkin/portal/webui/component/customization/UIChangeSkinForm/Stylesheet.css</literal>.
+ If no name is set for the new skin, it will be named
<literal>label></literal>. The skin name is defined in the
<literal>./jboss-as/server/default/tmp<replaceable>instance</replaceable>/<replaceable>resource</replaceable>/skin/DefaultSkin/portal/webui/component/customization/UIChangeSkinForm/Stylesheet.css</literal>.
</para>
-<warning>
-<para>
- The program listing below is in French. This should be translated into en-US before
publication.
-</para>
-</warning>
-
-
+ <warning>
+ <para>
+ The program listing below is in French. This should be translated into en-US before
publication.
+ </para>
+ </warning>
+
<programlisting>
#############################################################################
# Change Skin #
@@ -446,7 +441,6 @@
Skin.title=Liste des styles
Skin.left.title=Voir et s?lectionner un style
</programlisting>
-
</step>
<step>
<para>
@@ -454,31 +448,34 @@
</para>
</step>
</procedure>
+
</section>
<section
id="sect-Reference_Guide-Skin_Configuration-How_to_create_new_themes">
<title>How to create new themes</title>
- <procedure>
- <step>
- <para>
- Define the new theme in
<literal>WEB-INF/conf/script/groovy/SkinConfigScript.groovy</literal> in your
<literal>Resource</literal> (for example, in the project MyPortal:
<literal>GateInResourcesCp060508</literal>).
- </para>
-<programlisting>SkinService.addTheme("MyPortal-MacTheme",
["MacGray","MacBlue","MacBlack"]);
+ <procedure>
+ <step>
+ <para>
+ Define the new theme in
<literal>WEB-INF/conf/script/groovy/SkinConfigScript.groovy</literal> in your
<literal>Resource</literal> (for example, in the project MyPortal:
<literal>GateInResourcesCp060508</literal>).
+ </para>
+
+<programlisting>SkinService.addTheme("MyPortal-MacTheme",
["MacGray","MacBlue","MacBlack"]);
</programlisting>
- </step>
- <step>
- <para>
- Place new theme files into <literal>folder skinyourSkin</literal> and
create a new <literal>Stylesheet.css</literal> file in the same directory.
This file should include lines to import all links to all CSS resources. For example, in
the <replaceable>MyPortal</replaceable> project:
- </para>
-
+ </step>
+ <step>
+ <para>
+ Place new theme files into <literal>folder skinyourSkin</literal> and
create a new <literal>Stylesheet.css</literal> file in the same directory.
This file should include lines to import all links to all CSS resources. For example, in
the <replaceable>MyPortal</replaceable> project:
+ </para>
+
<programlisting>@import url(MyPortalSkin/PortletThemes/Stylesheet.css) ;
</programlisting>
- </step>
- </procedure>
- <para>
- The code below illustrates the inclusion of all CSS resoucres for a new theme from
the example file
<literal>GateInResourcesCp060508/skin/MyPortalSkin/PortletThemes/Stylesheet.css</literal>.
- </para>
+ </step>
+ </procedure>
+ <para>
+ The code below illustrates the inclusion of all CSS resoucres for a new theme from the
example file
<literal>GateInResourcesCp060508/skin/MyPortalSkin/PortletThemes/Stylesheet.css</literal>.
+ </para>
+
<programlisting>
/*---- MyPortalTheme ----*/
.MyPortalTheme .WindowBarCenter .WindowPortletInfo {
@@ -491,7 +488,7 @@
width: 24px;
height: 17px;
cursor: pointer;
- background-image: url('background/MyPortalTheme.png');
+ background-image: url('background/MyPortalTheme.png');
}
.MyPortalTheme .ArrowDownIcon {
background-position: center 20px;
@@ -528,8 +525,8 @@
float: left;/* orientation=rt */
width: 18px; height: 18px;
cursor: nw-resize;
- background: url('background/ResizeArea18x18.gif') no-repeat left top; /*
orientation=lt */
- background: url('background/ResizeArea18x18-rt.gif') no-repeat right top; /*
orientation=rt */
+ background: url('background/ResizeArea18x18.gif') no-repeat left top; /*
orientation=lt */
+ background: url('background/ResizeArea18x18-rt.gif') no-repeat right
top; /* orientation=rt */
}
.MyPortalTheme .Information {
height: 18px; line-height: 18px;
@@ -556,18 +553,18 @@
}
.MyPortalTheme .WindowBarLeft {
padding-left: 12px;
- background-image: url('background/MyPortalTheme.png');
+ background-image: url('background/MyPortalTheme.png');
background-repeat: no-repeat;
background-position: left -148px;
}
.MyPortalTheme .WindowBarRight {
padding-right: 11px;
- background-image: url('background/MyPortalTheme.png');
+ background-image: url('background/MyPortalTheme.png');
background-repeat: no-repeat;
background-position: right -119px;
}
.MyPortalTheme .WindowBarCenter {
- background-image: url('background/MyPortalTheme.png');
+ background-image: url('background/MyPortalTheme.png');
background-repeat: repeat-x;
background-position: left -90px;
}
@@ -577,29 +574,29 @@
}
.MyPortalTheme .MiddleDecoratorLeft {
padding-left: 12px;
- background: url('background/MMyPortalTheme.png') repeat-y left;
+ background: url('background/MMyPortalTheme.png') repeat-y left;
}
.MyPortalTheme .MiddleDecoratorRight {
padding-right: 11px;
- background: url('background/MMyPortalTheme.png') repeat-y right;
+ background: url('background/MMyPortalTheme.png') repeat-y right;
}
.MyPortalTheme .MiddleDecoratorCenter {
background: #ffffff;
}
.MyPortalTheme .BottomDecoratorLeft {
padding-left: 12px;
- background-image: url('background/MyPortalTheme.png');
+ background-image: url('background/MyPortalTheme.png');
background-repeat: no-repeat;
background-position: left -60px;
}
.MyPortalTheme .BottomDecoratorRight {
padding-right: 11px;
- background-image: url('background/MyPortalTheme.png');
+ background-image: url('background/MyPortalTheme.png');
background-repeat: no-repeat;
background-position: right -30px;
}
.MyPortalTheme .BottomDecoratorCenter {
- background-image: url('background/MyPortalTheme.png');
+ background-image: url('background/MyPortalTheme.png');
background-repeat: repeat-x;
background-position: left top;
}
@@ -607,7 +604,6 @@
height: 30px;
}
</programlisting>
-
</section>
</section>
Modified:
portal/trunk/docs/reference-guide/en/modules/development/Accessing_User_Profile.xml
===================================================================
---
portal/trunk/docs/reference-guide/en/modules/development/Accessing_User_Profile.xml 2010-02-15
01:19:14 UTC (rev 1673)
+++
portal/trunk/docs/reference-guide/en/modules/development/Accessing_User_Profile.xml 2010-02-15
01:20:35 UTC (rev 1674)
@@ -1,7 +1,5 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Accessing_User_Profile">
<title>Accessing User Profile</title>
Modified:
portal/trunk/docs/reference-guide/en/modules/development/Ajax_Loading_Mask_Layer_Deactivation.xml
===================================================================
---
portal/trunk/docs/reference-guide/en/modules/development/Ajax_Loading_Mask_Layer_Deactivation.xml 2010-02-15
01:19:14 UTC (rev 1673)
+++
portal/trunk/docs/reference-guide/en/modules/development/Ajax_Loading_Mask_Layer_Deactivation.xml 2010-02-15
01:20:35 UTC (rev 1674)
@@ -1,11 +1,9 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<section
id="sect-Reference_Guide-Deactivation_of_the_Ajax_Loading_Mask_Layer_">
<title>Deactivation of the Ajax Loading Mask Layer </title>
-<!-- <section
id="sect-Reference_Guide-Deactivation_of_the_Ajax_Loading_Mask_Layer_-Overview">
+ <!-- <section
id="sect-Reference_Guide-Deactivation_of_the_Ajax_Loading_Mask_Layer_-Overview">
<title>Overview</title>
<para>
In this article, you will learn:
@@ -27,46 +25,46 @@
</para>
</listitem>
</itemizedlist>
- </section> -->
-
- <section
id="sect-Reference_Guide-Deactivation_of_the_Ajax_Loading_Mask_Layer_-Purpose_of_requirement">
+ </section> -->
+ <section
id="sect-Reference_Guide-Deactivation_of_the_Ajax_Loading_Mask_Layer_-Purpose">
<title>Purpose</title>
- <para>
- The loading mask layer is deployed after an ajax-call. Its purpose is to block the
GUI in order to prevent further user actions until the the ajax-request has been
completed.
- </para>
- <para>
- However, the mask layer may need to be deactivated in instances where the portal
requires user instructions before previous instructions have been carried out.
- </para>
- <procedure>
- <title>How to deactivate the ajax-loading mask</title>
- <step>
- <para>
- Generate a script to make an asynchronous ajax-call. Use the
<literal>uicomponent.doAsync()</literal> method rather than the
<literal>uicomponent.event()</literal> method.
- </para>
- <para>
- For example:
- </para>
-
-<programlisting><a href="<%=uicomponent.doAsync(action, beanId,
params)%>" alt="">Asynchronous</a>
+ <para>
+ The loading mask layer is deployed after an ajax-call. Its purpose is to block the GUI
in order to prevent further user actions until the the ajax-request has been completed.
+ </para>
+ <para>
+ However, the mask layer may need to be deactivated in instances where the portal
requires user instructions before previous instructions have been carried out.
+ </para>
+ <procedure
id="proc-Reference_Guide-Purpose-How_to_deactivate_the_ajax_loading_mask">
+ <title>How to deactivate the ajax-loading mask</title>
+ <step>
+ <para>
+ Generate a script to make an asynchronous ajax-call. Use the
<literal>uicomponent.doAsync()</literal> method rather than the
<literal>uicomponent.event()</literal> method.
+ </para>
+ <para>
+ For example:
+ </para>
+
+<programlisting><a href="<%=uicomponent.doAsync(action,
beanId, params)%>"
alt="">Asynchronous</a>
</programlisting>
- </step>
- <step>
- <para>
- The <literal>doAsync()</literal> method automatically adds the
following new parameter into the parameters list; <literal>asyncparam = new
Parameter(AJAX ASYNC,"true"); (AJAX ASYNC == "ajax
async")</literal>
- </para>
- <para>
- This request is asynchronous and the ajax-loading mask will not deployed.
- </para>
- <note>
- <para>
- An asynchronous request can still be made using the
<literal>uicomponent.event()</literal>. When using this method, however, the
asyncparam must be added manually.
- </para>
- </note>
- </step>
- </procedure>
- <para>
- The GUI will be blocked to ensure a user can only request one action at a time and
while the request seems to be synchronous, all ajax requests are, in fact always
asynchronous. For further information refer to <xref
linkend="sect-Reference_Guide-Deactivation_of_the_Ajax_Loading_Mask_Layer_-Synchronous_issue"/>.
- </para>
+ </step>
+ <step>
+ <para>
+ The <literal>doAsync()</literal> method automatically adds the following
new parameter into the parameters list; <literal>asyncparam = new Parameter(AJAX
ASYNC,"true"); (AJAX ASYNC == "ajax
async")</literal>
+ </para>
+ <para>
+ This request is asynchronous and the ajax-loading mask will not deployed.
+ </para>
+ <note>
+ <para>
+ An asynchronous request can still be made using the
<literal>uicomponent.event()</literal>. When using this method, however, the
asyncparam must be added manually.
+ </para>
+ </note>
+ </step>
+ </procedure>
+
+ <para>
+ The GUI will be blocked to ensure a user can only request one action at a time and
while the request seems to be synchronous, all ajax requests are, in fact always
asynchronous. For further information refer to <xref
linkend="sect-Reference_Guide-Deactivation_of_the_Ajax_Loading_Mask_Layer_-Synchronous_issue"
/>.
+ </para>
</section>
<section
id="sect-Reference_Guide-Deactivation_of_the_Ajax_Loading_Mask_Layer_-Synchronous_issue">
@@ -81,18 +79,16 @@
<para>
However, in order to work with browsers that do not support
<emphasis>Synchronous</emphasis> requests,
<literal>bAsync</literal> is set to always be true (Ajax request will always
be asynchronous).
</para>
-<!--
+ <!--
<programlisting>var bAsync = false; // Synchronous
request.open(instance.method, instance.url, bAsync); // Firefox will not execute
</programlisting>
<para>
So
- </para> -->
-
+ </para> -->
<programlisting>// Asynchronous request
request.open(instance.method, instance.url, true);
</programlisting>
-
</section>
</section>
Modified: portal/trunk/docs/reference-guide/en/modules/development/Dynamic_Layouts.xml
===================================================================
---
portal/trunk/docs/reference-guide/en/modules/development/Dynamic_Layouts.xml 2010-02-15
01:19:14 UTC (rev 1673)
+++
portal/trunk/docs/reference-guide/en/modules/development/Dynamic_Layouts.xml 2010-02-15
01:20:35 UTC (rev 1674)
@@ -1,7 +1,5 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Dynamic_Layouts">
<title>Dynamic Layouts</title>
Modified:
portal/trunk/docs/reference-guide/en/modules/development/Internationalization_Configuration.xml
===================================================================
---
portal/trunk/docs/reference-guide/en/modules/development/Internationalization_Configuration.xml 2010-02-15
01:19:14 UTC (rev 1673)
+++
portal/trunk/docs/reference-guide/en/modules/development/Internationalization_Configuration.xml 2010-02-15
01:20:35 UTC (rev 1674)
@@ -1,7 +1,5 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Internationalization_Configuration">
<title>Internationalization Configuration</title>
@@ -10,13 +8,12 @@
<note>
<title>Assumed Knowledge</title>
<para>
- &PRODUCT; is fully configurable for internationalization, however users should
have a general knowledge of Internationalization in Java products before attempting these
configurations.
+ &PRODUCT; is fully configurable for internationalization, however users should
have a general knowledge of Internationalization in Java products before attempting these
configurations.
</para>
<para>
- Sun Java hosts a comprehensive guide to internationalizing java products at <ulink
url="http://java.sun.com/docs/books/tutorial/i18n/TOC.html">...;.
+ Sun Java hosts a comprehensive guide to internationalizing java products at <ulink
url="http://java.sun.com/docs/books/tutorial/i18n/TOC.html" />.
</para>
</note>
-
<para>
All &PRODUCT; applications contain property files for various languages. They are
packaged with the portlets applications in a
<filename>WEB-INF/classes/locale/</filename> directory.
</para>
@@ -46,7 +43,7 @@
<programlisting>javax.portlet.title=Portlet Navigation
</programlisting>
<para>
- There are also properties files in the portal itself. They form the <emphasis
role="bold">portal resource bundle</emphasis>.
+ There are also properties files in the portal itself. They form the <emphasis
role="bold">portal resource bundle</emphasis>.
</para>
<para>
From a portlet you can then access translations from the portlet itself or shared at
the portal level, both are aggregated when you need them.
@@ -54,7 +51,7 @@
<note>
<title>Translation in XML format</title>
<para>
- It is also possible to use a proprietary XML format to define translations. This is a
more convenient way to translate a document for some languages such as Japanese, Arabic or
Russian. Property files have te be ASCII encoded, while the XML file can define its
encoding. As a result it's easier for a human being to read (and fix) a translation in
XML instead of having to decode and encode the property file.
+ It is also possible to use a proprietary XML format to define translations. This is a
more convenient way to translate a document for some languages such as Japanese, Arabic or
Russian. Property files have te be ASCII encoded, while the XML file can define its
encoding. As a result it's easier for a human being to read (and fix) a
translation in XML instead of having to decode and encode the property file.
</para>
<para>
For more information refer to: <xref
linkend="sect-Reference_Guide-XML_Resources_Bundles" />
@@ -65,26 +62,26 @@
<section
id="sect-Reference_Guide-Internationalization_Configuration-Locales_configuration">
<title>Locales configuration</title>
<para>
- Various languages are available in the portal package. The configuration below will
define which languages are shown in the "Change Language" section and made
available to users.
+ Various languages are available in the portal package. The configuration below will
define which languages are shown in the "Change Language" section and made
available to users.
</para>
<para>
The
<filename>02portal.war:/WEB-INF/conf/common/common-configuration.xml</filename>
file of your installation contains the following section:
</para>
-<programlisting role="XML"><component>
-
<key>org.exoplatform.services.resources.LocaleConfigService</key>
-
<type>org.exoplatform.services.resources.impl.LocaleConfigServiceImpl</type>
- <init-params>
- <value-param>
- <name>locale.config.file</name>
- <value>war:/conf/common/locales-config.xml</value>
- </value-param>
- </init-params>
-</component>
+<programlisting role="XML"><component>
+
<key>org.exoplatform.services.resources.LocaleConfigService</key>
+
<type>org.exoplatform.services.resources.impl.LocaleConfigServiceImpl</type>
+ <init-params>
+ <value-param>
+ <name>locale.config.file</name>
+ <value>war:/conf/common/locales-config.xml</value>
+ </value-param>
+ </init-params>
+</component>
</programlisting>
<para>
- This configuration points to the locale configuration file.
- </para>
+ This configuration points to the locale configuration file.
+ </para>
<para>
The locale configuration file
(<filename>02portal.war:/WEB-INF/conf/common/locales-config.xml</filename>)
contains the following code:
</para>
@@ -97,35 +94,35 @@
<area coords="22"
id="area-Reference_Guide-i18n.locales.configuration.orientation" />
</areaspec>
-<programlisting><?xml version="1.0"
encoding="UTF-8"?>
-<locales-config>
- <locale-config>
- <locale>en</locale>
- <output-encoding>UTF-8</output-encoding>
- <input-encoding>UTF-8</input-encoding>
- <description>Default configuration for english
locale</description>
- </locale-config>
+<programlisting><?xml version="1.0"
encoding="UTF-8"?>
+<locales-config>
+ <locale-config>
+ <locale>en</locale>
+ <output-encoding>UTF-8</output-encoding>
+ <input-encoding>UTF-8</input-encoding>
+ <description>Default configuration for english
locale</description>
+ </locale-config>
- <locale-config>
- <locale>fr</locale>
- <output-encoding>UTF-8</output-encoding>
- <input-encoding>UTF-8</input-encoding>
- <description>Default configuration for the french
locale</description>
- </locale-config>
+ <locale-config>
+ <locale>fr</locale>
+ <output-encoding>UTF-8</output-encoding>
+ <input-encoding>UTF-8</input-encoding>
+ <description>Default configuration for the french
locale</description>
+ </locale-config>
- <locale-config>
- <locale>ar</locale>
- <output-encoding>UTF-8</output-encoding>
- <input-encoding>UTF-8</input-encoding>
- <description>Default configuration for the arabic
locale</description>
- <orientation>rt</orientation>
- </locale-config>
-</locales-config>
+ <locale-config>
+ <locale>ar</locale>
+ <output-encoding>UTF-8</output-encoding>
+ <input-encoding>UTF-8</input-encoding>
+ <description>Default configuration for the arabic
locale</description>
+ <orientation>rt</orientation>
+ </locale-config>
+</locales-config>
</programlisting>
<calloutlist>
<callout
arearefs="area-Reference_Guide-i18n.locales.configuration.locale">
<para>
- <emphasis>locale</emphasis> The locale has to be defined such as
defined here <ulink type="http"
url="http://ftp.ics.uci.edu-pub-ietf-http-related-iso639.txt" />. In this
example "<emphasis>ar</emphasis>" is Arabic.
+ <emphasis>locale</emphasis> The locale has to be defined such as
defined here <ulink type="http"
url="http://ftp.ics.uci.edu-pub-ietf-http-related-iso639.txt" />. In this
example "<emphasis>ar</emphasis>" is Arabic.
</para>
</callout>
<callout
arearefs="area-Reference_Guide-i18n.locales.configuration.output-encoding">
@@ -165,39 +162,39 @@
<area coords="24"
id="area-Reference_Guide-i18n.rb.service.portal_resource_names" />
</areaspec>
-<programlisting><component>
-
<key>org.exoplatform.services.resources.ResourceBundleService</key>
-
<type>org.exoplatform.services.resources.impl.SimpleResourceBundleService</type>
- <init-params>
- <values-param>
- <name>classpath.resources</name>
- <description>The resources that start with the following package
name should be load from file system</description>
- <value>locale.portlet</value>
- </values-param>
- <values-param>
- <name>init.resources</name>
- <description>Initiate the following resources during the first
launch</description>
- <value>locale.portal.expression</value>
- <value>locale.portal.services</value>
- <value>locale.portal.webui</value>
- <value>locale.portal.custom</value>
- <value>locale.navigation.portal.classic</value>
-
<value>locale.navigation.group.platform.administrators</value>
- <value>locale.navigation.group.platform.users</value>
- <value>locale.navigation.group.platform.guests</value>
-
<value>locale.navigation.group.organization.management.executive-board</value>
- </values-param>
- <values-param>
- <name>portal.resource.names</name>
- <description>The properties files of the portal , those file will
be merged
- into one ResoruceBundle properties </description>
- <value>locale.portal.expression</value>
- <value>locale.portal.services</value>
- <value>locale.portal.webui</value>
- <value>locale.portal.custom</value>
- </values-param>
- </init-params>
-</component>
+<programlisting><component>
+
<key>org.exoplatform.services.resources.ResourceBundleService</key>
+
<type>org.exoplatform.services.resources.impl.SimpleResourceBundleService</type>
+ <init-params>
+ <values-param>
+ <name>classpath.resources</name>
+ <description>The resources that start with the following package
name should be load from file system</description>
+ <value>locale.portlet</value>
+ </values-param>
+ <values-param>
+ <name>init.resources</name>
+ <description>Initiate the following resources during the first
launch</description>
+ <value>locale.portal.expression</value>
+ <value>locale.portal.services</value>
+ <value>locale.portal.webui</value>
+ <value>locale.portal.custom</value>
+ <value>locale.navigation.portal.classic</value>
+
<value>locale.navigation.group.platform.administrators</value>
+
<value>locale.navigation.group.platform.users</value>
+
<value>locale.navigation.group.platform.guests</value>
+
<value>locale.navigation.group.organization.management.executive-board</value>
+ </values-param>
+ <values-param>
+ <name>portal.resource.names</name>
+ <description>The properties files of the portal , those file will
be merged
+ into one ResoruceBundle properties </description>
+ <value>locale.portal.expression</value>
+ <value>locale.portal.services</value>
+ <value>locale.portal.webui</value>
+ <value>locale.portal.custom</value>
+ </values-param>
+ </init-params>
+</component>
</programlisting>
<calloutlist>
<callout
arearefs="area-Reference_Guide-i18n.rb.service.classpath_resources">
@@ -226,7 +223,7 @@
<section
id="sect-Reference_Guide-Internationalization_Configuration-Navigation_Resource_Bundles">
<title>Navigation Resource Bundles</title>
<para>
- There is a resource bundle for each navigation. A navigation can exist for user,
groups, and portal.
+ There is a resource bundle for each navigation. A navigation can exist for user,
groups, and portal.
</para>
<para>
The previous example shows bundle definitions for the navigation of the classic portal
and of four different groups. Each of these resource bundles occupies a different sphere,
they are independent of each other and they are not included in the
<parameter>portal.resource.names</parameter> parameter.
@@ -235,14 +232,13 @@
The properties for a group must be in the
<filename>WEB-INF/classes/locale/navigation/group/</filename> folder.
<literal>/WEB-INF/classes/locale/navigation/group/organization/management/executive-board_en.properties</literal>,
for example.
</para>
<para>
- The folder and file names must correspond to the group hierarchy. The group name
"<parameter>executive-board</parameter>" is followed by the iso 639
code.
+ The folder and file names must correspond to the group hierarchy. The group name
"<parameter>executive-board</parameter>" is followed by the
iso 639 code.
</para>
<para>
For each language defined in <parameter>LocalesConfig</parameter> must
have a resource file defined. If the name of a group is changed the name of the folder
and/or files of the correspondent navigation resource bundles must also be changed.
</para>
<para>
Content of <filename>executive-board_en.properties</filename>:
-
<programlisting>organization.title=Organization
organization.newstaff=New Staff
organization.management=Management
@@ -252,95 +248,95 @@
This resource bundle is only accessible for the navigation of the
<parameter>organization.management.executive-board</parameter> group.
</para>
</section>
-
- <section
id="sect-Reference_Guide-Internationalization_Configuration-Portlets">
+
+ <section
id="sect-Reference_Guide-Internationalization_Configuration-_Portlets_">
<title> Portlets </title>
<para>
Portlets are independent applications and deliver their own resource files.
</para>
<para>
- All shipped portlet resources are located in the <emphasis
role="bold">locale/portlet</emphasis> subfolder. The
ResourceBundleService parameter <emphasis
role="bold">classpath.resources</emphasis> defines this subfolder.
<!-- Doing so the resource file that are in ~~locale/portlet~~ will never be stored in
the JCR and reloaded at each start of the application server. -->
+ All shipped portlet resources are located in the <emphasis
role="bold">locale/portlet</emphasis> subfolder. The
ResourceBundleService parameter <emphasis
role="bold">classpath.resources</emphasis> defines this subfolder.
<!-- Doing so the resource file that are in ~~locale/portlet~~ will never be stored
in the JCR and reloaded at each start of the application server. -->
</para>
- <procedure>
+ <procedure id="proc-Reference_Guide-_Portlets_-Example">
<title>Example</title>
- <step>
- <para>
- To add a Spanish translation to the
<parameter>GadgetPortlet</parameter>.
- </para>
- </step>
- <step>
- <para>
- Create the file <literal>GadgetPortlet_es.properties</literal> in:
<filename>WEB-INF/classes/locale/portlet/gadget/GadgetPortlet</filename>.
- </para>
- </step>
- <step>
- <para>
- In <filename>portlet.xml</filename>, add
<parameter>Spanish</parameter> as a <emphasis
role="bold">supported-locale</emphasis> ('es' is the 2 letters
code for Spanish), the <emphasis
role="bold">resource-bundle</emphasis> is already declared and is the
same for all languages :
- </para>
-<programlisting
role="XML"><supported-locale>en</supported-locale>
-<supported-locale>es</supported-locale>
-<resource-bundle>locale.portlet.gadget.GadgetPortlet</resource-bundle>
+ <step>
+ <para>
+ To add a Spanish translation to the
<parameter>GadgetPortlet</parameter>.
+ </para>
+ </step>
+ <step>
+ <para>
+ Create the file <literal>GadgetPortlet_es.properties</literal> in:
<filename>WEB-INF/classes/locale/portlet/gadget/GadgetPortlet</filename>.
+ </para>
+ </step>
+ <step>
+ <para>
+ In <filename>portlet.xml</filename>, add
<parameter>Spanish</parameter> as a <emphasis
role="bold">supported-locale</emphasis> ('es' is the 2
letters code for Spanish), the <emphasis
role="bold">resource-bundle</emphasis> is already declared and is the
same for all languages :
+ </para>
+
+<programlisting
role="XML"><supported-locale>en</supported-locale>
+<supported-locale>es</supported-locale>
+<resource-bundle>locale.portlet.gadget.GadgetPortlet</resource-bundle>
</programlisting>
- </step>
+ </step>
</procedure>
+
+ <para>
+ See the portlet specification for more details about portlet internationalization.
+ </para>
+ <section
id="sect-Reference_Guide-_Portlets_-Standard_portlet_resource_keys">
+ <title>Standard portlet resource keys</title>
<para>
- See the portlet specification for more details about portlet internationalization.
+ The portlet specifications defines three standard keys: Title, Short Title and
Keywords. Keywords is formatted as a comma-separated list of tags.
</para>
-
- <section
id="sect-Reference_Guide-Example-Standard_portlet_resource_keys">
- <title>Standard portlet resource keys</title>
- <para>
- The portlet specifications defines three standard keys: Title, Short Title and
Keywords. Keywords is formatted as a comma-separated list of tags.
- </para>
-
+
<programlisting> javax.portlet.title=Breadcrumbs Portlet
javax.portlet.short-title=Breadcrumbs
javax.portlet.keywords=Breadcrumbs, Breadcrumb
</programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Example-Access">
- <title>Access</title>
- <para>
- These <emphasis>key</emphasis>s are used to display a property in the
user language.
- </para>
- <para>
- The following access method enables translation to the preferred language for the
connected user:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Groovy Template
+ </section>
+
+ <section id="sect-Reference_Guide-_Portlets_-Access">
+ <title>Access</title>
+ <para>
+ These <emphasis>key</emphasis>s are used to display a property in the
user language.
+ </para>
+ <para>
+ The following access method enables translation to the preferred language for the
connected user:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Groovy Template
<programlisting>TODO
</programlisting>
- </para>
- </listitem>
- <listitem>
- <para>
- Java
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Java
<programlisting>WebuiRequestContext context =
WebuiRequestContext.getCurrentInstance() ;
ResourceBundle res = context.getApplicationResourceBundle() ;
String translatedString = res.getString(key);
</programlisting>
- </para>
- </listitem>
- </itemizedlist>
-
+ </para>
+ </listitem>
+ </itemizedlist>
</section>
- <section
id="sect-Reference_Guide-Portlets-Debugging_resource_bundle_usage">
+ <section
id="sect-Reference_Guide-_Portlets_-Debugging_resource_bundle_usage">
<title>Debugging resource bundle usage</title>
<para>
- When translating an application it can sometimes be difficult to find the right key
for a given property.
- </para>
+ When translating an application it can sometimes be difficult to find the right key
for a given property.
+ </para>
<para>
Execute the portal in <emphasis role="bold">debug
mode</emphasis> and select, from the available languages, select the special
language; <emphasis role="bold">Magic locale</emphasis>.
</para>
<para>
- This feature translates a key to the same key value.
- </para>
+ This feature translates a key to the same key value.
+ </para>
<para>
- For example, the translated value for the key
"<parameter>organization.title</parameter>" is simply the value
"<parameter>organization.title</parameter>". Selecting that language
allows use of the portal and its applications with all the keys visible. This makes it
easier to find out the correct key for a given label in the portal page.
+ For example, the translated value for the key
"<parameter>organization.title</parameter>" is simply the
value "<parameter>organization.title</parameter>". Selecting
that language allows use of the portal and its applications with all the keys visible.
This makes it easier to find out the correct key for a given label in the portal page.
</para>
</section>
Modified:
portal/trunk/docs/reference-guide/en/modules/development/JavaScript_Inter_Application_Communication.xml
===================================================================
---
portal/trunk/docs/reference-guide/en/modules/development/JavaScript_Inter_Application_Communication.xml 2010-02-15
01:19:14 UTC (rev 1673)
+++
portal/trunk/docs/reference-guide/en/modules/development/JavaScript_Inter_Application_Communication.xml 2010-02-15
01:20:35 UTC (rev 1674)
@@ -1,14 +1,12 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<section
id="sect-Reference_Guide-JavaScript_Inter_Application_Communication">
<title>JavaScript Inter Application Communication</title>
<section
id="sect-Reference_Guide-JavaScript_Inter_Application_Communication-Overview">
<title>Overview</title>
<para>
- JavaScript Inter Application Communication is designed to allow applications within a
page to exchange data. This library is made for broadcasting messages on topic.
+ JavaScript Inter Application Communication is designed to allow applications within a
page to exchange data. This library is made for broadcasting messages on topic.
</para>
<para>
It is based on 3 functions:
@@ -31,31 +29,30 @@
</listitem>
</itemizedlist>
<para>
- A subscription to a topic will receive any subtopic messages. For example; An
application subscribed to "<literal>/eXo/application</literal>" will
receive messages sent on the
"<literal>/eXo/application/map</literal>" topic. A message sent on
"<literal>/eXo</literal>", however, would not be received.
+ A subscription to a topic will receive any subtopic messages. For example; An
application subscribed to
"<literal>/eXo/application</literal>" will receive messages
sent on the "<literal>/eXo/application/map</literal>" topic. A
message sent on "<literal>/eXo</literal>", however, would not
be received.
</para>
- <variablelist>
+ <variablelist id="vari-Reference_Guide-Overview-Subscription_Topics">
<title>Subscription Topics</title>
- <varlistentry>
- <term>/eXo</term>
- <listitem>
- <para>
- This topic contains all the events generated by the platform.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>/eXo/portal/notification</term>
- <listitem>
- <para>
- A message is sent on this topic will prompt a popup notification in the top right of
the screen.
- </para>
- </listitem>
- </varlistentry>
+ <varlistentry>
+ <term>/eXo</term>
+ <listitem>
+ <para>
+ This topic contains all the events generated by the platform.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>/eXo/portal/notification</term>
+ <listitem>
+ <para>
+ A message is sent on this topic will prompt a popup notification in the top right
of the screen.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
-
</section>
- <!--
+ <!--
<section
id="sect-Reference_Guide-JavaScript_Inter_Application_Communication-GateInportalchangeTitle">
<title>/GateIn/portal/changeTitle (not
@@ -101,7 +98,7 @@
Receive a message when an application is unloaded in the page.
</para>
</section>
- -->
+ -->
<section
id="sect-Reference_Guide-JavaScript_Inter_Application_Communication-Library">
<title>Library</title>
<para>
@@ -112,7 +109,7 @@
* publish is used to publish an event to the other subscribers to the given channels
* @param {Object} senderId is a string that identify the sender
* @param {String} topic is the topic that the message will be published
- * @param {Object} message is the message that's going to be delivered to the
subscribers to the topic
+ * @param {Object} message is the message that's going to be delivered to the
subscribers to the topic
*/
Topic.prototype.publish = function(/*Object*/ senderId, /*String*/ topicName, /*Object*/
message ) { ... }
@@ -150,12 +147,11 @@
<para>
The three messaging functions require particular objects and definitions in their
syntax:
</para>
-
<variablelist>
<varlistentry>
- <term>Subscribe</term>
+ <term>Subscribe</term>
<listitem>
- <para>
+ <para>
The <literal>subscribe</literal> function is used to subscribe a
callback to a topic. It uses the following parameters:
</para>
<variablelist>
@@ -188,7 +184,7 @@
<term>Publish</term>
<listitem>
<para>
- The <literal>publish</literal> function is used to publish an event to
the other subscribered applications through the given channels. Its parameters are:
+ The <literal>publish</literal> function is used to publish an event to
the other subscribered applications through the given channels. Its parameters are:
</para>
<variablelist>
<varlistentry>
@@ -201,19 +197,19 @@
</varlistentry>
<varlistentry>
<term>topicName</term>
- <listitem>
- <para>
- The topic that the message will be published.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ The topic that the message will be published.
+ </para>
+ </listitem>
</varlistentry>
<varlistentry>
<term>message</term>
- <listitem>
- <para>
- This is the message body to be delivered to the subscribers to the topic.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ This is the message body to be delivered to the subscribers to the topic.
+ </para>
+ </listitem>
</varlistentry>
</variablelist>
</listitem>
@@ -222,7 +218,7 @@
<term>Unsubscribe</term>
<listitem>
<para>
- The <literal>unsubscribe</literal> function is used to unsubscribe a
callback to a topic. The required parameters are:
+ The <literal>unsubscribe</literal> function is used to unsubscribe a
callback to a topic. The required parameters are:
</para>
<variablelist>
<varlistentry>
@@ -247,26 +243,26 @@
</variablelist>
</section>
- <section
id="sect-Reference_Guide-JavaScript_Inter_Application_Communication-Example">
+ <section
id="sect-Reference_Guide-JavaScript_Inter_Application_Communication-Example_of_what">
<title>Example [of what?]</title>
-<programlisting role="HTML"><%@ taglib
uri="http://java.sun.com/portlet" prefix="portlet" %>
-<portlet:defineObjects/>
-<div>
- <p>
+<programlisting role="HTML"><%@ taglib
uri="http://java.sun.com/portlet" prefix="portlet"
%>
+<portlet:defineObjects/>
+<div>
+ <p>
Received messages:
- <div id="received_<portlet:namespace/>">
+ <div
id="received_<portlet:namespace/>">
- </div>
- </p>
+ </div>
+ </p>
- <p>
+ <p>
Send message:
- <input type="text"
id="msg_<portlet:namespace/>"/> <a
href="#"
onclick="send_<portlet:namespace/>();">send</a>
- </p>
-</div>
+ <input type="text"
id="msg_<portlet:namespace/>"/> <a
href="#"
onclick="send_<portlet:namespace/>();">send</a>
+ </p>
+</div>
-<script type="text/javascript">
+<script type="text/javascript">
Function.prototype.bind = function(object) {
var method = this;
@@ -275,28 +271,28 @@
}
}
- function send_<portlet:namespace/>() {
- var msg =
document.getElementById("msg_<portlet:namespace/>").value;
- eXo.core.Topic.publish("<portlet:namespace/>",
"/demo", msg);
+ function send_<portlet:namespace/>() {
+ var msg =
document.getElementById("msg_<portlet:namespace/>").value;
+ eXo.core.Topic.publish("<portlet:namespace/>",
"/demo", msg);
}
- function Listener_<portlet:namespace/>(){
+ function Listener_<portlet:namespace/>(){
}
- Listener_<portlet:namespace/>.prototype.receiveMsg = function(event) {
-
document.getElementById("received_<portlet:namespace/>").innerHTML
=
-
document.getElementById("received_<portlet:namespace/>").innerHTML
+ "<br />* " +
- event.senderId + ": " + event.message;
+ Listener_<portlet:namespace/>.prototype.receiveMsg = function(event) {
+
document.getElementById("received_<portlet:namespace/>").innerHTML
=
+
document.getElementById("received_<portlet:namespace/>").innerHTML
+ "<br />* " +
+ event.senderId + ": " + event.message;
}
- function init_<portlet:namespace/>() {
- var listener_<portlet:namespace/> = new
Listener_<portlet:namespace/>();
- eXo.core.Topic.subscribe("/demo",
listener_<portlet:namespace/>.receiveMsg.bind(listener_<portlet:namespace/>));
+ function init_<portlet:namespace/>() {
+ var listener_<portlet:namespace/> = new
Listener_<portlet:namespace/>();
+ eXo.core.Topic.subscribe("/demo",
listener_<portlet:namespace/>.receiveMsg.bind(listener_<portlet:namespace/>));
}
- init_<portlet:namespace/>();
-</script>
+ init_<portlet:namespace/>();
+</script>
</programlisting>
</section>
Modified: portal/trunk/docs/reference-guide/en/modules/development/Portal_Lifecycle.xml
===================================================================
---
portal/trunk/docs/reference-guide/en/modules/development/Portal_Lifecycle.xml 2010-02-15
01:19:14 UTC (rev 1673)
+++
portal/trunk/docs/reference-guide/en/modules/development/Portal_Lifecycle.xml 2010-02-15
01:20:35 UTC (rev 1674)
@@ -1,7 +1,5 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Portal_Lifecycle">
<title>Portal Lifecycle</title>
@@ -18,16 +16,16 @@
A portal instance is simply a web application deployed as a WAR in an application
server. Portlets are also part of an enhanced WAR called a portlet application.
</para>
<para>
- &PRODUCT; doesn't require any particular setup for your portlet in most common
scenarios and the <filename>web.xml</filename> file can remain without any
&PRODUCT; specific configuration.
+ &PRODUCT; doesn't require any particular setup for your portlet in most
common scenarios and the <filename>web.xml</filename> file can remain without
any &PRODUCT; specific configuration.
</para>
<para>
During deployment, &PRODUCT; will automatically and transparently inject a servlet
into the portlet application to be able to interact with it. This feature is dependent on
the underlying servlet container but will work out of the box on the proposed bundles.
</para>
</section>
- <!--
+ <!--
TODO: Define the added listener
- --><!--
+ --><!--
<section id="sect-Reference_Guide-Portal_Lifecycle-The_Listener">
<title>The Listener</title>
<para>
@@ -87,7 +85,7 @@
}
}
</programlisting>
- -->
+ -->
<section
id="sect-Reference_Guide-Portal_Lifecycle-The_Command_Servlet">
<title>The Command Servlet</title>
<para>
@@ -101,21 +99,22 @@
As the servlet is already configured this example is for information only.
</para>
</note>
+
<programlisting role="XML">
-<servlet>
- <servlet-name>TomcatGateInServlet</servlet-name>
-
<servlet-class>org.gatein.wci.command.CommandServlet</servlet-class>
- <load-on-startup>0</load-on-startup>
-</servlet>
+<servlet>
+ <servlet-name>TomcatGateInServlet</servlet-name>
+
<servlet-class>org.gatein.wci.command.CommandServlet</servlet-class>
+ <load-on-startup>0</load-on-startup>
+</servlet>
-<servlet-mapping>
- <servlet-name>TomcatGateInServlet</servlet-name>
- <url-pattern>/tomcatgateinservlet</url-pattern>
-</servlet-mapping>
+<servlet-mapping>
+ <servlet-name>TomcatGateInServlet</servlet-name>
+ <url-pattern>/tomcatgateinservlet</url-pattern>
+</servlet-mapping>
</programlisting>
<para>
It is possible to filter on the CommandServlet by filtering the URL pattern used by
the Servlet mapping.
- </para>
+ </para>
<para>
The example below would create a servlet filter that calculates the time of execution
of a portlet request.
</para>
@@ -142,7 +141,7 @@
long beforeTime = System.currentTimeMillis();
chain.doFilter(request, response);
long afterTime = System.currentTimeMillis();
- System.out.println("Time to execute the portlet request (in ms): " +
(afterTime - beforeTime));
+ System.out.println("Time to execute the portlet request (in ms): " +
(afterTime - beforeTime));
}
public void init(FilterConfig config) throws ServletException
@@ -160,23 +159,23 @@
</para>
<programlisting role="XML">
-<?xml version="1.0"?>
-<web-app
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
- version="2.5">
+<?xml version="1.0"?>
+<web-app
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.5">
- <filter>
- <filter-name>MyFilter</filter-name>
- <filter-class>org.example.MyFilter</filter-class>
- </filter>
+ <filter>
+ <filter-name>MyFilter</filter-name>
+ <filter-class>org.example.MyFilter</filter-class>
+ </filter>
- <filter-mapping>
- <filter-name>MyFilter</filter-name>
- <url-pattern>/tomcatgateinservlet</url-pattern>
- <dispatcher>INCLUDE</dispatcher>
- </filter-mapping>
+ <filter-mapping>
+ <filter-name>MyFilter</filter-name>
+ <url-pattern>/tomcatgateinservlet</url-pattern>
+ <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
-</web-app>
+</web-app>
</programlisting>
<para>
<note>
@@ -188,7 +187,7 @@
</para>
</section>
- <!--
+ <!--
<para>
Here is its definition in the web.xml file:
</para>
@@ -1033,7 +1032,7 @@
}
</programlisting>
</section>
- -->
+ -->
</section>
Modified:
portal/trunk/docs/reference-guide/en/modules/development/Right_To_Left_Framework.xml
===================================================================
---
portal/trunk/docs/reference-guide/en/modules/development/Right_To_Left_Framework.xml 2010-02-15
01:19:14 UTC (rev 1673)
+++
portal/trunk/docs/reference-guide/en/modules/development/Right_To_Left_Framework.xml 2010-02-15
01:20:35 UTC (rev 1674)
@@ -1,14 +1,12 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-RTL_Right_To_Left_Framework">
<title>RTL (Right To Left) Framework</title>
- <para>
- The text orientation depends on the current locale setting. The orientation is a Java
5 enum that provides a set of functionalities:
- </para>
-
+ <para>
+ The text orientation depends on the current locale setting. The orientation is a Java 5
enum that provides a set of functionalities:
+ </para>
+
<programlisting>
LT, // Western Europe
RT, // Middle East (Arabic, Hebrew)
@@ -19,16 +17,15 @@
public boolean isTL() { ... }
public boolean isTR() { ... }
</programlisting>
- <para>
- The object defining the Orientation for the current request is the
<literal>UIPortalApplication</literal>. However it should be accessed at
runtime using the <literal>RequestContext</literal> that delegates to the
<literal>UIPortalApplication</literal>.
- </para>
- <para>
- In the case of a <literal>PortalRequestContext</literal> it is a direct
delegate as the <literal>PortalRequestContext</literal> has a reference to the
current <literal>UIPortalApplication</literal>.
- </para>
- <para>
- In the case of a different context such as the
<literal>PortletRequestContext</literal>, it delegates to the parent context
given the fact that the root <literal>RequestContext</literal> is always a
<literal>PortalRequestContext</literal>.
- </para>
-
+ <para>
+ The object defining the Orientation for the current request is the
<literal>UIPortalApplication</literal>. However it should be accessed at
runtime using the <literal>RequestContext</literal> that delegates to the
<literal>UIPortalApplication</literal>.
+ </para>
+ <para>
+ In the case of a <literal>PortalRequestContext</literal> it is a direct
delegate as the <literal>PortalRequestContext</literal> has a reference to the
current <literal>UIPortalApplication</literal>.
+ </para>
+ <para>
+ In the case of a different context such as the
<literal>PortletRequestContext</literal>, it delegates to the parent context
given the fact that the root <literal>RequestContext</literal> is always a
<literal>PortalRequestContext</literal>.
+ </para>
<section
id="sect-Reference_Guide-RTL_Right_To_Left_Framework-Groovy_templates">
<title>Groovy templates</title>
<para>
@@ -63,7 +60,7 @@
<term>dir</term>
<listitem>
<para>
- The string 'ltr' if the orientation is LT or the string 'rtl' if
the orientation is RT.
+ The string 'ltr' if the orientation is LT or the string
'rtl' if the orientation is RT.
</para>
</listitem>
</varlistentry>
@@ -74,14 +71,14 @@
<title>Stylesheet</title>
<para>
The skin service handles stylesheet rewriting to accommodate the orientation. It works
by appending -lt or -rt to the stylesheet name.
- </para>
+ </para>
<para>
For instance:
<filename>/web/skin/portal/webui/component/UIFooterPortlet/DefaultStylesheet-rt.css</filename>
will return the same stylesheet as
<filename>/web/skin/portal/webui/component/UIFooterPortlet/DefaultStylesheet.css</filename>
but processed for the RT orientation. The <parameter>-lt</parameter> suffix is
optional.
</para>
<para>
Stylesheet authors can annotate their stylesheet to create content that depends on the
orientation.
</para>
- <formalpara>
+ <formalpara id="form-Reference_Guide-Stylesheet-Example_1">
<title>Example 1</title>
<para>
In the example we need to use the orientation to modify the float attribute that will
make the horizontal tabs either float on left or on right:
@@ -108,8 +105,7 @@
</programlisting>
</para>
</formalpara>
-
- <formalpara>
+ <formalpara id="form-Reference_Guide-Stylesheet-Example_2">
<title>Example 2</title>
<para>
In this example we need to modify the padding according to the orientation:
@@ -117,7 +113,7 @@
color: white;
line-height: 24px;
padding: 0px 5px 0px 0px; /* orientation=lt */
-padding: 0px 0px 0px 5px; /* >orientation=rt */
+padding: 0px 0px 0px 5px; /* >orientation=rt */
</programlisting>
The LT produced output will be:
<programlisting>
@@ -133,7 +129,6 @@
</programlisting>
</para>
</formalpara>
-
</section>
<section id="sect-Reference_Guide-RTL_Right_To_Left_Framework-Images">
@@ -142,14 +137,14 @@
Sometimes it is necessary to create an RT version of an image that will be used from a
template or from a stylesheet. However symmetric images can be automatically generated
avoiding the necessity to create a mirrored version of an image and furthermore avoiding
maintenance cost.
</para>
<para>
- The web resource filter uses the same naming pattern as the skin service. When an
image ends with the -rt suffix the portal will attempt to locate the original image and
create a mirror of it.
- </para>
+ The web resource filter uses the same naming pattern as the skin service. When an
image ends with the -rt suffix the portal will attempt to locate the original image and
create a mirror of it.
+ </para>
<para>
- For instance: requesting the image
<filename>/GateInResources/skin/DefaultSkin/webui/component/UITabSystem/UITabs/background/NormalTabStyle-rt.gif</filename>
returns a mirror of the image
<filename>/GateInResources/skin/DefaultSkin/webui/component/UITabSystem/UITabs/background/NormalTabStyle.gif</filename>.
+ For instance: requesting the image
<filename>/GateInResources/skin/DefaultSkin/webui/component/UITabSystem/UITabs/background/NormalTabStyle-rt.gif</filename>
returns a mirror of the image
<filename>/GateInResources/skin/DefaultSkin/webui/component/UITabSystem/UITabs/background/NormalTabStyle.gif</filename>.
</para>
<note>
<para>
- It is important to consider whether the image to be mirrored is symmetrical as this
will impact it's final appearance.
+ It is important to consider whether the image to be mirrored is symmetrical as this
will impact it's final appearance.
</para>
</note>
<para>
@@ -158,8 +153,8 @@
<programlisting>
line-height: 24px;
-background: url('background/NavigationTab.gif') no-repeat right top; /*
orientation=lt */
-background: url('background/NavigationTab-rt.gif') no-repeat left top; /*
orientation=rt */
+background: url('background/NavigationTab.gif') no-repeat right top; /*
orientation=lt */
+background: url('background/NavigationTab-rt.gif') no-repeat left top; /*
orientation=rt */
padding-right: 2px; /* orientation=lt */
padding-left: 2px; /* orientation=rt */
</programlisting>
@@ -168,43 +163,42 @@
<section
id="sect-Reference_Guide-RTL_Right_To_Left_Framework-Client_side_JavaScript">
<title>Client side JavaScript</title>
<para>
- The <literal>eXo.core.I18n</literal> object provides the following
parameters for orientation:
+ The <literal>eXo.core.I18n</literal> object provides the following
parameters for orientation:
</para>
- <variablelist>
- <varlistentry>
- <term>getOrientation()</term>
- <listitem>
- <para>
- Returns either the string lt or rt
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>getDir()</term>
- <listitem>
- <para>
- Returns either the string ltr or rtl
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>isLT()</term>
- <listitem>
- <para>
- Returns true for LT
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>isRT()</term>
- <listitem>
- <para>
- Returns true of RT
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
+ <variablelist>
+ <varlistentry>
+ <term>getOrientation()</term>
+ <listitem>
+ <para>
+ Returns either the string lt or rt
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>getDir()</term>
+ <listitem>
+ <para>
+ Returns either the string ltr or rtl
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>isLT()</term>
+ <listitem>
+ <para>
+ Returns true for LT
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>isRT()</term>
+ <listitem>
+ <para>
+ Returns true of RT
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
</section>
</section>
Modified: portal/trunk/docs/reference-guide/en/modules/development/Upload_Component.xml
===================================================================
---
portal/trunk/docs/reference-guide/en/modules/development/Upload_Component.xml 2010-02-15
01:19:14 UTC (rev 1673)
+++
portal/trunk/docs/reference-guide/en/modules/development/Upload_Component.xml 2010-02-15
01:20:35 UTC (rev 1674)
@@ -1,11 +1,9 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Upload_Component">
<title>Upload Component</title>
-<!-- <section id="sect-Reference_Guide-Upload_Component-Overview">
+ <!-- <section id="sect-Reference_Guide-Upload_Component-Overview">
<title>Overview</title>
<para>
In this article, you will learn how to :
@@ -32,8 +30,7 @@
</para>
</listitem>
</itemizedlist>
- </section> -->
-
+ </section> -->
<section id="sect-Reference_Guide-Upload_Component-Upload_Service">
<title>Upload Service</title>
<para>
@@ -43,76 +40,75 @@
This can be configured with the following xml code:
</para>
-<programlisting role="XML"><component>
- <type>org.exoplatform.upload.UploadService</type>
- <init-params>
- <value-param>
- <name>upload.limit.size</name>
- <description>Maximum size of the file to upload in
MB</description>
- <value>10</value>
- </value-param>
- </init-params>
- </component>
+<programlisting role="XML"><component>
+ <type>org.exoplatform.upload.UploadService</type>
+ <init-params>
+ <value-param>
+ <name>upload.limit.size</name>
+ <description>Maximum size of the file to upload in
MB</description>
+ <value>10</value>
+ </value-param>
+ </init-params>
+ </component>
</programlisting>
<para>
This code allows for a default upload size limit for the service to be configured. The
value unit is in MegaBytes.
- </para>
+ </para>
<para>
This limit will be used by default by all applications if no application-specific
limit is set. Setting a different limit for applications is discussed in a later section.
</para>
<para>
If the value is set at <parameter>0</parameter> the upload size is
unlimited.
</para>
-
- <procedure
id="proc-Reference_Guide-Upload_Component-How_to_use_the_upload_component">
+ <procedure
id="proc-Reference_Guide-Upload_Service-How_to_use_the_upload_component">
<title>How to use the upload component</title>
<step>
<para>
- Create an object type
<literal>org.exoplatform.webui.form.UIFormUploadInput</literal>.
+ Create an object type
<literal>org.exoplatform.webui.form.UIFormUploadInput</literal>.
</para>
<para>
Two constructors are available for this:
</para>
-
+
<programlisting>public UIFormUploadInput(String name, String bindingExpression)
</programlisting>
<para>
or:
</para>
-
+
<programlisting>public UIFormUploadInput(String name, String bindingExpression, int
limit)
</programlisting>
<para>
This is an example using the second form :
</para>
-
+
<programlisting role="JAVA">PortletRequestContext pcontext =
(PortletRequestContext)WebuiRequestContext.getCurrentInstance();
PortletPreferences portletPref = pcontext.getRequest().getPreferences();
-int limitMB = Integer.parseInt(portletPref.getValue("uploadFileSizeLimitMB",
"").trim());
-UIFormUploadInput uiInput = new UIFormUploadInput("upload", "upload",
limitMB);
+int limitMB =
Integer.parseInt(portletPref.getValue("uploadFileSizeLimitMB",
"").trim());
+UIFormUploadInput uiInput = new UIFormUploadInput("upload",
"upload", limitMB);
</programlisting>
</step>
<step>
<para>
To obtain the limit from the <literal>xml</literal> configuration, this
piece of code can be added to the either <filename>portlet.xml</filename> or
<filename>portlet-preferences.xml</filename> :
</para>
-
-<programlisting role="XML"><preference>
- <name>uploadFileSizeLimitMB</name>
- <value>30</value>
- <read-only>false</read-only>
-</preference>
+
+<programlisting role="XML"><preference>
+ <name>uploadFileSizeLimitMB</name>
+ <value>30</value>
+ <read-only>false</read-only>
+</preference>
</programlisting>
- <para>
- Again, a <parameter>0</parameter> value means an unlimited upload size,
and the value unit is set in MegaBytes.
- </para>
+ <para>
+ Again, a <parameter>0</parameter> value means an unlimited upload size,
and the value unit is set in MegaBytes.
+ </para>
</step>
<step>
<para>
Use the <literal>getUploadDataAsStream()</literal> method to get the
uploaded data:
</para>
-
-<programlisting role="JAVA">UIFormUploadInput input =
(UIFormUploadInput)uiForm.getUIInput("upload");
+
+<programlisting role="JAVA">UIFormUploadInput input =
(UIFormUploadInput)uiForm.getUIInput("upload");
InputStream inputStream = input.getUploadDataAsStream();
...
jcrData.setValue(inputStream);
@@ -137,19 +133,20 @@
<para>
Use the<literal>removeUpload()</literal> method defined in the upload
service to purge the file:
</para>
-
+
<programlisting role="JAVA">UploadService uploadService =
uiForm.getApplicationComponent(UploadService.class) ;
UIFormUploadInput uiChild = uiForm.getChild(UIFormUploadInput.class) ;
uploadService.removeUpload(uiChild.getUploadId()) ;
</programlisting>
-<note>
- <title>Saving the uploaded file</title>
- <para>
- Ensure the file is saved <emphasis role="bold">before</emphasis>
the service is cleaned.
- </para>
-</note>
+ <note>
+ <title>Saving the uploaded file</title>
+ <para>
+ Ensure the file is saved <emphasis
role="bold">before</emphasis> the service is cleaned.
+ </para>
+ </note>
</step>
</procedure>
+
</section>
</section>
Modified:
portal/trunk/docs/reference-guide/en/modules/development/XML_Resource_Bundles.xml
===================================================================
---
portal/trunk/docs/reference-guide/en/modules/development/XML_Resource_Bundles.xml 2010-02-15
01:19:14 UTC (rev 1673)
+++
portal/trunk/docs/reference-guide/en/modules/development/XML_Resource_Bundles.xml 2010-02-15
01:20:35 UTC (rev 1674)
@@ -1,7 +1,5 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-XML_Resources_Bundles">
<title>XML Resources Bundles</title>
@@ -32,7 +30,7 @@
<section id="sect-Reference_Guide-XML_Resources_Bundles-XML_format">
<title>XML format</title>
<para>
- The XML format is very simple and has been developed based on the
<emphasis>DRY</emphasis> (Don't Repeat Yourself) principle. Usually
resource bundle keys are hierarchically defined and we can leverage the hierarchic nature
of the XML for that purpose. Here is an example of turning a property file into an XML
resource bundle file:
+ The XML format is very simple and has been developed based on the
<emphasis>DRY</emphasis> (Don't Repeat Yourself) principle. Usually
resource bundle keys are hierarchically defined and we can leverage the hierarchic nature
of the XML for that purpose. Here is an example of turning a property file into an XML
resource bundle file:
</para>
<programlisting>UIAccountForm.tab.label.AccountInputSet = ...
@@ -46,28 +44,28 @@
UIAccountForm.action.Reset= ...
</programlisting>
-<programlisting role="XML"><?xml version="1.0"
encoding="UTF-8"?>
-<bundle>
- <UIAccountForm>
- <tab>
- <label>
- <AccountInputSet>...</AccountInputSet>
- <UIUserProfileInputSet>...</UIUserProfileInputSet>
- </label>
- </tab>
- <label>
- <Profile>...</Profile>
- <HomeInfo>...</HomeInfo>
- <BusinessInfo>...</BusinessInfo>
- <password>...</password>
- <Confirmpassword>...</Confirmpassword>
- <email>...</email>
- </label>
- <action>
- <Reset>...</Reset>
- </action>
- </UIAccountForm>
-</bundle>
+<programlisting role="XML"><?xml version="1.0"
encoding="UTF-8"?>
+<bundle>
+ <UIAccountForm>
+ <tab>
+ <label>
+ <AccountInputSet>...</AccountInputSet>
+
<UIUserProfileInputSet>...</UIUserProfileInputSet>
+ </label>
+ </tab>
+ <label>
+ <Profile>...</Profile>
+ <HomeInfo>...</HomeInfo>
+ <BusinessInfo>...</BusinessInfo>
+ <password>...</password>
+ <Confirmpassword>...</Confirmpassword>
+ <email>...</email>
+ </label>
+ <action>
+ <Reset>...</Reset>
+ </action>
+ </UIAccountForm>
+</bundle>
</programlisting>
</section>
@@ -75,9 +73,9 @@
<title>Portal support</title>
<para>
In order to be loaded by the portal at runtime (actually the resource bundle service),
the name of the file must be the same as a property file and it must use the <emphasis
role="bold">.xml</emphasis> suffix.
- </para>
+ </para>
<para>
- For example; for the Account Portlet to be displayed in Arabic, the resource bundle
would be <emphasis role="bold"> AccountPortlet_ar.xml</emphasis>
rather than <emphasis
role="bold">AccountPortlet_ar.properties</emphasis>.
+ For example; for the Account Portlet to be displayed in Arabic, the resource bundle
would be <emphasis role="bold"> AccountPortlet_ar.xml</emphasis>
rather than <emphasis
role="bold">AccountPortlet_ar.properties</emphasis>.
</para>
</section>
Modified: portal/trunk/docs/reference-guide/en/modules/gadgets/Gadgets.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/gadgets/Gadgets.xml 2010-02-15 01:19:14
UTC (rev 1673)
+++ portal/trunk/docs/reference-guide/en/modules/gadgets/Gadgets.xml 2010-02-15 01:20:35
UTC (rev 1674)
@@ -1,84 +1,82 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Gadgets">
<title>Gadgets</title>
- <para>
- A gadget is a mini web application, embedded in a web page and running on an
application server platform. These small applications help users perform various tasks.
- </para>
- <para>
- &PRODUCT; supports gadgets such as: Todo gadget, Calendar gadget, Calculator
gadget, Weather Forecasts and and RSS Reader.
- </para>
- <variablelist
id="vari-User_Guide-Using_the_Dashboard_Workspace-Default_Gadgets">
- <title>Default Gadgets:</title>
- <varlistentry>
- <term>Calendar</term>
- <listitem>
- <para>
- The calendar gadget allows users to switch easily between daily, monthly and yearly
view and, again, is customizable to match your portal's theme.
- </para>
- <mediaobject>
+ <para>
+ A gadget is a mini web application, embedded in a web page and running on an
application server platform. These small applications help users perform various tasks.
+ </para>
+ <para>
+ &PRODUCT; supports gadgets such as: Todo gadget, Calendar gadget, Calculator
gadget, Weather Forecasts and and RSS Reader.
+ </para>
+ <variablelist id="vari-Reference_Guide-Gadgets-Default_Gadgets">
+ <title>Default Gadgets:</title>
+ <varlistentry>
+ <term>Calendar</term>
+ <listitem>
+ <para>
+ The calendar gadget allows users to switch easily between daily, monthly and yearly
view and, again, is customizable to match your portal's theme.
+ </para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Calendar.png" format="PNG" />
+ </imageobject>
+ </mediaobject>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>ToDo</term>
+ <listitem>
+ <para>
+ This application helps you organize your day and work group. It is designed to keep
track of your tasks in a convenient and transparent way. Tasks can be highlighted with
different colors.
+ </para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Todo.png" format="PNG" />
+ </imageobject>
+ </mediaobject>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Calculator</term>
+ <listitem>
+ <para>
+ This mini-application lets you perform most basic arithmetic operations and can be
themed to match the rest of your portal.
+ </para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Calculator.png" format="PNG"
/>
+ </imageobject>
+ </mediaobject>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>RSS Reader</term>
+ <listitem>
+ <para>
+ An RSS reader, or aggregator, collates content from various, user-specified feed
sources and displays them in one location. This content can include, but isn't
limited to, news headlines, blog posts or email. The RSS Reader gadget displays this
content in a single window on your Portal page.
+ </para>
+ <!-- <mediaobject>
<imageobject>
- <imagedata fileref="images/Calendar.png" format="PNG"
/>
- </imageobject>
- </mediaobject>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>ToDo</term>
- <listitem>
- <para>
- This application helps you organize your day and work group. It is designed to keep
track of your tasks in a convenient and transparent way. Tasks can be highlighted with
different colors.
- </para>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/Todo.png" format="PNG" />
- </imageobject>
- </mediaobject>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Calculator</term>
- <listitem>
- <para>
- This mini-application lets you perform most basic arithmetic operations and can be
themed to match the rest of your portal.
- </para>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/Calculator.png" format="PNG"
/>
- </imageobject>
- </mediaobject>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>RSS Reader</term>
- <listitem>
- <para>
- An RSS reader, or aggregator, collates content from various, user-specified feed
sources and displays them in one location. This content can include, but isn't limited
to, news headlines, blog posts or email. The RSS Reader gadget displays this content in a
single window on your Portal page.
- </para>
- <!-- <mediaobject>
- <imageobject>
<imagedata fileref="images/RSS.png"
format="PNG"></imagedata>
</imageobject>
- </mediaobject> -->
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>More Gadgets</term>
- <listitem>
- <para>
- Further gadgets can be obtained from the <ulink type="http"
url="http://www.google.com/ig/directory?synd=open">Google
Gadget</ulink> site. &PRODUCT; is compatible with most of the gadgets available
here.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-<important>
- <para>
- The following sections require more textual information.
- </para>
-</important>
+ </mediaobject> -->
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>More Gadgets</term>
+ <listitem>
+ <para>
+ Further gadgets can be obtained from the <ulink type="http"
url="http://www.google.com/ig/directory?synd=open">Google
Gadget</ulink> site. &PRODUCT; is compatible with most of the gadgets available
here.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <important>
+ <para>
+ The following sections require more textual information.
+ </para>
+ </important>
<section id="sect-Reference_Guide-Gadgets-Existing_Gadgets">
<title>Existing Gadgets</title>
<mediaobject>
Modified: portal/trunk/docs/reference-guide/en/modules/gadgets/Setup_a_Gadget_Server.xml
===================================================================
---
portal/trunk/docs/reference-guide/en/modules/gadgets/Setup_a_Gadget_Server.xml 2010-02-15
01:19:14 UTC (rev 1673)
+++
portal/trunk/docs/reference-guide/en/modules/gadgets/Setup_a_Gadget_Server.xml 2010-02-15
01:20:35 UTC (rev 1674)
@@ -1,14 +1,12 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Setup_a_Gadget_Server">
<title>Setup a Gadget Server</title>
<section
id="sect-Reference_Guide-Setup_a_Gadget_Server-Virtual_servers_for_gadget_rendering">
<title>Virtual servers for gadget rendering</title>
<para>
- &PRODUCT; recommends using two virtual hosts for security. If the gadget is
running on a different domain than the container (the website that 'contains' the
app), it is unable to interfere with the portal by modifying code or cookies.
+ &PRODUCT; recommends using two virtual hosts for security. If the gadget is
running on a different domain than the container (the website that
'contains' the app), it is unable to interfere with the portal by
modifying code or cookies.
</para>
<para>
An example would hosting the portal from <emphasis
role="bold">http://www.sample.com</emphasis> and the gadgets from
<emphasis role="bold">http://www.samplemodules.com</emphasis>.
@@ -16,19 +14,19 @@
<para>
To do this, configure a parameter called
<emphasis>gadgets.hostName</emphasis>. The value is the
<emphasis>path/to/gadgetServer</emphasis> in
<literal>GadgetRegisteryService</literal>:
</para>
-<programlisting><component>
-
<key>org.exoplatform.application.gadget.GadgetRegistryService</key>
-
<type>org.exoplatform.application.gadget.jcr.GadgetRegistryServiceImpl</type>
- <init-params>
- <value-param>
- <name>gadgets.hostName</name>
- <description>Gadget server url</description>
-
<value>http://localhost:8080/GateInGadgetServer/gadgets/</value>
- </value-param>
- </init-params>
-</component>
+
+<programlisting><component>
+
<key>org.exoplatform.application.gadget.GadgetRegistryService</key>
+
<type>org.exoplatform.application.gadget.jcr.GadgetRegistryServiceImpl</type>
+ <init-params>
+ <value-param>
+ <name>gadgets.hostName</name>
+ <description>Gadget server url</description>
+
<value>http://localhost:8080/GateInGadgetServer/gadgets/</value>
+ </value-param>
+ </init-params>
+</component>
</programlisting>
-
<para>
It is also possible to have multiple rendering servers. This helps to balance the
rendering load across multiple servers.
</para>
@@ -48,7 +46,7 @@
In Linux systems this file can be generated with:
</para>
-<programlisting><command>dd if=/dev/random bs=32 count=1 | openssl base64
> /tmp/key.txt</command>
+<programlisting><command>dd if=/dev/random bs=32 count=1 | openssl base64
> /tmp/key.txt</command>
</programlisting>
</section>
@@ -57,13 +55,14 @@
<para>
These servers have to be on the same domain as the gadget server. You can configure
the container in
<filename>eXoGadgetServer:/WEB-INF/classes/containers/default/container.js</filename>.
</para>
-<programlisting>"gadgets.content-rewrite" : {
- "include-urls": ".*",
- "exclude-urls": "",
- "include-tags": ["link", "script", "embed",
"img", "style"],
- "expires": "86400",
- "proxy-url":
"http://localhost:8080/eXoGadgetServer/gadgets/proxy?url=",
- "concat-url":
"http://localhost:8080/eXoGadgetServer/gadgets/concat?"
+
+<programlisting>"gadgets.content-rewrite" : {
+ "include-urls": ".*",
+ "exclude-urls": "",
+ "include-tags": ["link", "script",
"embed", "img", "style"],
+ "expires": "86400",
+ "proxy-url":
"http://localhost:8080/eXoGadgetServer/gadgets/proxy?url=",
+ "concat-url":
"http://localhost:8080/eXoGadgetServer/gadgets/concat?"
},
</programlisting>
</section>
Modified:
portal/trunk/docs/reference-guide/en/modules/portlets/AJAX_in_GateIn_Framework.xml
===================================================================
---
portal/trunk/docs/reference-guide/en/modules/portlets/AJAX_in_GateIn_Framework.xml 2010-02-15
01:19:14 UTC (rev 1673)
+++
portal/trunk/docs/reference-guide/en/modules/portlets/AJAX_in_GateIn_Framework.xml 2010-02-15
01:20:35 UTC (rev 1674)
@@ -1,19 +1,16 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-AJAX_Framework">
<title>AJAX Framework</title>
- <para>
- Ajax calls are easily managed in &PRODUCT;'s framework. Lines can be added to
the relevant template file and java class. A simple Ajax update of a component does not
require any JavaScript code to be written.
- </para>
-
+ <para>
+ Ajax calls are easily managed in &PRODUCT;'s framework. Lines can be added
to the relevant template file and java class. A simple Ajax update of a component does not
require any JavaScript code to be written.
+ </para>
<section id="sect-Reference_Guide-AJAX_Framework-Portlet_Preparation">
<title>Portlet Preparation</title>
<para>
&PRODUCT; portlets can use specific <literal>ActionListener</literal>s
to receive and process Ajax calls. To set a portlet up to recieve Ajax calls, follow this
procedure:
- </para>
+ </para>
<procedure>
<step>
<para>
@@ -22,15 +19,15 @@
<para>
Example : <literal>ParentClass</literal> is the class being wrtitten
in.
</para>
-
-<programlisting>static public class SaveActionListener extends
EventListener<ParentClass>
+
+<programlisting>static public class SaveActionListener extends
EventListener<ParentClass>
</programlisting>
</step>
<step>
<para>
Declare this listener in the configuration of the portlet:
</para>
-
+
<programlisting>listeners = ParentClass.SaveActionListener.class
</programlisting>
</step>
@@ -41,19 +38,19 @@
<para>
For example; the configuration below is for
<literal>UIAccountForm</literal>:
</para>
-
+
<programlisting role="JAVA">...
@ComponentConfig(
lifecycle = UIFormLifecycle.class,
- template = "system:/groovy/webui/form/UIFormTabPane.gtmpl",
+ template = "system:/groovy/webui/form/UIFormTabPane.gtmpl",
initParams = {
@ParamConfig(
- name = "AccountTemplateConfigOption",
- value =
"app:/WEB-INF/conf/uiconf/account/webui/component/model/AccountTemplateConfigOption.groovy"
+ name = "AccountTemplateConfigOption",
+ value =
"app:/WEB-INF/conf/uiconf/account/webui/component/model/AccountTemplateConfigOption.groovy"
),
@ParamConfig(
- name = "help.UIAccountFormQuickHelp",
- value =
"app:/WEB-INF/conf/uiconf/account/webui/component/model/UIAccountFormQuickHelp.xhtml"
+ name = "help.UIAccountFormQuickHelp",
+ value =
"app:/WEB-INF/conf/uiconf/account/webui/component/model/UIAccountFormQuickHelp.xhtml"
)
},
events = {
@@ -69,10 +66,9 @@
<para>
Create an <literal>execute</literal> method inside this class:
</para>
-
-<programlisting>public void execute(Event<ParentClass> event) throws
Exception
+
+<programlisting>public void execute(Event<ParentClass> event)
throws Exception
</programlisting>
-
<para>
This method is called every time the listener gets an event from the client. Hence
you can process this event in it, using the even attribute. Use it to get parameters from
a form in your client, to modify the status of your portlet, etc.,
</para>
@@ -81,17 +77,17 @@
</para>
<itemizedlist>
<listitem>
-
-<programlisting role="XML">String value =
event.getRequestContext().getRequestParameter("name"); // to get a value from a
form
+
+<programlisting role="XML">String value =
event.getRequestContext().getRequestParameter("name"); // to get a value
from a form
</programlisting>
</listitem>
<listitem>
-
+
<programlisting role="XML">ParentClass parent = event.getSource(); // to
get the parent object (the portlet that threw and caugth the event)
</programlisting>
</listitem>
<listitem>
-
+
<programlisting role="XML">UIMyComponent portal =
parent.getAncestorOfType(UIMyComponent.class); // to get any node in the hierarchy of
UIComponents
</programlisting>
</listitem>
@@ -99,9 +95,9 @@
</step>
<step>
<para>
- If your action has to update an element on your client's interface, you must
call <emphasis role="bold">addUIComponentToUpdateByAjax()
</emphasis> at the end of the <literal>execute</literal> method:
+ If your action has to update an element on your client's interface, you must
call <emphasis role="bold">addUIComponentToUpdateByAjax()
</emphasis> at the end of the <literal>execute</literal> method:
</para>
-
+
<programlisting>event.getRequestContext().addUIComponentToUpdateByAjax(uicomponent);
</programlisting>
<para>
@@ -119,6 +115,7 @@
</para>
</step>
</procedure>
+
</section>
<section id="sect-Reference_Guide-AJAX_Framework-AJAX_in_Groovy">
@@ -131,8 +128,8 @@
<para>
Add the following code to the groovy template file associated with the appropriate
portlet class ( <literal>ParentClass</literal> here):
</para>
-
-<programlisting>uicomponent.event("YourOperation");
+
+<programlisting>uicomponent.event("YourOperation");
</programlisting>
<para>
<literal>YourOperation</literal> is the same as in the
<literal>ActionListener</literal> class (save in our example above).
@@ -147,7 +144,7 @@
<para>
If your operation must update the content of a component, make sure that the target
component is well rendered. The following is recommended:
</para>
-
+
<programlisting>uicomponent.renderChild(UITargetComponent.class) ;
</programlisting>
</step>
@@ -155,19 +152,20 @@
<para>
The <literal>uicomponent</literal> must be of the
<literal>UITargetComponent</literal> type as the component class;
<programlisting>event.getRequestContext().addUIComponentToUpdateByAjax(uicomponent)
;
-</programlisting>
- will be updated when <literal>UITargetComponent</literal> is called.
- </para>
- </step>
+</programlisting>
+ will be updated when <literal>UITargetComponent</literal> is called.
+ </para>
+ </step>
<step>
<para>
If this component is not rendered by default, set its
<literal>rendered</literal> attribute (in the constructor of the portlet) to
false when the portlet loads:
</para>
-
+
<programlisting>mycomponent.setRendered(false);
</programlisting>
</step>
</procedure>
+
</section>
<section id="sect-Reference_Guide-AJAX_Framework-How_JavaScript_works">
@@ -176,23 +174,27 @@
All javascript in &PRODUCT; is managed by the file
<filename>02eXoresources:javascript/eXo/portal/PortalHttpRequest.js</filename>.
</para>
<para>
- In this class, there are four functions/classes:
+ In this class, there are four functions/classes:
</para>
- <formalpara>
+ <formalpara
id="form-Reference_Guide-How_JavaScript_works-PortletResponse">
<title>PortletResponse</title>
- <para></para>
+ <para>
+ </para>
</formalpara>
- <formalpara>
+ <formalpara
id="form-Reference_Guide-How_JavaScript_works-PortalResponse">
<title>PortalResponse</title>
- <para></para>
+ <para>
+ </para>
</formalpara>
- <formalpara>
+ <formalpara
id="form-Reference_Guide-How_JavaScript_works-AjaxRequest">
<title>AjaxRequest</title>
- <para></para>
+ <para>
+ </para>
</formalpara>
- <formalpara>
+ <formalpara
id="form-Reference_Guide-How_JavaScript_works-HttpResponseHandler">
<title>HttpResponseHandler</title>
- <para></para>
+ <para>
+ </para>
</formalpara>
<para>
and 6 functions:
@@ -200,25 +202,25 @@
<variablelist>
<varlistentry>
<term>ajaxGet(url, callback)</term>
- <listitem>
- <para>
- This is the main entry method for every Ajax calls to the portal It is simply a
dispatcher method that completes some <parameter>init</parameter> fields
before calling the <literal>doRequest()</literal> method.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ This is the main entry method for every Ajax calls to the portal It is simply a
dispatcher method that completes some <parameter>init</parameter> fields
before calling the <literal>doRequest()</literal> method.
+ </para>
+ </listitem>
</varlistentry>
<varlistentry>
<term>ajaxPost(formElement, callback)</term>
- <listitem>
- <para>
- This method is called instead of an <literal>HTTP POST</literal> when,
in an AJAX case, some manipulations are needed. Once the content of the form is placed
into a string object, the call is delegated to the
<literal>doRequest()</literal> method
- </para>
- </listitem>
+ <listitem>
+ <para>
+ This method is called instead of an <literal>HTTP POST</literal> when,
in an AJAX case, some manipulations are needed. Once the content of the form is placed
into a string object, the call is delegated to the
<literal>doRequest()</literal> method
+ </para>
+ </listitem>
</varlistentry>
<varlistentry>
<term>doRequest(method, url, queryString, callback)</term>
- <listitem>
- <para>
- The <literal>doRequest()</literal> method takes incoming request from
<literal>ajaxGet</literal> and <literal>ajaxPost</literal> calls.
The second argument is the URL to target on the server The third argument is the query
string object which is created out of a form element, this value is null except when there
is a POST request.
+ <listitem>
+ <para>
+ The <literal>doRequest()</literal> method takes incoming request from
<literal>ajaxGet</literal> and <literal>ajaxPost</literal> calls.
The second argument is the URL to target on the server The third argument is the query
string object which is created out of a form element, this value is null except when there
is a POST request.
<orderedlist>
<listitem>
<para>
@@ -227,36 +229,36 @@
</listitem>
<listitem>
<para>
- An <literal>HttpResponseHandler</literal> object is instantiated and
its methods (<literal>ajaxResponse</literal>,
<literal>ajaxLoading</literal>, <literal>ajaxTimeout</literal>)
are associated with the one from the <literal>AjaxRequest</literal> and will
be called by the XHR during the process method.
+ An <literal>HttpResponseHandler</literal> object is instantiated and
its methods (<literal>ajaxResponse</literal>,
<literal>ajaxLoading</literal>, <literal>ajaxTimeout</literal>)
are associated with the one from the <literal>AjaxRequest</literal> and will
be called by the XHR during the process method.
</para>
</listitem>
</orderedlist>
- </para>
- </listitem>
+ </para>
+ </listitem>
</varlistentry>
<varlistentry>
<term>ajaxAbort()</term>
- <listitem>
- <para>
- Cancels the current request.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ Cancels the current request.
+ </para>
+ </listitem>
</varlistentry>
<varlistentry>
<term>ajaxAsyncGetRequest(url, async)</term>
- <listitem>
- <para>
- Allows to create and execute a sync or async GET request.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ Allows to create and execute a sync or async GET request.
+ </para>
+ </listitem>
</varlistentry>
<varlistentry>
<term>ajaxRedirect(url)</term>
- <listitem>
- <para>
- A simple javascript redirection with
<literal>window.location.href</literal> that are the entry points of these
classes. These functions need not be called explicitly, as the template file and the
portlet class manage everything.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ A simple javascript redirection with
<literal>window.location.href</literal> that are the entry points of these
classes. These functions need not be called explicitly, as the template file and the
portlet class manage everything.
+ </para>
+ </listitem>
</varlistentry>
</variablelist>
</section>
@@ -264,7 +266,7 @@
<section id="sect-Reference_Guide-AJAX_Framework-PortletResponse">
<title>PortletResponse</title>
<para>
- This class doesn't contain any methods. On creation, it retrieves the response
elements from the xml returned by Ajax, and stores them in the corresponding attributes :
+ This class doesn't contain any methods. On creation, it retrieves the response
elements from the xml returned by Ajax, and stores them in the corresponding attributes :
</para>
<variablelist>
<varlistentry>
@@ -285,43 +287,43 @@
</varlistentry>
<varlistentry>
<term>portletMode</term>
- <listitem>
- <para>
- The mode the component runs in. The options are: View, Edit, Help or Config.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ The mode the component runs in. The options are: View, Edit, Help or Config.
+ </para>
+ </listitem>
</varlistentry>
<varlistentry>
<term>portletState</term>
- <listitem>
- <para>
- The processing state of the component. The options are: Decode, Render.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ The processing state of the component. The options are: Decode, Render.
+ </para>
+ </listitem>
</varlistentry>
<varlistentry>
<term>portletData</term>
- <listitem>
- <para>
- The updated data to put in the component.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ The updated data to put in the component.
+ </para>
+ </listitem>
</varlistentry>
<varlistentry>
<term>script</term>
- <listitem>
- <para>
- The javascript code to update the component.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ The javascript code to update the component.
+ </para>
+ </listitem>
</varlistentry>
<varlistentry>
- <term>blocksToUpdate</term>
- <listitem>
- <para>
- An array containing the containers to update with this script.
- </para>
- </listitem>
+ <term>blocksToUpdate</term>
+ <listitem>
+ <para>
+ An array containing the containers to update with this script.
+ </para>
+ </listitem>
</varlistentry>
</variablelist>
<para>
@@ -335,22 +337,22 @@
This is an array of <literal>PortletResponse</literal>s
(<literal>portletResponses</literal>) and two other attributes:
</para>
<variablelist>
- <varlistentry>
- <term>data</term>
- <listitem>
- <para>
- Data to update.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>script</term>
- <listitem>
- <para>
- Javascript code to update.
- </para>
- </listitem>
- </varlistentry>
+ <varlistentry>
+ <term>data</term>
+ <listitem>
+ <para>
+ Data to update.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>script</term>
+ <listitem>
+ <para>
+ Javascript code to update.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</section>
@@ -367,78 +369,78 @@
This class provides methods to handle the Ajax response.
</para>
<variablelist>
- <varlistentry>
- <term>executeScript</term>
- <listitem>
- <para>
- Used to execute javascript code.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>updateBlocks</term>
- <listitem>
- <para>
- Updates <literal>html</literal> components.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>ajaxTimeout</term>
- <listitem>
- <para>
- This function is called when the timeout of the ajax call exceeds its set limit.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>ajaxResponse</term>
- <listitem>
- <para>
- This function creates a <literal>PortalResponse</literal> object from
the data in the Ajax request.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>ajaxLoading</term>
- <listitem>
- <para>
- This function shows the loading pop-up and mask layer.
- </para>
- </listitem>
- </varlistentry>
+ <varlistentry>
+ <term>executeScript</term>
+ <listitem>
+ <para>
+ Used to execute javascript code.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>updateBlocks</term>
+ <listitem>
+ <para>
+ Updates <literal>html</literal> components.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>ajaxTimeout</term>
+ <listitem>
+ <para>
+ This function is called when the timeout of the ajax call exceeds its set limit.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>ajaxResponse</term>
+ <listitem>
+ <para>
+ This function creates a <literal>PortalResponse</literal> object from
the data in the Ajax request.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>ajaxLoading</term>
+ <listitem>
+ <para>
+ This function shows the loading pop-up and mask layer.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
-
- <formalpara>
- <title>Portal Ajax Response Data Structure:</title>
+ <formalpara
id="form-Reference_Guide-HttpResponseHandler-Portal_Ajax_Response_Data_Structure">
+ <title>Portal Ajax Response Data Structure:</title>
<para>
+
<programlisting>{PortalResponse}
|
- |--->{PortletResponse}
+ |--->{PortletResponse}
|
- |--->{PortletResponse}
- | |-->{portletId}
- | |-->{portletTitle}
- | |-->{portletMode}
- | |-->{portletState}
+ |--->{PortletResponse}
+ | |-->{portletId}
+ | |-->{portletTitle}
+ | |-->{portletMode}
+ | |-->{portletState}
| |
- | |-->{Data}
+ | |-->{Data}
| | |
- | | |--->{BlockToUpdate}
- | | | |-->{blockId}
- | | | |-->{data}
+ | | |--->{BlockToUpdate}
+ | | | |-->{blockId}
+ | | | |-->{data}
| | |
- | | |--->{BlockToUpdate}
- | |--->{Script}
+ | | |--->{BlockToUpdate}
+ | |--->{Script}
|
- |--->{Data}
+ |--->{Data}
| |
- | |--->{BlockToUpdate}
- | | |-->{blockId}
- | | |-->{data}
+ | |--->{BlockToUpdate}
+ | | |-->{blockId}
+ | | |-->{data}
| |
- | |--->{BlockToUpdate}
- |--->{Script}
+ | |--->{BlockToUpdate}
+ |--->{Script}
</programlisting>
</para>
</formalpara>
@@ -454,6 +456,7 @@
<para>
Create a <literal>UIPopupAction</literal> in the main portlet class:
</para>
+
<programlisting>addChild(UIPopupAction.class, null, null);
</programlisting>
</step>
@@ -461,9 +464,9 @@
<para>
Render this action in your template file:
</para>
+
<programlisting>uicomponent.renderChild(UIPopupAction.class) ;
</programlisting>
-
<para>
(This creates an empty container (pop-up) that will receive the new content by
Ajax)
</para>
@@ -472,12 +475,13 @@
<para>
Put this component in your action listener class and update its content:
</para>
+
<programlisting>UIPopupAction uiPopupAction =
uiMainPortlet.getChild(UIPopupAction.class) ;
uiPopupAction.activate(UIReferencesList.class, 600) ;
</programlisting>
<para>
- <literal>UIReferenceList</literal> is the component that will appear in
the pop-up. It does not have to declared in the main portlet class.
- </para>
+ <literal>UIReferenceList</literal> is the component that will appear in
the pop-up. It does not have to declared in the main portlet class.
+ </para>
<para>
The activate method creates the component and its rendering in the pop-up window.
</para>
@@ -486,6 +490,7 @@
<para>
Allow this component to be updated by Ajax:
</para>
+
<programlisting>event.getRequestContext().addUIComponentToUpdateByAjax(uiPopupAction)
;
</programlisting>
</step>
@@ -495,6 +500,7 @@
</para>
</step>
</procedure>
+
</section>
</section>
Modified:
portal/trunk/docs/reference-guide/en/modules/portlets/Create_a_WebUI_Portlet.xml
===================================================================
---
portal/trunk/docs/reference-guide/en/modules/portlets/Create_a_WebUI_Portlet.xml 2010-02-15
01:19:14 UTC (rev 1673)
+++
portal/trunk/docs/reference-guide/en/modules/portlets/Create_a_WebUI_Portlet.xml 2010-02-15
01:20:35 UTC (rev 1674)
@@ -1,19 +1,17 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Create_a_WebUI_Portlet">
<title>Create a WebUI Portlet</title>
<section id="sect-Reference_Guide-Create_a_WebUI_Portlet-Overview">
- <title>Overview</title>
- <important>
- <title>TODO</title>
+ <title>Overview</title>
+ <important>
+ <title>TODO</title>
+ <para>
+ Create example (This one doesn't exist anymore). Overall this chapter need to
be reviewed, any taker ? :)
+ </para>
+ </important>
<para>
- Create example (This one doesn't exist anymore). Overall this chapter need to be
reviewed, any taker ? :)
- </para>
- </important>
- <para>
This example is based on the <literal>testPortlet</literal> in
<filename>portal/trunk/portlet/test</filename>.
</para>
</section>
@@ -40,36 +38,36 @@
Create the pom.xml, at root level of the project, like this :
</para>
-<programlisting role="XML"><project>
- <parent>
- <groupId>org.exoplatform.portal</groupId>
- <artifactId>config</artifactId>
- <version>trunk</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
-
<artifactId>org.gatein.example.portlet.testRomain</artifactId>
- <packaging>war</packaging>
- <version>1.0.0</version>
- <name>gatein.portlets.testRomain</name>
- <description>Romain Test Portlet</description>
- <dependencies>
- <dependency>
- <groupId>org.exoplatform.portal</groupId>
- <artifactId>exo.portal.webui.portal</artifactId>
- <version>${org.exoplatform.portal.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.portal</groupId>
- <artifactId>exo.portal.webui.eXo</artifactId>
- <version>${org.exoplatform.portal.version}</version>
- <scope>provided</scope>
- </dependency>
- </dependencies>
- <build>
- <finalName>testRomain</finalName>
- </build>
-</project>
+<programlisting role="XML"><project>
+ <parent>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>config</artifactId>
+ <version>trunk</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
<artifactId>org.gatein.example.portlet.testRomain</artifactId>
+ <packaging>war</packaging>
+ <version>1.0.0</version>
+ <name>gatein.portlets.testRomain</name>
+ <description>Romain Test Portlet</description>
+ <dependencies>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.webui.portal</artifactId>
+
<version>${org.exoplatform.portal.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.webui.eXo</artifactId>
+
<version>${org.exoplatform.portal.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <finalName>testRomain</finalName>
+ </build>
+</project>
</programlisting>
</section>
@@ -86,7 +84,7 @@
//this part is configuration of the portlet, we set the path to the template groovy.
@ComponentConfig(
lifecycle = UIApplicationLifecycle.class,
- template = "app:/groovy/testRomain/portlet/UITestRomainPortlet.gtmpl"
+ template =
"app:/groovy/testRomain/portlet/UITestRomainPortlet.gtmpl"
)
public class UITestRomainPortlet extends UIPortletApplication {
@@ -96,7 +94,7 @@
</programlisting>
</section>
- <!--
+ <!--
<section
id="sect-Reference_Guide-Create_a_WebUI_Portlet-testRomain.xml">
<title>testRomain.xml</title>
<para>
@@ -107,45 +105,45 @@
docBase must be set to webapp path of the portlet when you are in the tomcat bin
directory.
</para>
</section>
- -->
+ -->
<section
id="sect-Reference_Guide-Configure_the_portlet-Portlet_Groovy_Template">
<title>Portlet Groovy Template</title>
<para>
In src/main/webapp, create the groovy template for the portlet. The path to this file
must match the path you set in the java file, in our case :
groovy/testRomain/portlet/UITestRomainPortlet.gtmpl
</para>
-<programlisting role="HTML"><div
id="<%=uicomponent.getId();%>">
+<programlisting role="HTML"><div
id="<%=uicomponent.getId();%>">
HelloWorld
-</div>
+</div>
</programlisting>
</section>
<section id="sect-Reference_Guide-Configure_the_portlet-Skin_Folder">
<title>Skin Folder</title>
<para>
- Create the folder skin in src/main/webapp. We don't fill it now, but in this
folder, you can put css stylesheet and images.
+ Create the folder skin in src/main/webapp. We don't fill it now, but in this
folder, you can put css stylesheet and images.
</para>
</section>
<section
id="sect-Reference_Guide-Configure_the_portlet-Locale_Folder">
<title>Locale Folder</title>
<para>
- Create the folder WEB-INF/classes/locale in src/main/webapp. We don't fill it
now, but in this folder, you can put language properties files. See <xref
linkend="sect-Reference_Guide-Internationalization_Configuration" />.
+ Create the folder WEB-INF/classes/locale in src/main/webapp. We don't fill it
now, but in this folder, you can put language properties files. See <xref
linkend="sect-Reference_Guide-Internationalization_Configuration" />.
</para>
</section>
<section
id="sect-Reference_Guide-Configure_the_portlet-configuration.xml">
<title>configuration.xml</title>
<para>
- Create the file configuration.xml in WEB-INF/conf/portlet/testPortletRomain/. Content
of tag <ui-component-root> must match your package organization.
+ Create the file configuration.xml in WEB-INF/conf/portlet/testPortletRomain/. Content
of tag <ui-component-root> must match your package organization.
</para>
-<programlisting role="XML"><webui-configuration>
- <application>
-
<ui-component-root>testRomain.portlet.component.UITestRomainPortlet</ui-component-root>
-
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
- </application>
-</webui-configuration>
+<programlisting role="XML"><webui-configuration>
+ <application>
+
<ui-component-root>testRomain.portlet.component.UITestRomainPortlet</ui-component-root>
+
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
+ </application>
+</webui-configuration>
</programlisting>
</section>
@@ -155,34 +153,34 @@
In WEB-INF, create file portlet.xml :
</para>
-<programlisting role="XML"><?xml version="1.0"
encoding="UTF-8"?>
-<portlet-app version="1.0"
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1...
http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
- <portlet>
- <description xml:lang="EN">Test Portlet
Romain</description>
- <portlet-name>TestRomain</portlet-name>
- <display-name xml:lang="EN">Test Portlet
Romain</display-name>
-
<portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
- <init-param>
- <name>webui.configuration</name>
- <!-- must match the path to configuration file -->
-
<value>/WEB-INF/conf/portlet/testPortletRomain/configuration.xml</value>
- </init-param>
- <expiration-cache>0</expiration-cache>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>help</portlet-mode>
- </supports>
- <supported-locale>en</supported-locale>
-
<resource-bundle>locale.testRomainPortlet</resource-bundle>
- <portlet-info>
- <title>TestPortletRomain</title>
- <short-title>TestPortlet</short-title>
- <keywords>test</keywords>
- </portlet-info>
- </portlet>
-</portlet-app>
+<programlisting role="XML"><?xml version="1.0"
encoding="UTF-8"?>
+<portlet-app version="1.0"
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd&...;
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-ap...
http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
+ <portlet>
+ <description xml:lang="EN">Test Portlet
Romain</description>
+ <portlet-name>TestRomain</portlet-name>
+ <display-name xml:lang="EN">Test Portlet
Romain</display-name>
+
<portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
+ <init-param>
+ <name>webui.configuration</name>
+ <!-- must match the path to configuration file -->
+
<value>/WEB-INF/conf/portlet/testPortletRomain/configuration.xml</value>
+ </init-param>
+ <expiration-cache>0</expiration-cache>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>help</portlet-mode>
+ </supports>
+ <supported-locale>en</supported-locale>
+
<resource-bundle>locale.testRomainPortlet</resource-bundle>
+ <portlet-info>
+ <title>TestPortletRomain</title>
+ <short-title>TestPortlet</short-title>
+ <keywords>test</keywords>
+ </portlet-info>
+ </portlet>
+</portlet-app>
</programlisting>
</section>
@@ -192,25 +190,25 @@
In WEB-INF, create file web.xml :
</para>
-<programlisting role="XML"><?xml version="1.0"
encoding="ISO-8859-1"?>
-<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
-<web-app>
- <!-If define the Portlet Application name MUST end with .par->
- <display-name>test</display-name>
- <description> This application is a portlet. It can not be used outside a
portal.
- This web.xml file is mandatory in each .par archive file. </description>
- <listener>
-
<listener-class>org.exoplatform.services.portletcontainer.impl.servlet.PortletApplicationListener</listener-class>
- </listener>
- <servlet>
- <servlet-name>PortletWrapper</servlet-name>
- <servlet-class>org.exoplatform.services.portletcontainer.impl.servlet.ServletWrapper</servlet-class>
- </servlet>
- <servlet-mapping>
- <servlet-name>PortletWrapper</servlet-name>
- <url-pattern>/PortletWrapper</url-pattern>
- </servlet-mapping>
-</web-app>
+<programlisting role="XML"><?xml version="1.0"
encoding="ISO-8859-1"?>
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+ <!-If define the Portlet Application name MUST end with .par->
+ <display-name>test</display-name>
+ <description> This application is a portlet. It can not be used outside
a portal.
+ This web.xml file is mandatory in each .par archive file.
</description>
+ <listener>
+
<listener-class>org.exoplatform.services.portletcontainer.impl.servlet.PortletApplicationListener</listener-class>
+ </listener>
+ <servlet>
+ <servlet-name>PortletWrapper</servlet-name>
+ <servlet-class>org.exoplatform.services.portletcontainer.impl.servlet.ServletWrapper</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>PortletWrapper</servlet-name>
+ <url-pattern>/PortletWrapper</url-pattern>
+ </servlet-mapping>
+</web-app>
</programlisting>
</section>
@@ -230,21 +228,21 @@
In the groovy template, add this code :
</para>
-<programlisting role="HTML"><div
class="UIAction">
- <div class="ActionContainer">
- <div class="ActionButton">
- <div class="LightBlueStyle">
- <div class="ButtonLeft">
- <div class="ButtonRight">
- <div class="ButtonMiddle">
- <a href="<%=uicomponent.event("OpenPopup",
"")%>">Open Popup</a>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
-</div>
+<programlisting role="HTML"><div
class="UIAction">
+ <div class="ActionContainer">
+ <div class="ActionButton">
+ <div class="LightBlueStyle">
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <a
href="<%=uicomponent.event("OpenPopup",
"")%>">Open Popup</a>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
</programlisting>
</section>
@@ -262,9 +260,9 @@
Remark : XXXActionLister.class XXX must match the name you set for the event in the
groovy.
</para>
-<programlisting role="JAVA">static public class OpenPopupActionListener
extends EventListener<UITestRomainPortlet> {
- public void execute(Event<UITestRomainPortlet> event) throws Exception
{
- System.out.println("HelloWorld");
+<programlisting role="JAVA">static public class OpenPopupActionListener
extends EventListener<UITestRomainPortlet> {
+ public void execute(Event<UITestRomainPortlet> event) throws
Exception {
+ System.out.println("HelloWorld");
}
}
</programlisting>
@@ -273,24 +271,24 @@
<section id="sect-Reference_Guide-Use_the_Portlet-Redeploy">
<title>Redeploy</title>
<para>
- Redeploy the portlet and click on the button. You will see "HelloWorld" in
your console. If you don't change in the portlet, try to redeploy and reboot the
tomcat server.
+ Redeploy the portlet and click on the button. You will see
"HelloWorld" in your console. If you don't change in the portlet,
try to redeploy and reboot the tomcat server.
</para>
</section>
</section>
<section
id="sect-Reference_Guide-Create_a_WebUI_Portlet-Add_a_HelloWorld_popup">
- <title>Add a "HelloWorld" popup</title>
+ <title>Add a "HelloWorld" popup</title>
<para>
- Now, we will add a popup which say "HelloWorld" when you click on the
button.
+ Now, we will add a popup which say "HelloWorld" when you click on the
button.
</para>
<para>
First, create the groovy template of the popup : in webapp/groovy/testRomain/portlet,
create UIHelloWorldPopupContent.gtmpl :
</para>
-<programlisting role="HTML"><div
id="<%=uicomponent.getId();%>">
+<programlisting role="HTML"><div
id="<%=uicomponent.getId();%>">
HelloWorld in a popup
-</div>
+</div>
</programlisting>
<para>
In java/testRomain/portlet/component, create the java file for the popup look like :
{code} package testRomain.portlet.component;
@@ -303,7 +301,7 @@
@ComponentConfig(
lifecycle = UIApplicationLifecycle.class,
- template = "app:/groovy/testRomain/portlet/UIHelloWorldPopupContent.gtmpl"
+ template =
"app:/groovy/testRomain/portlet/UIHelloWorldPopupContent.gtmpl"
)
public class UIHelloWorldPopupContent extends UIComponent {
@@ -328,7 +326,7 @@
At the beginning, we set the popup not visible. As you see, we add a children to the
Portlet. So, if we want to see the content of it, we must add this in
UITestPortletRomain.gtmpl :
</para>
-<programlisting><% uicomponent.renderChildren(); %>
+<programlisting><% uicomponent.renderChildren(); %>
</programlisting>
<para>
This makes the portlet generate the content of all child components.
@@ -337,8 +335,8 @@
Change the treatment of the event, replace the println by :
</para>
-<programlisting role="JAVA">public static class OpenPopupActionListener
extends EventListener<UITestRomainPortlet> {
- public void execute(Event<UITestRomainPortlet> event) throws Exception {
+<programlisting role="JAVA">public static class OpenPopupActionListener
extends EventListener<UITestRomainPortlet> {
+ public void execute(Event<UITestRomainPortlet> event) throws Exception
{
UITestRomainPortlet portlet = event.getSource();
UIPopupWindow popup = portlet.getChild(UIPopupWindow.class);
popup.setRendered(true);
@@ -350,7 +348,7 @@
When user clicks on the button, the popup is shown.
</para>
<para>
- Redeploy the portlet and click on the button. You will see "HelloWorld in a
popup" in a popup. If you don't change in the portlet, try to redeploy and reboot
the tomcat server.
+ Redeploy the portlet and click on the button. You will see "HelloWorld in a
popup" in a popup. If you don't change in the portlet, try to redeploy and
reboot the tomcat server.
</para>
</section>
Modified: portal/trunk/docs/reference-guide/en/modules/portlets/Groovy_Templates.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/portlets/Groovy_Templates.xml 2010-02-15
01:19:14 UTC (rev 1673)
+++ portal/trunk/docs/reference-guide/en/modules/portlets/Groovy_Templates.xml 2010-02-15
01:20:35 UTC (rev 1674)
@@ -1,14 +1,11 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Groovy_Templates">
<title>Groovy Templates</title>
- <para>
- In addition to the content in this chapter, refer also to <xref
linkend="sect-Reference_Guide-AJAX_Framework" /> in order to better
understand the communication between the Groovy Template and the portlet.
- </para>
-
+ <para>
+ In addition to the content in this chapter, refer also to <xref
linkend="sect-Reference_Guide-AJAX_Framework" /> in order to better
understand the communication between the Groovy Template and the portlet.
+ </para>
<section id="sect-Reference_Guide-Groovy_Templates-Basic_structure">
<title>Basic structure</title>
<para>
@@ -22,77 +19,76 @@
</listitem>
<listitem>
<para>
- zero or more groovy language code blocks, enclosed by <% ... %>
enclosures.
+ zero or more groovy language code blocks, enclosed by <% ... %>
enclosures.
</para>
</listitem>
</orderedlist>
<para>
- The HTML code in the template doesn't have to contain the
<literal>html</literal>, or <literal>body</literal> tags. This
allows groovy templates for one component to also be rendered in another component.
+ The HTML code in the template doesn't have to contain the
<literal>html</literal>, or <literal>body</literal> tags. This
allows groovy templates for one component to also be rendered in another component.
</para>
<para>
For example:
</para>
-<programlisting role="HTML"><!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<%
+<programlisting role="HTML"><!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<%
import org.exoplatform.webui.core.UIComponent;
def currentPage = uicomponent.getCurrentPage();
...
-%>
+%>
...
- <div class="$uicomponent.skin"
id="UIPortalApplication">
- <%uicomponent.renderChildren();%>
- </div>
+ <div class="$uicomponent.skin"
id="UIPortalApplication">
+ <%uicomponent.renderChildren();%>
+ </div>
</programlisting>
</section>
<section id="sect-Reference_Guide-Groovy_Templates-Groovy_language">
<title>Groovy language</title>
<para>
- Groovy is a scripting language for Java. Some usage examples are included in this
section, however further information is available at <ulink
url="http://groovy.codehaus.org/Documentation"></ulink> .
+ Groovy is a scripting language for Java. Some usage examples are included in this
section, however further information is available at <ulink
url="http://groovy.codehaus.org/Documentation" /> .
</para>
- <variablelist>
+ <variablelist
id="vari-Reference_Guide-Groovy_language-Some_examples_of_Groovy">
<title>Some examples of Groovy</title>
- <varlistentry>
- <term>Variables definition</term>
- <listitem>
- <para>
+ <varlistentry>
+ <term>Variables definition</term>
+ <listitem>
+ <para>
+
<programlisting>int min = 1;
def totalPage = uicomponent.getAvailablePage();
-String name = "uiPortlet";
+String name = "uiPortlet";
categories = uicomponent.getItemCategories();
String columns = uicomponent.getColumns();
</programlisting>
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Other expressions</term>
- <listitem>
- <para>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Other expressions</term>
+ <listitem>
+ <para>
+
<programlisting>for(category in categories) { ... }
for(i in min..max) { ... } // min and max are int variables
-println "</div>" ;
-println """
- <div class="Item">
- <div class="OverflowContainer">
-""";
-<%=uicomponent.getToolbarStyle();%> // <%= to avoid a call of
println method
+println "</div>" ;
+println """
+ <div class="Item">
+ <div class="OverflowContainer">
+""";
+<%=uicomponent.getToolbarStyle();%> // <%= to avoid a call of
println method
import org.exoplatform.portal.config.model.PageNode;
</programlisting>
-
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
</section>
<section
id="sect-Reference_Guide-Groovy_Templates-Linking_a_portlet_with_a_template">
<title>Linking a portlet with a template</title>
-
<section
id="sect-Reference_Guide-Linking_a_portlet_with_a_template-Portlet_configuration">
<title>Portlet configuration</title>
<para>
@@ -110,7 +106,7 @@
<programlisting>@ComponentConfig(
lifecycle = UIFormLifecycle.class,
- template = "system:/groovy/webui/form/UIFormWithTitle.gtmpl",
+ template = "system:/groovy/webui/form/UIFormWithTitle.gtmpl",
events = {
@EventConfig(listeners = UIApplicationForm.SaveActionListener.class),
@EventConfig(phase = Phase.DECODE, listeners =
UIApplicationForm.CancelActionListener.class)
@@ -118,13 +114,13 @@
)
</programlisting>
<para>
- The path is in the "<literal>system</literal>" namespace. This
is a reference to the portal webapp.
+ The path is in the "<literal>system</literal>" namespace.
This is a reference to the portal webapp.
</para>
<para>
This webapp contains reusable groovy templates in the folder; <emphasis
role="bold">src:/web/portal/src/main/webapp/groovy/webui/form/
</emphasis>.
</para>
<para>
- Use the following steps to create a new template;
+ Use the following steps to create a new template;
</para>
<procedure>
<step>
@@ -134,24 +130,26 @@
</step>
<step>
<para>
- Use the namespace "app" for refering to the same webapp as the
component.
+ Use the namespace "app" for refering to the same webapp as the
component.
</para>
</step>
<step>
<para>
- &PRODUCT; stores the component templates in a folder that follows this
placement convention:
"<filename>/webapp/groovy/<literal>your_portlet_name</literal>/webui/component</filename>".
+ &PRODUCT; stores the component templates in a folder that follows this
placement convention:
"<filename>/webapp/groovy/<literal>your_portlet_name</literal>/webui/component</filename>".
</para>
<para>
-<programlisting>template =
"app:/groovy/your_portlet_name/webui/component/your_component.gtmpl"
+
+<programlisting>template =
"app:/groovy/your_portlet_name/webui/component/your_component.gtmpl"
</programlisting>
</para>
</step>
<step>
<para>
- Edit the template file according to the information in the <xref
linkend="sect-Reference_Guide-Linking_a_portlet_with_a_template-The_template_file"/>.
+ Edit the template file according to the information in the <xref
linkend="sect-Reference_Guide-Linking_a_portlet_with_a_template-The_template_file"
/>.
</para>
</step>
</procedure>
+
</section>
<section
id="sect-Reference_Guide-Linking_a_portlet_with_a_template-The_template_file">
@@ -174,15 +172,16 @@
Using the <literal>uicomponent</literal> variable, you can access all
the attributes and functions of a component to use them in your template.
</para>
<para>
- Take, for example <literal>UIPageIterator.gtmpl</literal>:
- </para>
-<programlisting><%
+ Take, for example <literal>UIPageIterator.gtmpl</literal>:
+ </para>
+
+<programlisting><%
def currentPage = uicomponent.getCurrentPage();
-%>
+%>
...
-<a
href="<%=uicomponent.event("ShowPage","$currentPage")%>"
class="Icon LastTopPageIcon">
- <span></span>
-</a>
+<a
href="<%=uicomponent.event("ShowPage","$currentPage")%>"
class="Icon LastTopPageIcon">
+ <span></span>
+</a>
</programlisting>
<para>
The following example shows how <literal>uicomponent</literal> can be
used to make Ajax calls using the <literal>event</literal> method. See
<xref linkend="sect-Reference_Guide-AJAX_Framework" /> for more details.
@@ -198,22 +197,23 @@
<para>
Some usage examples are:
</para>
-<programlisting><%
+
+<programlisting><%
def rcontext = ctx.getRequestContext() ;
- context.getJavascriptManager().importJavascript('GateIn.webui.UIPopupWindow');
- ctx.appRes(popupId + ".title."+ title);
-%>
+
context.getJavascriptManager().importJavascript('GateIn.webui.UIPopupWindow');
+ ctx.appRes(popupId + ".title."+ title);
+%>
</programlisting>
</listitem>
<listitem>
<para>
- If the template defines the user interface of a component that includes a form use
an instance of <literal>UIForm</literal> in a variable named
<literal>uiform</literal>.
+ If the template defines the user interface of a component that includes a form use
an instance of <literal>UIForm</literal> in a variable named
<literal>uiform</literal>.
</para>
<para>
- The <literal>UIForm</literal> class provides the methods
<literal>begin()</literal> and <literal>end()</literal> which
write the HTML tags of the form.
+ The <literal>UIForm</literal> class provides the methods
<literal>begin()</literal> and <literal>end()</literal> which
write the HTML tags of the form.
</para>
<para>
- The form class must inherit from <literal>UIForm</literal>. In this
class add the input elements (fields, checkboxes, lists) which are required in the form.
+ The form class must inherit from <literal>UIForm</literal>. In this
class add the input elements (fields, checkboxes, lists) which are required in the form.
</para>
<para>
Render the input elements in the groovy template using
<literal>uiform.renderField(field)</literal>.
Modified: portal/trunk/docs/reference-guide/en/modules/portlets/Portlet_Lifecycle.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/portlets/Portlet_Lifecycle.xml 2010-02-15
01:19:14 UTC (rev 1673)
+++ portal/trunk/docs/reference-guide/en/modules/portlets/Portlet_Lifecycle.xml 2010-02-15
01:20:35 UTC (rev 1674)
@@ -1,66 +1,63 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Portlet_Lifecycle">
<title>Portlet Lifecycle</title>
+ <para>
+ This chapter does not to refer to the Portlet API specification lifecycle but focuses
on the &PRODUCT; UI framework.
+ </para>
+ <para>
+ This web framework has been developed specifically for &PRODUCT; and, while it is
not necessary to use the native web framework to build portlets, all portlets packaged
with &PRODUCT; are developed using this framework.
+ </para>
+ <para>
+ This consistency allows portlets to use several UI components that can be used in
different abstracted contexts (such as the portal itself or some portlets).
+ </para>
+ <note>
+ <title>Recommended Reading</title>
<para>
- This chapter does not to refer to the Portlet API specification lifecycle but focuses
on the &PRODUCT; UI framework.
+ This chapter is intended for advanced developers. It covers code implementation and
logic. It is not a tutorial on how to write portlets.
</para>
<para>
- This web framework has been developed specifically for &PRODUCT; and, while it is
not necessary to use the native web framework to build portlets, all portlets packaged
with &PRODUCT; are developed using this framework.
+ Refer to <xref linkend="sect-Reference_Guide-Portal_Lifecycle" /> for
information on concepts that are similar and top hierarchy classes that are shared.
</para>
- <para>
- This consistency allows portlets to use several UI components that can be used in
different abstracted contexts (such as the portal itself or some portlets).
- </para>
- <note>
- <title>Recommended Reading</title>
- <para>
- This chapter is intended for advanced developers. It covers code implementation and
logic. It is not a tutorial on how to write portlets.
- </para>
- <para>
- Refer to <xref linkend="sect-Reference_Guide-Portal_Lifecycle" /> for
information on concepts that are similar and top hierarchy classes that are shared.
- </para>
- </note>
-
+ </note>
<section id="sect-Reference_Guide-Portlet_Lifecycle-Portlet_init">
<title>Portlet init</title>
<para>
- The main entry point for configuring a portlet is in the <emphasis
role="bold">portlet.xml</emphasis> file located in the portlet
application WAR.
+ The main entry point for configuring a portlet is in the <emphasis
role="bold">portlet.xml</emphasis> file located in the portlet
application WAR.
</para>
<para>
- Each portlet built using the &PRODUCT; web framework must reference the
<emphasis role="bold">PortletApplicationController</emphasis> .
+ Each portlet built using the &PRODUCT; web framework must reference the
<emphasis role="bold">PortletApplicationController</emphasis> .
</para>
<para>
- The portlet configuration (such as the root component) is defined in
<filename>configuration.xml</filename>. The path to this file is defined in
the init-param "<emphasis
role="bold">webui.configuration</emphasis>" of
<filename>portlet.xml</filename>.
+ The portlet configuration (such as the root component) is defined in
<filename>configuration.xml</filename>. The path to this file is defined in
the init-param "<emphasis
role="bold">webui.configuration</emphasis>" of
<filename>portlet.xml</filename>.
</para>
-<programlisting><portlet>
- <description xml:lang="EN">Content
Portlet</description>
- <portlet-name>ContentPortlet</portlet-name>
- <display-name xml:lang="EN">Content
Portlet</display-name>
-
<portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
+<programlisting><portlet>
+ <description xml:lang="EN">Content
Portlet</description>
+ <portlet-name>ContentPortlet</portlet-name>
+ <display-name xml:lang="EN">Content
Portlet</display-name>
+
<portlet-class>org.exoplatform.webui.application.portlet.PortletApplicationController</portlet-class>
- <init-param>
- <name>webui.configuration</name>
-
<value>/WEB-INF/conf/portlet/content/ContentPortlet/webui/configuration.xml</value>
- </init-param>
-</portlet>
+ <init-param>
+ <name>webui.configuration</name>
+
<value>/WEB-INF/conf/portlet/content/ContentPortlet/webui/configuration.xml</value>
+ </init-param>
+</portlet>
</programlisting>
<para>
- The structure of the <filename>configuration.xml</filename> file is
exactly the same as the <filename>webui-configuration.xml</filename> which was
introduced in <xref linkend="sect-Reference_Guide-Portal_Lifecycle" />.
+ The structure of the <filename>configuration.xml</filename> file is
exactly the same as the <filename>webui-configuration.xml</filename> which was
introduced in <xref linkend="sect-Reference_Guide-Portal_Lifecycle" />.
</para>
<para>
In the case of the content portlet it is formatted as:
</para>
-<programlisting><webui-configuration>
- <application>
-
<ui-component-root>org.exoplatform.content.webui.component.UIContentPortlet</ui-component-root>
-
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
- </application>
-</webui-configuration>
+<programlisting><webui-configuration>
+ <application>
+
<ui-component-root>org.exoplatform.content.webui.component.UIContentPortlet</ui-component-root>
+
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
+ </application>
+</webui-configuration>
</programlisting>
<para>
The <literal>PortletApplicationController</literal> class extends the
<literal>GenericPortlet</literal> class defined in the Portlet API
specification.
@@ -133,7 +130,7 @@
UIApplication uiApp = getStateManager().restoreUIRootComponent(context) ;
context.setUIApplication(uiApp) ;
processDecode(uiApp, context) ;
- if(!images/context.isResponseComplete() &&!images/
context.getProcessRender()) {
+ if(!images/context.isResponseComplete() &&!images/
context.getProcessRender()) {
processAction(uiApp, context) ;
}
} finally {
@@ -158,13 +155,13 @@
*/
private PortletRequestContext createRequestContext(PortletRequest req, PortletResponse
res,
WebuiRequestContext
parentAppRequestContext) throws IOException {
- String attributeName = getApplicationId() + "$PortletRequest" ;
+ String attributeName = getApplicationId() + "$PortletRequest" ;
PortletRequestContext context =
(PortletRequestContext) parentAppRequestContext.getAttribute(attributeName) ;
Writer w = null ;
if(res instanceof RenderResponse){
RenderResponse renderRes = (RenderResponse)res;
- renderRes.setContentType("text/html; charset=UTF-8");
+ renderRes.setContentType("text/html; charset=UTF-8");
w = renderRes.getWriter() ;
}
if(context!images/= null) {
@@ -180,10 +177,11 @@
<para>
In the <literal>PortletApplication</literal>, the line;
</para>
+
<programlisting>UIApplication uiApp =
getStateManager().restoreUIRootComponent(context);
</programlisting>
<para>
- asks the <literal>StateManager</literal> defined for the portlet to get
the UI root component. In the case of a portlet the root component must extend
<literal>UIPortletApplication</literal>.
+ asks the <literal>StateManager</literal> defined for the portlet to get
the UI root component. In the case of a portlet the root component must extend
<literal>UIPortletApplication</literal>.
</para>
<programlisting>public class ParentAppStateManager extends StateManager {
@@ -191,7 +189,7 @@
/**
* This method simply delegate the call to the same method of the parent
WebuiRequestContext
*/
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("unchecked")
public UIApplication restoreUIRootComponent(WebuiRequestContext context) throws
Exception {
WebuiRequestContext pcontext = (WebuiRequestContext)
context.getParentAppRequestContext() ;
return pcontext.getStateManager().restoreUIRootComponent(context) ;
@@ -274,7 +272,7 @@
lifecycle.onEndRequest(this, context) ;
}
} catch (Exception exception){
- log.error("Error while trying to call onEndRequest of the portlet
ApplicationLifecycle",
+ log.error("Error while trying to call onEndRequest of the portlet
ApplicationLifecycle",
exception);
}
WebuiRequestContext.setCurrentInstance(parentAppRequestContext) ;
@@ -302,10 +300,10 @@
*/
public void processRender(WebuiApplication app, WebuiRequestContext context) throws
Exception {
WebuiRequestContext pContext =
(WebuiRequestContext)context.getParentAppRequestContext();
- if(context.useAjax() &&!images/pContext.getFullRender()) {
+ if(context.useAjax() &&!images/pContext.getFullRender()) {
Writer w = context.getWriter() ;
- Set<UIComponent> list = context.getUIComponentToUpdateByAjax() ;
+ Set<UIComponent> list = context.getUIComponentToUpdateByAjax() ;
if(list!images/= null) {
if(getUIPopupMessages().hasMessage())
context.addUIComponentToUpdateByAjax(getUIPopupMessages()) ;
for(UIComponent uicomponent : list) {
Modified: portal/trunk/docs/reference-guide/en/modules/portlets/Standard.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/portlets/Standard.xml 2010-02-15 01:19:14
UTC (rev 1673)
+++ portal/trunk/docs/reference-guide/en/modules/portlets/Standard.xml 2010-02-15 01:20:35
UTC (rev 1674)
@@ -1,14 +1,12 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Portlet_Primer">
<title>Portlet Primer</title>
<section
id="sect-Reference_Guide-Portlet_Primer-JSR_168_and_JSR_286_overview">
<title>JSR-168 and JSR-286 overview</title>
<para>
- The Java Community Process (<literal>JCP</literal>) uses Java
Specification Requests (<literal>JSR</literal>s) to define proposed
specifications and technologies designed for the Java platform.
+ The Java Community Process (<literal>JCP</literal>) uses Java
Specification Requests (<literal>JSR</literal>s) to define proposed
specifications and technologies designed for the Java platform.
</para>
<para>
The Portlet Specifications aim at defining portlets that can be used by any <ulink
url="http://www.jcp.org/en/jsr/detail?id=168">JSR-168 (Portlet
1.0)</ulink> or <ulink
url="http://www.jcp.org/en/jsr/detail?id=286">JSR-286 (Portlet
2.0)</ulink> portlet container.
@@ -45,31 +43,31 @@
A portlet can have different view modes. Three modes are defined by the JSR-286
specification:
</para>
<variablelist>
- <varlistentry>
- <term>View</term>
- <listitem>
- <para>
- Generates markup reflecting the current state of the portlet.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Edit</term>
- <listitem>
- <para>
- Allows a user to customize the behavior of the portlet.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Help</term>
- <listitem>
- <para>
- Provides information to the user as to how to use the portlet.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
+ <varlistentry>
+ <term>View</term>
+ <listitem>
+ <para>
+ Generates markup reflecting the current state of the portlet.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Edit</term>
+ <listitem>
+ <para>
+ Allows a user to customize the behavior of the portlet.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Help</term>
+ <listitem>
+ <para>
+ Provides information to the user as to how to use the portlet.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
</section>
<section
id="sect-Reference_Guide-JSR_168_and_JSR_286_overview-Window_States">
@@ -78,30 +76,30 @@
Window states are an indicator of how much page space a portlet consumes on any given
page. The three states defined by the JSR-168 specification are:
</para>
<variablelist>
- <varlistentry>
- <term>Normal</term>
- <listitem>
- <para>
- A portlet shares this page with other portlets.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Minimized</term>
- <listitem>
- <para>
- A portlet may show very little information, or none at all.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>Maximized</term>
- <listitem>
- <para>
- A portlet may be the only portlet displayed on this page.
- </para>
- </listitem>
- </varlistentry>
+ <varlistentry>
+ <term>Normal</term>
+ <listitem>
+ <para>
+ A portlet shares this page with other portlets.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Minimized</term>
+ <listitem>
+ <para>
+ A portlet may show very little information, or none at all.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Maximized</term>
+ <listitem>
+ <para>
+ A portlet may be the only portlet displayed on this page.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</section>
@@ -114,18 +112,15 @@
</para>
<note>
<title>Maven</title>
- <para>
- This example is using Maven to compile and build the web archive. Maven versions can
be downloaded from <ulink
url="http://maven.apache.org/download.html">maven.apache.org...
- </para>
+ <para>
+ This example is using Maven to compile and build the web archive. Maven versions can
be downloaded from <ulink
url="http://maven.apache.org/download.html">maven.apache.org...
+ </para>
</note>
-
<section
id="sect-Reference_Guide-Tutorials-Deploying_your_first_Portlet">
<title>Deploying your first Portlet</title>
-
- <para>
- This section describes how to deploy a portlet in &PRODUCT;. A sample portlet
called <filename>SimplestHelloWorld</filename> is located in the
<literal>examples</literal> directory at the root of your &PRODUCT; binary
package. This sample is used in the following examples.
- </para>
-
+ <para>
+ This section describes how to deploy a portlet in &PRODUCT;. A sample portlet
called <filename>SimplestHelloWorld</filename> is located in the
<literal>examples</literal> directory at the root of your &PRODUCT; binary
package. This sample is used in the following examples.
+ </para>
<section
id="sect-Reference_Guide-Deploying_your_first_Portlet-Compiling">
<title>Compiling</title>
<para>
@@ -134,19 +129,20 @@
<procedure>
<step>
<para>
- Navigate to the <filename>SimplestHelloWorld</filename> directory and
execute:
+ Navigate to the <filename>SimplestHelloWorld</filename> directory and
execute:
</para>
+
<programlisting>mvn package
</programlisting>
</step>
<step>
<para>
- If the compile is successfully packaged the result will be available in:
<filename>SimplestHelloWorld/target/SimplestHelloWorld-0.0.1.war </filename>.
+ If the compile is successfully packaged the result will be available in:
<filename>SimplestHelloWorld/target/SimplestHelloWorld-0.0.1.war </filename>.
</para>
</step>
<step>
<para>
- Copy the package file into
<literal>JBOSS_HOME/server/default/deploy</literal>.
+ Copy the package file into
<literal>JBOSS_HOME/server/default/deploy</literal>.
</para>
</step>
<step>
@@ -166,21 +162,22 @@
</mediaobject>
</step>
</procedure>
+
</section>
<section
id="sect-Reference_Guide-Deploying_your_first_Portlet-Package_Structure">
<title>Package Structure</title>
<para>
- Like other Java EE applications, &PRODUCT; portlets are packaged in WAR files. A
typical portlet WAR file can include servlets, resource bundles, images, HTML, JavaServer
Pages (JSP), and other static or dynamic files.
- </para>
+ Like other Java EE applications, &PRODUCT; portlets are packaged in WAR files. A
typical portlet WAR file can include servlets, resource bundles, images, HTML, JavaServer
Pages (JSP), and other static or dynamic files.
+ </para>
<para>
The following is an example of the directory structure of the
<filename>SimplestHelloWorld</filename> portlet:
</para>
<programlistingco>
<areaspec>
- <area coords="9"
id="area-Reference_Guide-tutorials.simplest.javaclass" />
- <area coords="10"
id="area-Reference_Guide-tutorials.simplest.portlet" />
- <area coords="11"
id="area-Reference_Guide-tutorials.simplest.web" />
+ <area coords="9"
id="area-Reference_Guide-Deploying_your_first_Portlet-Package_Structure.javaclass"
/>
+ <area coords="10"
id="area-Reference_Guide-Deploying_your_first_Portlet-Package_Structure.portlet"
/>
+ <area coords="11"
id="area-Reference_Guide-Deploying_your_first_Portlet-Package_Structure.web"
/>
</areaspec>
<programlisting>|-- SimplestHelloWorld-0.0.1.war
@@ -196,17 +193,17 @@
| `-- web.xml
</programlisting>
<calloutlist>
- <callout
arearefs="area-Reference_Guide-tutorials.simplest.javaclass">
+ <callout
arearefs="area-Reference_Guide-Deploying_your_first_Portlet-Package_Structure.javaclass">
<para>
The compiled Java class implementing
<emphasis>javax.portlet.Portlet</emphasis> (through
<emphasis>javax.portlet.GenericPortlet </emphasis> )
</para>
</callout>
- <callout
arearefs="area-Reference_Guide-tutorials.simplest.portlet">
+ <callout
arearefs="area-Reference_Guide-Deploying_your_first_Portlet-Package_Structure.portlet">
<para>
This is the mandatory descriptor files for portlets. It is used during
deployment..
</para>
</callout>
- <callout arearefs="area-Reference_Guide-tutorials.simplest.web">
+ <callout
arearefs="area-Reference_Guide-Deploying_your_first_Portlet-Package_Structure.web">
<para>
This is the mandatory descriptor for web applications.
</para>
@@ -223,11 +220,11 @@
</para>
<programlistingco>
<areaspec>
- <area coords="10"
id="area-Reference_Guide-tutorials.simplest.extends" />
- <area coords="13"
id="area-Reference_Guide-tutorials.simplest.doview" />
- <area coords="15"
id="area-Reference_Guide-tutorials.simplest.writer" />
- <area coords="16"
id="area-Reference_Guide-tutorials.simplest.write" />
- <area coords="17"
id="area-Reference_Guide-tutorials.simplest.close" />
+ <area coords="10"
id="area-Reference_Guide-Deploying_your_first_Portlet-Portlet_Class.extends"
/>
+ <area coords="13"
id="area-Reference_Guide-Deploying_your_first_Portlet-Portlet_Class.doview"
/>
+ <area coords="15"
id="area-Reference_Guide-Deploying_your_first_Portlet-Portlet_Class.writer"
/>
+ <area coords="16"
id="area-Reference_Guide-Deploying_your_first_Portlet-Portlet_Class.write"
/>
+ <area coords="17"
id="area-Reference_Guide-Deploying_your_first_Portlet-Portlet_Class.close"
/>
</areaspec>
<programlisting role="JAVA">package org.gatein.portal.examples.portlets;
@@ -245,39 +242,39 @@
RenderResponse response) throws IOException
{
PrintWriter writer = response.getWriter();
- writer.write("Hello World !");
+ writer.write("Hello World !");
writer.close();
}
}
</programlisting>
<calloutlist>
- <callout
arearefs="area-Reference_Guide-tutorials.simplest.extends">
+ <callout
arearefs="area-Reference_Guide-Deploying_your_first_Portlet-Portlet_Class.extends">
<para>
- All portlets must implement the
<literal>javax.portlet.Portlet</literal> interface. The portlet API provides a
convenient implementation of this interface.
+ All portlets must implement the
<literal>javax.portlet.Portlet</literal> interface. The portlet API provides a
convenient implementation of this interface.
</para>
<para>
- The <literal>javax.portlet.Portlet</literal> interface uses the
<literal>javax.portlet.GenericPortlet</literal> class which implements the
<literal>Portlet render</literal> method to dispatch to abstract mode-specific
methods. This makes it easier to support the standard portlet modes.
+ The <literal>javax.portlet.Portlet</literal> interface uses the
<literal>javax.portlet.GenericPortlet</literal> class which implements the
<literal>Portlet render</literal> method to dispatch to abstract mode-specific
methods. This makes it easier to support the standard portlet modes.
</para>
<para>
<literal>Portlet render</literal> also provides a default
implementation for the <literal>processAction</literal>,
<literal>init</literal> and <literal>destroy</literal> methods. It
is recommended to extend <literal>GenericPortlet</literal> for most cases.
</para>
</callout>
- <callout
arearefs="area-Reference_Guide-tutorials.simplest.doview">
+ <callout
arearefs="area-Reference_Guide-Deploying_your_first_Portlet-Portlet_Class.doview">
<para>
If only the <literal>view</literal> mode is required, then only the
<literal>doView</literal> method needs to be implemented. The
<literal>GenericPortlet</literal><literal>render</literal>
implementation calls our implementation when the <literal>view</literal> mode
is requested.
</para>
</callout>
- <callout
arearefs="area-Reference_Guide-tutorials.simplest.writer">
+ <callout
arearefs="area-Reference_Guide-Deploying_your_first_Portlet-Portlet_Class.writer">
<para>
Use the <emphasis>RenderResponse</emphasis> to obtain a writer to be
used to produce content.
</para>
</callout>
- <callout arearefs="area-Reference_Guide-tutorials.simplest.write">
+ <callout
arearefs="area-Reference_Guide-Deploying_your_first_Portlet-Portlet_Class.write">
<para>
Write the markup to display.
</para>
</callout>
- <callout arearefs="area-Reference_Guide-tutorials.simplest.close">
+ <callout
arearefs="area-Reference_Guide-Deploying_your_first_Portlet-Portlet_Class.close">
<para>
Closing the writer.
</para>
@@ -289,7 +286,7 @@
<note>
<title>Markup Fragments</title>
<para>
- Portlets are responsible for generating markup fragments, as they are included on
a page and are surrounded by other portlets. This means that a portlet outputting HTML
must not output any markup that cannot be found in a
<literal><body></literal> element.
+ Portlets are responsible for generating markup fragments, as they are included on
a page and are surrounded by other portlets. This means that a portlet outputting HTML
must not output any markup that cannot be found in a
<literal><body></literal> element.
</para>
</note>
</para>
@@ -305,60 +302,60 @@
</para>
<programlistingco>
<areaspec>
- <area coords="8"
id="area-Reference_Guide-tutorials.simplest.portletname" />
- <area coords="9"
id="area-Reference_Guide-tutorials.simplest.portletclass" />
- <area coords="12"
id="area-Reference_Guide-tutorials.simplest.supports" />
- <area coords="15"
id="area-Reference_Guide-tutorials.simplest.portletinfo" />
+ <area coords="8"
id="area-Reference_Guide-Deploying_your_first_Portlet-Application_Descriptors.portletname"
/>
+ <area coords="9"
id="area-Reference_Guide-Deploying_your_first_Portlet-Application_Descriptors.portletclass"
/>
+ <area coords="12"
id="area-Reference_Guide-Deploying_your_first_Portlet-Application_Descriptors.supports"
/>
+ <area coords="15"
id="area-Reference_Guide-Deploying_your_first_Portlet-Application_Descriptors.portletinfo"
/>
</areaspec>
<programlisting>
-<portlet-app
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2...
-
http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
- version="2.0">
- <portlet>
- <portlet-name>SimplestHelloWorldPortlet</portlet-name>
- <portlet-class>
+<portlet-app
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd&...;
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-ap...
+
http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+ version="2.0">
+ <portlet>
+
<portlet-name>SimplestHelloWorldPortlet</portlet-name>
+ <portlet-class>
org.gatein.portal.examples.portlets.SimplestHelloWorldPortlet
- </portlet-class>
- <supports>
- <mime-type>text/html</mime-type>
- </supports>
- <portlet-info>
- <title>Simplest Hello World Portlet</title>
- </portlet-info>
- </portlet>
-</portlet-app>
+ </portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ </supports>
+ <portlet-info>
+ <title>Simplest Hello World Portlet</title>
+ </portlet-info>
+ </portlet>
+</portlet-app>
</programlisting>
<calloutlist>
- <callout
arearefs="area-Reference_Guide-tutorials.simplest.portletname">
+ <callout
arearefs="area-Reference_Guide-Deploying_your_first_Portlet-Application_Descriptors.portletname">
<para>
Define the portlet name. It does not have to be the class name.
</para>
</callout>
- <callout
arearefs="area-Reference_Guide-tutorials.simplest.portletclass">
+ <callout
arearefs="area-Reference_Guide-Deploying_your_first_Portlet-Application_Descriptors.portletclass">
<para>
The Fully Qualified Name (<literal>FQN</literal>) of your portlet
class must be declared here.
</para>
</callout>
- <callout
arearefs="area-Reference_Guide-tutorials.simplest.supports">
+ <callout
arearefs="area-Reference_Guide-Deploying_your_first_Portlet-Application_Descriptors.supports">
<para>
- The <literal><supports> </literal> element declares all
of the markup types that a portlet supports in the <literal>render</literal>
method. This is accomplished via the <literal><mime-type>
</literal> element, which is required for every portlet.
+ The <literal><supports> </literal> element declares
all of the markup types that a portlet supports in the
<literal>render</literal> method. This is accomplished via the
<literal><mime-type> </literal> element, which is required for
every portlet.
</para>
<para>
The declared MIME types must match the capability of the portlet. It allows
administrators to pair which modes and window states are supported for each markup type.
</para>
<para>
- This does not have to be declared as all portlets must support the
<literal>view</literal> portlet mode.
+ This does not have to be declared as all portlets must support the
<literal>view</literal> portlet mode.
</para>
<para>
- Use the <literal><mime-type> </literal> element to
define which markup type the portlet supports. In the example above this is
<literal>text/html</literal>. This section tells the portal to only output
HTML.
+ Use the <literal><mime-type> </literal> element to
define which markup type the portlet supports. In the example above this is
<literal>text/html</literal>. This section tells the portal to only output
HTML.
</para>
</callout>
- <callout
arearefs="area-Reference_Guide-tutorials.simplest.portletinfo">
+ <callout
arearefs="area-Reference_Guide-Deploying_your_first_Portlet-Application_Descriptors.portletinfo">
<para>
- When rendered, the portlet's title is displayed as the header in the portlet
window, unless it is overridden programmatically. In the example above the title would be
<literal>Simplest Hello World Portlet</literal> .
+ When rendered, the portlet's title is displayed as the header in the
portlet window, unless it is overridden programmatically. In the example above the title
would be <literal>Simplest Hello World Portlet</literal> .
</para>
</callout>
</calloutlist>
@@ -368,67 +365,67 @@
</section>
- <section
id="sect-Reference_Guide-Tutorials-_JavaServer_Pages_Portlet_Example_">
+ <section
id="sect-Reference_Guide-Tutorials-JavaServer_Pages_Portlet_Example">
<title>JavaServer Pages Portlet Example</title>
+ <para>
+ This section discusses:
+ </para>
+ <orderedlist>
+ <listitem>
+ <para>
+ Adding more features to the previous example.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Using a JSP page to render the markup.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Using the portlet tag library to generate links to the portlet in different ways.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Using the other standard portlet modes.
+ </para>
+ </listitem>
+ </orderedlist>
+ <procedure>
+ <step>
+ <para>
+ The example used in this section can be found in the
<literal>JSPHelloUser</literal> directory.
+ </para>
+ </step>
+ <step>
+ <para>
+ Execute <command>mvn package</command> in this directory.
+ </para>
+ </step>
+ <step>
+ <para>
+ Copy <filename>JSPHelloUser/target/JSPHelloUser-0.0.1.war </filename>
to the <literal>deploy</literal> directory of JBoss Application Server.
+ </para>
+ </step>
+ <step>
+ <para>
+ Select the new <literal>JSPHelloUser</literal> tab in your portal.
+ </para>
+ </step>
+ </procedure>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata align="center"
fileref="images/tutorials/jsp_portlet/output.png" format="PNG"
scalefit="1" width="444" />
+ </imageobject>
+ </mediaobject>
+ <note>
<para>
- This section discusses:
+ The <literal>EDIT</literal> button only appears with logged-in users,
which is not the case in the screenshot.
</para>
- <orderedlist>
- <listitem>
- <para>
- Adding more features to the previous example.
- </para>
- </listitem>
- <listitem>
- <para>
- Using a JSP page to render the markup.
- </para>
- </listitem>
- <listitem>
- <para>
- Using the portlet tag library to generate links to the portlet in different ways.
- </para>
- </listitem>
- <listitem>
- <para>
- Using the other standard portlet modes.
- </para>
- </listitem>
- </orderedlist>
- <procedure>
- <step>
- <para>
- The example used in this section can be found in the
<literal>JSPHelloUser</literal> directory.
- </para>
- </step>
- <step>
- <para>
- Execute <command>mvn package</command> in this directory.
- </para>
- </step>
- <step>
- <para>
- Copy <filename>JSPHelloUser/target/JSPHelloUser-0.0.1.war </filename>
to the <literal>deploy</literal> directory of JBoss Application Server.
- </para>
- </step>
- <step>
- <para>
- Select the new <literal>JSPHelloUser</literal> tab in your portal.
- </para>
- </step>
- </procedure>
- <mediaobject>
- <imageobject>
- <imagedata align="center"
fileref="images/tutorials/jsp_portlet/output.png" format="PNG"
scalefit="1" width="444" />
- </imageobject>
- </mediaobject>
- <note>
- <para>
- The <literal>EDIT</literal> button only appears with logged-in users,
which is not the case in the screenshot.
- </para>
- </note>
-
- <section
id="sect-Reference_Guide-_JavaServer_Pages_Portlet_Example_-Package_Structure">
+ </note>
+ <section
id="sect-Reference_Guide-JavaServer_Pages_Portlet_Example-Package_Structure">
<title>Package Structure</title>
<para>
The package structure in this tutorial does not differ greatly from the previous
example, with the exception of adding some JSP files detailed later.
@@ -458,17 +455,17 @@
</programlisting>
</section>
- <section
id="sect-Reference_Guide-_JavaServer_Pages_Portlet_Example_-Portlet_Class">
+ <section
id="sect-Reference_Guide-JavaServer_Pages_Portlet_Example-Portlet_Class">
<title>Portlet Class</title>
<para>
The code below is from the <filename>
JSPHelloUser/src/main/java/org/gatein/portal/examples/portlets/JSPHelloUserPortlet.java
</filename> Java source. It is split in different pieces.
</para>
<programlistingco>
<areaspec>
- <area coords="18"
id="area-Reference_Guide-tutorials.jsphello.doView" />
- <area coords="21"
id="area-Reference_Guide-tutorials.jsphello.renderParameter" />
- <area coords="25"
id="area-Reference_Guide-tutorials.jsphello.requestDispatcher" />
- <area coords="26"
id="area-Reference_Guide-tutorials.jsphello.include" />
+ <area coords="18"
id="area-Reference_Guide-JavaServer_Pages_Portlet_Example-Portlet_Class.doView"
/>
+ <area coords="21"
id="area-Reference_Guide-JavaServer_Pages_Portlet_Example-Portlet_Class.renderParameter"
/>
+ <area coords="25"
id="area-Reference_Guide-JavaServer_Pages_Portlet_Example-Portlet_Class.requestDispatcher"
/>
+ <area coords="26"
id="area-Reference_Guide-JavaServer_Pages_Portlet_Example-Portlet_Class.include"
/>
</areaspec>
<programlisting role="JAVA">package org.gatein.portal.examples.portlets;
@@ -490,39 +487,39 @@
public void doView(RenderRequest request, RenderResponse response)
throws PortletException, IOException
{
- String sYourName = (String) request.getParameter("yourname");
+ String sYourName = (String) request.getParameter("yourname");
if (sYourName != null)
{
- request.setAttribute("yourname", sYourName);
+ request.setAttribute("yourname", sYourName);
PortletRequestDispatcher prd =
- getPortletContext().getRequestDispatcher("/jsp/hello.jsp");
+ getPortletContext().getRequestDispatcher("/jsp/hello.jsp");
prd.include(request, response);
}
else
{
- PortletRequestDispatcher prd =
getPortletContext().getRequestDispatcher("/jsp/welcome.jsp");
+ PortletRequestDispatcher prd =
getPortletContext().getRequestDispatcher("/jsp/welcome.jsp");
prd.include(request, response);
}
}
...
</programlisting>
<calloutlist>
- <callout
arearefs="area-Reference_Guide-tutorials.jsphello.doView">
+ <callout
arearefs="area-Reference_Guide-JavaServer_Pages_Portlet_Example-Portlet_Class.doView">
<para>
Override the <emphasis>doView</emphasis> method (as in the first
tutorial).
</para>
</callout>
- <callout
arearefs="area-Reference_Guide-tutorials.jsphello.renderParameter">
+ <callout
arearefs="area-Reference_Guide-JavaServer_Pages_Portlet_Example-Portlet_Class.renderParameter">
<para>
This entry attempts to obtain the value of the render parameter named
<literal>yourname</literal>. If defined it should redirect to the
<filename>hello.jsp</filename> JSP page, otherwise to the
<filename>welcome.jsp</filename> JSP page.
</para>
</callout>
- <callout
arearefs="area-Reference_Guide-tutorials.jsphello.requestDispatcher">
+ <callout
arearefs="area-Reference_Guide-JavaServer_Pages_Portlet_Example-Portlet_Class.requestDispatcher">
<para>
Get a request dispatcher on a file located within the web archive.
</para>
</callout>
- <callout
arearefs="area-Reference_Guide-tutorials.jsphello.include">
+ <callout
arearefs="area-Reference_Guide-JavaServer_Pages_Portlet_Example-Portlet_Class.include">
<para>
Perform the inclusion of the markup obtained from the JSP.
</para>
@@ -534,7 +531,7 @@
As well as the <literal>VIEW</literal> portlet mode, the specification
defines two other modes; <literal>EDIT</literal> and
<literal>HELP</literal>.
</para>
<para>
- These modes need to be defined in the <filename>portlet.xml</filename>
descriptor. This will enable the corresponding buttons on the portlet's window.
+ These modes need to be defined in the <filename>portlet.xml</filename>
descriptor. This will enable the corresponding buttons on the portlet's window.
</para>
<para>
The generic portlet that is inherited dispatches the different views to the methods:
<literal>doView</literal> , <literal>doHelp</literal> and
<literal>doEdit</literal>.
@@ -544,16 +541,16 @@
protected void doHelp(RenderRequest rRequest, RenderResponse rResponse) throws
PortletException, IOException,
UnavailableException
{
- rResponse.setContentType("text/html");
- PortletRequestDispatcher prd =
getPortletContext().getRequestDispatcher("/jsp/help.jsp");
+ rResponse.setContentType("text/html");
+ PortletRequestDispatcher prd =
getPortletContext().getRequestDispatcher("/jsp/help.jsp");
prd.include(rRequest, rResponse);
}
protected void doEdit(RenderRequest rRequest, RenderResponse rResponse) throws
PortletException, IOException,
UnavailableException
{
- rResponse.setContentType("text/html");
- PortletRequestDispatcher prd =
getPortletContext().getRequestDispatcher("/jsp/edit.jsp");
+ rResponse.setContentType("text/html");
+ PortletRequestDispatcher prd =
getPortletContext().getRequestDispatcher("/jsp/edit.jsp");
prd.include(rRequest, rResponse);
}
...
@@ -569,32 +566,32 @@
</para>
<programlistingco>
<areaspec>
- <area coords="2"
id="area-Reference_Guide-tutorials.jsphello.processAction" />
- <area coords="5"
id="area-Reference_Guide-tutorials.jsphello.getActionParameter" />
- <area coords="6"
id="area-Reference_Guide-tutorials.jsphello.setRenderParameter" />
+ <area coords="2"
id="area-Reference_Guide-JavaServer_Pages_Portlet_Example-Portlet_Class.processAction"
/>
+ <area coords="5"
id="area-Reference_Guide-JavaServer_Pages_Portlet_Example-Portlet_Class.getActionParameter"
/>
+ <area coords="6"
id="area-Reference_Guide-JavaServer_Pages_Portlet_Example-Portlet_Class.setRenderParameter"
/>
</areaspec>
<programlisting role="JAVA">...
public void processAction(ActionRequest aRequest, ActionResponse aResponse)
throws PortletException, IOException,
UnavailableException
{
- String sYourname = (String) aRequest.getParameter("yourname");
- aResponse.setRenderParameter("yourname", sYourname);
+ String sYourname = (String) aRequest.getParameter("yourname");
+ aResponse.setRenderParameter("yourname", sYourname);
}
...
</programlisting>
<calloutlist>
- <callout
arearefs="area-Reference_Guide-tutorials.jsphello.processAction">
+ <callout
arearefs="area-Reference_Guide-JavaServer_Pages_Portlet_Example-Portlet_Class.processAction">
<para>
<literal>processAction</literal> is the method from
<literal>GernericPorlet</literal> to override for the
<emphasis>action</emphasis> phase.
</para>
</callout>
- <callout
arearefs="area-Reference_Guide-tutorials.jsphello.getActionParameter">
+ <callout
arearefs="area-Reference_Guide-JavaServer_Pages_Portlet_Example-Portlet_Class.getActionParameter">
<para>
Here the parameter is retrieved through an <emphasis>action
URL</emphasis> .
</para>
</callout>
- <callout
arearefs="area-Reference_Guide-tutorials.jsphello.setRenderParameter">
+ <callout
arearefs="area-Reference_Guide-JavaServer_Pages_Portlet_Example-Portlet_Class.setRenderParameter">
<para>
The value of <literal>yourname</literal> is kept to make it available
in the rendering phase. The previous line simply copies an action parameters to a render
parameter for this example.
</para>
@@ -604,96 +601,96 @@
</section>
- <section
id="sect-Reference_Guide-_JavaServer_Pages_Portlet_Example_-_JSP_files_and_the_Portlet_Tag_Library_">
+ <section
id="sect-Reference_Guide-JavaServer_Pages_Portlet_Example-JSP_files_and_the_Portlet_Tag_Library">
<title>JSP files and the Portlet Tag Library</title>
<para>
The <filename>help.jsp</filename> and
<filename>edit.jsp</filename> files are very simple. Note that CSS styles are
used as defined in the portlet specification. This ensures that the portlet will render
well within the theme and across portal vendors.
</para>
-<programlisting role="XHTML"><div
class="portlet-section-header">Help mode</div>
-<div class="portlet-section-body">This is the help mode, a
convenient place to give the user some help information.</div>
+<programlisting role="XHTML"><div
class="portlet-section-header">Help mode</div>
+<div class="portlet-section-body">This is the help mode,
a convenient place to give the user some help information.</div>
</programlisting>
-<programlisting role="XHTML"><div
class="portlet-section-header">Edit mode</div>
-<div class="portlet-section-body">This is the edit mode, a
convenient place to let the user change his portlet preferences.</div>
+<programlisting role="XHTML"><div
class="portlet-section-header">Edit mode</div>
+<div class="portlet-section-body">This is the edit mode,
a convenient place to let the user change his portlet preferences.</div>
</programlisting>
<para>
The landing page contains the links and form to call our portlet:
</para>
<programlistingco>
<areaspec>
- <area coords="1"
id="area-Reference_Guide-tutorials.jsphello.taglib" />
- <area coords="13"
id="area-Reference_Guide-tutorials.jsphello.method1" />
- <area coords="20"
id="area-Reference_Guide-tutorials.jsphello.method2.1" />
- <area coords="24"
id="area-Reference_Guide-tutorials.jsphello.method2.2" />
- <area coords="30"
id="area-Reference_Guide-tutorials.jsphello.method3.1" />
- <area coords="31"
id="area-Reference_Guide-tutorials.jsphello.method3.2" />
+ <area coords="1"
id="area-Reference_Guide-JavaServer_Pages_Portlet_Example-JSP_files_and_the_Portlet_Tag_Library.taglib"
/>
+ <area coords="13"
id="area-Reference_Guide-JavaServer_Pages_Portlet_Example-JSP_files_and_the_Portlet_Tag_Library.method1"
/>
+ <area coords="20"
id="area-Reference_Guide-JavaServer_Pages_Portlet_Example-JSP_files_and_the_Portlet_Tag_Library.method2.1"
/>
+ <area coords="24"
id="area-Reference_Guide-JavaServer_Pages_Portlet_Example-JSP_files_and_the_Portlet_Tag_Library.method2.2"
/>
+ <area coords="30"
id="area-Reference_Guide-JavaServer_Pages_Portlet_Example-JSP_files_and_the_Portlet_Tag_Library.method3.1"
/>
+ <area coords="31"
id="area-Reference_Guide-JavaServer_Pages_Portlet_Example-JSP_files_and_the_Portlet_Tag_Library.method3.2"
/>
</areaspec>
-<programlisting><%@ taglib
uri="http://java.sun.com/portlet"
prefix="portlet" %>
+<programlisting><%@ taglib
uri="http://java.sun.com/portlet" prefix="portlet"
%>
-<div class="portlet-section-header">Welcome
!</div>
+<div class="portlet-section-header">Welcome
!</div>
-<br/>
+<br/>
-<div class="portlet-font">Welcome on the JSP Hello User portlet,
-my name is GateIn Portal. What's yours ?</div>
+<div class="portlet-font">Welcome on the JSP Hello User
portlet,
+my name is GateIn Portal. What's yours ?</div>
-<br/>
+<br/>
-<div class="portlet-font">Method 1: We simply pass the parameter
to the render phase:<br/>
-<a href="<portlet:renderURL><portlet:param
name="yourname" value="John Doe"/>
- </portlet:renderURL>">John
Doe</a></div>
+<div class="portlet-font">Method 1: We simply pass the
parameter to the render phase:<br/>
+<a href="<portlet:renderURL><portlet:param
name="yourname" value="John Doe"/>
+ </portlet:renderURL>">John
Doe</a></div>
-<br/>
+<br/>
-<div class="portlet-font">Method 2: We pass the parameter to the
render phase, using valid XML:
+<div class="portlet-font">Method 2: We pass the parameter
to the render phase, using valid XML:
Please check the source code to see the difference with Method 1.
-<portlet:renderURL var="myRenderURL">
- <portlet:param name="yourname" value='John Doe'/>
-</portlet:renderURL>
-<br/>
-<a href="<%= myRenderURL %>">John
Doe</a></div>
+<portlet:renderURL var="myRenderURL">
+ <portlet:param name="yourname" value='John
Doe'/>
+</portlet:renderURL>
+<br/>
+<a href="<%= myRenderURL %>">John
Doe</a></div>
-<br/>
+<br/>
-<div class="portlet-font">Method 3: We use a
form:<br/>
+<div class="portlet-font">Method 3: We use a
form:<br/>
-<portlet:actionURL var="myActionURL"/>
-<form action="<%= myActionURL %>"
method="POST">
- <span
class="portlet-form-field-label">Name:</span>
- <input class="portlet-form-input-field" type="text"
name="yourname"/>
- <input class="portlet-form-button"
type="Submit"/>
-</form>
-</div>
+<portlet:actionURL var="myActionURL"/>
+<form action="<%= myActionURL %>"
method="POST">
+ <span
class="portlet-form-field-label">Name:</span>
+ <input class="portlet-form-input-field"
type="text" name="yourname"/>
+ <input class="portlet-form-button"
type="Submit"/>
+</form>
+</div>
</programlisting>
<calloutlist>
- <callout
arearefs="area-Reference_Guide-tutorials.jsphello.taglib">
+ <callout
arearefs="area-Reference_Guide-JavaServer_Pages_Portlet_Example-JSP_files_and_the_Portlet_Tag_Library.taglib">
<para>
The portlet taglib, needs to be declared.
</para>
</callout>
- <callout
arearefs="area-Reference_Guide-tutorials.jsphello.method1">
+ <callout
arearefs="area-Reference_Guide-JavaServer_Pages_Portlet_Example-JSP_files_and_the_Portlet_Tag_Library.method1">
<para>
- The first method showed here is the simplest one.
<literal>portlet:renderURL</literal> will create a URL that calls the render
phase of the current portlet and append the result at the place of the markup (within a
tag). A parameter is also added directly to the URL.
+ The first method showed here is the simplest one.
<literal>portlet:renderURL</literal> will create a URL that calls the render
phase of the current portlet and append the result at the place of the markup (within a
tag). A parameter is also added directly to the URL.
</para>
</callout>
- <callout
arearefs="area-Reference_Guide-tutorials.jsphello.method2.1">
+ <callout
arearefs="area-Reference_Guide-JavaServer_Pages_Portlet_Example-JSP_files_and_the_Portlet_Tag_Library.method2.1">
<para>
In this method the <literal>var</literal> attribute is used. This
avoids having one XML tag within another. Instead of printing the url the
<literal>portlet:renderURL</literal> tag will store the result in the
referenced variable ( <literal>myRenderURL</literal>).
</para>
</callout>
- <callout
arearefs="area-Reference_Guide-tutorials.jsphello.method2.2">
+ <callout
arearefs="area-Reference_Guide-JavaServer_Pages_Portlet_Example-JSP_files_and_the_Portlet_Tag_Library.method2.2">
<para>
The variable <literal>myRenderURL</literal> is used like any other
JSP variable.
</para>
</callout>
- <callout
arearefs="area-Reference_Guide-tutorials.jsphello.method3.1">
+ <callout
arearefs="area-Reference_Guide-JavaServer_Pages_Portlet_Example-JSP_files_and_the_Portlet_Tag_Library.method3.1">
<para>
The third method mixes form submission and action request. Again, a temporary
variable is used to put the created URL into.
</para>
</callout>
- <callout
arearefs="area-Reference_Guide-tutorials.jsphello.method3.2">
+ <callout
arearefs="area-Reference_Guide-JavaServer_Pages_Portlet_Example-JSP_files_and_the_Portlet_Tag_Library.method3.2">
<para>
The action URL is used in HTML form.
</para>
@@ -711,10 +708,10 @@
</para>
</section>
- <section
id="sect-Reference_Guide-_JavaServer_Pages_Portlet_Example_-_JSF_example_using_the_JBoss_Portlet_Bridge_">
+ <section
id="sect-Reference_Guide-JavaServer_Pages_Portlet_Example-JSF_example_using_the_JBoss_Portlet_Bridge">
<title>JSF example using the JBoss Portlet Bridge </title>
<para>
- In order to write a portlet using JSF a 'bridge' is needed. This software
allows developers to write a portlet application as if it was a JSF application. The
bridge then negotiates the interactions between the two layers.
+ In order to write a portlet using JSF a 'bridge' is needed. This
software allows developers to write a portlet application as if it was a JSF application.
The bridge then negotiates the interactions between the two layers.
</para>
<para>
An example of the JBoss Portlet Bridge is available in
<filename>examples/JSFHelloUser</filename>. The configuration is slightly
different from a JSP application. This example can be used as a base to configure instead
of creating a new application.
@@ -723,14 +720,14 @@
As in any JSF application, the file <literal>faces-config.xml</literal>
is required. It must contain the following information:
</para>
-<programlisting role="XML"><faces-config>
+<programlisting role="XML"><faces-config>
...
- <application>
-
<view-handler>org.jboss.portletbridge.application.PortletViewHandler</view-handler>
-
<state-manager>org.jboss.portletbridge.application.PortletStateManager</state-manager>
- </application>
+ <application>
+
<view-handler>org.jboss.portletbridge.application.PortletViewHandler</view-handler>
+
<state-manager>org.jboss.portletbridge.application.PortletStateManager</state-manager>
+ </application>
...
-</faces-config>
+</faces-config>
</programlisting>
<para>
The portlet bridge libraries must be available and are usually bundled with the
<literal>WEB-INF/lib</literal> directory of the web archive.
@@ -740,68 +737,68 @@
</para>
<programlistingco>
<areaspec>
- <area coords="9"
id="area-Reference_Guide-tutorials.jsf.portlet" />
- <area coords="21"
id="area-Reference_Guide-tutorials.jsf.view" />
- <area coords="26"
id="area-Reference_Guide-tutorials.jsf.edit" />
- <area coords="31"
id="area-Reference_Guide-tutorials.jsf.help" />
+ <area coords="9"
id="area-Reference_Guide-JavaServer_Pages_Portlet_Example-JSF_example_using_the_JBoss_Portlet_Bridge.portlet"
/>
+ <area coords="21"
id="area-Reference_Guide-JavaServer_Pages_Portlet_Example-JSF_example_using_the_JBoss_Portlet_Bridge.view"
/>
+ <area coords="26"
id="area-Reference_Guide-JavaServer_Pages_Portlet_Example-JSF_example_using_the_JBoss_Portlet_Bridge.edit"
/>
+ <area coords="31"
id="area-Reference_Guide-JavaServer_Pages_Portlet_Example-JSF_example_using_the_JBoss_Portlet_Bridge.help"
/>
</areaspec>
-<programlisting><?xml version="1.0"
encoding="UTF-8"?>
-<portlet-app
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2...
-
http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
- version="2.0">
- <portlet>
- <portlet-name>JSFHelloUserPortlet</portlet-name>
-
<portlet-class>javax.portlet.faces.GenericFacesPortlet</portlet-class>
- <supports>
- <mime-type>text/html</mime-type>
- <portlet-mode>view</portlet-mode>
- <portlet-mode>edit</portlet-mode>
- <portlet-mode>help</portlet-mode>
- </supports>
- <portlet-info>
- <title>JSF Hello User Portlet</title>
- </portlet-info>
+<programlisting><?xml version="1.0"
encoding="UTF-8"?>
+<portlet-app
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd&...;
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-ap...
+
http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+ version="2.0">
+ <portlet>
+ <portlet-name>JSFHelloUserPortlet</portlet-name>
+
<portlet-class>javax.portlet.faces.GenericFacesPortlet</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>view</portlet-mode>
+ <portlet-mode>edit</portlet-mode>
+ <portlet-mode>help</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>JSF Hello User Portlet</title>
+ </portlet-info>
- <init-param>
- <name>javax.portlet.faces.defaultViewId.view</name>
- <value>/jsf/welcome.jsp</value>
- </init-param>
+ <init-param>
+
<name>javax.portlet.faces.defaultViewId.view</name>
+ <value>/jsf/welcome.jsp</value>
+ </init-param>
- <init-param>
- <name>javax.portlet.faces.defaultViewId.edit</name>
- <value>/jsf/edit.jsp</value>
- </init-param>
+ <init-param>
+
<name>javax.portlet.faces.defaultViewId.edit</name>
+ <value>/jsf/edit.jsp</value>
+ </init-param>
- <init-param>
- <name>javax.portlet.faces.defaultViewId.help</name>
- <value>/jsf/help.jsp</value>
- </init-param>
+ <init-param>
+
<name>javax.portlet.faces.defaultViewId.help</name>
+ <value>/jsf/help.jsp</value>
+ </init-param>
- </portlet>
-</portlet-app>
+ </portlet>
+</portlet-app>
</programlisting>
<calloutlist>
- <callout arearefs="area-Reference_Guide-tutorials.jsf.portlet">
+ <callout
arearefs="area-Reference_Guide-JavaServer_Pages_Portlet_Example-JSF_example_using_the_JBoss_Portlet_Bridge.portlet">
<para>
All JSF portlets define <literal>javax.portlet.faces.GenericFacesPortlet
</literal> as portlet class. This class is part of the JBoss Portlet Bridge
</para>
</callout>
- <callout arearefs="area-Reference_Guide-tutorials.jsf.view">
+ <callout
arearefs="area-Reference_Guide-JavaServer_Pages_Portlet_Example-JSF_example_using_the_JBoss_Portlet_Bridge.view">
<para>
- This is a mandatory parameter to define what's the default page to display.
+ This is a mandatory parameter to define what's the default page to
display.
</para>
</callout>
- <callout arearefs="area-Reference_Guide-tutorials.jsf.edit">
+ <callout
arearefs="area-Reference_Guide-JavaServer_Pages_Portlet_Example-JSF_example_using_the_JBoss_Portlet_Bridge.edit">
<para>
- This parameter defines which page to display on the 'edit' mode.
+ This parameter defines which page to display on the 'edit' mode.
</para>
</callout>
- <callout arearefs="area-Reference_Guide-tutorials.jsf.help">
+ <callout
arearefs="area-Reference_Guide-JavaServer_Pages_Portlet_Example-JSF_example_using_the_JBoss_Portlet_Bridge.help">
<para>
- This parameter defines which page to display on the 'help' mode.
+ This parameter defines which page to display on the 'help' mode.
</para>
</callout>
</calloutlist>
Modified: portal/trunk/docs/reference-guide/en/modules/portlets/WebUI.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/portlets/WebUI.xml 2010-02-15 01:19:14
UTC (rev 1673)
+++ portal/trunk/docs/reference-guide/en/modules/portlets/WebUI.xml 2010-02-15 01:20:35
UTC (rev 1674)
@@ -1,16 +1,14 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Web_User_Interface_WebUI">
<title>Web User Interface - WebUI</title>
<para>
- WebUI is the name of &PRODUCT;'s webframework.
- </para>
+ WebUI is the name of &PRODUCT;'s webframework.
+ </para>
<para>
- Using a self-contained framework ensures that the portal's architecture does not
interfere with other web technologies deployed by the portlets.
- </para>
+ Using a self-contained framework ensures that the portal's architecture does
not interfere with other web technologies deployed by the portlets.
+ </para>
<para>
Using a particular technology raises potential difficulties for users with a differing
version (either newer or older) of the same technology.
</para>