Author: smumford
Date: 2010-01-20 03:13:42 -0500 (Wed, 20 Jan 2010)
New Revision: 1388
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:
initial edits
Modified: portal/trunk/docs/reference-guide/en/modules/Configuration.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/Configuration.xml 2010-01-20 08:10:24 UTC
(rev 1387)
+++ portal/trunk/docs/reference-guide/en/modules/Configuration.xml 2010-01-20 08:13:42 UTC
(rev 1388)
@@ -1,5 +1,7 @@
<?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>
@@ -8,11 +10,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-01-20 08:10:24 UTC
(rev 1387)
+++ portal/trunk/docs/reference-guide/en/modules/Development.xml 2010-01-20 08:13:42 UTC
(rev 1388)
@@ -1,8 +1,10 @@
<?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>
+ <title>Development</title>
<xi:include href="development/Portal_Lifecycle.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="development/Right_To_Left_Framework.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="development/Internationalization_Configuration.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
Modified: portal/trunk/docs/reference-guide/en/modules/Gadgets.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/Gadgets.xml 2010-01-20 08:10:24 UTC (rev
1387)
+++ portal/trunk/docs/reference-guide/en/modules/Gadgets.xml 2010-01-20 08:13:42 UTC (rev
1388)
@@ -1,8 +1,10 @@
<?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.
@@ -21,7 +23,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-01-20 08:10:24 UTC
(rev 1387)
+++ portal/trunk/docs/reference-guide/en/modules/Integration.xml 2010-01-20 08:13:42 UTC
(rev 1388)
@@ -1,8 +1,10 @@
<?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.
@@ -21,16 +23,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-01-20 08:10:24 UTC
(rev 1387)
+++ portal/trunk/docs/reference-guide/en/modules/Introduction.xml 2010-01-20 08:13:42 UTC
(rev 1388)
@@ -1,8 +1,10 @@
<?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.
@@ -21,14 +23,14 @@
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" />
+ <imagedata fileref="images/Frontpage.png" format="PNG"
scalefit="1" width="444" />
</imageobject>
</mediaobject>
<para>
- GateIn comes from a merge of two mature projects; the JBoss Portal and the eXo Portal.
It takes the best of both into a single new project. The aim is to provide both an
intuitive portal to use as-is and a portal framework to build upon depending on your
needs.
+ &PRODUCT; comes from a merge of two mature projects; the JBoss Portal and the eXo
Portal. It takes the best of both into a single new project. The aim is to provide both an
intuitive portal to use as-is and a portal framework to build upon depending on your
needs.
</para>
<section id="sect-Reference_Guide-Introduction-Links">
<title>Links</title>
@@ -40,6 +42,11 @@
</listitem>
<listitem>
<para>
+ 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>
+ <para>
GateIn videos: <ulink
url="http://www.jboss.org/gatein/videos.html">www.jboss.org/...
</para>
</listitem>
@@ -52,7 +59,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-01-20 08:10:24 UTC (rev
1387)
+++ portal/trunk/docs/reference-guide/en/modules/Portlets.xml 2010-01-20 08:13:42 UTC (rev
1388)
@@ -1,13 +1,15 @@
<?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>
+ <title>Portlet development</title>
<xi:include href="portlets/WebUI.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="portlets/AJAX_in_GateIn_Framework.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
<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" />
- <xi:include href="portlets/Create_a_WebUI_Portlet.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="portlets/Standard.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <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-01-20 08:10:24 UTC (rev
1387)
+++ portal/trunk/docs/reference-guide/en/modules/SSO.xml 2010-01-20 08:13:42 UTC (rev
1388)
@@ -1,175 +1,156 @@
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
"http://www.oasis-open.org/docbook/sgml/4.4/docbookx.dtd">
-<chapter>
- <title>Single Sign On</title>
-
- <section>
- <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>
-
- <section>
- <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>
- </para>
- <section>
- <title>Integration</title>
- <section>
- <title>From source</title>
- <itemizedlist>
- <listitem>
- <para>
- Check out the GateIn SSO component from SVN using
- the following command:
- <programlisting>
- <![CDATA[
-svn co
http://anonsvn.jboss.org/repos/gatein/components/sso/tags/<appropriate sso
component version>
- ]]>
- </programlisting>
- </para>
- </listitem>
- <listitem>
- <para>
- Update
- <emphasis>packaging/profiles.xml</emphasis>
- to reflect the directories where your local JBoss
- AS 5.1.0.GA and Tomcat 6.0.2 are installed
- </para>
- </listitem>
- </itemizedlist>
- </section>
- <section>
- <title>Install CAS plugin into a designated CAS (3.3.4)
- server</title>
- <itemizedlist>
- <listitem>
- <para>
- <programlisting>
- <![CDATA[
+<?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-Single_Sign_On">
+ <title>Single Sign On</title>
+ <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>
+
+ <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>
+ </para>
+ <section
id="sect-Reference_Guide-CAS_Central_Authentication_Service-Integration">
+ <title>Integration</title>
+ <section id="sect-Reference_Guide-Integration-From_source">
+ <title>From source</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Check out the GateIn SSO component from SVN using the following command:
+<programlisting>
+
+svn co
http://anonsvn.jboss.org/repos/gatein/components/sso/tags/<appropr... sso
component version>
+</programlisting>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Update <emphasis>packaging/profiles.xml</emphasis> to reflect the
directories where your local JBoss AS 5.1.0.GA and Tomcat 6.0.2 are installed
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section
id="sect-Reference_Guide-Integration-Install_CAS_plugin_into_a_designated_CAS_3.3.4_server">
+ <title>Install CAS plugin into a designated CAS (3.3.4) server</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+
+<programlisting>
+
mvn -Pplugin-cas-install install
- ]]>
- </programlisting>
- </para>
- </listitem>
- </itemizedlist>
- </section>
- <section>
- <title>Install CAS GateIn Agent into the designated GateIn
- server</title>
- <itemizedlist>
- <listitem>
- <para>
- <programlisting>
- <![CDATA[
+</programlisting>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section
id="sect-Reference_Guide-Integration-Install_CAS_GateIn_Agent_into_the_designated_GateIn_server">
+ <title>Install CAS GateIn Agent into the designated GateIn
server</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+
+<programlisting>
+
mvn -Pgatein-cas-install install
- ]]>
- </programlisting>
- </para>
- </listitem>
- </itemizedlist>
- </section>
- </section>
- <section>
- <title>CAS Server Plugin Configuration</title>
- <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>
- <para>
- <programlisting>
- <![CDATA[
- <!--
+</programlisting>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ </section>
+
+ <section
id="sect-Reference_Guide-CAS_Central_Authentication_Service-CAS_Server_Plugin_Configuration">
+ <title>CAS Server Plugin Configuration</title>
+ <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>
+ <para>
+
+<programlisting>
+
+ <!--
Note: Modify the Plugin Configuration based on the actual information of a GateIn
instance.
The instance can be anywhere on the internet...Not 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>
- ]]>
- </programlisting>
- </para>
- </section>
- <section>
- <title>GateIn Agent Configuration</title>
- <para>
- In a Single Sign On usecase, the GateIn server re-directs
- all "private" resource requests to the CAS server for
- authentication first. 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>gatein.ear/02portal.war/groovy/portal/webui/UILoginForm.gtmpl</emphasis>
- <para>
- <programlisting>
- <![CDATA[
- <script>
- <%=uicomponent.event("Close");%>
+ -->
+ <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>
+</programlisting>
+ </para>
+ </section>
+
+ <section
id="sect-Reference_Guide-CAS_Central_Authentication_Service-GateIn_Agent_Configuration">
+ <title>GateIn Agent Configuration</title>
+ <para>
+ In a Single Sign On usecase, the GateIn server re-directs all "private"
resource requests to the CAS server for authentication first. 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>gatein.ear/02portal.war/groovy/portal/webui/UILoginForm.gtmpl</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>gatein.ear/02portal.war/login/jsp/login.jsp</emphasis>
- <para>
- <programlisting>
- <![CDATA[
- <html>
- <head>
- <script type="text/javascript">
+ </script>
+</programlisting>
+ </para>
+ </listitem>
+ <listitem>
+ <emphasis>gatein.ear/02portal.war/login/jsp/login.jsp</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>gatein.ear/02portal.war/WEB-INF/web.xml</emphasis>
- <para>
- <programlisting>
- <![CDATA[
- <servlet>
- <servlet-name>InitiateLoginServlet</servlet-name>
- <servlet-class>org.gatein.sso.agent.GenericSSOAgent</servlet-class>
- <init-param>
- <param-name>casServerUrl</param-name>
- <param-value>http://localhost:8888/cas</param-value>
- </init-param>
- </servlet>
- ]]>
- </programlisting>
- </para>
- </listitem>
- </itemizedlist>
- </para>
+ </script>
+ </head>
+ <body>
+ </body>
+ </html>
+</programlisting>
+ </para>
+ </listitem>
+ <listitem>
+ <emphasis>gatein.ear/02portal.war/WEB-INF/web.xml</emphasis>
+ <para>
+
+<programlisting>
+
+ <servlet>
+ <servlet-name>InitiateLoginServlet</servlet-name>
+
<servlet-class>org.gatein.sso.agent.GenericSSOAgent</servlet-class>
+ <init-param>
+ <param-name>casServerUrl</param-name>
+ <param-value>http://localhost:8888/cas</param-value>
+ </init-param>
+ </servlet>
+</programlisting>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </section>
- </section>
- </section>
-</chapter>
\ No newline at end of file
+ </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-01-20
08:10:24 UTC (rev 1387)
+++
portal/trunk/docs/reference-guide/en/modules/configuration/Authentication_Token_Configuration.xml 2010-01-20
08:13:42 UTC (rev 1388)
@@ -1,130 +1,99 @@
<?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-Overview">
- <title>Overview</title>
- <para>
- In this article, you will learn:
+ <title>Authentication Token Configuration</title>
+ <section
id="sect-Reference_Guide-Authentication_Token_Configuration-Overview">
+ <title>Overview</title>
+ <para>
+ In this article, you will learn:
</para>
- <itemizedlist>
- <listitem>
- <para>
- What token services are.
+ <itemizedlist>
+ <listitem>
+ <para>
+ What token services are.
</para>
- </listitem>
- <listitem>
- <para>
- Implement a token service for using in GateIn portal.
+ </listitem>
+ <listitem>
+ <para>
+ Implement a token service for using in GateIn portal.
</para>
- </listitem>
- <listitem>
- <para>
- Configure a token service with a token's life-time.
+ </listitem>
+ <listitem>
+ <para>
+ Configure a token service with a token's life-time.
</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section
-
id="sect-Reference_Guide-Authentication_Token_Configuration-What_is_token_service">
- <title>What is token service</title>
- <para>
- Token service is used in authentication.
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section
id="sect-Reference_Guide-Authentication_Token_Configuration-What_is_token_service">
+ <title>What is token service</title>
+ <para>
+ Token service is used in authentication.
</para>
- <para>
- Using token helps preventing information such as user name, password into
- user request so the system will become more secure.
+ <para>
+ Using token helps preventing information such as user name, password into user request
so the system will become more secure.
</para>
- <para>
- Token service provides the way to manipulate tokens such as create,
- delete, retrieve, clean ... Token service also defines the
- life-time of token. After the life-time, token has no more
- effect. The life-time definition must be configured.
+ <para>
+ Token service provides the way to manipulate tokens such as create, delete, retrieve,
clean ... Token service also defines the life-time of token. After the life-time, token
has no more effect. The life-time definition must be configured.
</para>
- </section>
-
- <section
-
id="sect-Reference_Guide-Authentication_Token_Configuration-Implement_token_services_API">
- <title>Implement token service's API</title>
- <para>
- All token services used in GateIn portal's authentication must
- be a subclass of an abstract class
- <emphasis role="bold">AbstractTokenService</emphasis>
- . So they must have these following methods:
- </para>
-
- <programlisting role="JAVA"><![CDATA[
+ </section>
+
+ <section
id="sect-Reference_Guide-Authentication_Token_Configuration-Implement_token_services_API">
+ <title>Implement token service's API</title>
+ <para>
+ All token services used in GateIn portal's authentication must be a subclass of an
abstract class <emphasis role="bold">AbstractTokenService</emphasis>
. So they must have these following methods:
+ </para>
+
+<programlisting role="JAVA">
public Token getToken(String id) throws PathNotFoundException, RepositoryException;
public Token deleteToken(String id) throws PathNotFoundException, RepositoryException;
public String[] getAllTokens();
public long getNumberTokens() throws Exception;
public String createToken(Credentials credentials) throws
IllegalArgumentException,NullPointerException;
public Credentials validateToken(String tokenKey, boolean remove) throws
NullPointerException;
-]]></programlisting>
- <para>
- These methods show how the token-service manipulates its tokens.
+</programlisting>
+ <para>
+ These methods show how the token-service manipulates its tokens.
</para>
- </section>
-
- <section
-
id="sect-Reference_Guide-Authentication_Token_Configuration-Configure_token_services">
- <title>Configure token services</title>
- <para>
- Token services configuration is also known as specifying the life-time of
- token in the configuration file. The token service is
- configured as a portal component.
+ </section>
+
+ <section
id="sect-Reference_Guide-Authentication_Token_Configuration-Configure_token_services">
+ <title>Configure token services</title>
+ <para>
+ Token services configuration is also known as specifying the life-time of token in the
configuration file. The token service is configured as a portal component.
</para>
- <para>
- Examples:
+ <para>
+ Examples:
</para>
+
+<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>
+ <para>
+ In this example, <emphasis>CookieTokenService</emphasis> is a subclass of
<emphasis role="bold">AbstractTokenService</emphasis> so it has a
property which specifies <emphasis>how long token can live</emphasis> .
+ </para>
+ <para>
+ Service will initiate this property by looking for an init-param named as "
<emphasis role="bold">service.configuration</emphasis> ". This
property must have 3 values (service's name, amount of time, unit of time). In this
case, we can see the service's name is "jcr-token", the token's
expiration time is a week.
+ </para>
+ <para>
+ At this time, GateIn Portal supports <emphasis>four</emphasis> timing
units: <emphasis role="bold">SECOND</emphasis> , <emphasis
role="bold">MINUTE</emphasis> , <emphasis
role="bold">HOUR</emphasis> and <emphasis
role="bold">DAY</emphasis> .
+ </para>
+ </section>
- <programlisting role="XML"><![CDATA[<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>
- <para>
- In this example,
- <emphasis>CookieTokenService</emphasis>
- is a subclass of
- <emphasis role="bold">AbstractTokenService</emphasis>
- so it has a property which specifies
- <emphasis>how long token can live</emphasis>
- .
- </para>
- <para>
- Service will initiate this property by looking for an
- init-param named as "
- <emphasis role="bold">service.configuration</emphasis>
- ". This property must have 3 values (service's name, amount of
- time, unit of time). In this case, we can see the service's
- name is "jcr-token", the token's expiration time is a week.
- </para>
- <para>
- At this time, GateIn Portal supports
- <emphasis>four</emphasis>
- timing units:
- <emphasis role="bold">SECOND</emphasis>
- ,
- <emphasis role="bold">MINUTE</emphasis>
- ,
- <emphasis role="bold">HOUR</emphasis>
- and
- <emphasis role="bold">DAY</emphasis>
- .
- </para>
- </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-01-20
08:10:24 UTC (rev 1387)
+++
portal/trunk/docs/reference-guide/en/modules/configuration/Dashboard_Configuration.xml 2010-01-20
08:13:42 UTC (rev 1388)
@@ -1,51 +1,51 @@
<?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>
- <section
-
id="sect-Reference_Guide-Dashboard_configuration-Parameters_in_edit_mode">
- <title>Parameters (in edit mode)</title>
+ <title>Dashboard configuration</title>
+ <section
id="sect-Reference_Guide-Dashboard_configuration-Parameters_in_edit_mode">
+ <title>Parameters (in edit mode)</title>
+ <section id="sect-Reference_Guide-Parameters_in_edit_mode-owner">
+ <title>owner</title>
+ <itemizedlist>
+ <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>
+ </itemizedlist>
+ </section>
+
+ <section id="sect-Reference_Guide-Parameters_in_edit_mode-isPrivate">
+ <title>isPrivate</title>
+ <itemizedlist>
+ <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>
+ </itemizedlist>
+ </section>
- <section id="sect-Reference_Guide-Dashboard_configuration-owner">
- <title>owner</title>
- <itemizedlist>
- <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>
- </itemizedlist>
- </section>
+ </section>
- <section
id="sect-Reference_Guide-Dashboard_configuration-isPrivate">
- <title>isPrivate</title>
- <itemizedlist>
- <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>
- </itemizedlist>
- </section>
- </section>
</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-01-20
08:10:24 UTC (rev 1387)
+++
portal/trunk/docs/reference-guide/en/modules/configuration/Data_Injector_Configuration.xml 2010-01-20
08:13:42 UTC (rev 1388)
@@ -1,211 +1,175 @@
<?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 an utility to initialize enterprise data for Portal. It is
- packed as a .jar.
-<!--
+ <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 an utility to initialize enterprise
data for Portal. It is packed as a .jar. <!--
and deployed under $TOMCATHOME/lib. It is started
automatically when Tomcat starts.
- -->
-
- </para>
- </section>
-
- <section
-
id="sect-Reference_Guide-Data_Injector_Configuration-OrganizationInitializer">
- <title>OrganizationInitializer</title>
- <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, each user.
- </para>
- </section>
-
- <section
-
id="sect-Reference_Guide-Data_Injector_Configuration-Service_configuration_file">
- <title>Service configuration file</title>
-
- <programlisting role="XML"><![CDATA[<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>
+ -->
+ </para>
+ </section>
+
+ <section
id="sect-Reference_Guide-Data_Injector_Configuration-OrganizationInitializer">
+ <title>OrganizationInitializer</title>
+ <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, each user.
+ </para>
+ </section>
+
+ <section
id="sect-Reference_Guide-Data_Injector_Configuration-Service_configuration_file">
+ <title>Service configuration file</title>
+
+<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>]]></programlisting>
- </section>
+ <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>
+ </section>
+
+ <section
id="sect-Reference_Guide-Data_Injector_Configuration-Parameters_for_Group">
+ <title>Parameters for Group</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis>name</emphasis> : The name of group.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>parentId</emphasis> : The id of parent group. If the parent id
is null, it means that the group is at the first level. If parent groups do not exist, it
will be created automatically.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>description</emphasis> : The description of group.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>label</emphasis> : The label of group.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>from and to</emphasis> : This group can be cloned to may
copies and each copy is marked a number from!images/number.png!images/ to!images/
number.png!.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section
id="sect-Reference_Guide-Data_Injector_Configuration-Parameters_for_User">
+ <title>Parameters for User</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis>userName</emphasis> : The ID of user.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>password</emphasis> : The password of user.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>firstName</emphasis> : The first name of user.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>lastName</emphasis> : The last name of user.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>email</emphasis> : The email of user.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>groups</emphasis> : The list of groups that user join with
membership type
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>from and to</emphasis> : This user can be cloned to may copies
and each copy is marked a number from!images/number.png!images/ to!images/ number.png!.
With this configuration we can create a range of users and put them to various groups and
other range to other groups.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The " <emphasis>auto.create.group.page.navigation</emphasis> "
Parameter Value is true or false. If TRUE it automatically create portal navigation and
page for each group. If FALSE it does not create portal navigation and page for each
group.
+ </para>
+ <para>
+ The " <emphasis>auto.create.user.page.navigation</emphasis> "
Parameter Value is number of pages that automatically created for each user.
+ </para>
+ </section>
- <section
-
id="sect-Reference_Guide-Data_Injector_Configuration-Parameters_for_Group">
- <title>Parameters for Group</title>
- <itemizedlist>
- <listitem>
- <para>
- <emphasis>name</emphasis>
- : The name of group.
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>parentId</emphasis>
- : The id of parent group. If the parent id is null, it
- means that the group is at the first level. If parent
- groups do not exist, it will be created automatically.
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>description</emphasis>
- : The description of group.
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>label</emphasis>
- : The label of group.
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>from and to</emphasis>
- : This group can be cloned to may copies and each copy is
- marked a number from!images/number.png!images/ to!images/
- number.png!.
- </para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section
-
id="sect-Reference_Guide-Data_Injector_Configuration-Parameters_for_User">
- <title>Parameters for User</title>
- <itemizedlist>
- <listitem>
- <para>
- <emphasis>userName</emphasis>
- : The ID of user.
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>password</emphasis>
- : The password of user.
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>firstName</emphasis>
- : The first name of user.
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>lastName</emphasis>
- : The last name of user.
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>email</emphasis>
- : The email of user.
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>groups</emphasis>
- : The list of groups that user join with membership type
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>from and to</emphasis>
- : This user can be cloned to may copies and each copy is
- marked a number from!images/number.png!images/ to!images/
- number.png!. With this configuration we can create a
- range of users and put them to various groups and other
- range to other groups.
- </para>
- </listitem>
- </itemizedlist>
- <para>
- The "
- <emphasis>auto.create.group.page.navigation</emphasis>
- " Parameter Value is true or false. If TRUE it automatically
- create portal navigation and page for each group. If FALSE it
- does not create portal navigation and page for each group.
- </para>
- <para>
- The "
- <emphasis>auto.create.user.page.navigation</emphasis>
- " Parameter Value is number of pages that automatically created
- for each user.
- </para>
- </section>
-
</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-01-20
08:10:24 UTC (rev 1387)
+++
portal/trunk/docs/reference-guide/en/modules/configuration/Database_Configuration.xml 2010-01-20
08:13:42 UTC (rev 1388)
@@ -1,212 +1,183 @@
<?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>
- <section id="sect-Reference_Guide-Database_Configuration-Overview">
- <title>Overview</title>
- <para>
- GateIn Portal has two different database dependencies. One is the Hibernate
- service configuration, which depends on the the Hibernate and
- c3p0 projects. The other database dependency is Java content
- repository (JCR) service, which depends on the native JDBC API
- and it can integrate with any existing datasource
- implementation.
+ <title>Database Configuration</title>
+ <section id="sect-Reference_Guide-Database_Configuration-Overview">
+ <title>Overview</title>
+ <para>
+ GateIn Portal has two different database dependencies. One is the Hibernate service
configuration, which depends on the the Hibernate and c3p0 projects. The other database
dependency is Java content repository (JCR) service, which depends on the native JDBC API
and it can integrate with any existing datasource implementation.
</para>
- <para>
- When you change the database configuration for the first time, GateIn
- will automatically generate the proper schema (assuming that
- the database user has the appropriate permissions).
+ <para>
+ When you change the database configuration for the first time, GateIn will
automatically generate the proper schema (assuming that the database user has the
appropriate permissions).
</para>
- <para>
- GateIn assumes the default encoding for your database is
- <literal>latin1</literal>
- . You will need to change this parameter for your database in
- order to work properly.
- </para>
- </section>
-
- <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).
+ <para>
+ GateIn assumes the default encoding for your database is
<literal>latin1</literal> . You will need to change this parameter for your
database in order to work properly.
</para>
-
- <programlisting role="XML"><![CDATA[<?xml
version="1.0" encoding="ISO-8859-1"?>
-<configuration>
+ </section>
+
+ <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).
+ </para>
+
+<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>]]></programlisting>
- <para>
- The first component configuration is for the Hibernate service. You can
- enter any additional properties in a hibernate.properties file,
- but GateIn will override hibernate.properties with values read
- in from this configuration file.
+</configuration>
+</programlisting>
+ <para>
+ The first component configuration is for the Hibernate service. You can enter any
additional properties in a hibernate.properties file, but GateIn will override
hibernate.properties with values read in from this configuration file.
</para>
- <para>
- The second component configuration is for the JCR datasource. The
- InitialContextInitializer 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 "jdbcexo" to "myjdbc", you also need to change JCR
- repository configuration in order that the service picks up the
- right datasource.
+ <para>
+ The second component configuration is for the JCR datasource. The
InitialContextInitializer 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
"jdbcexo" to "myjdbc", 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.
+ <para>
+ Make sure you update the database connection properties and dialect for both of these
component configurations.
</para>
- </section>
-
- <section
-
id="sect-Reference_Guide-Database_Configuration-JCR_database_configuration">
- <title>JCR database configuration</title>
- <para>
- There are two JCR configuration files that must be changed to
- support a different database. In both files,
- <emphasis role="bold">edit the dialect (and the data source
- name if necessary)</emphasis>
- .
- </para>
- <para>
- The first file is
-
<filename>02portal.war:/WEB-INF/conf/jcr/jcr-configuration.xml</filename>
- :
- </para>
-
- <programlisting><![CDATA[[...]
- <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>
- The second file is
-
<filename>02portal.war:/WEB-INF/conf/jcr/repository-configuration.xml</filename>
- :
- </para>
-
- <programlisting role="XML"> <![CDATA[...]
- <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>
+ </section>
+
+ <section
id="sect-Reference_Guide-Database_Configuration-JCR_database_configuration">
+ <title>JCR database configuration</title>
+ <para>
+ There are two JCR configuration files that must be changed to support a different
database. In both files, <emphasis role="bold">edit the dialect (and the
data source name if necessary)</emphasis> .
+ </para>
+ <para>
+ The first file is
<filename>02portal.war:/WEB-INF/conf/jcr/jcr-configuration.xml</filename> :
+ </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>
[...]
- </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>
+</programlisting>
+ <para>
+ The second file is
<filename>02portal.war:/WEB-INF/conf/jcr/repository-configuration.xml</filename>
:
+ </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>
[...]
- </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="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>
[...]
- </workspaces>
-[...]]]></programlisting>
- </section>
+ </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>
+[...]
+</programlisting>
+ </section>
</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-01-20
08:10:24 UTC (rev 1387)
+++
portal/trunk/docs/reference-guide/en/modules/configuration/Default_Portal_Configuration.xml 2010-01-20
08:13:42 UTC (rev 1388)
@@ -1,52 +1,48 @@
<?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>
- default portal will be accessed when the user doesn't specify the
- portal. For example:
<literal>http://hostname:port/portal/</literal>. And the
- default portal be used for checking at starting of tomcat to
- determine whether database is empty or not, too.
+ <title>Default Portal Configuration</title>
+ <section
id="sect-Reference_Guide-Default_Portal_Configuration-Overview">
+ <title>Overview</title>
+ <para>
+ default portal will be accessed when the user doesn't specify the portal. For
example: <literal>http://hostname:port/portal/</literal>. And the default
portal be used for checking at starting of tomcat to determine whether database is empty
or not, too.
</para>
- </section>
-
- <section
- id="sect-Reference_Guide-Default_Portal_Configuration-Configuration">
- <title>Configuration</title>
- <para>
- Configuration file path :
"02portal.war:/WEB-INF/conf/portal/portal-configuration.xml"
- </para>
-
- <programlisting role="XML"><![CDATA[<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>
+ </section>
+
+ <section
id="sect-Reference_Guide-Default_Portal_Configuration-Configuration">
+ <title>Configuration</title>
+ <para>
+ Configuration file path :
"02portal.war:/WEB-INF/conf/portal/portal-configuration.xml"
+ </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>
..........
- </init-params>
- </component-plugin>
- </component-plugins>
- </component>]]></programlisting>
- <para>
- You can see in the configuration above, we defined the classic as a
- default portal. Notes that the definition should be as a
- initial parameter of the NewPortalConfigListener
- component-plugin
+ </init-params>
+ </component-plugin>
+ </component-plugins>
+ </component>
+</programlisting>
+ <para>
+ You can see in the configuration above, we defined the classic as a default portal.
Notes that the definition should be as a initial parameter of the NewPortalConfigListener
component-plugin
</para>
- </section>
+ </section>
</section>
Modified:
portal/trunk/docs/reference-guide/en/modules/configuration/IDM_Configuration.xml
===================================================================
---
portal/trunk/docs/reference-guide/en/modules/configuration/IDM_Configuration.xml 2010-01-20
08:10:24 UTC (rev 1387)
+++
portal/trunk/docs/reference-guide/en/modules/configuration/IDM_Configuration.xml 2010-01-20
08:13:42 UTC (rev 1388)
@@ -1,135 +1,197 @@
<?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-JBoss_Identity_IDM_integration">
- <title>PicketLink IDM integration</title>
- <para>
- GateIn by default uses PicketLink IDM component to persist identity
- information (user, groups, memberships and etc.). While still
- legacy exo interfaces are used
- (org.exoplatform.services.organization) for identity management
- the wrapper implementation delegates to the PicketLink IDM
- framework. This section won't provide information about PicketLink
- IDM and its configuration - please refer to proper
- project documentation (<ulink
url="http://jboss.org/picketlink/IDM.html"/>).
- It is important to fully understand concepts behind this framework
- design before changing configuration
+<section id="sect-Reference_Guide-PicketLink_IDM_integration">
+ <title>PicketLink IDM integration</title>
+ <para>
+ &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>
- Identity model represented in 'org.exoplatform.services.organization'
- interfaces and one used in JBoss Identity IDM have some major
- differences. JBoss Identity IDM provides greater abstraction - for
- example it is possible for groups in IDM framework to form
- memberships with many parents while GateIn model allows only pure
- tree like membership structures - this requires recursive ID
- translation. Additionally GateIn membership concept needs to be
- translated into IDM Role concept. Therefore JBoss Identity IDM
- model is used in a limited way. All those translations are applied
- by the integration layer
+ <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.
</para>
- <section
-
id="sect-Reference_Guide-JBoss_Identity_IDM_integration-Configuration_files">
- <title>Configuration files</title>
- <para>
- Main configuration file is
- <emphasis role="bold">idm-configuration</emphasis>
- :
- </para>
+ <note>
+ <para>
+ It is important to fully understand the concepts behind this framework design before
changing the default configuration.
+ </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>
+ <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>
+ <para>
+ Additionally the GateIn <emphasis>membership</emphasis> concept needs to be
translated into the IDM <emphasis>Role</emphasis> concept. Therefore
<emphasis role="bold">JBoss Identity IDM</emphasis> model is used in
a limited way. All these translations are applied by the integration layer.
+ </para>
+ <section
id="sect-Reference_Guide-PicketLink_IDM_integration-Configuration_files">
+ <title>Configuration files</title>
+ <para>
+ The main configuration file is <emphasis
role="bold">idm-configuration</emphasis>:
+ </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"
/>
+ </areaspec>
- <programlisting role="XML"><![CDATA[<configuration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<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">
+
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>]]></programlisting>
+</configuration>
+</programlisting>
+ <calloutlist>
+ <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>
+ 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>
- <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>
- <emphasis
role="bold">org.exoplatform.services.organization.jbidm.JBossIDMServiceImpl</emphasis>
service has following options:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- <emphasis role="bold">hibernate.properties</emphasis> -
(properties-para) - a list of hibernate properties used to create SessionFactory that will
be injected to JBoss Identity IDM configuration registry
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis role="bold">hibernate.annotations</emphasis> -
(values-param) - list of annotated classes that will be added to hibernate configuration
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis role="bold">hibernate.mappings</emphasis> -
(values-param) - list of xml files that will be added to hibernate configuration as
mapping files
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis role="bold">config</emphasis> - (value-param) -
JBoss Identity IDM configuration file
- </para>
- </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
- </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'.
- </para>
- </listitem>
- </itemizedlist>
- <para>
+ The <emphasis
role="bold">org.exoplatform.services.organization.jbidm.JBossIDMServiceImpl</emphasis>
service has following options:
+ </para> -->
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis role="bold">hibernate.properties</emphasis> -
(properties-para) - a list of hibernate properties used to create SessionFactory that will
be injected to JBoss Identity IDM configuration registry
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold">hibernate.annotations</emphasis> -
(values-param) - list of annotated classes that will be added to hibernate configuration
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold">hibernate.mappings</emphasis> -
(values-param) - list of xml files that will be added to hibernate configuration as
mapping files
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold">config</emphasis> - (value-param) -
JBoss Identity IDM configuration file
+ </para>
+ </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
+ </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'.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </callout>
+ <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>
+ <para>
+ <emphasis
role="bold">org.exoplatform.services.organization.jbidm.JBossIDMOrganizationServiceImpl</emphasis>
service has following options:
+ </para>
+ <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'
+ </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'
+ </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'
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="bold">passwordAsAttribute</emphasis> -
(value-param) - (default false) - Specifies if password should be stored using JBoss
Identity IDM Credential object or as a plain attribute
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Additionally <emphasis
role="bold">JBossIDMOrganizationServiceImpl</emphasis> uses those
defaults to perform identity management operations
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ GateIn User interface properties fields are persisted in JBoss Identity IDM using
those attributes names: firstName, lastName, email, createdDate, lastLoginTime,
organizationId, password (if password is configured to be stored as attribute)
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ GateIn Group interface properties fields are persisted in JBoss Identity IDM
using those attributes names: label, description
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ GateIn MembershipType interface properties fields are persisted in JBoss Identity
IDM using those RoleType properties: description, owner, create_date, modified_date
+ </para>
+ </listitem>
+ </itemizedlist>
+ </callout>
+ </calloutlist>
+ </programlistingco>
+
+<!-- In calloutlist above <para>
<emphasis
role="bold">org.exoplatform.services.organization.jbidm.JBossIDMOrganizationServiceImpl</emphasis>
service has following options:
</para>
<itemizedlist>
@@ -173,84 +235,86 @@
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> -->
+<!-- MARK -->
<para>
- Sample JBoss Identity IDM configuration file is shown below. To understand all options
present in it please refer to the JBoss Identity IDM Reference Guide
+ 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><![CDATA[<jboss-identity
xmlns="urn:jboss:identity:idm:config:v1_0_beta"
+<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>
+ 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>
</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-01-20
08:10:24 UTC (rev 1387)
+++
portal/trunk/docs/reference-guide/en/modules/configuration/JavaScript_Configuration.xml 2010-01-20
08:13:42 UTC (rev 1388)
@@ -1,32 +1,18 @@
<?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>
- <para>
- Manaing Javascript scripts in an application like GateIn
- Platform is a
- critical part of the configuration work if you want
- to get good
- response time.
+ <title>Javascript Configuration</title>
+ <para>
+ Manaing Javascript scripts in an application like GateIn Platform is a critical part of
the configuration work if you want to get good response time.
</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, GateIn has a mechanism to easily register the
- libraries
- that will be loaded when the first page will be rendered.
- To do
- so, every WAR deployed in GateIn can register the js files
- thanks
- to a groovy script
- "WEB-INF/conf/script/groovy/JavascriptScript.groovy". The next
- file is the one you can find in the GateInResources.war
+ <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, GateIn has a mechanism to easily
register the libraries that will be loaded when the first page will be rendered. To do so,
every WAR deployed in GateIn can register the js files thanks to a groovy script
"WEB-INF/conf/script/groovy/JavascriptScript.groovy". The next file is the one
you can find in the GateInResources.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);
/* Application descriptor */
@@ -69,24 +55,21 @@
/* Desktop Javascripts 2 */
JavascriptService.addJavascript("eXo.desktop.UIWindow",
"/javascript/eXo/desktop/UIWindow.js", ServletContext);
</programlisting>
- <para>
- Note that even if the you register dedicated javascripts, they
- will be merged into a single
- <literal>merged.js</literal>
- file when the server will load in order to reduce 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>
<para>
- Although this optimization is useful for a production environment, you may find it
easier to deactivate this optimization while debugging your javascript. For that, you
simply need to set the java system property
<literal>exo.product.developing</literal> to
<literal>true</literal>. But if you <emphasis>want to see or use the
merged file</emphasis> you have to set this property to
<literal>false</literal>.
- You can pass the property as a JVM parameter with the
<literal>-D</literal> option in your <literal>GateIn.sh</literal>
or <literal>GateIn.bat</literal> startup script:
+ Note that even if the you register dedicated javascripts, they will be merged into a
single <literal>merged.js</literal> file when the server will load in order to
reduce 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>
<para>
+ Although this optimization is useful for a production environment, you may find it
easier to deactivate this optimization while debugging your javascript. For that, you
simply need to set the java system property
<literal>exo.product.developing</literal> to
<literal>true</literal>. But if you <emphasis>want to see or use the
merged file</emphasis> you have to set this property to
<literal>false</literal>. You can pass the property 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 type
"eXo.core.DragDrop" which acts like a namespace. Inside the associated files,
global javascript functions are used following the same namespace convention:
</para>
-<programlisting>eXo.core.DragDrop = new DragDrop() ;</programlisting>
+<programlisting>eXo.core.DragDrop = new DragDrop() ;
+</programlisting>
<para>
It is also possible to use the eXo.require() javascript method to lazy load and
evaluate some javascript code. This is quite useful from the portlet or widget
applications that will use this javascript only once. Otherwise, if the library is
reusable in several places it is better to reference it in the groovy file.
</para>
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-01-20
08:10:24 UTC (rev 1387)
+++
portal/trunk/docs/reference-guide/en/modules/configuration/Portal_Default_Permission_Configuration.xml 2010-01-20
08:13:42 UTC (rev 1388)
@@ -1,127 +1,109 @@
<?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>
- <section
-
id="sect-Reference_Guide-Portal_Default_Permission_Configuration-Overview">
- <title>Overview</title>
- <para>
- The permission configuration for the portal is defined in the
- file
- <filename>02portal.war:/WEB-INF/conf/portal/portal-configuration.xml
- </filename>
- . The component UserACL is described there along with other
- portal component configurations.
- </para>
- <para>
- It defines 5 permissions types:
+ <title>Portal Default Permission Configuration</title>
+ <section
id="sect-Reference_Guide-Portal_Default_Permission_Configuration-Overview">
+ <title>Overview</title>
+ <para>
+ The permission configuration for the portal is defined in the file
<filename>02portal.war:/WEB-INF/conf/portal/portal-configuration.xml
</filename> . The component UserACL is described there along with other portal
component configurations.
</para>
- <itemizedlist>
- <listitem>
- <para>
- <emphasis>super.user</emphasis>
- : The super user has all the rights on the platform, by
- default this user is called root
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>portal.creator.groups</emphasis>
- : This list defines all groups that will be able to
- manage the different portals, they also have the
- permission to create new portals. The format is
- "membership:/group/subgroup".
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>navigation.creator.membership.type</emphasis>
- : 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>
- <listitem>
- <para>
- <emphasis>guests.group</emphasis>
- : Contains the name of the group that is used as guest
- group. Any anonymous user becomes automatically member of
- this group when he enters the public pages.
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>access.control.workspace</emphasis>
- : 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>
- </itemizedlist>
-
- <programlisting role="XML"><![CDATA[<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>
+ <para>
+ It defines 5 permissions types:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis>super.user</emphasis> : The super user has all the rights on
the platform, by default this user is called root
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>portal.creator.groups</emphasis> : This list defines all
groups that will be able to manage the different portals, they also have the permission to
create new portals. The format is "membership:/group/subgroup".
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>navigation.creator.membership.type</emphasis> : 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>
+ <listitem>
+ <para>
+ <emphasis>guests.group</emphasis> : Contains the name of the group that
is used as guest group. Any anonymous user becomes automatically member of this group when
he enters the public pages.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>access.control.workspace</emphasis> : 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>
+ </itemizedlist>
+
+<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>]]></programlisting>
- </section>
- <section>
+ <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"><![CDATA[<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>
+<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>
+
</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-01-20
08:10:24 UTC (rev 1387)
+++
portal/trunk/docs/reference-guide/en/modules/configuration/Portal_Navigation_Configuration.xml 2010-01-20
08:13:42 UTC (rev 1388)
@@ -1,524 +1,408 @@
<?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>
- <section
- id="sect-Reference_Guide-Portal_Navigation_Configuration-Overview">
- <title>Overview</title>
- <para>
- When a user logs in he sees three types of navigation tree:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Portal Navigation
+ <title>Portal Navigation Configuration</title>
+ <section
id="sect-Reference_Guide-Portal_Navigation_Configuration-Overview">
+ <title>Overview</title>
+ <para>
+ When a user logs in he sees three types of navigation tree:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Portal Navigation
</para>
- </listitem>
- <listitem>
- <para>
- Group Navigation
+ </listitem>
+ <listitem>
+ <para>
+ Group Navigation
</para>
- </listitem>
- <listitem>
- <para>
- User Navigation
+ </listitem>
+ <listitem>
+ <para>
+ User Navigation
</para>
- </listitem>
- </itemizedlist>
- <para>
- they all are configured thanks to the usual XML
- configuration syntax in a
- file:
- "02portal.war:/WEB-INF/conf/portal/portal-configuration.xml"
- </para>
-
- <programlisting role="XML"><![CDATA[<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>
- In the previous XML file we define, for the 3 navigation
- types, some
- sets of predefined portal, groups or users that will
- have some
- XML files inside the war. 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
- hence only
- modifiable from the portal UI.
+ </listitem>
+ </itemizedlist>
+ <para>
+ they all are configured thanks to the usual XML configuration syntax in a file:
"02portal.war:/WEB-INF/conf/portal/portal-configuration.xml"
</para>
- </section>
-
- <section
-
id="sect-Reference_Guide-Portal_Navigation_Configuration-Portal_Navigation">
- <title>Portal Navigation</title>
- <para>
- The portal navigation incorporates the pages that can be
- accessed even
- when the user is not logged in (if the permission
- allow a
- public access). Several portal navigations are used for
- example
- when a company has several trademarks and each trade
- would have
- its own website.
+
+<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>
+ In the previous XML file we define, for the 3 navigation types, some sets of
predefined portal, groups or users that will have some XML files inside the war. 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 hence only modifiable from the portal
UI.
</para>
- <para>
- The configuration of a portal called "classic" is made by
- providing 4
- XML files under the directory
- portal/WEBINF/conf/portal/portal/classic:
+ </section>
+
+ <section
id="sect-Reference_Guide-Portal_Navigation_Configuration-Portal_Navigation">
+ <title>Portal Navigation</title>
+ <para>
+ The portal navigation incorporates the pages that can be accessed even when the user
is not logged in (if the permission allow a public access). Several portal navigations are
used for example when a company has several trademarks and each trade would have its own
website.
</para>
- </section>
-
- <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.
+ <para>
+ The configuration of a portal called "classic" is made by providing 4 XML
files under the directory portal/WEBINF/conf/portal/portal/classic:
</para>
- <programlisting role="XML"><![CDATA[<?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>
+ </section>
+
+ <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.
+ </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>]]></programlisting>
- <para>
- Even if not shown in the previous XML file, it is also
- possible to apply
- a nested container that can also contain
- portlets. Containers
- are then responsible of the layout of their
- children (row,
- column or tabs containers exist).
+</portal-config>
+</programlisting>
+ <para>
+ Even if not shown in the previous XML file, it is also possible to apply a nested
container that can also contain portlets. Containers are then responsible of the layout of
their children (row, column or tabs containers exist).
</para>
- <para>
- Each application references a portlet using the id
- portal#{portalName}:/{portletWarName}/{portletName}/{uniqueId}
- </para>
- <para>
- In order to define at which location GateIn Portal shall
- render the
- current page use the page-body tag.
+ <para>
+ Each application references a portlet using the id
portal#{portalName}:/{portletWarName}/{portletName}/{uniqueId}
</para>
- <para>
- The defined classic portal is accessible to "Everyone" (that
- means it
- can be accessed through the URL /portal/public/classic)
- but
- only members of the group /platform/administrators can edit
- it.
- </para>
- </section>
-
- <section
-
id="sect-Reference_Guide-Portal_Navigation_Configuration-Navigation.xml">
- <title>Navigation.xml</title>
- <para>
- This file defines all the navigation nodes the portal will
- have. The
- syntax is simple as we get nested node tags. Each node
- references a page that is defined in the next XML file.
+ <para>
+ In order to define at which location GateIn Portal shall render the current page use
the page-body tag.
</para>
- <para>
- If the label #{} is used then it means the i18n mechanism is
- activated
- and that the real label to render is taken from an
- associated
- properties file for the current locale.
+ <para>
+ The defined classic portal is accessible to "Everyone" (that means it can be
accessed through the URL /portal/public/classic) but only members of the group
/platform/administrators can edit it.
</para>
-
- <programlisting role="XML"><![CDATA[<?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 that render the current view node, the
- site map or
- the menu portlets.
+ </section>
+
+ <section
id="sect-Reference_Guide-Portal_Navigation_Configuration-Navigation.xml">
+ <title>Navigation.xml</title>
+ <para>
+ This file defines all the navigation nodes the portal will have. The syntax is simple
as we get nested node tags. Each node references a page that is defined in the next XML
file.
</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 role="bold">same</emphasis>
- value. For the other nodes the uri is composed like
- <emphasis>
- <uri>contentmanagement/fileexplorer</uri>
- </emphasis>
- where 'contentmanagement' is the name of the parent node and
- 'fileexplorer' the name of the node (
- <emphasis><name>fileexplorer</name>
</emphasis>
- ).
- </para>
- </warning>
- </section>
-
- <section
- id="sect-Reference_Guide-Portal_Navigation_Configuration-Pages.xml">
- <title>Pages.xml</title>
- <para>
- This XML file structure is very similar to portal.xml and it
- can also
- contain container tags. Each application can decide if
- it
- wishes to render the portlet border, the window state icons
- or
- the mode.
+ <para>
+ If the label #{} is used then it means the i18n mechanism is activated and that the
real label to render is taken from an associated properties file for the current locale.
</para>
-
- <programlisting role="XML"><![CDATA[<?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>
+
+<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
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 role="bold">same</emphasis> value. For the other
nodes the uri is composed like
<emphasis><uri>contentmanagement/fileexplorer</uri></emphasis>
where 'contentmanagement' is the name of the parent node and
'fileexplorer' the name of the node (
<emphasis><name>fileexplorer</name> </emphasis>
).
+ </para>
+ </warning>
+ </section>
+
+ <section
id="sect-Reference_Guide-Portal_Navigation_Configuration-Pages.xml">
+ <title>Pages.xml</title>
+ <para>
+ This XML file structure is very similar to portal.xml and it can also contain
container tags. Each application can decide if it wishes 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>]]></programlisting>
- </section>
-
- <section
-
id="sect-Reference_Guide-Portal_Navigation_Configuration-Portlet_preferences.xml">
- <title>Portlet-preferences.xml</title>
- <para>
- Porlet instances can be associated with portlet-preferences
- that override
- the one defined in the usual portlet.xml file of
- the portlet
- application WAR.
+ <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>
+ </section>
+
+ <section
id="sect-Reference_Guide-Portal_Navigation_Configuration-Portlet_preferences.xml">
+ <title>Portlet-preferences.xml</title>
+ <para>
+ Porlet instances can be associated with portlet-preferences that override the one
defined in the usual portlet.xml file of the portlet application WAR.
</para>
-
- <programlisting role="XML"><![CDATA[<?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>
+
+<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>]]></programlisting>
- </section>
-
- <section
-
id="sect-Reference_Guide-Portal_Navigation_Configuration-Group_Navigation">
- <title>Group Navigation</title>
- <para>
- Group navigations are dynamically added (mounted) to the
- user navigation
- when he logs in. This means that a user sees in
- his menu also
- all the pages that are assigned to the groups to
- which he
- belongs to.
+ <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>
+ </section>
+
+ <section
id="sect-Reference_Guide-Portal_Navigation_Configuration-Group_Navigation">
+ <title>Group Navigation</title>
+ <para>
+ Group navigations are dynamically added (mounted) to the user navigation when he logs
in. This means that a user sees in his menu also all the pages that are assigned to the
groups to which he belongs to.
</para>
- <para>
- Here only 3 XML files are necessary: navigation.xml,
- pages.xml and
- portlet-preferences.xml. The syntax is the same as
- for portal
- navigations.
+ <para>
+ Here only 3 XML files are necessary: navigation.xml, pages.xml and
portlet-preferences.xml. The syntax is the same as for portal navigations.
</para>
- <para>
- The 3 files are located in the directory:
- "portal/WEB-INF/conf/portal/group/group-name-path/" like for
- example
- "portal/WEB-INF/conf/portal/group/platform/administrators/"
- </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 is owned
- by a user. You can see that part as the user dashboard. The
- files needed are navigation.xml, pages.xml,
- portlet-preferences.xml. You will also find gadgets.xml
- (formerly called widgets.xml) which defines the gadgets
- (widgets) that will be located in the user workspace. The user
- workspace is located at the left hand side, the access is
- restricted to some privileged users, see
- <xref linkend="sect-Reference_Guide-Predefined_User_Configuration"
/>
- </para>
- <para>
- Those files are located in the directory
- "portal/WEB-INF/conf/portal/users/{userName}"
+ <para>
+ The 3 files are located in the directory:
"portal/WEB-INF/conf/portal/group/group-name-path/" like for example
"portal/WEB-INF/conf/portal/group/platform/administrators/"
</para>
-
- <programlisting role="XML"><![CDATA[<?xml
version="1.0" encoding="ISO-8859-1"?>
-<widgets>
- <owner-type>user</owner-type>
- <owner-id>root</owner-id>
+ </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 is owned by a user. You can see
that part as the user dashboard. The files needed are navigation.xml, pages.xml,
portlet-preferences.xml. You will also find gadgets.xml (formerly called widgets.xml)
which defines the gadgets (widgets) that will be located in the user workspace. The user
workspace is located at the left hand side, the access is restricted to some privileged
users, see <xref linkend="sect-Reference_Guide-Predefined_User_Configuration"
/>
+ </para>
+ <para>
+ Those files are located in the directory
"portal/WEB-INF/conf/portal/users/{userName}"
+ </para>
+
+<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>]]></programlisting>
- <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>
- </section>
+</widgets>
+</programlisting>
+ <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>
+ </section>
+
+ <section
id="sect-Reference_Guide-Portal_Navigation_Configuration-Tips">
+ <title>Tips</title>
+ <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. pages.xml:
+ </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>
+ naviguation.xml:
+ </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>
+ <warning>
+ <title>Direct external links were not a design goal</title>
+ <para>
+ Currently you cannot modify the URL using the portal interface, you must change it
in the configuration files or modify the underlying database table.
+ </para>
+ </warning>
+ </section>
- <section
id="sect-Reference_Guide-Portal_Navigation_Configuration-Tips">
- <title>Tips</title>
- <section>
- <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.
- pages.xml:
- </para>
- <programlisting><![CDATA[<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>
- naviguation.xml:</para>
+ </section>
- <programlisting><![CDATA[<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>
-
- <warning>
- <title>Direct external links were not a design goal</title>
- <para>Currently you cannot modify the URL using the portal
- interface, you
- must change it in the configuration files
- or modify the underlying
- database table.</para>
- </warning>
- </section>
- </section>
</section>
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-01-20
08:10:24 UTC (rev 1387)
+++
portal/trunk/docs/reference-guide/en/modules/configuration/Predefined_User_Configuration.xml 2010-01-20
08:13:42 UTC (rev 1388)
@@ -1,213 +1,188 @@
<?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>
- <section
- id="sect-Reference_Guide-Predefined_User_Configuration-Overview">
- <title>Overview</title>
- <para>
- To specify the initial Organization configuration, the content
- of
-
<literal>02portal.war:/WEB-INF/conf/organization/organization-configuration.xml
- </literal>
- should be edited. This file complies with the XML GateIn
- configuration schema. It lists several configuration plugins.
- </para>
- </section>
-
- <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. The initialization parameter named
- "checkDatabaseAlgorithm" determines how the creation is
- triggered. Thus, the value "entry" means that each user, group
- and membership listed in the configuration is checked each time
- GateIn is started. If not existing, it is created. The value
- "empty" means that the whole list of preconfigured users,
- groups and memberships is 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
- "membershipType"
- field of the "OrganizationConfig" plugin
- parameter.
- </para>
- <programlisting role="XML"><![CDATA[<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
- "OrganizationConfig" plugin parameter.
- </para>
- <programlisting role="XML"><![CDATA[<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>
+ <title>Predefined User Configuration</title>
+ <section
id="sect-Reference_Guide-Predefined_User_Configuration-Overview">
+ <title>Overview</title>
+ <para>
+ To specify the initial Organization configuration, the content of
<literal>02portal.war:/WEB-INF/conf/organization/organization-configuration.xml
</literal> should be edited. This file complies with the XML GateIn configuration
schema. It lists several configuration plugins.
+ </para>
+ </section>
+
+ <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.
The initialization parameter named "checkDatabaseAlgorithm" determines how the
creation is triggered. Thus, the value "entry" means that each user, group and
membership listed in the configuration is checked each time GateIn is started. If not
existing, it is created. The value "empty" means that the whole list of
preconfigured users, groups and memberships is 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 "membershipType" field
of the "OrganizationConfig" 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>
+ </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
"OrganizationConfig" 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>
...
- </collection>
-</field>]]></programlisting>
- </section>
-
- <section
id="sect-Reference_Guide-Predefined_User_Configuration-Users">
- <title>Users</title>
- <para>
- The predefined users are specified in the "membershipType"
- field of the
- "OrganizationConfig" plugin parameter.
+ </collection>
+</field>
+</programlisting>
+ </section>
+
+ <section id="sect-Reference_Guide-Predefined_User_Configuration-Users">
+ <title>Users</title>
+ <para>
+ The predefined users are specified in the "membershipType" field of the
"OrganizationConfig" plugin parameter.
</para>
-
- <programlisting role="XML"><![CDATA[<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>]]></programlisting>
- </section>
+ </collection>
+</field>
+</programlisting>
+ </section>
+
+ <section
id="sect-Reference_Guide-Predefined_User_Configuration-Plugin_for_monitoring_user_creation">
+ <title>Plugin for monitoring user creation</title>
+ <para>
+ 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>
+ </section>
- <section
-
id="sect-Reference_Guide-Predefined_User_Configuration-Plugin_for_monitoring_user_creation">
- <title>Plugin for monitoring user creation</title>
- <para>
- 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"><![CDATA[<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>
-
</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-01-20
08:10:24 UTC (rev 1387)
+++
portal/trunk/docs/reference-guide/en/modules/configuration/Skin_Configuration.xml 2010-01-20
08:13:42 UTC (rev 1388)
@@ -1,5 +1,7 @@
<?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>
@@ -17,7 +19,7 @@
</para>
<mediaobject>
<imageobject>
- <imagedata fileref="images/portal-change-skin.png"
format="PNG" />
+ <imagedata fileref="images/portal-change-skin.png"
format="PNG" width="444" />
</imageobject>
</mediaobject>
<para>
@@ -31,15 +33,16 @@
An GateIn skin contains css styles for GateIn portal's components but also shares
components that may be reused in portlets. When GateIn generates a portal page markup, it
inserts stylesheet links in the page's <literal>head</literal> tag.
</para>
-<programlisting><![CDATA[<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>]]></programlisting>
+</head>
+</programlisting>
<para>
In the snipped code above, you can see two types of links :
</para>
@@ -87,7 +90,8 @@
<programlisting>@import url(/eXoResources/skin/PortletThemes/Stylesheet.css) ;
@import url(VistaSkin/portal/webui/component/UIPortalApplicationSkin.css) ;
-@import url(VistaSkin/webui/component/Stylesheet.css) ;</programlisting>
+@import url(VistaSkin/webui/component/Stylesheet.css) ;
+</programlisting>
</section>
<section id="sect-Reference_Guide-Skin_Configuration-Portlet_Styles">
@@ -105,14 +109,13 @@
<section
id="sect-Reference_Guide-Skin_Configuration-How_to_Configure_a_Portal_Skin">
<title>How to Configure a Portal Skin</title>
-
- <section id="sect-Reference_Guide-Skin_Configuration-SkinService">
- <title>SkinService</title>
- <para>
- The <ulink
url="http://fisheye.exoplatform.org/browse/projects/portal/trunk/web...
is an GateIn service that manages portal skin, portlet styles and portlet themes (windows
borders). The code snippet below is an excerpt of the API offered by this service.
- </para>
-
-<programlisting role="JAVA"><![CDATA[/**
+ <section
id="sect-Reference_Guide-How_to_Configure_a_Portal_Skin-SkinService">
+ <title>SkinService</title>
+ <para>
+ The <ulink
url="http://fisheye.exoplatform.org/browse/projects/portal/trunk/web...
is an GateIn service that manages portal skin, portlet styles and portlet themes (windows
borders). The code snippet below is an excerpt of the API offered by this service.
+ </para>
+
+<programlisting role="JAVA">/**
* Register the stylesheet for a portal Skin.
* @param module skin module identifier
* @param skinName skin name
@@ -146,37 +149,40 @@
* @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>
- <para>
- Use the skin service to register your own portal skins, portlet styles and portlet
themes.
- </para>
- </section>
-
- <section
id="sect-Reference_Guide-Skin_Configuration-SkinConfigListener">
- <title>SkinConfigListener</title>
- <para>
- GateIn provides a servlet listener that allows you to register your own skins and
styles when your webapp starts up. Your first step is to add the listener to your portlet
app <literal>web.xml</literal>.
- </para>
+ }
+</programlisting>
+ <para>
+ Use the skin service to register your own portal skins, portlet styles and portlet
themes.
+ </para>
+ </section>
-<programlisting role="XML"><![CDATA[<web-app>
+ <section
id="sect-Reference_Guide-How_to_Configure_a_Portal_Skin-SkinConfigListener">
+ <title>SkinConfigListener</title>
+ <para>
+ GateIn provides a servlet listener that allows you to register your own skins and
styles when your webapp starts up. Your first step is to add the listener to your portlet
app <literal>web.xml</literal>.
+ </para>
+
+<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>]]></programlisting>
-</section>
- <section>
- <title>SkinConfigScript.groovy</title>
- <para>
- The <literal>SkinListener</literal> looks for the groovy script file
located in your war under:
<filename>/WEB-INF/conf/script/groovy/SkinConfigScript.groovy</filename>
- </para>
- <para>
- In this script, you have full access to the <literal>SkinService</literal>
and <literal>ServletContext</literal> which are bound as scripting variables
under the same name. As an example, take a look at the following script. It can be found
in the <literal>GateInResources.war</literal> and is used by GateIn to
register the <literal>Default</literal> portal skin and some portlet themes.
- </para>
+ </web-app>
+</programlisting>
+ </section>
+ <section
id="sect-Reference_Guide-How_to_Configure_a_Portal_Skin-SkinConfigScript.groovy">
+ <title>SkinConfigScript.groovy</title>
+ <para>
+ The <literal>SkinListener</literal> looks for the groovy script file
located in your war under:
<filename>/WEB-INF/conf/script/groovy/SkinConfigScript.groovy</filename>
+ </para>
+ <para>
+ In this script, you have full access to the
<literal>SkinService</literal> and
<literal>ServletContext</literal> which are bound as scripting variables under
the same name. As an example, take a look at the following script. It can be found in the
<literal>GateInResources.war</literal> and is used by GateIn 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"]);
@@ -184,114 +190,123 @@
SkinService.addTheme("MacStyle",
["MacTheme","MacGray","MacGreenSteel","MacBlack"]);
SkinService.addTheme("VistaStyle",
["VistaTheme","VistaBlue"]);
</programlisting>
- <para>
- The syntax of addTheme() is: <programlisting><![CDATA[addTheme(String
categoryName, List<String> themesName)]]></programlisting>
- </para>
- <para>
- So, to provide your own skin you could use the following:
<programlisting><![CDATA[SkinService.addSkin("mywebapp/MyPortlet",
"MyPortalSkin", "/mywebapp/skin/Stylesheet.css",
ServletContext);]]></programlisting>
- </para>
- <para>
- This simple line would register a styleesheet for a portlet named
<literal>MyPortlet</literal> in a portlet app named
<literal>mywebapp</literal>. The stylesheet would be used when a skin named
<literal>MyPortalSkin</literal> is selected in portal.
- </para>
- <para>
- The syntax of addSkin() is: <programlisting><![CDATA[addSkin(String module,
String skinName, String cssPath, ServletContext scontext, boolean
overwrite)]]></programlisting>
- </para>
- <para>
- <literal>overwrite</literal> is optional, its default value is
"false". If its value is true, the later call of addSkin() for the same skin key
(combination of module + skinName) replaces the skin of the previous call.
- </para>
- <para>
- Similarly, to configure a particular portal you can use the following :
- </para>
-
-<programlisting>SkinService.addSkin("myportalname", "skin",
"/path/to/skin/Stylesheet.css", ServletContext);</programlisting>
- <para>
- The syntax of addPortalSkin() is:
<programlisting><![CDATA[addPortalSkin(String module, String skinName, String
cssPath, ServletContext scontext, boolean overwrite)]]></programlisting>
- </para>
- </section>
- </section>
- <section>
+ <para>
+ The syntax of addTheme() is:
+<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>
+ </para>
+ <para>
+ This simple line would register a styleesheet for a portlet named
<literal>MyPortlet</literal> in a portlet app named
<literal>mywebapp</literal>. The stylesheet would be used when a skin named
<literal>MyPortalSkin</literal> is selected in portal.
+ </para>
+ <para>
+ The syntax of addSkin() is:
+<programlisting>addSkin(String module, String skinName, String cssPath,
ServletContext scontext, boolean overwrite)
+</programlisting>
+ </para>
+ <para>
+ <literal>overwrite</literal> is optional, its default value is
"false". If its value is true, the later call of addSkin() for the same skin key
(combination of module + skinName) replaces the skin of the previous call.
+ </para>
+ <para>
+ Similarly, to configure a particular portal you can use the following :
+ </para>
+
+<programlisting>SkinService.addSkin("myportalname", "skin",
"/path/to/skin/Stylesheet.css", ServletContext);
+</programlisting>
+ <para>
+ The syntax of addPortalSkin() is:
+<programlisting>addPortalSkin(String module, String skinName, String cssPath,
ServletContext scontext, boolean overwrite)
+</programlisting>
+ </para>
+ </section>
+
+ </section>
+
+ <section id="sect-Reference_Guide-Skin_Configuration-Tips_and_Tricks">
<title>Tips and Tricks</title>
- <section>
+ <section
id="sect-Reference_Guide-Tips_and_Tricks-Easier_css_debuggin">
<title>Easier css debuggin</title>
- <para>
- By default, CSS files are cached and their imports are merged, at the server side,
into a single CSS file to reduce the number of HTTP requests from the browser to the
server.
- </para>
- <para>
- The <literal>ServletContext</literal> parameter is there to allow the
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, you may find it
easier to deactivate this optimization while debugging your stylesheets. For that, you
simply need to set the java system property
<literal>exo.product.developing</literal> to
<literal>true</literal>.
- </para>
- <para>
- For example, you can pass the property as a JVM parameter with the
<literal>-D</literal> option in your <literal>GateIn.sh</literal>
startup script: {code} EXO{code}
- </para>
- <orderedlist numeration="arabic">
- <listitem>
+ <para>
+ By default, CSS files are cached and their imports are merged, at the server side,
into a single CSS file to reduce the number of HTTP requests from the browser to the
server.
+ </para>
+ <para>
+ The <literal>ServletContext</literal> parameter is there to allow the
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, you may find it
easier to deactivate this optimization while debugging your stylesheets. For that, you
simply need to set the java system property
<literal>exo.product.developing</literal> to
<literal>true</literal>.
+ </para>
+ <para>
+ For example, you can pass the property as a JVM parameter with the
<literal>-D</literal> option in your <literal>GateIn.sh</literal>
startup script: {code} EXO{code}
+ </para>
+ <orderedlist numeration="arabic">
+ <listitem>
+ <para>
+ 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">
+ <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. You can change this icon by adding an image in the directory :
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ $project/portlet/myportlets/src/main/webapp/skin/DefaultSkin/portletIcons/<emphasis
role="bold">and by naming the icon after the portlet,
eg:</emphasis>ExoPortlet.png
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ For example, in portal we have an account portlet named AccountPortlet, the icon is
located in :
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ portal/tags/2.1.1/portlet/exoadmin/src/main/webapp/skin/DefaultSkin/portletIcons/AccountPortlet.png
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section
id="sect-Reference_Guide-Tips_and_Tricks-Set_the_default_skin_for_Portal">
+ <title> Set the default skin for Portal </title>
+ <para>
+ When not configured, the default skin of portal is Default. If you want to change
this value (to Mac skin, Vista skin, or your own), 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>
+ </section>
+
+ <section
id="sect-Reference_Guide-Tips_and_Tricks-Some_CSS_techniques">
+ <title>Some CSS techniques</title>
+ <para>
+ Before studying GateIn CSS, make sure you already have some experience with css and
read the css spec at
http://www.w3.org/TR/REC-CSS2/selector.html
+ </para>
+ <para>
+ GateIn relies heavily on CSS to create the layout and special effects for the UI.
Below we explain some common techniques you may find often inside GateIn's markup. We
explain them here to help you better understand GateIn generated markup, ease css issues
fixing or get inspration for styling your own apps.
+ </para>
+ <section
id="sect-Reference_Guide-Some_CSS_techniques-Decorator_pattern">
+ <title>Decorator pattern</title>
<para>
- warning("This is option may cause display bugs with certain browsers like
Internet Explorer")
+ The decorator is a pattern to create a contour or a curve around an area. In order
to achieve this effect you need to create 9 cells. The BODY is the central area that you
want to decorate. The other 8 cells are distributed around the BODY cell. You can use the
width, height and background image properties to achieve any decoration effect that you
want.
</para>
- </listitem>
- </orderedlist>
- </section>
- <section>
- <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. You can change this icon by adding an image in the directory :
- </para>
- <itemizedlist>
- <listitem>
- <para>
- $project/portlet/myportlets/src/main/webapp/skin/DefaultSkin/portletIcons/<emphasis
role="bold">and by naming the icon after the portlet,
eg:</emphasis>ExoPortlet.png
- </para>
- </listitem>
- </itemizedlist>
- <para>
- For example, in portal we have an account portlet named AccountPortlet, the icon is
located in :
- </para>
- <itemizedlist>
- <listitem>
- <para>
- portal/tags/2.1.1/portlet/exoadmin/src/main/webapp/skin/DefaultSkin/portletIcons/AccountPortlet.png
- </para>
- </listitem>
- </itemizedlist>
- </section>
- <section>
- <title>
- Set the default skin for Portal
- </title>
- <para>
- When not configured, the default skin of portal is Default. If you want to change this
value (to Mac skin, Vista skin, or your own), add a skin tag in the
<literal>portal.xml</literal> that defines your portal:
- </para>
-
-<programlisting role="XML"><![CDATA[<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>
-
- <section
id="sect-Reference_Guide-Skin_Configuration-Some_CSS_techniques">
- <title>Some CSS techniques</title>
- <para>
- Before studying GateIn CSS, make sure you already have some experience with css and
read the css spec at
http://www.w3.org/TR/REC-CSS2/selector.html
- </para>
- <para>
- GateIn relies heavily on CSS to create the layout and special effects for the UI.
Below we explain some common techniques you may find often inside GateIn's markup. We
explain them here to help you better understand GateIn generated markup, ease css issues
fixing or get inspration for styling your own apps.
- </para>
-
- <section
id="sect-Reference_Guide-Skin_Configuration-Decorator_pattern">
- <title>Decorator pattern</title>
- <para>
- The decorator is a pattern to create a contour or a curve around an area. In order to
achieve this effect you need to create 9 cells. The BODY is the central area that you want
to decorate. The other 8 cells are distributed around the BODY cell. You can use the
width, height and background image properties to achieve any decoration effect that you
want.
- </para>
-
-<programlisting role="HTML"><![CDATA[
+
+<programlisting role="HTML">
-----------------------------------------------------------------------
| | | |
| TopLeft | TopCenter | TopRight |
@@ -305,50 +320,54 @@
| 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>
-
- <section
id="sect-Reference_Guide-Skin_Configuration-Left_margin_left_pattern">
- <title>Left margin left pattern</title>
- <para>
- Left margin left pattern is a technique to create 2 blocks side by side. The left
block will have a fixed size and the right block will take the rest of the available
space. When the user resizes the browser the added or removed space will be taken from the
right block.
- </para>
-
-<programlisting role="HTML"><![CDATA[
+ </section>
+
+ <section
id="sect-Reference_Guide-Some_CSS_techniques-Left_margin_left_pattern">
+ <title>Left margin left pattern</title>
+ <para>
+ Left margin left pattern is a technique to create 2 blocks side by side. The left
block will have a fixed size and the right block will take the rest of the available
space. When the user resizes the browser the added or removed space will be taken from the
right block.
+ </para>
+
+<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>]]></programlisting>
+<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>
+
+ </section>
+
</section>
- </section>
- </section>
+
<section
id="sect-Reference_Guide-Skin_Configuration-How_to_create_a_new_skin">
<title>How to create a new skin</title>
<para>
@@ -367,10 +386,10 @@
@import url(MyPortalSkin/webui/component/Stylesheet.css) ;
</programlisting>
<para>
- Finally, you have to definy the name of new skin and the image preview for the
<emphasis>Skin Settings</emphasis> action in <emphasis> "User
Workspace" </emphasis> <!-- <link linkend="User
Workspace">User Workspace</link> -->.
+ Finally, you have to definy the name of new skin and the image preview for the
<emphasis>Skin Settings</emphasis> action in <emphasis> "User
Workspace" </emphasis> <!-- <link linkend="User
Workspace">User Workspace</link> -->.
</para>
<para>
- By default, if you don not set new name for skin, its name is
<literal>label></literal>. Looking in the file and add yout new name here.
+ By default, if you don not set new name for skin, its name is
<literal>label></literal>. Looking in the file and add yout new name
here.
</para>
<programlisting>
@@ -411,12 +430,14 @@
Firstly, you have to definy the new theme in
<literal>WEB-INF/conf/script/groovy/SkinConfigScript.groovy</literal> in your
<literal>Ressource</literal> (for example, in the project MyPortal, you can
put it in <literal>GateInResourcesCp060508</literal>).
</para>
-<programlisting>SkinService.addTheme("MyPortal-MacTheme",
["MacGray","MacBlue","MacBlack"]);</programlisting>
+<programlisting>SkinService.addTheme("MyPortal-MacTheme",
["MacGray","MacBlue","MacBlack"]);
+</programlisting>
<para>
Secondly, you put all your new theme into <literal>folder
skinyourSkin</literal> and create new file
<literal>Stylesheet.css</literal> here. In this file, you will import all
links to your CSS. For example in MyPortal project.
</para>
-<programlisting>@import url(MyPortalSkin/PortletThemes/Stylesheet.css)
;</programlisting>
+<programlisting>@import url(MyPortalSkin/PortletThemes/Stylesheet.css) ;
+</programlisting>
<para>
You can see here, in the
<literal>GateInResourcesCp060508/skin/MyPortalSkin/PortletThemes/Stylesheet.css</literal>,
you put all your CSS of new theme.
</para>
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-01-20
08:10:24 UTC (rev 1387)
+++
portal/trunk/docs/reference-guide/en/modules/development/Accessing_User_Profile.xml 2010-01-20
08:13:42 UTC (rev 1388)
@@ -1,13 +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-Accessing_User_Profile">
- <title>Accessing User Profile</title>
- <para>
- To retrieve the logged in user you can do as follows :
+ <title>Accessing User Profile</title>
+ <para>
+ To retrieve the logged in user you can do as follows :
</para>
-
- <programlisting role="JAVA"><![CDATA[// Alternative context:
WebuiRequestContext context = WebuiRequestContext.getCurrentInstance() ;
+
+<programlisting role="JAVA">// Alternative context: WebuiRequestContext
context = WebuiRequestContext.getCurrentInstance() ;
PortalRequestContext context = PortalRequestContext.getCurrentInstance() ;
// Get the id of the user logged
String userId = context.getRemoteUser();
@@ -22,20 +24,25 @@
String lastName = user.getLastName();
String email = user.getEmail();
}
-}]]></programlisting>
- <para>
- Alternatives for retrieving the Organization Service
+}
+</programlisting>
+ <para>
+ Alternatives for retrieving the Organization Service
</para>
- <orderedlist>
- <listitem>
- <programlisting role="JAVA"><![CDATA[OrganizationService
service = (OrganizationService)
-
ExoContainerContext.getCurrentContainer().getComponentInstanceOfType(OrganizationService.class);]]></programlisting>
- </listitem>
- <listitem>
- <programlisting role="JAVA"><![CDATA[OrganizationService
service = (OrganizationService)
-
PortalContainer.getInstance().getComponentInstanceOfType(OrganizationService.class);]]></programlisting>
- </listitem>
- </orderedlist>
+ <orderedlist>
+ <listitem>
+
+<programlisting role="JAVA">OrganizationService service =
(OrganizationService)
+
ExoContainerContext.getCurrentContainer().getComponentInstanceOfType(OrganizationService.class);
+</programlisting>
+ </listitem>
+ <listitem>
+
+<programlisting role="JAVA">OrganizationService service =
(OrganizationService)
+ PortalContainer.getInstance().getComponentInstanceOfType(OrganizationService.class);
+</programlisting>
+ </listitem>
+ </orderedlist>
</section>
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-01-20
08:10:24 UTC (rev 1387)
+++
portal/trunk/docs/reference-guide/en/modules/development/Ajax_Loading_Mask_Layer_Deactivation.xml 2010-01-20
08:13:42 UTC (rev 1388)
@@ -1,124 +1,110 @@
<?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">
- <title>Overview</title>
- <para>
- In this article, you will learn:
+<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">
+ <title>Overview</title>
+ <para>
+ In this article, you will learn:
</para>
- <itemizedlist>
- <listitem>
- <para>
- Purpose of ajax-loading mask.
+ <itemizedlist>
+ <listitem>
+ <para>
+ Purpose of ajax-loading mask.
</para>
- </listitem>
- <listitem>
- <para>
- How to deactivate ajax-loading mask.
+ </listitem>
+ <listitem>
+ <para>
+ How to deactivate ajax-loading mask.
</para>
- </listitem>
- <listitem>
- <para>
- Synchronous / Asynchronous issue.
+ </listitem>
+ <listitem>
+ <para>
+ Synchronous / Asynchronous issue.
</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section
-
id="sect-Reference_Guide-Deactivation_of_the_Ajax_Loading_Mask_Layer-Purpose_of_requirement">
- <title>Purpose of requirement</title>
- <itemizedlist>
- <listitem>
- <para>
- Loading mask layer is displayed after ajax-call for
- blocking GUI to
- prevent user's action until the the
- ajax-request is
- completed.
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section
id="sect-Reference_Guide-Deactivation_of_the_Ajax_Loading_Mask_Layer_-Purpose_of_requirement">
+ <title>Purpose of requirement</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Loading mask layer is displayed after ajax-call for blocking GUI to prevent
user's action until the the ajax-request is completed.
</para>
- </listitem>
- <listitem>
- <para>
- Sometimes portal needs to be ready for user
- instructions without waiting
- previous instructions
- completed. So mask layer may need
- to be deactivated.
- </para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section
-
id="sect-Reference_Guide-Deactivation_of_the_Ajax_Loading_Mask_Layer-How_to_deactivate_ajax_loading_mask_in_your_code">
- <title>How to deactivate ajax-loading mask in your code</title>
- <para>
- To generate script to make an asynchronous ajax-call, we use
- uicomponent.doAsync() method instead of uicomponent.event()
- method.
+ </listitem>
+ <listitem>
+ <para>
+ Sometimes portal needs to be ready for user instructions without waiting previous
instructions completed. So mask layer may need to be deactivated.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section
id="sect-Reference_Guide-Deactivation_of_the_Ajax_Loading_Mask_Layer_-How_to_deactivate_ajax_loading_mask_in_your_code">
+ <title>How to deactivate ajax-loading mask in your code</title>
+ <para>
+ To generate script to make an asynchronous ajax-call, we use uicomponent.doAsync()
method instead of uicomponent.event() method.
</para>
- <para>
- Here is an example:
+ <para>
+ Here is an example:
</para>
- <programlisting><![CDATA[<a
href="<%=uicomponent.doAsync(action, beanId, params)%>"
alt="">Asynchronous</a>]]></programlisting>
- <para>
- Method doAsync() automatically adds a parameter into parameters
- list. Parameter async
- <emphasis>param = new Parameter(AJAX</emphasis>
- ASYNC,"true"); (AJAX
- <emphasis>ASYNC == "ajax</emphasis>
- async")
- </para>
- <para>
- After all, its call method event() to generate script that make Ajax
- Request. This request is asynchronous and ajax-loading mask
- will not displayed.
+
+<programlisting><a href="<%=uicomponent.doAsync(action, beanId,
params)%>" alt="">Asynchronous</a>
+</programlisting>
+ <para>
+ Method doAsync() automatically adds a parameter into parameters list. Parameter async
<emphasis>param = new Parameter(AJAX</emphasis> ASYNC,"true"); (AJAX
<emphasis>ASYNC == "ajax</emphasis> async")
</para>
- <note>
- <orderedlist><listitem><para>
- You still also make an asynchronous request by using method
- uicomponent.event(). Using this way, you must add asyncparam
- manually.</para></listitem>
- <listitem><para>
- GUI is blocked so that user can do only one action at a time
- (Request seems to be synchronous). But in fact ajax request
- always be asynchronous. See Synchronous issue section.
- </para></listitem>
- </orderedlist>
- </note>
- </section>
-
- <section
-
id="sect-Reference_Guide-Deactivation_of_the_Ajax_Loading_Mask_Layer-Synchronous_issue">
- <title>Synchronous issue</title>
- <para>
- Almost web browser such as (IE, Chrome, Safari .. ) support ajax requests
- in two modes: Synchronous / Asynchronous with boolean
- value of bAsyn parameter.
+ <para>
+ After all, its call method event() to generate script that make Ajax Request. This
request is asynchronous and ajax-loading mask will not displayed.
</para>
- <programlisting>var bAsync = false; // Synchronous
-request.open(instance.method, instance.url, bAsync);</programlisting>
- <para>
- But in Mozilla Firefox versions prior to 3.5 it wouldn't support synchronous
request.
- </para>
- <programlisting>var bAsync = false; // Synchronous
-request.open(instance.method, instance.url, bAsync); // Firefox will not
execute</programlisting>
- <para>
- So bAsync is set to always be true (Ajax request to always be asynchronous).
- </para>
- <programlisting>// Asynchronous request
+ <note>
+ <orderedlist>
+ <listitem>
+ <para>
+ You still also make an asynchronous request by using method uicomponent.event().
Using this way, you must add asyncparam manually.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ GUI is blocked so that user can do only one action at a time (Request seems to be
synchronous). But in fact ajax request always be asynchronous. See Synchronous issue
section.
+ </para>
+ </listitem>
+ </orderedlist>
+ </note>
+ </section>
+
+ <section
id="sect-Reference_Guide-Deactivation_of_the_Ajax_Loading_Mask_Layer_-Synchronous_issue">
+ <title>Synchronous issue</title>
+ <para>
+ Almost web browser such as (IE, Chrome, Safari .. ) support ajax requests in two
modes: Synchronous / Asynchronous with boolean value of bAsyn parameter.
+ </para>
+
+<programlisting>var bAsync = false; // Synchronous
+request.open(instance.method, instance.url, bAsync);
+</programlisting>
+ <para>
+ But in Mozilla Firefox versions prior to 3.5 it wouldn't support synchronous
request.
+ </para>
+
+<programlisting>var bAsync = false; // Synchronous
+request.open(instance.method, instance.url, bAsync); // Firefox will not execute
+</programlisting>
+ <para>
+ So bAsync is set to always be true (Ajax request to always be asynchronous).
+ </para>
+
+<programlisting>// Asynchronous request
request.open(instance.method, instance.url, true);
</programlisting>
- <para>
- As a consequence that Ajax Request will always be asynchronous.
+ <para>
+ As a consequence that Ajax Request will always be asynchronous.
</para>
- </section>
+ </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-01-20
08:10:24 UTC (rev 1387)
+++
portal/trunk/docs/reference-guide/en/modules/development/Dynamic_Layouts.xml 2010-01-20
08:13:42 UTC (rev 1388)
@@ -1,64 +1,49 @@
<?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>
- <section id="sect-Reference_Guide-Dynamic_Layouts-Overview">
- <title>Overview</title>
- <para>
- The traditional way of rendering a portal page is a static one where you
- need a template, usually a jsp page, for each layout (2
- columns, 3 columns and so on). That makes you depend on the
- integrator or developers as for each new layout you will need
- to ask for a custom development.
+ <title>Dynamic Layouts</title>
+ <section id="sect-Reference_Guide-Dynamic_Layouts-Overview">
+ <title>Overview</title>
+ <para>
+ The traditional way of rendering a portal page is a static one where you need a
template, usually a jsp page, for each layout (2 columns, 3 columns and so on). That makes
you depend on the integrator or developers as for each new layout you will need to ask for
a custom development.
</para>
- <para>
- GateIn has a dynamic way which creates a tree of nested UI containers
- that contain portlets as shown in the picture below. Each
- container is responsible for rendering its children. In the
- picture, the main container renders its children in several
- rows while the nested container displays them as columns.
- </para>
- <para>
- Furthermore, by manipulating the tree using the WYSIWYG editor, it allows you
to
- create new containers, define how they will render their
- children, add new portlets.
+ <para>
+ GateIn has a dynamic way which creates a tree of nested UI containers that contain
portlets as shown in the picture below. Each container is responsible for rendering its
children. In the picture, the main container renders its children in several rows while
the nested container displays them as columns.
</para>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/portal.gif" format="GIF"
/>
- </imageobject>
- </mediaobject>
- </section>
-
- <section
-
id="sect-Reference_Guide-Dynamic_Layouts-Advanced_Drag_and_Drop_mechanism">
- <title>Advanced Drag and Drop mechanism</title>
- <para>
- As most portal use the static layout mechanism, they can only drag
- portlets from one static location, let's say a column, to
- another one.
+ <para>
+ Furthermore, by manipulating the tree using the WYSIWYG editor, it allows you to
create new containers, define how they will render their children, add new portlets.
</para>
- <para>
- With GateIn Portal, it is possible to also drag the UI containers and the
- portlets and drop them in containers that are deeper or upper
- in the Portal component tree. This feature is unique and not
- just a tool!
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/portal.gif" format="GIF" />
+ </imageobject>
+ </mediaobject>
+ </section>
+
+ <section
id="sect-Reference_Guide-Dynamic_Layouts-Advanced_Drag_and_Drop_mechanism">
+ <title>Advanced Drag and Drop mechanism</title>
+ <para>
+ As most portal use the static layout mechanism, they can only drag portlets from one
static location, let's say a column, to another one.
</para>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/image3.jpg" format="JPG"
/>
- </imageobject>
- </mediaobject>
- </section>
-
- <section id="sect-Reference_Guide-Dynamic_Layouts-Summary">
- <title>Summary</title>
- <para>
- With this innovative concept of dynamic layout, you can easily create
- portal pages with complex layout.
+ <para>
+ With GateIn Portal, it is possible to also drag the UI containers and the portlets and
drop them in containers that are deeper or upper in the Portal component tree. This
feature is unique and not just a tool!
</para>
- </section>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/image3.jpg" format="JPG"
width="444" />
+ </imageobject>
+ </mediaobject>
+ </section>
+
+ <section id="sect-Reference_Guide-Dynamic_Layouts-Summary">
+ <title>Summary</title>
+ <para>
+ With this innovative concept of dynamic layout, you can easily create portal pages
with complex layout.
+ </para>
+ </section>
</section>
Modified:
portal/trunk/docs/reference-guide/en/modules/development/Internationalization_Configuration.xml
===================================================================
---
portal/trunk/docs/reference-guide/en/modules/development/Internationalization_Configuration.xml 2010-01-20
08:10:24 UTC (rev 1387)
+++
portal/trunk/docs/reference-guide/en/modules/development/Internationalization_Configuration.xml 2010-01-20
08:13:42 UTC (rev 1388)
@@ -1,31 +1,38 @@
<?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>
+ <title>Internationalization Configuration</title>
<section
id="sect-Reference_Guide-Internationalization_Configuration-Overview">
<title>Overview</title>
<para>
All aspects of internationalization in GateIn products are covered. You should have a
general knowledge of Internationalization in Java products. Sun created a <ulink
url="http://java.sun.com/docs/books/tutorial/i18n/TOC.html">...
internationalization tutorial</ulink> .
</para>
- <para>All embedded applications contains property files for various
languages. They are packaged with the portlets applications in a WEB-INF/classes/locale/
directory.</para>
- <para>
- You should notice that
- </para>
- <itemizedlist>
- <listitem>
- <para>
- the files are located in the <literal>classes</literal> folder of your
WEB-INF, this way they are loaded by the ClassLoader.
- </para>
- </listitem>
- <listitem>
- <para>
- all resource files are in a subfolder named <literal>locale</literal>
- </para>
- </listitem>
- </itemizedlist>
- <para>For instance you will find the translations for the
NavigationPortlet in
<literal>web.war/WEB-INF/classes/locale/portlet/portal</literal></para>
- <programlisting><![CDATA[NavigationPortlet_de.properties
+ <para>
+ All embedded applications contains property files for various languages. They are
packaged with the portlets applications in a WEB-INF/classes/locale/ directory.
+ </para>
+ <para>
+ You should notice that
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ the files are located in the <literal>classes</literal> folder of your
WEB-INF, this way they are loaded by the ClassLoader.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ all resource files are in a subfolder named <literal>locale</literal>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ For instance you will find the translations for the NavigationPortlet in
<literal>web.war/WEB-INF/classes/locale/portlet/portal</literal>
+ </para>
+
+<programlisting>NavigationPortlet_de.properties
NavigationPortlet_en.properties
NavigationPortlet_es.properties
NavigationPortlet_fr.properties
@@ -33,225 +40,211 @@
NavigationPortlet_ru.properties
NavigationPortlet_uk.properties
NavigationPortlet_ar.xml
-]]></programlisting>
- <para>Inside those file we find typical
<literal>key=value</literal> Java EE properties. For example the French
one:</para>
- <programlisting><![CDATA[javax.portlet.title=Portlet
Navigation]]></programlisting>
+</programlisting>
+ <para>
+ Inside those file we find typical <literal>key=value</literal> Java EE
properties. For example the French one:
+ </para>
+
+<programlisting>javax.portlet.title=Portlet Navigation
+</programlisting>
+ <para>
+ Furthermore there are properties files in the portal itself. They form together the
<emphasis role="bold">portal resource bundle</emphasis>. 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.
+ </para>
+ <note>
+ <title>Translation in XML format</title>
<para>
- Furthermore there are properties files in the portal itself. They form together the
<emphasis role="bold">portal resource bundle</emphasis>.
- 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.
+ 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>
- <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.
- </para>
- <para>
- More information are available here: <xref
linkend="sect-Reference_Guide-XML_Resources_Bundles" />
- </para>
- </note>
- </section>
- <section id="sect-Reference_Guide-I18N-Locale-Configuration">
- <title>Locales configuration</title>
- <para>
- Various languages are available in the shipped portal, one may want to add or
remove languages.
- This configuration will define the list of languages in the "Change
Language" section of the portal that the user can pick from.
- </para>
<para>
- In the
<filename>02portal.war:/WEB-INF/conf/common/common-configuration.xml</filename>
file of your installation you can find the following section:
+ More information are available here: <xref
linkend="sect-Reference_Guide-XML_Resources_Bundles" />
</para>
+ </note>
+ </section>
+
+ <section
id="sect-Reference_Guide-Internationalization_Configuration-Locales_configuration">
+ <title>Locales configuration</title>
+ <para>
+ Various languages are available in the shipped portal, one may want to add or remove
languages. This configuration will define the list of languages in the "Change
Language" section of the portal that the user can pick from.
+ </para>
+ <para>
+ In the
<filename>02portal.war:/WEB-INF/conf/common/common-configuration.xml</filename>
file of your installation you can find 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>
+ <para>
+ The configuration points to the locale configuration file such as the following one
located in
<filename>02portal.war:/WEB-INF/conf/common/locales-config.xml</filename>:
+ </para>
+ <programlistingco>
+ <areaspec>
+ <area coords="4"
id="area-Reference_Guide-i18n.locales.configuration.locale" />
+ <area coords="5"
id="area-Reference_Guide-i18n.locales.configuration.output-encoding" />
+ <area coords="6"
id="area-Reference_Guide-i18n.locales.configuration.input-encoding" />
+ <area coords="7"
id="area-Reference_Guide-i18n.locales.configuration.description" />
+ <area coords="22"
id="area-Reference_Guide-i18n.locales.configuration.orientation" />
+ </areaspec>
-<programlisting role="XML"><![CDATA[<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>
- The configuration points to the locale configuration file such as the following one
located in
<filename>02portal.war:/WEB-INF/conf/common/locales-config.xml</filename>:
- </para>
-<programlistingco>
- <areaspec>
- <area id="i18n.locales.configuration.locale"
coords='4' />
- <area id="i18n.locales.configuration.output-encoding"
coords='5' />
- <area id="i18n.locales.configuration.input-encoding"
coords='6' />
- <area id="i18n.locales.configuration.description"
coords='7' />
- <area id="i18n.locales.configuration.orientation"
coords='22' />
- </areaspec>
-<programlisting><![CDATA[<?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>
-]]></programlisting>
-<calloutlist>
- <callout arearefs="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 "ar" is Arabic.
- </para>
- </callout>
- <callout
arearefs="i18n.locales.configuration.output-encoding">
- <para>
- <emphasis>output-encoding</emphasis>
- Encoding It's highly recommended to always use <emphasis
role="bold">UTF-8</emphasis>.
- </para>
- </callout>
- <callout
arearefs="i18n.locales.configuration.input-encoding">
- <para>
- <emphasis>input-encoding</emphasis>
- In the java implementation, the encoding parameters will be used
for the request response stream. The input-encoding parameter will be used for request
setCharacterEncoding(..).
- </para>
- </callout>
- <callout
arearefs="i18n.locales.configuration.description">
- <para>
- <emphasis>description</emphasis>
- Description for the language
- </para>
- </callout>
- <callout
arearefs="i18n.locales.configuration.orientation">
- <para>
- <emphasis>description</emphasis>
- The default orientation of text and images is Left-To-Right.
- GateIn supports <emphasis
role="bold">Right-To-Left</emphasis> orientation. Therefore you can
define the orientation to use as explained in <xref
linkend="sect-Reference_Guide-RTL_Right_To_Left_Framework"/>.
- </para>
- </callout>
- </calloutlist>
- </programlistingco>
- </section>
- <section>
- <title>ResourceBundleService</title>
- <para>
- The resource bundle service is configured in:
<filename>02portal.war:/WEB-INF/conf/common/common-configuration.xml</filename>:
- </para>
- <programlistingco>
- <areaspec>
- <area id="i18n.rb.service.classpath_resources"
coords='6' />
- <area id="i18n.rb.service.init_resources"
coords='11' />
- <area id="i18n.rb.service.portal_resource_names"
coords='24' />
- </areaspec>
- <programlisting><![CDATA[<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="i18n.rb.service.classpath_resources">
- <para>
- <emphasis>classpath.resources</emphasis>
- We will talk later about classpath.resources
- </para>
- </callout>
- <callout arearefs="i18n.rb.service.init_resources">
- <para>
- <emphasis>init.resources</emphasis>
- TODO
- </para>
- </callout>
- <callout
arearefs="i18n.rb.service.portal_resource_names">
- <para>
- <emphasis>portal.resource.names</emphasis>
- Defines all resources that belong to the <emphasis>Portal
Resource Bundle</emphasis>.
- This means that these resources are merged to a single resource
bundle which is accessible from anywhere in GateIn products.
- As mentioned, all these keys are located in the same bundle, which
is separated from the navigation resource bundles.
- </para>
- </callout>
- </calloutlist>
- </programlistingco>
- </section>
- <section>
- <title>Navigation Resource Bundles</title>
- <para>
- There is a resource bundle for each navigation. A navigation can exist for
user, groups, and portal. In the example above you see
- bundle definitions for the navigation of the classic portal and of four
different groups. Each of these resource bundles lives in
- a different sphere, they are independent of each other and they do not
belong to the portal.resource.names parameter (because they
- are not mentioned in portal.resource.names).
- </para>
- <para>
- As you learned in the introduction you must put the properties for a group
in the WEB-INF/classes/locale/navigation/group/ folder.
- Such as:
<literal>/WEB-INF/classes/locale/navigation/group/organization/management/executive-board_en.properties</literal>
- The folder and file names must correspond to the group hierarchy. The
group name "executive-board" is followed by the iso 639 code.
- For each language you defined in the LocalesConfig you must provide a
resource file.
- If you ever change the name of a group you also need to change the name of
the folder and/or files of the correspondent navigation
- resource bundles.
- Content of executive-board_en.properties:
- <programlisting>organization.title=Organization
+ <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 "ar" is Arabic.
+ </para>
+ </callout>
+ <callout
arearefs="area-Reference_Guide-i18n.locales.configuration.output-encoding">
+ <para>
+ <emphasis>output-encoding</emphasis> Encoding It's highly
recommended to always use <emphasis role="bold">UTF-8</emphasis>.
+ </para>
+ </callout>
+ <callout
arearefs="area-Reference_Guide-i18n.locales.configuration.input-encoding">
+ <para>
+ <emphasis>input-encoding</emphasis> In the java implementation, the
encoding parameters will be used for the request response stream. The input-encoding
parameter will be used for request setCharacterEncoding(..).
+ </para>
+ </callout>
+ <callout
arearefs="area-Reference_Guide-i18n.locales.configuration.description">
+ <para>
+ <emphasis>description</emphasis> Description for the language
+ </para>
+ </callout>
+ <callout
arearefs="area-Reference_Guide-i18n.locales.configuration.orientation">
+ <para>
+ <emphasis>description</emphasis> The default orientation of text and
images is Left-To-Right. GateIn supports <emphasis
role="bold">Right-To-Left</emphasis> orientation. Therefore you can
define the orientation to use as explained in <xref
linkend="sect-Reference_Guide-RTL_Right_To_Left_Framework" />.
+ </para>
+ </callout>
+ </calloutlist>
+ </programlistingco>
+
+ </section>
+
+ <section
id="sect-Reference_Guide-Internationalization_Configuration-ResourceBundleService">
+ <title>ResourceBundleService</title>
+ <para>
+ The resource bundle service is configured in:
<filename>02portal.war:/WEB-INF/conf/common/common-configuration.xml</filename>:
+ </para>
+ <programlistingco>
+ <areaspec>
+ <area coords="6"
id="area-Reference_Guide-i18n.rb.service.classpath_resources" />
+ <area coords="11"
id="area-Reference_Guide-i18n.rb.service.init_resources" />
+ <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>
+ <calloutlist>
+ <callout
arearefs="area-Reference_Guide-i18n.rb.service.classpath_resources">
+ <para>
+ <emphasis>classpath.resources</emphasis> We will talk later about
classpath.resources
+ </para>
+ </callout>
+ <callout
arearefs="area-Reference_Guide-i18n.rb.service.init_resources">
+ <para>
+ <emphasis>init.resources</emphasis> TODO
+ </para>
+ </callout>
+ <callout
arearefs="area-Reference_Guide-i18n.rb.service.portal_resource_names">
+ <para>
+ <emphasis>portal.resource.names</emphasis> Defines all resources that
belong to the <emphasis>Portal Resource Bundle</emphasis>. This means that
these resources are merged to a single resource bundle which is accessible from anywhere
in GateIn products. As mentioned, all these keys are located in the same bundle, which is
separated from the navigation resource bundles.
+ </para>
+ </callout>
+ </calloutlist>
+ </programlistingco>
+
+ </section>
+
+ <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. In the example above you see bundle definitions for the navigation of
the classic portal and of four different groups. Each of these resource bundles lives in a
different sphere, they are independent of each other and they do not belong to the
portal.resource.names parameter (because they are not mentioned in
portal.resource.names).
+ </para>
+ <para>
+ As you learned in the introduction you must put the properties for a group in the
WEB-INF/classes/locale/navigation/group/ folder. Such as:
<literal>/WEB-INF/classes/locale/navigation/group/organization/management/executive-board_en.properties</literal>
The folder and file names must correspond to the group hierarchy. The group name
"executive-board" is followed by the iso 639 code. For each language you defined
in the LocalesConfig you must provide a resource file. If you ever change the name of a
group you also need to change the name of the folder and/or files of the correspondent
navigation resource bundles. Content of executive-board_en.properties:
+<programlisting>organization.title=Organization
organization.newstaff=New Staff
-organization.management=Management</programlisting>
- </para>
- <para>
- This resource bundle is only accessible for the navigation of the
organization.management.executive-board group.
- </para>
- </section>
- <section>
- <title>
- Portlets
- </title>
- <para>
- classpath.resources
- </para>
- <para>
- Portlets are independent application and they deliver their own resource files.
- </para>
- <para>
- All shipped-in 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>
-
- <section id="sect-Reference_Guide-Overview-Example">
+organization.management=Management
+</programlisting>
+ </para>
+ <para>
+ This resource bundle is only accessible for the navigation of the
organization.management.executive-board group.
+ </para>
+ </section>
+
+ <section
id="sect-Reference_Guide-Internationalization_Configuration-Portlets">
+ <title> Portlets </title>
+ <para>
+ classpath.resources
+ </para>
+ <para>
+ Portlets are independent application and they deliver their own resource files.
+ </para>
+ <para>
+ All shipped-in 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>
+ <section id="sect-Reference_Guide-Portlets-Example">
<title>Example</title>
<para>
Let's suppose you want to add a Spanish translation to the GadgetPortlet.
@@ -260,52 +253,56 @@
Create the file <literal>GadgetPortlet_es.properties</literal> in:
<filename>WEB-INF/classes/locale/portlet/gadget/GadgetPortlet</filename>
</para>
<para>
- In <emphasis role="bold">portlet.xml</emphasis>, add Spanish 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"><![CDATA[<supported-locale>en</supported-locale>
-<supported-locale>es</supported-locale>
-<resource-bundle>locale.portlet.gadget.GadgetPortlet</resource-bundle>]]></programlisting>
+ In <emphasis role="bold">portlet.xml</emphasis>, add Spanish 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>
<para>
See the portlet specification for more details about portlet internationalization.
</para>
- <section>
- <title>Standard portlet resource keys</title>
- </section>
- <para>
- The portlet specifications defines three standard keys: Title, Short Title and
Keywords. Keywords contain a comma-separated list of keywords.
- </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 contain a comma-separated list of keywords.
+ </para>
+
<programlisting> javax.portlet.title=Breadcrumbs Portlet
javax.portlet.short-title=Breadcrumbs
javax.portlet.keywords=Breadcrumbs, Breadcrumb
</programlisting>
- </section>
-
- <section id="sect-Reference_Guide-Overview-Access">
- <title>Access</title>
- <para>
- Whenever you want to display a property in the user language you use its
<emphasis>key</emphasis>. Using the below access method the translation is
returned in the preferred language for the connected user:
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Groovy Template
- <programlisting>TODO</programlisting>
- </para>
- </listitem>
- <listitem>
- <para>
- Java
+ </section>
+
+ <section id="sect-Reference_Guide-Example-Access">
+ <title>Access</title>
+ <para>
+ Whenever you want to display a property in the user language you use its
<emphasis>key</emphasis>. Using the below access method the translation is
returned in the preferred language for the connected user:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Groovy Template
+<programlisting>TODO
+</programlisting>
+ </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>
- <section
id="sect-Reference_Guide-Overview-Debugging_resource_bundle_usage">
+ <section
id="sect-Reference_Guide-Portlets-Debugging_resource_bundle_usage">
<title>Debugging resource bundle usage</title>
<para>
When an application needs to be translated, it is never obvious to find out the right
key for a given translated property. When the portal is executed in <emphasis
role="bold">debug mode</emphasis> it is possible to select among the
available languages a special language called <emphasis role="bold">Magic
locale</emphasis>.
@@ -314,7 +311,9 @@
This feature translates a key to the same key value. For instance, the translated
value for the key "organization.title" is simply the value
"organization.title". Selecting that language allows to use the portal and its
applications with <emphasis role="bold">all the keys
visible</emphasis> and it is easy to find out the correct key for a given label in
the portal page.
</para>
</section>
- </section>
+
+ </section>
+
</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-01-20
08:10:24 UTC (rev 1387)
+++
portal/trunk/docs/reference-guide/en/modules/development/JavaScript_Inter_Application_Communication.xml 2010-01-20
08:13:42 UTC (rev 1388)
@@ -1,27 +1,21 @@
<?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>
- This kind of communication is made to allow applications within a page to
- exchange data. This library is made for broadcasting messages
- on topic. This is basically based on 3 functions : subscribe,
- publish and unsubscribe.
+<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>
+ This kind of communication is made to allow applications within a page to exchange
data. This library is made for broadcasting messages on topic. This is basically based on
3 functions : subscribe, publish and unsubscribe.
</para>
- <para>
- When you subscribe to a topic, you receive all the subtopic message. for
- example, if I subscribe to "/eXo/application", and an
- application send a message on "/eXo/application/map", i will
- receive it, but if another application send a message on
- "/eXo", i will not receive it.
+ <para>
+ When you subscribe to a topic, you receive all the subtopic message. for example, if I
subscribe to "/eXo/application", and an application send a message on
"/eXo/application/map", i will receive it, but if another application send a
message on "/eXo", i will not receive it.
</para>
- </section>
-<!--
+ </section>
+
+ <!--
<section
id="sect-Reference_Guide-JavaScript_Inter_Application_Communication-Common_topics">
<title>Common topics</title>
@@ -29,25 +23,22 @@
Stuff Goes Here?
</para>
</section>
- -->
- <section
-
id="sect-Reference_Guide-JavaScript_Inter_Application_Communication-GateIn">
- <title>/eXo</title>
- <para>
- It contains all the events generated by the platform.
+ -->
+ <section
id="sect-Reference_Guide-JavaScript_Inter_Application_Communication-eXo">
+ <title>/eXo</title>
+ <para>
+ It contains all the events generated by the platform.
</para>
- </section>
-
- <section
-
id="sect-Reference_Guide-JavaScript_Inter_Application_Communication-GateInportalnotification">
- <title>/eXo/portal/notification
- </title>
- <para>
- When a message is sent on this topic, a popup message appears on the top
- right of the screen.
+ </section>
+
+ <section
id="sect-Reference_Guide-JavaScript_Inter_Application_Communication-eXoportalnotification_">
+ <title>/eXo/portal/notification </title>
+ <para>
+ When a message is sent on this topic, a popup message appears on the top right of the
screen.
</para>
- </section>
-<!--
+ </section>
+
+ <!--
<section
id="sect-Reference_Guide-JavaScript_Inter_Application_Communication-GateInportalchangeTitle">
<title>/GateIn/portal/changeTitle (not
@@ -93,16 +84,14 @@
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>
- The inter application communication library can be found in
-
<filename>01eXoResources.war:/javascript/eXo/core/Topic.js</filename>
- </para>
- <programlisting><![CDATA[/**
+ -->
+ <section
id="sect-Reference_Guide-JavaScript_Inter_Application_Communication-Library">
+ <title>Library</title>
+ <para>
+ The inter application communication library can be found in
<filename>01eXoResources.war:/javascript/eXo/core/Topic.js</filename>
+ </para>
+
+<programlisting>/**
* 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
@@ -135,65 +124,90 @@
*/
Topic.prototype.unsubscribe = function(/*String*/ topic, /*Object*/ id) { ... }
-Topic.prototype.initCometdBridge = function() { ... }]]></programlisting>
- </section>
-
- <section
-
id="sect-Reference_Guide-JavaScript_Inter_Application_Communication-Syntax">
- <title>Syntax</title>
-
- <para><literal>subscribe</literal> is used to subscribe a
callback to a topic.
- Parameters:
- <itemizedlist>
- <listitem><para><literal>topic</literal> is the topic
that will be listened</para></listitem>
- <listitem><para><literal>func</literal> is the name of
the function of obj to call when a message is received on the topic.
- It has to be a function that take an Object in parameter. the event received
have this format:
- <programlisting>{
+Topic.prototype.initCometdBridge = function() { ... }
+</programlisting>
+ </section>
+
+ <section
id="sect-Reference_Guide-JavaScript_Inter_Application_Communication-Syntax">
+ <title>Syntax</title>
+ <para>
+ <literal>subscribe</literal> is used to subscribe a callback to a topic.
Parameters:
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>topic</literal> is the topic that will be listened
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>func</literal> is the name of the function of obj to call when
a message is received on the topic. It has to be a function that take an Object in
parameter. the event received have this format:
+<programlisting>{
senderId:senderId,
message:message,
topic: topic
-}</programlisting>
- </para></listitem>
- </itemizedlist>
- </para>
-
- <para><literal>publish</literal> is used to publish an event to
the other subscribers to the given channels.
- Parameters:
- <itemizedlist>
- <listitem><para><literal>senderId</literal> is a string
that identify the sender</para></listitem>
- <listitem><para><literal>topicName</literal> is the
topic that the message will be published</para></listitem>
- <listitem><para><literal>message</literal> is the
message that's going to be delivered to the subscribers to the
topic</para></listitem>
- </itemizedlist>
- </para>
- <para><literal>unsubscribe</literal> is used to unsubscribe a
callback to a topic
- Parameters:
- <itemizedlist>
- <listitem><para><literal>topic</literal> is the topic
that will be unsubscribe</para></listitem>
- <listitem><para><literal>id</literal> is the context
object</para></listitem>
- </itemizedlist>
- </para>
- </section>
-
- <section
-
id="sect-Reference_Guide-JavaScript_Inter_Application_Communication-Example">
- <title>Example</title>
- <programlisting role="HTML"><![CDATA[<%@ taglib
uri="http://java.sun.com/portlet" prefix="portlet" %>
-<portlet:defineObjects/>
-<div>
- <p>
+}
+</programlisting>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ <literal>publish</literal> is used to publish an event to the other
subscribers to the given channels. Parameters:
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>senderId</literal> is a string that identify the sender
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>topicName</literal> is the topic that the message will be
published
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>message</literal> is the message that's going to be
delivered to the subscribers to the topic
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ <literal>unsubscribe</literal> is used to unsubscribe a callback to a
topic Parameters:
+ <itemizedlist>
+ <listitem>
+ <para>
+ <literal>topic</literal> is the topic that will be unsubscribe
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <literal>id</literal> is the context object
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </section>
+
+ <section
id="sect-Reference_Guide-JavaScript_Inter_Application_Communication-Example">
+ <title>Example</title>
+
+<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;
@@ -202,29 +216,30 @@
}
}
- 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 />* " +
+ 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>]]></programlisting>
- </section>
+ init_<portlet:namespace/>();
+</script>
+</programlisting>
+ </section>
</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-01-20
08:10:24 UTC (rev 1387)
+++
portal/trunk/docs/reference-guide/en/modules/development/Portal_Lifecycle.xml 2010-01-20
08:13:42 UTC (rev 1388)
@@ -1,39 +1,30 @@
<?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>
<section id="sect-Reference_Guide-Portal_Lifecycle-Overview">
<title>Overview</title>
<para>
- This chapter describes the portal lifecycle from the application
- server start to its stop as well as how requests are handled.
+ This chapter describes the portal lifecycle from the application server start to its
stop as well as how requests are handled.
</para>
</section>
-
- <section
- id="sect-Reference_Guide-Portal_Lifecycle-Application_Server_start_and_stop">
+
+ <section
id="sect-Reference_Guide-Portal_Lifecycle-Application_Server_start_and_stop">
<title>Application Server start and stop</title>
<para>
- A GateIn Portal instance is simply a web application deployed as
- a WAR in an application server.
- Portlets are also part of an enhanced
- WAR that we call a portlet application.
+ A GateIn Portal instance is simply a web application deployed as a WAR in an
application server. Portlets are also part of an enhanced WAR that we call a portlet
application.
</para>
<para>
- GateIn doesn't require any particular setup for your portlet in most common
scenario and the
- web.xml file can remain without any GateIn specific configuration. During deployment,
- GateIn 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.
+ GateIn doesn't require any particular setup for your portlet in most common
scenario and the web.xml file can remain without any GateIn specific configuration. During
deployment, GateIn 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>
@@ -93,40 +84,36 @@
}
}
</programlisting>
- -->
- <section>
- <title>The Command Servlet</title>
+ -->
+ <section
id="sect-Reference_Guide-Portal_Lifecycle-The_Command_Servlet">
+ <title>The Command Servlet</title>
<para>
- The servlet is the main entry point for incoming requests, it
- also includes some interesting init code when the portal is launched.
- This servlet (<literal>org.gatein.wci.command.CommandServlet</literal>) is
automatically
- added during deployment and mapped to
<literal>/tomcatgateinservlet</literal>.
+ The servlet is the main entry point for incoming requests, it also includes some
interesting init code when the portal is launched. This servlet
(<literal>org.gatein.wci.command.CommandServlet</literal>) is automatically
added during deployment and mapped to
<literal>/tomcatgateinservlet</literal>.
</para>
<para>
- In other words, this is equivalent to adding the following into web.xml (But this is
for
- information only, the servlet is already configured)
- </para>
-
-<programlisting role="XML"><![CDATA[
-<servlet>
- <servlet-name>TomcatGateInServlet</servlet-name>
- <servlet-class>org.gatein.wci.command.CommandServlet</servlet-class>
- <load-on-startup>0</load-on-startup>
-</servlet>
+ In other words, this is equivalent to adding the following into web.xml (But this is
for information only, the servlet is already configured)
+ </para>
+
+<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-mapping>
- <servlet-name>TomcatGateInServlet</servlet-name>
- <url-pattern>/tomcatgateinservlet</url-pattern>
-</servlet-mapping>]]></programlisting>
-
+<servlet-mapping>
+ <servlet-name>TomcatGateInServlet</servlet-name>
+ <url-pattern>/tomcatgateinservlet</url-pattern>
+</servlet-mapping>
+</programlisting>
<para>
- With this in mind it's possible to filter on the CommandServlet by
- filtering on the URL pattern used by the Servlet mapping. As an example
- below we will create a servlet filter that calculates the time of
- execution of a portlet request.
- </para>
- <para>The filter class: </para>
-<programlisting role="JAVA"><![CDATA[
+ With this in mind it's possible to filter on the CommandServlet by filtering on
the URL pattern used by the Servlet mapping. As an example below we will create a servlet
filter that calculates the time of execution of a portlet request.
+ </para>
+ <para>
+ The filter class:
+ </para>
+
+<programlisting role="JAVA">
package org.example;
import java.io.IOException;
@@ -156,40 +143,42 @@
{
}
-}]]></programlisting>
+}
+</programlisting>
<para>
- The Java EE web application configuration file (web.xml) of the portlet on which we
want to
- know the time to serve a portlet request. As mentioned above nothing specific to GateIn
needs to be included,
- only the URL pattern to set has to be known.
- </para>
-<programlisting role="XML"><![CDATA[
-<?xml version="1.0"?>
-<web-app
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ The Java EE web application configuration file (web.xml) of the portlet on which we
want to know the time to serve a portlet request. As mentioned above nothing specific to
GateIn needs to be included, only the URL pattern to set has to be known.
+ </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">
+ 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>]]></programlisting>
- <para>
- <note>
- <title>INCLUDE dispatcher</title>
- <para>Here it's important to set INCLUDE as dispatcher as the
portal will always hit
- the CommandServlet through a request dispatcher. Without this, the filter
will not be
- triggered, unless direct access to a resource (such as an
image).</para>
- </note>
+</web-app>
+</programlisting>
+ <para>
+ <note>
+ <title>INCLUDE dispatcher</title>
+ <para>
+ Here it's important to set INCLUDE as dispatcher as the portal will always hit
the CommandServlet through a request dispatcher. Without this, the filter will not be
triggered, unless direct access to a resource (such as an image).
+ </para>
+ </note>
</para>
- </section>
-<!--
+ </section>
+
+ <!--
<para>
Here is its definition in the web.xml file:
</para>
@@ -1034,8 +1023,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-01-20
08:10:24 UTC (rev 1387)
+++
portal/trunk/docs/reference-guide/en/modules/development/Right_To_Left_Framework.xml 2010-01-20
08:13:42 UTC (rev 1388)
@@ -1,28 +1,24 @@
<?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>
<section
id="sect-Reference_Guide-RTL_Right_To_Left_Framework-Overview">
<title>Overview</title>
<para>
- The RTL framework (Right-To-Left framework) provides a set of
- tools that can be leveraged by the user interface components to
- handle directionality gracefully.
+ The RTL framework (Right-To-Left framework) provides a set of tools that can be
leveraged by the user interface components to handle directionality gracefully.
</para>
</section>
-
+
<section
id="sect-Reference_Guide-RTL_Right_To_Left_Framework-Direction">
<title>Direction</title>
<para>
- The orientation depends on the current locale and during a
- portal request the current orientation is made available by various
- means. The orientation is a Java 5 enum that provides a set of
- functionalities:
+ The orientation depends on the current locale and during a portal request the current
orientation is made available by various means. The orientation is a Java 5 enum that
provides a set of functionalities:
</para>
-
- <programlisting>
+
+<programlisting>
LT, // Western Europe
RT, // Middle East (Arabic, Hebrew)
TL, // Japanese, Chinese, Korean
@@ -32,24 +28,15 @@
public boolean isTL() { ... }
public boolean isTR() { ... }
</programlisting>
- <para>The object defining the current Orientation for the current
- request is the UIPortalApplication. However it should be accessed at
- runtime using the RequestContext that delegates to the
- UIPortalApplication. In the case of a PortalRequestContext it is a
- direct delegate as the PortalRequestContext has a reference to the
- current UIPortalApplication. In case of a different context such as
- the PortletRequestContext, it delegates to the parent context given
- the fact that the root RequestContext is always a
- PortalRequestContext.</para>
-
+ <para>
+ The object defining the current Orientation for the current request is the
UIPortalApplication. However it should be accessed at runtime using the RequestContext
that delegates to the UIPortalApplication. In the case of a PortalRequestContext it is a
direct delegate as the PortalRequestContext has a reference to the current
UIPortalApplication. In case of a different context such as the PortletRequestContext, it
delegates to the parent context given the fact that the root RequestContext is always a
PortalRequestContext.
+ </para>
</section>
-
- <section
- id="sect-Reference_Guide-RTL_Right_To_Left_Framework-Groovy_templates">
+
+ <section
id="sect-Reference_Guide-RTL_Right_To_Left_Framework-Groovy_templates">
<title>Groovy templates</title>
<para>
- Orientation is obtained from implicit variables defined by the
- groovy binding context:
+ Orientation is obtained from implicit variables defined by the groovy binding
context:
</para>
<itemizedlist>
<listitem>
@@ -69,119 +56,88 @@
</listitem>
<listitem>
<para>
- dir : the string 'ltr' if the orientation is LT or the string
- 'rtl' if the orientation is RT
+ dir : the string 'ltr' if the orientation is LT or the string 'rtl'
if the orientation is RT
</para>
</listitem>
</itemizedlist>
</section>
-
+
<section
id="sect-Reference_Guide-RTL_Right_To_Left_Framework-Stylesheet">
<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.
- For instance
- <emphasis role="bold">
- /web/skin/portal/webui/component/UIFooterPortlet/DefaultStylesheet-rt.css
- </emphasis>
- will return the same stylesheet as
- <emphasis role="bold">
- /web/skin/portal/webui/component/UIFooterPortlet/DefaultStylesheet.css
- </emphasis>
- but processed for the RT orientation. Obviously the -lt suffix is
- optional.
+ The skin service handles stylesheet rewriting to accommodate the orientation. It works
by appending -lt or -rt to the stylesheet name. For instance <emphasis
role="bold">
/web/skin/portal/webui/component/UIFooterPortlet/DefaultStylesheet-rt.css
</emphasis> will return the same stylesheet as <emphasis
role="bold">
/web/skin/portal/webui/component/UIFooterPortlet/DefaultStylesheet.css </emphasis>
but processed for the RT orientation. Obviously the -lt suffix is optional.
</para>
<para>
- Stylesheet authors can annotate their stylesheet to create
- content that depends on the orientation.
+ Stylesheet authors can annotate their stylesheet to create content that depends on the
orientation.
</para>
- <section>
- <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:
- <programlisting>
+ <section id="sect-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:
+<programlisting>
float: left; /* orientation=lt */
float: right; /* orientation=rt */
font-weight: bold;
text-align: center;
white-space: nowrap;
</programlisting>
- The LT produced output will be:
- <programlisting>
+ The LT produced output will be:
+<programlisting>
float: left; /* orientation=lt */
font-weight: bold;
text-align: center;
white-space: nowrap;
- </programlisting>
- The RT produced output will be:
- <programlisting>
+</programlisting>
+ The RT produced output will be:
+<programlisting>
float: right; /* orientation=rt */
font-weight: bold;
text-align: center;
white-space: nowrap;
</programlisting>
- </para>
+ </para>
</section>
- <section>
- <title>Example 2</title>
- <para>
- In this example we need to modify the padding according to the
- orientation:
- <programlisting>
+
+ <section id="sect-Reference_Guide-Stylesheet-Example_2">
+ <title>Example 2</title>
+ <para>
+ In this example we need to modify the padding according to the orientation:
+<programlisting>
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>
+ The LT produced output will be:
+<programlisting>
color: white;
line-height: 24px;
padding: 0px 5px 0px 0px; /* orientation=lt */
</programlisting>
- The RT produced output will be:
- <programlisting>
+ The RT produced output will be:
+<programlisting>
color: white;
line-height: 24px;
padding: 0px 0px 0px 5px; /* orientation=rt */
</programlisting>
- </para>
+ </para>
</section>
- </section>
+ </section>
+
<section id="sect-Reference_Guide-RTL_Right_To_Left_Framework-Images">
<title>Images</title>
<para>
- 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.
+ 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 than the skin
- service does. When an image ends with the -rt suffix the portal will
- attempt to locate the original image and create a mirror of it. For
- instance requesting the image
- <emphasis role="bold">
- /GateInResources/skin/DefaultSkin/webui/component/UITabSystem/UITabs/background/NormalTabStyle-rt.gif
- </emphasis>
- returns a mirror of the image
- <emphasis role="bold">
- /GateInResources/skin/DefaultSkin/webui/component/UITabSystem/UITabs/background/NormalTabStyle.gif
- </emphasis>
- and it works perfectly because the image is symmetric.
+ The web resource filter uses the same naming pattern than the skin service does. When
an image ends with the -rt suffix the portal will attempt to locate the original image and
create a mirror of it. For instance requesting the image <emphasis
role="bold">
/GateInResources/skin/DefaultSkin/webui/component/UITabSystem/UITabs/background/NormalTabStyle-rt.gif
</emphasis> returns a mirror of the image <emphasis role="bold">
/GateInResources/skin/DefaultSkin/webui/component/UITabSystem/UITabs/background/NormalTabStyle.gif
</emphasis> and it works perfectly because the image is symmetric.
</para>
<para>
Here is an example combining stylesheet and images:
</para>
-
- <programlisting>
+
+<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 */
@@ -189,28 +145,36 @@
padding-left: 2px; /* orientation=rt */
</programlisting>
</section>
- <section>
+
+ <section
id="sect-Reference_Guide-RTL_Right_To_Left_Framework-Client_side_JavaScript">
<title>Client side JavaScript</title>
<para>
- Just use the eXo.core.I18n object that provides the following
- methods:
+ Just use the eXo.core.I18n object that provides the following methods:
<itemizedlist>
<listitem>
- <para>getOrientation() : returns either the string
- lt or rt</para>
+ <para>
+ getOrientation() : returns either the string lt or rt
+ </para>
</listitem>
<listitem>
- <para>getDir() : returns either the string ltr or rtl
+ <para>
+ getDir() : returns either the string ltr or rtl
</para>
</listitem>
<listitem>
- <para>isLT() : returns true for LT</para>
+ <para>
+ isLT() : returns true for LT
+ </para>
</listitem>
<listitem>
- <para>isRT() : returns true of RT</para>
+ <para>
+ isRT() : returns true of RT
+ </para>
</listitem>
</itemizedlist>
</para>
</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-01-20
08:10:24 UTC (rev 1387)
+++
portal/trunk/docs/reference-guide/en/modules/development/Upload_Component.xml 2010-01-20
08:13:42 UTC (rev 1388)
@@ -1,143 +1,142 @@
<?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">
- <title>Overview</title>
- <para>
- In this article, you will learn how to :
+ <title>Upload Component</title>
+ <section id="sect-Reference_Guide-Upload_Component-Overview">
+ <title>Overview</title>
+ <para>
+ In this article, you will learn how to :
</para>
- <itemizedlist>
- <listitem>
- <para>
- configure the Upload service
+ <itemizedlist>
+ <listitem>
+ <para>
+ configure the Upload service
</para>
- </listitem>
- <listitem>
- <para>
- add a default upload size limit
+ </listitem>
+ <listitem>
+ <para>
+ add a default upload size limit
</para>
- </listitem>
- <listitem>
- <para>
- use the Upload component in your application, with a specific upload
- size limit
+ </listitem>
+ <listitem>
+ <para>
+ use the Upload component in your application, with a specific upload size limit
</para>
- </listitem>
- <listitem>
- <para>
- clean the service when the upload finishes
+ </listitem>
+ <listitem>
+ <para>
+ clean the service when the upload finishes
</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section id="sect-Reference_Guide-Upload_Component-Upload_Service">
- <title>Upload Service</title>
- <para>
- The service is defined by the class :
- org.exoplatform.upload.UploadService;
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="sect-Reference_Guide-Upload_Component-Upload_Service">
+ <title>Upload Service</title>
+ <para>
+ The service is defined by the class : org.exoplatform.upload.UploadService;
</para>
- <para>
- You can configure it with the following xml code :
+ <para>
+ You can configure it with the following xml code :
</para>
-
- <programlisting role="XML"><![CDATA[<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>
- As you can see, you can configure a default upload size limit for the
- service. The value unit is in MegaBytes. This limit will be
- used by default by all applications if no specific limit is
- set. You will see in the next chapter how to set a different
- limit for your application.
+ <para>
+ As you can see, you can configure a default upload size limit for the service. The
value unit is in MegaBytes. This limit will be used by default by all applications if no
specific limit is set. You will see in the next chapter how to set a different limit for
your application.
</para>
- <para>
- If you set the value at 0, the upload size will be unlimited.
+ <para>
+ If you set the value at 0, the upload size will be unlimited.
</para>
- </section>
-
- <section
-
id="sect-Reference_Guide-Upload_Component-How_to_use_the_upload_component_in_your_application">
- <title>How to use the upload component in your application
- </title>
- <para>
- To use the component, you must create an object of type
- org.exoplatform.webui.form.UIFormUploadInput, using one of the
- two available constructors :
+ </section>
+
+ <section
id="sect-Reference_Guide-Upload_Component-How_to_use_the_upload_component_in_your_application_">
+ <title>How to use the upload component in your application </title>
+ <para>
+ To use the component, you must create an object of type
org.exoplatform.webui.form.UIFormUploadInput, using one of the two available constructors
:
</para>
- <programlisting>public UIFormUploadInput(String name, String
bindingExpression)</programlisting>
- <para>
- or:
+
+<programlisting>public UIFormUploadInput(String name, String bindingExpression)
+</programlisting>
+ <para>
+ or:
</para>
- <programlisting>public UIFormUploadInput(String name, String
bindingExpression, int limit)</programlisting>
- <para>
- Here is an example using the second form :
- </para>
- <programlisting role="JAVA"><![CDATA[PortletRequestContext
pcontext = (PortletRequestContext)WebuiRequestContext.getCurrentInstance();
+
+<programlisting>public UIFormUploadInput(String name, String bindingExpression, int
limit)
+</programlisting>
+ <para>
+ Here 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);
-]]></programlisting>
-
- <para>
- To get the limit from the xml configuration, you can add this piece of code in
the files portlet.xml or portlet-preferences.xml :
- </para>
- <programlisting role="XML"><![CDATA[<preference>
- <name>uploadFileSizeLimitMB</name>
- <value>30</value>
- <read-only>false</read-only>
-</preference>]]></programlisting>
- <para>
- Again, a 0 value means unlimited upload size, and the value unit is set in
- MegaBytes.
+</programlisting>
+ <para>
+ To get the limit from the xml configuration, you can add this piece of code in the
files portlet.xml or portlet-preferences.xml :
</para>
- <para>
- To get the uploaded data use the
<literal>getUploadDataAsStream()</literal> method:
- </para>
- <programlisting role="JAVA"><![CDATA[UIFormUploadInput input =
(UIFormUploadInput)uiForm.getUIInput("upload");
+
+<programlisting role="XML"><preference>
+ <name>uploadFileSizeLimitMB</name>
+ <value>30</value>
+ <read-only>false</read-only>
+</preference>
+</programlisting>
+ <para>
+ Again, a 0 value means unlimited upload size, and the value unit is set in MegaBytes.
+ </para>
+ <para>
+ To get the uploaded data use the
<literal>getUploadDataAsStream()</literal> method:
+ </para>
+
+<programlisting role="JAVA">UIFormUploadInput input =
(UIFormUploadInput)uiForm.getUIInput("upload");
InputStream inputStream = input.getUploadDataAsStream();
...
-jcrData.setValue(inputStream);]]></programlisting>
- <para>Clean the uploaded file</para>
- <para>
- The upload service stores a temporary file on the filesystem during the
- process. When the upload is finished, you must clean the
- service in order to :
+jcrData.setValue(inputStream);
+</programlisting>
+ <para>
+ Clean the uploaded file
</para>
- <itemizedlist>
- <listitem>
- <para>
- delete the temporary file
+ <para>
+ The upload service stores a temporary file on the filesystem during the process. When
the upload is finished, you must clean the service in order to :
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ delete the temporary file
</para>
- </listitem>
- <listitem>
- <para>
- delete the classes used for the upload
+ </listitem>
+ <listitem>
+ <para>
+ delete the classes used for the upload
</para>
- </listitem>
- </itemizedlist>
- <para>
- To do that, use the<literal>removeUpload()</literal> method defined
in the upload
- service, like this :
+ </listitem>
+ </itemizedlist>
+ <para>
+ To do that, use the<literal>removeUpload()</literal> method defined in the
upload service, like this :
</para>
-
- <programlisting role="JAVA"><![CDATA[UploadService uploadService
= uiForm.getApplicationComponent(UploadService.class) ;
+
+<programlisting role="JAVA">UploadService uploadService =
uiForm.getApplicationComponent(UploadService.class) ;
UIFormUploadInput uiChild = uiForm.getChild(UIFormUploadInput.class) ;
-uploadService.removeUpload(uiChild.getUploadId()) ;]]></programlisting>
- <para>
- Be sure to get and save the file <emphasis
role="bold">before</emphasis> you clean the service
- </para>
- </section>
+uploadService.removeUpload(uiChild.getUploadId()) ;
+</programlisting>
+ <para>
+ Be sure to get and save the file <emphasis
role="bold">before</emphasis> you clean the service
+ </para>
+ </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-01-20
08:10:24 UTC (rev 1387)
+++
portal/trunk/docs/reference-guide/en/modules/development/XML_Resource_Bundles.xml 2010-01-20
08:13:42 UTC (rev 1388)
@@ -1,67 +1,45 @@
<?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>
<section id="sect-Reference_Guide-XML_Resources_Bundles-Motivation">
<title>Motivation</title>
<para>
- Usually resource bundles are stored in property files however as
- property files are plain files it raise issues with the encoding of
- the file. The XML resource bundle format has been developed to
- provide an alternative to property files.
+ Usually resource bundles are stored in property files however as property files are
plain files it raise issues with the encoding of the file. The XML resource bundle format
has been developed to provide an alternative to property files.
</para>
<itemizedlist>
<listitem>
<para>
- The XML format declares the encoding of the file in the XML
- declaration which avoids to use the native2ascii program and mess
- with encoding.
+ The XML format declares the encoding of the file in the XML declaration which avoids
to use the native2ascii program and mess with encoding.
</para>
</listitem>
<listitem>
<para>
- Property files use the ISO 8859-1 which does not cover the
- full unicode charset and language such as Arabic would not be
- supported natively and require the use of escaping, leading the
- files to be barely maintainable.
+ Property files use the ISO 8859-1 which does not cover the full unicode charset and
language such as Arabic would not be supported natively and require the use of escaping,
leading the files to be barely maintainable.
</para>
</listitem>
<listitem>
<para>
- Tooling support for XML files is better than the tooling for
- Java property files and usually the XML editor cope very well with
- the file encoding.
+ Tooling support for XML files is better than the tooling for Java property files and
usually the XML editor cope very well with the file encoding.
</para>
</listitem>
</itemizedlist>
</section>
-
+
<section
id="sect-Reference_Guide-XML_Resources_Bundles-Portal_support">
<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 but instead of ending with the
- <emphasis role="bold">.properties</emphasis>
- suffix, it ends with the
- <emphasis role="bold">.xml</emphasis>
- suffix. For instance
- <emphasis role="bold">
- AccountPortlet_ar.xml</emphasis>
- instead of
- <emphasis role="bold">AccountPortlet_ar.properties</emphasis>.
+ 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 but instead of ending with the
<emphasis role="bold">.properties</emphasis> suffix, it ends with
the <emphasis role="bold">.xml</emphasis> suffix. For instance
<emphasis role="bold"> AccountPortlet_ar.xml</emphasis> instead of
<emphasis role="bold">AccountPortlet_ar.properties</emphasis>.
</para>
</section>
-
+
<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 DRY (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 DRY (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 = ...
@@ -75,29 +53,29 @@
UIAccountForm.action.Reset= ...
</programlisting>
-<programlisting role="XML"><![CDATA[<?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>
+<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>
</section>
Modified: portal/trunk/docs/reference-guide/en/modules/gadgets/Gadgets.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/gadgets/Gadgets.xml 2010-01-20 08:10:24
UTC (rev 1387)
+++ portal/trunk/docs/reference-guide/en/modules/gadgets/Gadgets.xml 2010-01-20 08:13:42
UTC (rev 1388)
@@ -1,130 +1,125 @@
<?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>
- <section id="sect-Reference_Guide-Gadgets-Overview">
- <title>Overview</title>
- <para>
- An gadget is a mini web application running on a platform and you can
- put it in a web page. This is a small application that helps
- users to do some private actions.
- </para>
- <para>
- GateIn Portal supports some gadgets such as: Todo gadget, Calendar gadget,
- Calculator gadget, Weather Forecasts, RSS Reader gadget.
- </para>
- <itemizedlist>
- <listitem>
- <para>
- Todo: This mini - application helps you to organize your day and work
- group.
- </para>
- </listitem>
- <listitem>
- <para>
- Calendar: A cool calendar to keep track of date in style.
- </para>
- </listitem>
- <listitem>
- <para>
- Calculator: This is the coolest calculator for your page.
- </para>
- </listitem>
- <listitem>
- <para>
- RSS Reader: This gadget lets you het a sneak preview of your favourite
- feeds around web
- </para>
- </listitem>
- <listitem>
- <para>
- Weather Forecasts: This gadget notifies you of current weather condition
- and gives tomorrow's forecast.
- </para>
- </listitem>
- </itemizedlist>
- </section>
+ <title>Gadgets</title>
+ <section id="sect-Reference_Guide-Gadgets-Overview">
+ <title>Overview</title>
+ <para>
+ An gadget is a mini web application running on a platform and you can put it in a web
page. This is a small application that helps users to do some private actions.
+ </para>
+ <para>
+ GateIn Portal supports some gadgets such as: Todo gadget, Calendar gadget, Calculator
gadget, Weather Forecasts, RSS Reader gadget.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Todo: This mini - application helps you to organize your day and work group.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Calendar: A cool calendar to keep track of date in style.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Calculator: This is the coolest calculator for your page.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ RSS Reader: This gadget lets you het a sneak preview of your favourite feeds around
web
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Weather Forecasts: This gadget notifies you of current weather condition and gives
tomorrow's forecast.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="sect-Reference_Guide-Gadgets-Existing_Gadgets">
+ <title>Existing Gadgets</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Liste.png" format="PNG"
width="444" />
+ </imageobject>
+ </mediaobject>
+ </section>
+
+ <section id="sect-Reference_Guide-Gadgets-Create_a_new_Gadget">
+ <title>Create a new Gadget</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/New.png" format="PNG"
width="444" />
+ </imageobject>
+ </mediaobject>
+ </section>
+
+ <section id="sect-Reference_Guide-Gadgets-Remote_Gadget">
+ <title>Remote Gadget</title>
+ <para>
+ This is the reference to a remote gadget (stock one).
+ </para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Import.png" format="PNG"
width="444" />
+ </imageobject>
+ </mediaobject>
+ </section>
+
+ <section id="sect-Reference_Guide-Gadgets-Gadget_Importing">
+ <title>Gadget Importing</title>
+ <para>
+ After referencing the gadget successfully, then import it into the local repository.
+ </para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Imported.png" format="PNG"
width="444" />
+ </imageobject>
+ </mediaobject>
+ </section>
+
+ <section id="sect-Reference_Guide-Gadgets-Gadget_Web_Editing">
+ <title>Gadget Web Editing</title>
+ <para>
+ Edit it from the Web the imported Gadget to modify it:
+ </para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/EditImportedOnline.png"
format="PNG" width="444" />
+ </imageobject>
+ </mediaobject>
+ </section>
+
+ <section id="sect-Reference_Guide-Gadgets-Gadget_IDE_Editing">
+ <title>Gadget IDE Editing</title>
+ <para>
+ Edit it from your IDE thanks to the WebDAV protocol:
+ </para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/EditImportedWebDAV.png"
format="PNG" width="444" />
+ </imageobject>
+ </mediaobject>
+ </section>
+
+ <section id="sect-Reference_Guide-Gadgets-Dashboard_Viewing">
+ <title>Dashboard Viewing</title>
+ <para>
+ View it from the Dashboard when you drag and drop the Gadget from listing to the
dashboard.
+ </para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Dashboard.png" format="PNG"
width="444" />
+ </imageobject>
+ </mediaobject>
+ </section>
- <section id="sect-Reference_Guide-Gadgets-Existing_Gadgets">
- <title>Existing Gadgets</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/Liste.png" format="PNG"
/>
- </imageobject>
- </mediaobject>
- </section>
+</section>
- <section id="sect-Reference_Guide-Gadgets-Create_a_new_Gadget">
- <title>Create a new Gadget</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/New.png" format="PNG"
/>
- </imageobject>
- </mediaobject>
- </section>
- <section id="sect-Reference_Guide-Gadgets-Remote_Gadget">
- <title>Remote Gadget</title>
- <para>
- This is the reference to a remote gadget (stock one).
- </para>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/Import.png" format="PNG"
/>
- </imageobject>
- </mediaobject>
- </section>
-
- <section id="sect-Reference_Guide-Gadgets-Gadget_Importing">
- <title>Gadget Importing</title>
- <para>
- After referencing the gadget successfully, then import it into the local
- repository.
- </para>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/Imported.png" format="PNG"
/>
- </imageobject>
- </mediaobject>
- </section>
-
- <section id="sect-Reference_Guide-Gadgets-Gadget_Web_Editing">
- <title>Gadget Web Editing</title>
- <para>
- Edit it from the Web the imported Gadget to modify it:
- </para>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/EditImportedOnline.png"
- format="PNG" />
- </imageobject>
- </mediaobject>
- </section>
-
- <section id="sect-Reference_Guide-Gadgets-Gadget_IDE_Editing">
- <title>Gadget IDE Editing</title>
- <para>
- Edit it from your IDE thanks to the WebDAV protocol:
- </para>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/EditImportedWebDAV.png"
- format="PNG" />
- </imageobject>
- </mediaobject>
- </section>
-
- <section id="sect-Reference_Guide-Gadgets-Dashboard_Viewing">
- <title>Dashboard Viewing</title>
- <para>
- View it from the Dashboard when you drag and drop the Gadget from listing
- to the dashboard.
- </para>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/Dashboard.png" format="PNG"
/>
- </imageobject>
- </mediaobject>
- </section>
-</section>
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-01-20
08:10:24 UTC (rev 1387)
+++
portal/trunk/docs/reference-guide/en/modules/gadgets/Setup_a_Gadget_Server.xml 2010-01-20
08:13:42 UTC (rev 1388)
@@ -1,100 +1,81 @@
<?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-Setup_virtual_servers_for_the_gadget_rendering">
- <title>Setup virtual servers for the gadget rendering</title>
- <para>
- GateIn recommend you to setup 2 different virtual hosts
- because it's the
- basis of the security model of gadgets. Having
- the gadget
- running on a different domain than the container (the
- website
- that 'contains' the app), the gadget can't read / modify
- / do
- anything nasty to GateIn Portal (like adding spam messages,
- stealing your cookies, whatever).
- </para>
- <para>
- For example you can server the portal from
- <emphasis role="bold">http://www.sample.com</emphasis>
- and the gadgets from
- <emphasis
role="bold">http://www.samplemodules.com</emphasis>
- </para>
- <para>
- To do this, we need to configure a parameter with the name is
- <emphasis>gadgets.hostName</emphasis>
- , the value is the
- <emphasis>path/to/gadgetServer</emphasis>
- in GadgetRegisteryService service like following:
- <programlisting><![CDATA[<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>
- <para>
- It's possible to have multiple rendering servers. That would
- help to
- balance the load across multiple servers.
- </para>
- <para>
- If you still want to deploy it on the same server, make sure
- that it
- starts before anything that use the gadgets (for example
- the
- webapp GateInGadgets that use
- org.exoplatform.application.gadget.GadgetRegister)
- </para>
- </section>
- <section>
- <title>Configuration</title>
- <section>
- <title>Security key</title>
- <para>
- A file
- <emphasis role="bold">key.txt</emphasis>
- has to be generated
- <emphasis role="bold">for every installation of GateIn to
- be
- secure</emphasis>
- . This file contains a secret key used to crypt the security
- token used for authenticating the user. On Linux this can be
- generated such as:
- </para>
- <programlisting>dd if=/dev/random bs=32 count=1 | openssl base64 >
/tmp/key.txt</programlisting>
- </section>
- <section>
- <title>Gadget proxy and concat configuration</title>
- <para>These servers have to be on the same domain as the gadget server.
You can configure it in:
<filename>eXoGadgetServer:/WEB-INF/classes/containers/default/container.js</filename>.
-<programlisting><![CDATA["gadgets.content-rewrite" : {
+ <title>Setup a Gadget Server</title>
+ <section
id="sect-Reference_Guide-Setup_a_Gadget_Server-Setup_virtual_servers_for_the_gadget_rendering">
+ <title>Setup virtual servers for the gadget rendering</title>
+ <para>
+ GateIn recommend you to setup 2 different virtual hosts because it's the basis of
the security model of gadgets. Having the gadget running on a different domain than the
container (the website that 'contains' the app), the gadget can't read /
modify / do anything nasty to GateIn Portal (like adding spam messages, stealing your
cookies, whatever).
+ </para>
+ <para>
+ For example you can server the portal from <emphasis
role="bold">http://www.sample.com</emphasis> and the gadgets from
<emphasis role="bold">http://www.samplemodules.com</emphasis>
+ </para>
+ <para>
+ To do this, we need to configure a parameter with the name is
<emphasis>gadgets.hostName</emphasis> , the value is the
<emphasis>path/to/gadgetServer</emphasis> in GadgetRegisteryService service
like following:
+<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>
+ <para>
+ It's possible to have multiple rendering servers. That would help to balance the
load across multiple servers.
+ </para>
+ <para>
+ If you still want to deploy it on the same server, make sure that it starts before
anything that use the gadgets (for example the webapp GateInGadgets that use
org.exoplatform.application.gadget.GadgetRegister)
+ </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Setup_a_Gadget_Server-Configuration">
+ <title>Configuration</title>
+ <section id="sect-Reference_Guide-Configuration-Security_key">
+ <title>Security key</title>
+ <para>
+ A file <emphasis role="bold">key.txt</emphasis> has to be
generated <emphasis role="bold">for every installation of GateIn to be
secure</emphasis> . This file contains a secret key used to crypt the security token
used for authenticating the user. On Linux this can be generated such as:
+ </para>
+
+<programlisting>dd if=/dev/random bs=32 count=1 | openssl base64 >
/tmp/key.txt
+</programlisting>
+ </section>
+
+ <section
id="sect-Reference_Guide-Configuration-Gadget_proxy_and_concat_configuration">
+ <title>Gadget proxy and concat configuration</title>
+ <para>
+ These servers have to be on the same domain as the gadget server. You can configure
it in:
<filename>eXoGadgetServer:/WEB-INF/classes/containers/default/container.js</filename>.
+<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>
- </para>
- </section>
- <section>
- <title>Proxy</title>
- <para>
- if your server is behind a proxy and you want to allow external gadgets, you should
configure the proxy of your JVM adding this code at the begining.
- </para>
- <programlisting>-Dhttp.proxyHost=proxyhostURL -Dhttp.proxyPort=proxyPortNumber
-Dhttp.proxyUser=someUserName -Dhttp.proxyPassword=somePassword</programlisting>
- </section>
+},
+</programlisting>
+ </para>
+ </section>
+
+ <section id="sect-Reference_Guide-Configuration-Proxy">
+ <title>Proxy</title>
+ <para>
+ if your server is behind a proxy and you want to allow external gadgets, you should
configure the proxy of your JVM adding this code at the begining.
+ </para>
+
+<programlisting>-Dhttp.proxyHost=proxyhostURL -Dhttp.proxyPort=proxyPortNumber
-Dhttp.proxyUser=someUserName -Dhttp.proxyPassword=somePassword
+</programlisting>
+ </section>
</section>
+
</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-01-20
08:10:24 UTC (rev 1387)
+++
portal/trunk/docs/reference-guide/en/modules/portlets/AJAX_in_GateIn_Framework.xml 2010-01-20
08:13:42 UTC (rev 1388)
@@ -1,59 +1,42 @@
<?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_in_GateIn_Framework">
- <title>AJAX in GateIn Framework</title>
- <section id="sect-Reference_Guide-AJAX_in_GateIn_Framework-Overview">
- <title>Overview</title>
- <para>
- It is very easy to create and manage Ajax calls in our
- framework. Just
- a few lines to write in your template file and
- your java class.
- For simple Ajax update of a component, you
- don't even have to
- write any line of JavaScript.
+ <title>AJAX in GateIn Framework</title>
+ <section id="sect-Reference_Guide-AJAX_in_GateIn_Framework-Overview">
+ <title>Overview</title>
+ <para>
+ It is very easy to create and manage Ajax calls in our framework. Just a few lines to
write in your template file and your java class. For simple Ajax update of a component,
you don't even have to write any line of JavaScript.
</para>
- </section>
-
- <section
-
id="sect-Reference_Guide-AJAX_in_GateIn_Framework-Portlet_Preparation">
- <title>Portlet Preparation</title>
- <para>
- Our portlets can use specific
- <literal>ActionListener</literal>
- s to receive and process Ajax calls. To do that, you must
- create an inner static class named following this convention :
- action name followed by ActionListener
- </para>
- <para>
- Example :
- <literal>ParentClass</literal>
- is the class in which you are writing.
- </para>
-
- <programlisting><![CDATA[static public class SaveActionListener extends
EventListener<ParentClass>]]></programlisting>
- <para>
- Don't forget to declare this listener in the configuration
- of your
- portlet, like this :
+ </section>
+
+ <section
id="sect-Reference_Guide-AJAX_in_GateIn_Framework-Portlet_Preparation">
+ <title>Portlet Preparation</title>
+ <para>
+ Our portlets can use specific <literal>ActionListener</literal> s to
receive and process Ajax calls. To do that, you must create an inner static class named
following this convention : action name followed by ActionListener
</para>
-
- <programlisting>listeners =
ParentClass.SaveActionListener.class</programlisting>
- <para>
- along with the correct annotation
- <literal>ComponentConfig</literal>
- ,
- <literal>EventConfig</literal>
- , etc.,
- </para>
- <para>
- For example, the configuration for
- <literal>UIAccountForm</literal>
- :
- </para>
-
- <programlisting role="JAVA"><![CDATA[...
+ <para>
+ Example : <literal>ParentClass</literal> is the class in which you are
writing.
+ </para>
+
+<programlisting>static public class SaveActionListener extends
EventListener<ParentClass>
+</programlisting>
+ <para>
+ Don't forget to declare this listener in the configuration of your portlet, like
this :
+ </para>
+
+<programlisting>listeners = ParentClass.SaveActionListener.class
+</programlisting>
+ <para>
+ along with the correct annotation <literal>ComponentConfig</literal> ,
<literal>EventConfig</literal> , etc.,
+ </para>
+ <para>
+ For example, the configuration for <literal>UIAccountForm</literal> :
+ </para>
+
+<programlisting role="JAVA">...
@ComponentConfig(
lifecycle = UIFormLifecycle.class,
template = "system:/groovy/webui/form/UIFormTabPane.gtmpl",
@@ -73,378 +56,299 @@
@EventConfig(listeners = UIAccountForm.SearchUserActionListener.class, phase =
Phase.DECODE)
}
)
-...]]></programlisting>
- <para>
- Inside this class, you will have to create an
- <literal>execute</literal>
- method like this :
- </para>
-
- <programlisting><![CDATA[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.,
+...
+</programlisting>
+ <para>
+ Inside this class, you will have to create an <literal>execute</literal>
method like this :
</para>
- <para>
- Possible ways to use the event attribute :
+
+<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>
- <itemizedlist>
- <listitem>
- <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>
- </itemizedlist>
- <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:
- </para>
-
-
<programlisting>event.getRequestContext().addUIComponentToUpdateByAjax(uicomponent);</programlisting>
- <para>
- The target component must be provided as parameter (the
- component that
- will be updated). We will come back on this
- later.
+ <para>
+ Possible ways to use the event attribute :
</para>
- <para>
- You must create one inner action listener class for each
- Ajax call you
- want to handle on this portlet. All these classes
- must be
- declared in the configuration annotations of the main
- class,
- otherwise you will get an error.
+ <itemizedlist>
+ <listitem>
+
+<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>
+ </itemizedlist>
+ <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:
</para>
- <para>
- Done. Your portlet is ready to accept Ajax calls from
- your
- client.
- </para>
- </section>
-
- <section
-
id="sect-Reference_Guide-AJAX_in_GateIn_Framework-AJAX_in_the_Groovy_template">
- <title>AJAX in the Groovy template</title>
- <para>
- Your server being configured to receive Ajax calls, you must
- configure
- the client interface to make these calls.
+
+<programlisting>event.getRequestContext().addUIComponentToUpdateByAjax(uicomponent);
+</programlisting>
+ <para>
+ The target component must be provided as parameter (the component that will be
updated). We will come back on this later.
</para>
- <para>
- In the groovy template file associated with your portlet class
- (
- <literal>ParentClass</literal>
- here), you just have to add :
- </para>
-
- <programlisting>uicomponent.event("YourOperation"); //
YourOperation is the same as in the ActionListener class (Save in our example above)
+ <para>
+ You must create one inner action listener class for each Ajax call you want to handle
on this portlet. All these classes must be declared in the configuration annotations of
the main class, otherwise you will get an error.
+ </para>
+ <para>
+ Done. Your portlet is ready to accept Ajax calls from your client.
+ </para>
+ </section>
+
+ <section
id="sect-Reference_Guide-AJAX_in_GateIn_Framework-AJAX_in_the_Groovy_template">
+ <title>AJAX in the Groovy template</title>
+ <para>
+ Your server being configured to receive Ajax calls, you must configure the client
interface to make these calls.
+ </para>
+ <para>
+ In the groovy template file associated with your portlet class (
<literal>ParentClass</literal> here), you just have to add :
+ </para>
+
+<programlisting>uicomponent.event("YourOperation"); // YourOperation is
the same as in the ActionListener class (Save in our example above)
</programlisting>
- <para>
- in a groovy code block. The event function will create an
- url
- starting
- with
- <literal>javascript:</literal>
- so you have to make sure this
- code can be executed in your
- environment.
- </para>
- <para>
- If your operation must update the content of a component,
- you have to
- make sure that the target component is well
- rendered.
- Basically, just type this :
+ <para>
+ in a groovy code block. The event function will create an url starting with
<literal>javascript:</literal> so you have to make sure this code can be
executed in your environment.
</para>
-
- <programlisting>uicomponent.renderChild(UITargetComponent.class)
;</programlisting>
- <para>
- in a groovy code block.
- <literal>UITargetComponent</literal>
- is the class of the component that will be updated when
- </para>
-
-
<programlisting>event.getRequestContext().addUIComponentToUpdateByAjax(uicomponent)
;</programlisting>
- <para>
- is called. Hence,
- <literal>uicomponent</literal>
- must be of type
- <literal>UITargetComponent</literal>
- . If this component is not rendered by default, when the
- portlet loads, don't forget to set its
- <literal>rendered</literal>
- attribute to false :
- </para>
-
- <programlisting>mycomponent.setRendered(false);</programlisting>
- <para>
- in the constructor of your portlet.
+ <para>
+ If your operation must update the content of a component, you have to make sure that
the target component is well rendered. Basically, just type this :
</para>
- </section>
-
- <section
-
id="sect-Reference_Guide-AJAX_in_GateIn_Framework-How_JavaScript_works">
- <title>How JavaScript works</title>
- <para>
- All the javascript is managed by the file
-
<filename>02eXoresources:javascript/eXo/portal/PortalHttpRequest.js</filename>
in
- the portal project.
- </para>
- <para>
- In this class, you will find 4 functions/classes (detailed
- below):
- <itemizedlist>
- <listitem>
- <para>PortletResponse</para>
- </listitem>
- <listitem>
- <para>PortalResponse</para>
- </listitem>
- <listitem>
- <para>AjaxRequest</para>
- </listitem>
- <listitem>
- <para>HttpResponseHandler</para>
- </listitem>
- </itemizedlist>
- </para>
- <para>
- and 6 functions:
+
+<programlisting>uicomponent.renderChild(UITargetComponent.class) ;
+</programlisting>
+ <para>
+ in a groovy code block. <literal>UITargetComponent</literal> is the class
of the component that will be updated when
</para>
- <itemizedlist>
- <listitem>
- <para>
- ajaxGet(url, callback)
- </para>
- <para>This is the main entry method for every Ajax calls to
- the GateIn Portal
- It is simply a dispatcher method that fills some init fields before
- calling the doRequest() method</para>
- </listitem>
- <listitem>
- <para>
- ajaxPost(formElement, callback) // Calls doRequest
- with an url in POST mode
- </para>
- <para>This method is called when a HTTP POST should be done
- but in an AJAX
- case some maniputalions are needed. Once
- the content of the form is placed
- into a string object,
- the call is delegated to the doRequest() method </para>
- </listitem>
- <listitem>
- <para>
- doRequest(method, url, queryString, callback)
- </para>
- <para>
- The doRequest() method takes incoming request from GET
- and POST 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 not null only when there is a POST request.
- <orderedlist>
- <listitem>
- <para>An AjaxRequest object is instanciated, it
- holds the reference to the XHR method</para>
- </listitem>
- <listitem>
- <para>An HttpResponseHandler object is instantiated
- and its methods like
- ajaxResponse, ajaxLoading, ajaxTimeout are associated with the
one from
- the AjaxRequest and will be called by the XHR during the process
- method</para>
- </listitem>
- </orderedlist>
- </para>
- </listitem>
- <listitem>
- <para>
- ajaxAbort()
- </para>
- <para>Cancels the current request</para>
- </listitem>
- <listitem>
- <para>
- ajaxAsyncGetRequest(url, async)
- </para>
- <para>Allows to create and execute a
- sync or async GET
- request
- </para>
- </listitem>
- <listitem>
- <para>
- ajaxRedirect(url)
- </para>
- <para>A simple javascript redirection with
- window.location.href
- that are the entry points of
- these
- classes. You
- shouldn't have to call explicitly these
- functions, since
- the template file and the portlet class
- manage
- everything.
+
+<programlisting>event.getRequestContext().addUIComponentToUpdateByAjax(uicomponent)
;
+</programlisting>
+ <para>
+ is called. Hence, <literal>uicomponent</literal> must be of type
<literal>UITargetComponent</literal> . If this component is not rendered by
default, when the portlet loads, don't forget to set its
<literal>rendered</literal> attribute to false :
+ </para>
+
+<programlisting>mycomponent.setRendered(false);
+</programlisting>
+ <para>
+ in the constructor of your portlet.
+ </para>
+ </section>
+
+ <section
id="sect-Reference_Guide-AJAX_in_GateIn_Framework-How_JavaScript_works">
+ <title>How JavaScript works</title>
+ <para>
+ All the javascript is managed by the file
<filename>02eXoresources:javascript/eXo/portal/PortalHttpRequest.js</filename>
in the portal project.
+ </para>
+ <para>
+ In this class, you will find 4 functions/classes (detailed below):
+ <itemizedlist>
+ <listitem>
+ <para>
+ PortletResponse
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ PortalResponse
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ AjaxRequest
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ HttpResponseHandler
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ and 6 functions:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ ajaxGet(url, callback)
</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section
- id="sect-Reference_Guide-AJAX_in_GateIn_Framework-PortletResponse">
- <title>PortletResponse</title>
- <para>
- This class doesn't contain any method. On creation, it just
- gets the
- response elements from the xml returned by Ajax, and
- store them
- in the corresponding attributes :
+ <para>
+ This is the main entry method for every Ajax calls to the GateIn Portal It is simply
a dispatcher method that fills some init fields before calling the doRequest() method
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ ajaxPost(formElement, callback) // Calls doRequest with an url in POST mode
+ </para>
+ <para>
+ This method is called when a HTTP POST should be done but in an AJAX case some
maniputalions are needed. Once the content of the form is placed into a string object, the
call is delegated to the doRequest() method
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ doRequest(method, url, queryString, callback)
+ </para>
+ <para>
+ The doRequest() method takes incoming request from GET and POST 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 not null only when there is a POST
request.
+ <orderedlist>
+ <listitem>
+ <para>
+ An AjaxRequest object is instanciated, it holds the reference to the XHR method
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ An HttpResponseHandler object is instantiated and its methods like ajaxResponse,
ajaxLoading, ajaxTimeout are associated with the one from the AjaxRequest and will be
called by the XHR during the process method
+ </para>
+ </listitem>
+ </orderedlist>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ ajaxAbort()
+ </para>
+ <para>
+ Cancels the current request
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ ajaxAsyncGetRequest(url, async)
+ </para>
+ <para>
+ Allows to create and execute a sync or async GET request
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ ajaxRedirect(url)
+ </para>
+ <para>
+ A simple javascript redirection with window.location.href that are the entry points
of these classes. You shouldn't have to call explicitly these functions, since the
template file and the portlet class manage everything.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section
id="sect-Reference_Guide-AJAX_in_GateIn_Framework-PortletResponse">
+ <title>PortletResponse</title>
+ <para>
+ This class doesn't contain any method. On creation, it just gets the response
elements from the xml returned by Ajax, and store them in the corresponding attributes :
</para>
- <itemizedlist>
- <listitem>
- <para>
- portletId
+ <itemizedlist>
+ <listitem>
+ <para>
+ portletId
</para>
- </listitem>
- <listitem>
- <para>
- portletTitle
+ </listitem>
+ <listitem>
+ <para>
+ portletTitle
</para>
- </listitem>
- <listitem>
- <para>
- portletMode // View, Edit, Help or Config
+ </listitem>
+ <listitem>
+ <para>
+ portletMode // View, Edit, Help or Config
</para>
- </listitem>
- <listitem>
- <para>
- portletState // Decode, Render
+ </listitem>
+ <listitem>
+ <para>
+ portletState // Decode, Render
</para>
- </listitem>
- <listitem>
- <para>
- portletData // The updated data to put in the
- component
+ </listitem>
+ <listitem>
+ <para>
+ portletData // The updated data to put in the component
</para>
- </listitem>
- <listitem>
- <para>
- script //The javascript code to update the component
- </para>
- </listitem>
- <listitem>
- <para>
- blocksToUpdate // An array containing the containers
- to update with this script
+ </listitem>
+ <listitem>
+ <para>
+ script //The javascript code to update the component
</para>
- </listitem>
- </itemizedlist>
- <para>
- You can access these attributes just by calling them from your
- <literal>PortletResponse</literal>
- instance.
- </para>
- </section>
-
- <section
- id="sect-Reference_Guide-AJAX_in_GateIn_Framework-PortalResponse">
- <title>PortalResponse</title>
- <para>
- Contains an array of
- <literal>PortletResponse</literal>
- s (
- <literal>portletResponses</literal>
- ) and two other attributes :
- </para>
- <itemizedlist>
- <listitem>
- <para>
- data // Data to update
+ </listitem>
+ <listitem>
+ <para>
+ blocksToUpdate // An array containing the containers to update with this script
</para>
- </listitem>
- <listitem>
- <para>
- script // Javascript code to update
+ </listitem>
+ </itemizedlist>
+ <para>
+ You can access these attributes just by calling them from your
<literal>PortletResponse</literal> instance.
+ </para>
+ </section>
+
+ <section
id="sect-Reference_Guide-AJAX_in_GateIn_Framework-PortalResponse">
+ <title>PortalResponse</title>
+ <para>
+ Contains an array of <literal>PortletResponse</literal> s (
<literal>portletResponses</literal> ) and two other attributes :
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ data // Data to update
</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section
id="sect-Reference_Guide-AJAX_in_GateIn_Framework-AjaxRequest">
- <title>AjaxRequest</title>
- <para>
- By far the most important class of this file. Wraps the
- XMLHttpRequest
- object with some functions and attributes, to
- make it easier to
- use. You can find the complete documentation
- here :
-
http://www.ajaxtoolbox.com/request/documentation.php
- </para>
- </section>
-
- <section
-
id="sect-Reference_Guide-AJAX_in_GateIn_Framework-HttpResponseHandler">
- <title>HttpResponseHandler</title>
- <para>
- This class provides methods to handle the Ajax response.
+ </listitem>
+ <listitem>
+ <para>
+ script // Javascript code to update
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section
id="sect-Reference_Guide-AJAX_in_GateIn_Framework-AjaxRequest">
+ <title>AjaxRequest</title>
+ <para>
+ By far the most important class of this file. Wraps the XMLHttpRequest object with
some functions and attributes, to make it easier to use. You can find the complete
documentation here :
http://www.ajaxtoolbox.com/request/documentation.php
</para>
- <itemizedlist>
- <listitem>
- <para>
- executeScript // execute some javascript
+ </section>
+
+ <section
id="sect-Reference_Guide-AJAX_in_GateIn_Framework-HttpResponseHandler">
+ <title>HttpResponseHandler</title>
+ <para>
+ This class provides methods to handle the Ajax response.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ executeScript // execute some javascript
</para>
- </listitem>
- <listitem>
- <para>
- updateBlocks // update some html components
+ </listitem>
+ <listitem>
+ <para>
+ updateBlocks // update some html components
</para>
- </listitem>
- <listitem>
- <para>
- ajaxTimeout // a function called when the timeout of
- the ajax call exceeds.
- Just cancel the request
+ </listitem>
+ <listitem>
+ <para>
+ ajaxTimeout // a function called when the timeout of the ajax call exceeds. Just
cancel the request
</para>
- </listitem>
- <listitem>
- <para>
- ajaxResponse // creates a PortalResponse object from
- the data from the Ajax
- request
+ </listitem>
+ <listitem>
+ <para>
+ ajaxResponse // creates a PortalResponse object from the data from the Ajax request
</para>
- </listitem>
- <listitem>
- <para>
- ajaxLoading // shows the loading popup and mask layer
+ </listitem>
+ <listitem>
+ <para>
+ ajaxLoading // shows the loading popup and mask layer
</para>
- </listitem>
- </itemizedlist>
- </section>
-
- <section
-
id="sect-Reference_Guide-AJAX_in_GateIn_Framework-Portal_Ajax_Response_Data_Structure">
- <title>Portal Ajax Response Data Structure</title>
-
- <programlisting>{PortalResponse}
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section
id="sect-Reference_Guide-AJAX_in_GateIn_Framework-Portal_Ajax_Response_Data_Structure">
+ <title>Portal Ajax Response Data Structure</title>
+
+<programlisting>{PortalResponse}
|
|--->{PortletResponse}
|
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-01-20
08:10:24 UTC (rev 1387)
+++
portal/trunk/docs/reference-guide/en/modules/portlets/Create_a_WebUI_Portlet.xml 2010-01-20
08:13:42 UTC (rev 1388)
@@ -1,79 +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-Create_a_WebUI_Portlet">
- <title>Create a WebUI Portlet</title>
- <section id="sect-Reference_Guide-Create_a_WebUI_Portlet-Overview">
- <title>Overview</title>
- <para>
- TODO: Create example (This one doesn't exist anymore). Overall this chapter
need to be reviewed, any taker ? :)
- </para>
- <para>
- This example is based on the testPortlet in portal/trunk/portlet/test.
- </para>
- </section>
-
- <section
-
id="sect-Reference_Guide-Create_a_WebUI_Portlet-Configure_the_portlet">
- <title>Configure the portlet</title>
-
- <section
id="sect-Reference_Guide-Create_a_WebUI_Portlet-Folder_tree">
- <title>Folder tree</title>
- <para>
- On Eclipse (or any IDE), create a new Java Project, and create this folder
tree :
- </para>
- <programlisting>src
+ <title>Create a WebUI Portlet</title>
+ <section id="sect-Reference_Guide-Create_a_WebUI_Portlet-Overview">
+ <title>Overview</title>
+ <para>
+ TODO: Create example (This one doesn't exist anymore). Overall this chapter need
to be reviewed, any taker ? :)
+ </para>
+ <para>
+ This example is based on the testPortlet in portal/trunk/portlet/test.
+ </para>
+ </section>
+
+ <section
id="sect-Reference_Guide-Create_a_WebUI_Portlet-Configure_the_portlet">
+ <title>Configure the portlet</title>
+ <section id="sect-Reference_Guide-Configure_the_portlet-Folder_tree">
+ <title>Folder tree</title>
+ <para>
+ On Eclipse (or any IDE), create a new Java Project, and create this folder tree :
+ </para>
+
+<programlisting>src
| main
| |- java
| |- resources
- | |- webapp</programlisting>
-
- </section>
-
- <section id="sect-Reference_Guide-Create_a_WebUI_Portlet-pom.xml">
- <title>pom.xml</title>
- <para>
- Create the pom.xml, at root level of the project, like this :
- </para>
-
- <programlisting role="XML"><![CDATA[<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>
- <section>
- <title>UITestRomainPortlet.java</title>
- <para>
- In java/testRomain/portlet/component/, we will create the UITestRomainPortlet.java
file for the portlet :
- </para>
+ | |- webapp
+</programlisting>
+ </section>
-<programlisting role="JAVA"><![CDATA[package
org.gatein.example.portlet.testRomain;
+ <section id="sect-Reference_Guide-Configure_the_portlet-pom.xml">
+ <title>pom.xml</title>
+ <para>
+ 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>
+ </section>
+
+ <section
id="sect-Reference_Guide-Configure_the_portlet-UITestRomainPortlet.java">
+ <title>UITestRomainPortlet.java</title>
+ <para>
+ In java/testRomain/portlet/component/, we will create the UITestRomainPortlet.java
file for the portlet :
+ </para>
+
+<programlisting role="JAVA">package
org.gatein.example.portlet.testRomain;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.core.lifecycle.UIApplicationLifecycle;
import org.exoplatform.webui.core.UIPortletApplication;
@@ -86,9 +89,11 @@
public UITestRomainPortlet() throws Exception {
}
-}]]></programlisting>
- </section>
- <!--
+}
+</programlisting>
+ </section>
+
+ <!--
<section
id="sect-Reference_Guide-Create_a_WebUI_Portlet-testRomain.xml">
<title>testRomain.xml</title>
<para>
@@ -99,109 +104,116 @@
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-Create_a_WebUI_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"><![CDATA[<div
id="<%=uicomponent.getId();%>">
+ -->
+ <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();%>">
HelloWorld
-</div>]]></programlisting>
- </section>
- <section id="sect-Reference_Guide-Create_a_WebUI_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.
- </para>
- </section>
-
- <section
id="sect-Reference_Guide-Create_a_WebUI_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" />.
- </para>
- </section>
-
- <section
id="sect-Reference_Guide-Create_a_WebUI_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.
- </para>
+</div>
+</programlisting>
+ </section>
-<programlisting role="XML"><![CDATA[<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>
- <section>
- <title>portlet.xml</title>
- <para>
- In WEB-INF, create file portlet.xml :
- </para>
+ <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.
+ </para>
+ </section>
-<programlisting role="XML"><![CDATA[<?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"
+ <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" />.
+ </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.
+ </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>
+ </section>
+
+ <section id="sect-Reference_Guide-Configure_the_portlet-portlet.xml">
+ <title>portlet.xml</title>
+ <para>
+ 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>
+
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>
+ </section>
+
+ <section id="sect-Reference_Guide-Configure_the_portlet-web.xml">
+ <title>web.xml</title>
+ <para>
+ 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>
+ </section>
+
</section>
- <section id="sect-Reference_Guide-Create_a_WebUI_Portlet-web.xml">
- <title>web.xml</title>
- <para>
- In WEB-INF, create file web.xml :
- </para>
-
-<programlisting role="XML"><![CDATA[<?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>
- </section>
- <section>
+ <section
id="sect-Reference_Guide-Create_a_WebUI_Portlet-Use_the_Portlet">
<title>Use the Portlet</title>
<para>
Compile your portlet, deploy it, and add it to the portal.
@@ -209,70 +221,79 @@
<para>
Now, we will add a button in the portlet. This button will open a popup with a message
inside.
</para>
- <section>
- <title>Add a button</title>
- <para>
- In the groovy template, add this code :
- </para>
+ <section id="sect-Reference_Guide-Use_the_Portlet-Add_a_button">
+ <title>Add a button</title>
+ <para>
+ 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>
+ </section>
-<programlisting role="HTML"><![CDATA[<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>
- <section>
- <title>Add a listener</title>
- <para>
- In the java file, in @ComponentConfig, add this code :
- </para>
-
-<programlisting role="JAVA"><![CDATA[events = {
+ <section id="sect-Reference_Guide-Use_the_Portlet-Add_a_listener">
+ <title>Add a listener</title>
+ <para>
+ In the java file, in @ComponentConfig, add this code :
+ </para>
+
+<programlisting role="JAVA">events = {
@EventConfig(listeners = UITestRomainPortlet.OpenPopupActionListener.class)
-}]]></programlisting>
- <para>
- Remark : XXXActionLister.class XXX must match the name you set for the event in the
groovy.
- </para>
-
-<programlisting role="JAVA"><![CDATA[static public class
OpenPopupActionListener extends EventListener<UITestRomainPortlet> {
- public void execute(Event<UITestRomainPortlet> event) throws Exception {
+}
+</programlisting>
+ <para>
+ 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>
- </section>
- <section>
- <title>Redeploy</title>
+}
+</programlisting>
+ </section>
+
+ <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.
+ </para>
+ </section>
+
+ </section>
+
+ <section
id="sect-Reference_Guide-Create_a_WebUI_Portlet-Add_a_HelloWorld_popup">
+ <title>Add a "HelloWorld" popup</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.
- </para>
- </section>
- </section>
- <section>
- <title>Add a "HelloWorld" popup</title>
- <para>
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"><![CDATA[<div
id="<%=uicomponent.getId();%>">
+<programlisting role="HTML"><div
id="<%=uicomponent.getId();%>">
HelloWorld in a popup
-</div>]]></programlisting>
+</div>
+</programlisting>
<para>
In java/testRomain/portlet/component, create the java file for the popup look like :
{code} package testRomain.portlet.component;
</para>
- <programlisting role="JAVA"><![CDATA[package
testRomain.portlet.component;
+
+<programlisting role="JAVA">package testRomain.portlet.component;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.core.lifecycle.UIApplicationLifecycle;
@@ -286,37 +307,42 @@
public UIHelloWorldPopupContent() throws Exception {
}
-}]]></programlisting>
+}
+</programlisting>
<para>
In UITestRomainPortlet.java, we will create the popup at the portlet creation (in the
constructor) :
</para>
-<programlisting role="JAVA"><![CDATA[public UITestRomainPortlet()
throws Exception {
+
+<programlisting role="JAVA">public UITestRomainPortlet() throws Exception
{
UIPopupWindow popup = addChild(UIPopupWindow.class, null, null);
popup.setWindowSize(400, 300);
UIHelloWorldPopupContent popupContent =
createUIComponent(UIHelloWorldPopupContent.class, null, null);
popup.setUIComponent(popupContent);
popup.setRendered(false);
- ]]></programlisting>
+</programlisting>
<para>
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><![CDATA[<% uicomponent.renderChildren();
%>]]></programlisting>
+<programlisting><% uicomponent.renderChildren(); %>
+</programlisting>
<para>
This makes the portlet generate the content of all child components.
</para>
<para>
Change the treatment of the event, replace the println by :
</para>
- <programlisting role="JAVA"><![CDATA[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);
popup.setShow(true);
}
-}]]></programlisting>
+}
+</programlisting>
<para>
When user clicks on the button, the popup is shown.
</para>
Modified: portal/trunk/docs/reference-guide/en/modules/portlets/Groovy_Templates.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/portlets/Groovy_Templates.xml 2010-01-20
08:10:24 UTC (rev 1387)
+++ portal/trunk/docs/reference-guide/en/modules/portlets/Groovy_Templates.xml 2010-01-20
08:13:42 UTC (rev 1388)
@@ -1,239 +1,164 @@
<?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>
- <section id="sect-Reference_Guide-Groovy_Templates-Overview">
- <title>Overview</title>
- <para>
- This article gives a glance at the Groovy language, and
- explains how to
- configure the portlet and and the groovy
- template.
+ <title>Groovy Templates</title>
+ <section id="sect-Reference_Guide-Groovy_Templates-Overview">
+ <title>Overview</title>
+ <para>
+ This article gives a glance at the Groovy language, and explains how to configure the
portlet and and the groovy template.
</para>
- <para>
- It's recommended to read also
- <xref linkend="sect-Reference_Guide-AJAX_in_GateIn_Framework"
/>
- in order to understand better the communication between the
- Groovy Template and the portlet.
- </para>
- </section>
-
- <section id="sect-Reference_Guide-Groovy_Templates-Basic_structure">
- <title>Basic structure</title>
- <para>
- The structure of a template is very easy :
+ <para>
+ It's recommended to read also <xref
linkend="sect-Reference_Guide-AJAX_in_GateIn_Framework" /> in order to
understand better the communication between the Groovy Template and the portlet.
</para>
- <itemizedlist>
- <listitem>
- <para>
- The HTML code
+ </section>
+
+ <section id="sect-Reference_Guide-Groovy_Templates-Basic_structure">
+ <title>Basic structure</title>
+ <para>
+ The structure of a template is very easy :
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ The HTML code
</para>
- </listitem>
- <listitem>
- <para>
- zero or more groovy language code blocks, enclosed by
- <% ... %> </para>
- </listitem>
- </itemizedlist>
- <para>
- The HTML code in the template doesn't have to contain the
- <literal>html</literal>
- , or
- <literal>body</literal>
- tags. Hence, you can use a groovy template for a component that
- will be rendered in another component.
- </para>
- <para>
- Example :
- </para>
-
- <programlisting role="HTML"><![CDATA[<!DOCTYPE html
+ </listitem>
+ <listitem>
+ <para>
+ zero or more groovy language code blocks, enclosed by <% ... %>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The HTML code in the template doesn't have to contain the
<literal>html</literal> , or <literal>body</literal> tags. Hence,
you can use a groovy template for a component that will be rendered in another component.
+ </para>
+ <para>
+ 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">
-<%
+ "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. Here are a few
- examples on how to use it, but you can find more information in
- <ulink
url="http://groovy.codehaus.org/Documentation">the full
documentation</ulink>
- .
- </para>
- <para>
- This language looks like Java a lot, so it's very easy to
- use. Examples :
- </para>
- <para>
- Variables definition :
- </para>
- <programlisting>int min = 1;
+ </section>
+
+ <section id="sect-Reference_Guide-Groovy_Templates-Groovy_language">
+ <title>Groovy language</title>
+ <para>
+ Groovy is a scripting language for Java. Here are a few examples on how to use it, but
you can find more information in <ulink
url="http://groovy.codehaus.org/Documentation">the full
documentation</ulink> .
+ </para>
+ <para>
+ This language looks like Java a lot, so it's very easy to use. Examples :
+ </para>
+ <para>
+ Variables definition :
+ </para>
+
+<programlisting>int min = 1;
def totalPage = uicomponent.getAvailablePage();
String name = "uiPortlet";
categories = uicomponent.getItemCategories();
-String columns = uicomponent.getColumns();</programlisting>
- <para>Other expressions :</para>
- <programlisting><![CDATA[for(category in categories) { ... }
+String columns = uicomponent.getColumns();
+</programlisting>
+ <para>
+ Other expressions :
+ </para>
+
+<programlisting>for(category in categories) { ... }
for(i in min..max) { ... } // min and max are int variables
-println "</div>" ;
+println "</div>" ;
println """
- <div class="Item">
- <div class="OverflowContainer">
+ <div class="Item">
+ <div class="OverflowContainer">
""";
-<%=uicomponent.getToolbarStyle();%> // <%= to avoid a call of println method
-import org.exoplatform.portal.config.model.PageNode;]]></programlisting>
- </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-Groovy_Templates-Portlet_configuration">
- <title>Portlet configuration</title>
- <para>
- The configuration of a portlet is partly made with
- <literal>ComponentConfig</literal> annotations (others are
- ComponentConfigs, EventConfig, etc). One of the parameters
- of
- this annotation is called
- <literal>template</literal>, where you can define the path
- to
- the template file associated with this portlet.
- </para>
- <para>
- To specify this parameter to your portlet, just add this
- statement to your configuration annotation, for example in
- <emphasis
role="bold">src:/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/
- </emphasis>
- you find
- <emphasis
role="bold">UIApplicationForm.java</emphasis>
- :
- </para>
-
- <programlisting>@ComponentConfig(
+<%=uicomponent.getToolbarStyle();%> // <%= to avoid a call of
println method
+import org.exoplatform.portal.config.model.PageNode;
+</programlisting>
+ </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>
+ The configuration of a portlet is partly made with
<literal>ComponentConfig</literal> annotations (others are ComponentConfigs,
EventConfig, etc). One of the parameters of this annotation is called
<literal>template</literal>, where you can define the path to the template
file associated with this portlet.
+ </para>
+ <para>
+ To specify this parameter to your portlet, just add this statement to your
configuration annotation, for example in <emphasis
role="bold">src:/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/
</emphasis> you find <emphasis
role="bold">UIApplicationForm.java</emphasis> :
+ </para>
+
+<programlisting>@ComponentConfig(
lifecycle = UIFormLifecycle.class,
template = "system:/groovy/webui/form/UIFormWithTitle.gtmpl",
events = {
@EventConfig(listeners = UIApplicationForm.SaveActionListener.class),
@EventConfig(phase = Phase.DECODE, listeners =
UIApplicationForm.CancelActionListener.class)
}
-)</programlisting>
- <para>
- You see that the path is in the namespace called "system",
- "system" is a reference to the portal webapp. In this webapp
- you find some reusable groovy templates, just open the
- folder
- <emphasis
role="bold">src:/web/portal/src/main/webapp/groovy/webui/form/
- </emphasis>
- to see them.
- </para>
- <para>
- As you want to create your own template, create a groovy
- file
- in your webbapp and refer to it. Please use the
- namespace "app"
- for refering to the same webapp as your
- component. GateIn
- always puts the component templates in a
- folder like
-
"/webapp/groovy/<literal>your_portlet_name</literal>/webui/component".
- </para>
- <programlisting>template =
"app:/groovy/your_portlet_name/webui/component/your_component.gtmpl"</programlisting>
- <para>
- You can now edit your template file.
- </para>
- </section>
-
- <section
id="sect-Reference_Guide-Groovy_Templates-The_template_file">
- <title>The template file</title>
- <para>
- As we said before, the template file is composed of HTML
- code and
- groovy code blocks. There are a few things more that
- you
- need
- to know to fully link your portlet with your
- template.
- </para>
- <para>
- If your template defines the UI of a component, you have
- an access to
- this component instance (the java object) using
- the variable
- <literal>uicomponent</literal>. This should be the case
- almost
- all the time, but we recommend that you check that
- your java
- class inherits from UIComponent before you use this
- variable.
- With this <literal>uicomponent</literal> variable, you can access
all
- the
- attributes and functions of your component, to use them
- in your
- template. Example : UIPageIterator.gtmpl:
- </para>
- <programlisting><![CDATA[<%
+)
+</programlisting>
+ <para>
+ You see that the path is in the namespace called "system",
"system" is a reference to the portal webapp. In this webapp you find some
reusable groovy templates, just open the folder <emphasis
role="bold">src:/web/portal/src/main/webapp/groovy/webui/form/
</emphasis> to see them.
+ </para>
+ <para>
+ As you want to create your own template, create a groovy file in your webbapp and
refer to it. Please use the namespace "app" for refering to the same webapp as
your component. GateIn always puts the component templates in a folder like
"/webapp/groovy/<literal>your_portlet_name</literal>/webui/component".
+ </para>
+
+<programlisting>template =
"app:/groovy/your_portlet_name/webui/component/your_component.gtmpl"
+</programlisting>
+ <para>
+ You can now edit your template file.
+ </para>
+ </section>
+
+ <section
id="sect-Reference_Guide-Linking_a_portlet_with_a_template-The_template_file">
+ <title>The template file</title>
+ <para>
+ As we said before, the template file is composed of HTML code and groovy code blocks.
There are a few things more that you need to know to fully link your portlet with your
template.
+ </para>
+ <para>
+ If your template defines the UI of a component, you have an access to this component
instance (the java object) using the variable <literal>uicomponent</literal>.
This should be the case almost all the time, but we recommend that you check that your
java class inherits from UIComponent before you use this variable. With this
<literal>uicomponent</literal> variable, you can access all the attributes and
functions of your component, to use them in your template. Example :
UIPageIterator.gtmpl:
+ </para>
+
+<programlisting><%
def currentPage = uicomponent.getCurrentPage();
-%>
+%>
...
-<a
href="<%=uicomponent.event("ShowPage","$currentPage")%>"
class="Icon LastTopPageIcon">
- <span></span>
-</a>]]></programlisting>
- <para>
- This example shows that <literal>uicomponent</literal> can be
used to make Ajax
- calls,
- thanks to the <literal>event</literal> method. See
- <xref linkend="sect-Reference_Guide-AJAX_in_GateIn_Framework"
/>
- for more details.
- </para>
- <para>
- Another variable that you can use is
- <literal>ctx</literal>. It gives access to the context in which
the
- template is processed. Hence, you can get some elements
- like
- the request, the Javscript manager, or the resource
- resolver (ctx.appRes).
- Examples :
- </para>
- <programlisting><![CDATA[<%
+<a
href="<%=uicomponent.event("ShowPage","$currentPage")%>"
class="Icon LastTopPageIcon">
+ <span></span>
+</a>
+</programlisting>
+ <para>
+ This example shows that <literal>uicomponent</literal> can be used to
make Ajax calls, thanks to the <literal>event</literal> method. See <xref
linkend="sect-Reference_Guide-AJAX_in_GateIn_Framework" /> for more details.
+ </para>
+ <para>
+ Another variable that you can use is <literal>ctx</literal>. It gives
access to the context in which the template is processed. Hence, you can get some elements
like the request, the Javscript manager, or the resource resolver (ctx.appRes). Examples
:
+ </para>
+
+<programlisting><%
def rcontext = ctx.getRequestContext() ;
context.getJavascriptManager().importJavascript('GateIn.webui.UIPopupWindow');
ctx.appRes(popupId + ".title."+ title);
-%>]]></programlisting>
- <para>
- If you use your template to define the user interface of a
- component that includes a form, you can access the instance
- of
- UIForm in a variable named
- <literal>uiform</literal>. The UIForm class provides the
- methods, <literal>begin()</literal> and
- <literal>end()</literal>,
- that write the HTML tags of the
- form. Your form class must
- inherit from
- <literal>UIForm</literal>
- , in this class you add the input elements (fields,
- checkboxes,
- lists) which you wish to use in your form. In
- your groovy
- template you can render your input elements using
- <literal>uiform.renderField(field)</literal>
- </para>
- </section>
- </section>
+%>
+</programlisting>
+ <para>
+ If you use your template to define the user interface of a component that includes a
form, you can access the instance of UIForm in a variable named
<literal>uiform</literal>. The UIForm class provides the methods,
<literal>begin()</literal> and <literal>end()</literal>, that
write the HTML tags of the form. Your form class must inherit from
<literal>UIForm</literal> , in this class you add the input elements (fields,
checkboxes, lists) which you wish to use in your form. In your groovy template you can
render your input elements using <literal>uiform.renderField(field)</literal>
+ </para>
+ </section>
+ </section>
+
</section>
Modified: portal/trunk/docs/reference-guide/en/modules/portlets/Portlet_Lifecycle.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/portlets/Portlet_Lifecycle.xml 2010-01-20
08:10:24 UTC (rev 1387)
+++ portal/trunk/docs/reference-guide/en/modules/portlets/Portlet_Lifecycle.xml 2010-01-20
08:13:42 UTC (rev 1388)
@@ -1,78 +1,55 @@
<?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>
- <section id="sect-Reference_Guide-Portlet_Lifecycle-Overview">
- <title>Overview</title>
- <para>
- The goal of this chapter is not to talk about the Portlet API
- specification lifecycle but more about GateIn UI framework to
- easily develop portlets.
+ <title>Portlet Lifecycle</title>
+ <section id="sect-Reference_Guide-Portlet_Lifecycle-Overview">
+ <title>Overview</title>
+ <para>
+ The goal of this chapter is not to talk about the Portlet API specification lifecycle
but more about GateIn UI framework to easily develop portlets.
</para>
- <para>
- The web framework used here has been completely developed by GateIn and
- perfectly suits the portal environment, it even allows to send
- events from the portlet UIComponents to the Portal ones.
+ <para>
+ The web framework used here has been completely developed by GateIn and perfectly
suits the portal environment, it even allows to send events from the portlet UIComponents
to the Portal ones.
</para>
- <para>
- Of course using the GateIn web framework to build portlets is not
- necessary and any other web framework that supports portlet
- environment can be used. But all GateIn portlets that are part
- of GateIn products are developed using that framework and we
- provide several UI components that can be used in different
- abstracted contexts such as the portal itself or some portlets.
- </para>
- <para>
- This chapter is not a tutorial on how to write portlets, it
- will go in the details of the code implementation and logic;
- hence it is intended for advanced developers. It is also
- advised to read the
- <xref linkend="sect-Reference_Guide-Portal_Lifecycle" />
- article before as the that article explains concepts that are
- similar and top hierarchy classes that are shared.
- </para>
- </section>
-
- <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. Every portlet that
- shall be built using the GateIn web framework must reference
- the
- <emphasis
role="bold">PortletApplicationController</emphasis>
- . The portlet configuration such as the root component is
- defined in a
- <emphasis role="bold">configuration.xml</emphasis>
- file. The path to this configuration.xml file is defined in the
- init-param "
- <emphasis role="bold">webui.configuration</emphasis>
- " of porlet.xml.
- </para>
-
- <programlisting><![CDATA[<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>
+ <para>
+ Of course using the GateIn web framework to build portlets is not necessary and any
other web framework that supports portlet environment can be used. But all GateIn portlets
that are part of GateIn products are developed using that framework and we provide several
UI components that can be used in different abstracted contexts such as the portal itself
or some portlets.
+ </para>
+ <para>
+ This chapter is not a tutorial on how to write portlets, it will go in the details of
the code implementation and logic; hence it is intended for advanced developers. It is
also advised to read the <xref
linkend="sect-Reference_Guide-Portal_Lifecycle" /> article before as the that
article explains concepts that are similar and top hierarchy classes that are shared.
+ </para>
+ </section>
+
+ <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. Every portlet that shall be built using the GateIn web framework must
reference the <emphasis
role="bold">PortletApplicationController</emphasis> . The portlet
configuration such as the root component is defined in a <emphasis
role="bold">configuration.xml</emphasis> file. The path to this
configuration.xml file is defined in the init-param " <emphasis
role="bold">webui.configuration</emphasis> " of porlet.xml.
+ </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>
- <init-param>
- <name>webui.configuration</name>
-
<value>/WEB-INF/conf/portlet/content/ContentPortlet/webui/configuration.xml</value>
- </init-param>
-</portlet>]]></programlisting>
+ <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 <emphasis
role="bold">configuration.xml</emphasis> file is exactly the same as
the <emphasis>webui-configuration.xml</emphasis>which we have already
introduced in the <xref linkend="sect-Reference_Guide-Portal_Lifecycle" />
article. In the case of the content portlet it looks like:
</para>
-<programlisting><![CDATA[<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>
+<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 <emphasis
role="bold">PortletApplicationController</emphasis> class extends the
<emphasis role="bold">GenericPortlet</emphasis> class defined in the
Portlet API specification.
</para>
@@ -80,7 +57,7 @@
All methods like <emphasis>processAction()</emphasis> or
<emphasis>render()</emphasis> are delegated to the <emphasis
role="bold">PortletApplication</emphasis>. The creation and caching
inside the <emphasis role="bold">WebController</emphasis> object is
described in the following method:
</para>
-<programlisting><![CDATA[/**
+<programlisting>/**
* try to obtain the PortletApplication from the WebAppController.
*
* If it does not exist a new PortletApplication object is created, init and cached in
the
@@ -97,7 +74,8 @@
controller.addApplication(application) ;
}
return application ;
-}]]></programlisting>
+}
+</programlisting>
</section>
<section
id="sect-Reference_Guide-Portlet_Lifecycle-Portlet_request_handler">
@@ -113,7 +91,7 @@
The code of the method in PortletApplication is described here. The business logic is
shown in the javadoc:
</para>
-<programlisting><![CDATA[/**
+<programlisting>/**
* The processAction() method is the one modelled according to the Portlet API
specification
*
* The process is quite simple and here are te different steps done in the method:
@@ -150,12 +128,13 @@
context.setProcessAction(true) ;
WebuiRequestContext.setCurrentInstance(parentAppRequestContext) ;
}
-}]]></programlisting>
+}
+</programlisting>
<para>
The <emphasis role="bold">PortletRequestContext</emphasis>
extends <emphasis role="bold">WebuiRequestContext</emphasis> class
and acts as a wrapper on top of all the portlet request information:
</para>
-<programlisting><![CDATA[/**
+<programlisting>/**
* In this method we try to get the PortletRequestContext object from the attribute map
of the parent
* WebuiRequestContext.
*
@@ -184,7 +163,8 @@
}
context.setParentAppRequestContext(parentAppRequestContext) ;
return context;
-}]]></programlisting>
+}
+</programlisting>
<para>
In the PortletApplication, the line
</para>
@@ -192,7 +172,7 @@
<emphasis>UIApplication uiApp =
getStateManager().restoreUIRootComponent(context);</emphasis> asks the StateManager
defined for the portlet to get the UI root component. In the case of a portlet the root
component must extend UIPortletApplication.
</para>
-<programlisting><![CDATA[public class ParentAppStateManager extends StateManager
{
+<programlisting>public class ParentAppStateManager extends StateManager {
/**
* This method simply delegate the call to the same method of the parent
WebuiRequestContext
@@ -201,12 +181,13 @@
public UIApplication restoreUIRootComponent(WebuiRequestContext context) throws
Exception {
WebuiRequestContext pcontext = (WebuiRequestContext)
context.getParentAppRequestContext() ;
return pcontext.getStateManager().restoreUIRootComponent(context) ;
- }]]></programlisting>
+ }
+</programlisting>
<para>
Hence this is the PortalStateManager that will also handle the extraction of the root
component.
</para>
-<programlisting><![CDATA[public UIApplication
restoreUIRootComponent(WebuiRequestContext context) throws Exception {
+<programlisting>public UIApplication restoreUIRootComponent(WebuiRequestContext
context) throws Exception {
context.setStateManager(this) ;
WebuiApplication app = (WebuiApplication)context.getApplication() ;
@@ -231,7 +212,8 @@
}
return uiApplication ;
}
-}]]></programlisting>
+}
+</programlisting>
</section>
<section id="sect-Reference_Guide-Portlet_Lifecycle-Render_phase">
@@ -240,7 +222,7 @@
The render method business logic is quite similar to processAction().
</para>
-<programlisting><![CDATA[/**
+<programlisting>/**
* The render method business logic is quite similar to the processAction() one.
*
* 1) A PortletRequestContext object is created (or extracted from the cache if it
already exists)
@@ -283,12 +265,13 @@
}
WebuiRequestContext.setCurrentInstance(parentAppRequestContext) ;
}
-}]]></programlisting>
+}
+</programlisting>
<para>
The processRender() call made on the UIPortletApplication is shown now:
</para>
-<programlisting><![CDATA[/**
+<programlisting>/**
* The default processRender for an UIPortletApplication handles two cases:
*
* A. Ajax is used
@@ -308,7 +291,7 @@
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) {
@@ -318,7 +301,8 @@
}
}
super.processRender(context) ;
-}]]></programlisting>
+}
+</programlisting>
</section>
</section>
Modified: portal/trunk/docs/reference-guide/en/modules/portlets/Standard.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/portlets/Standard.xml 2010-01-20 08:10:24
UTC (rev 1387)
+++ portal/trunk/docs/reference-guide/en/modules/portlets/Standard.xml 2010-01-20 08:13:42
UTC (rev 1388)
@@ -1,224 +1,138 @@
-<?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">
-<section id="tutorials">
- <title>Portlet Primer</title>
- <section id="portlet_primer">
- <title>JSR-168 and JSR-286 overview</title>
- <para>
- The Portlet Specifications aims 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. Most Java EE portals include one, it is
- obviously the case for
- GateIn Portal which includes the GateIn
- Portlet Container supporting the two
- versions. This chapter
- gives a brief overview of the Portlet Specifications but
- portlet developers are strongly encouraged to read the
- <ulink
url="http://www.jcp.org/en/jsr/detail?id=286">
- JSR-286 Portlet Specification
- </ulink>
- .
- </para>
- <para>
- GateIn Portal is fully JSR-286 compliant, which means any
- JSR-168 or JSR-286
- portlet behaves as it is mandated by the
- respective specifications inside the
- portal.
- </para>
- <section>
- <title>Portal Pages</title>
- <para>
- A portal can be seen as pages with different areas, and
- inside areas,
- different windows, and each window having one
- portlet:
- </para>
- <para>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/tutorials/SpecPortalDef.png"
- format="PNG" scalefit="1" />
- </imageobject>
- </mediaobject>
- </para>
- </section>
- <section>
- <title>Rendering Modes</title>
- <para>
- A portlet can have different view modes. Three modes are
- defined by the
- JSR-286 specification:
- </para>
- <para>
- <itemizedlist>
- <listitem>
- <para>
- <emphasis>view</emphasis>
- - generates markup reflecting the current state of
- the portlet.
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>edit</emphasis>
- - allows a user to customize the behavior of the
- portlet.
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>help</emphasis>
- - provides information to the user as to how to use
- the portlet.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </section>
- <section>
- <title>Window States</title>
- <para>
- Window states are an indicator of how much page
- real-estate a portlet consumes
- on any given page. The three
- states defined by the JSR-168 specification are:
- </para>
- <para>
- <itemizedlist>
- <listitem>
- <para>
- <emphasis>normal</emphasis>
- - a portlet shares this page with other portlets.
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>minimized</emphasis>
- -a portlet may show very little information, or
- none at all.
- </para>
- </listitem>
- <listitem>
- <para>
- <emphasis>maximized</emphasis>
- - a portlet may be the only portlet displayed on
- this page.
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </section>
- </section>
- <section id="tutorials_tutorials">
- <title>Tutorials</title>
- <para>
- The tutorials contained in this chapter are targeted toward
- portlet developers.
- Although they are a good starting and
- reference point, it is highly recommend
- that portlet developers
- read and understand the
- <ulink
url="http://www.jcp.org/en/jsr/detail?id=286">
- JSR-286 Portlet Specification
- </ulink>
- .
- </para>
- <section>
- <title>Deploying your first Portlet</title>
- <section>
- <title>Introduction</title>
- <para>
- This section describes how to deploy a portlet in GateIn
- Portal. You will
- find the
- <emphasis>SimplestHelloWorld</emphasis>
- portlet in the
- <literal>examples</literal>
- directory at the root of your GateIn Portal binary
- package.
- </para>
- </section>
- <section>
- <title>Compiling</title>
- <para>
- This example is using Maven to compile and build the web
- archive. If you
- don't have Maven already installed, you
- will find a version for your
- operating system
- <ulink
url="http://maven.apache.org/download.html">here</ulink>
- </para>
- <para>
- To compile and package the application, go to the
- SimplestHelloWorld
- directory and type
- <literal>mvn package</literal>
- .
- </para>
- <para>
- Once successfully packaged, the result should be
- available in:
- <literal>SimplestHelloWorld/target/SimplestHelloWorld-0.0.1.war
- </literal>
- . Simply copy that file into
- <literal>JBOSS_HOME/server/default/deploy</literal>
- , then start JBoss Application Server if it was not
- already started.
- </para>
- <para>
- Now you will need to create a new page and add that portlet on it.
- </para>
- <para>
- <mediaobject>
- <imageobject>
- <objectinfo>
- <title>SimplestHelloWorldPortlet deployed on a
- new page</title>
- </objectinfo>
- <imagedata
- fileref="images/tutorials/first_portlet/deployed.png"
/>
- </imageobject>
- </mediaobject>
- </para>
- </section>
- <section>
- <title>Package Structure</title>
- <bridgehead>
- Now that we have seen how to deploy an existing
- web application, let's have
- a look inside.
- </bridgehead>
- <para>
- Like other Java Platform, Enterprise Edition (Java EE)
- applications,
- portlets are packaged in WAR files. A
- typical portlet WAR file can include
- servlets, resource
- bundles, images, HTML,
- <trademark class="trade">JavaServer</trademark>
- Pages (
- <trademark class="trade">JSP</trademark>
- ), and other static or dynamic files. The following is an
- example of the
- directory structure of the
- HelloWorldPortlet portlet:
- </para>
- <programlistingco>
- <areaspec>
- <area id="tutorials.simplest.javaclass" coords='9'
/>
- <area id="tutorials.simplest.portlet" coords='10'
/>
- <area id="tutorials.simplest.web" coords='11'
/>
- </areaspec>
- <programlisting><![CDATA[|-- SimplestHelloWorld-0.0.1.war
+<?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 Portlet Specifications aims 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. Most Java EE portals include one,
it is obviously the case for GateIn Portal which includes the GateIn Portlet Container
supporting the two versions. This chapter gives a brief overview of the Portlet
Specifications but portlet developers are strongly encouraged to read the <ulink
url="http://www.jcp.org/en/jsr/detail?id=286"> JSR-286 Portlet Specification
</ulink> .
+ </para>
+ <para>
+ GateIn Portal is fully JSR-286 compliant, which means any JSR-168 or JSR-286 portlet
behaves as it is mandated by the respective specifications inside the portal.
+ </para>
+ <section
id="sect-Reference_Guide-JSR_168_and_JSR_286_overview-Portal_Pages">
+ <title>Portal Pages</title>
+ <para>
+ A portal can be seen as pages with different areas, and inside areas, different
windows, and each window having one portlet:
+ </para>
+ <para>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/tutorials/SpecPortalDef.png"
format="PNG" scalefit="1" width="444" />
+ </imageobject>
+ </mediaobject>
+ </para>
+ </section>
+
+ <section
id="sect-Reference_Guide-JSR_168_and_JSR_286_overview-Rendering_Modes">
+ <title>Rendering Modes</title>
+ <para>
+ A portlet can have different view modes. Three modes are defined by the JSR-286
specification:
+ </para>
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis>view</emphasis> - generates markup reflecting the current
state of the portlet.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>edit</emphasis> - allows a user to customize the behavior of
the portlet.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>help</emphasis> - provides information to the user as to how
to use the portlet.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </section>
+
+ <section
id="sect-Reference_Guide-JSR_168_and_JSR_286_overview-Window_States">
+ <title>Window States</title>
+ <para>
+ Window states are an indicator of how much page real-estate a portlet consumes on any
given page. The three states defined by the JSR-168 specification are:
+ </para>
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis>normal</emphasis> - a portlet shares this page with other
portlets.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>minimized</emphasis> -a portlet may show very little
information, or none at all.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis>maximized</emphasis> - a portlet may be the only portlet
displayed on this page.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </section>
+
+ </section>
+
+ <section id="sect-Reference_Guide-Portlet_Primer-Tutorials">
+ <title>Tutorials</title>
+ <para>
+ The tutorials contained in this chapter are targeted toward portlet developers.
Although they are a good starting and reference point, it is highly recommend that portlet
developers read and understand the <ulink
url="http://www.jcp.org/en/jsr/detail?id=286"> JSR-286 Portlet Specification
</ulink> .
+ </para>
+ <section
id="sect-Reference_Guide-Tutorials-Deploying_your_first_Portlet">
+ <title>Deploying your first Portlet</title>
+ <section
id="sect-Reference_Guide-Deploying_your_first_Portlet-Introduction">
+ <title>Introduction</title>
+ <para>
+ This section describes how to deploy a portlet in GateIn Portal. You will find the
<emphasis>SimplestHelloWorld</emphasis> portlet in the
<literal>examples</literal> directory at the root of your GateIn Portal binary
package.
+ </para>
+ </section>
+
+ <section
id="sect-Reference_Guide-Deploying_your_first_Portlet-Compiling">
+ <title>Compiling</title>
+ <para>
+ This example is using Maven to compile and build the web archive. If you don't
have Maven already installed, you will find a version for your operating system <ulink
url="http://maven.apache.org/download.html">here</ulink>
+ </para>
+ <para>
+ To compile and package the application, go to the SimplestHelloWorld directory and
type <literal>mvn package</literal> .
+ </para>
+ <para>
+ Once successfully packaged, the result should be available in:
<literal>SimplestHelloWorld/target/SimplestHelloWorld-0.0.1.war </literal> .
Simply copy that file into <literal>JBOSS_HOME/server/default/deploy</literal>
, then start JBoss Application Server if it was not already started.
+ </para>
+ <para>
+ Now you will need to create a new page and add that portlet on it.
+ </para>
+ <para>
+ <mediaobject>
+ <imageobject>
+ <objectinfo
id="obje-Reference_Guide-Compiling-SimplestHelloWorldPortlet_deployed_on_a_new_page"><title>SimplestHelloWorldPortlet
deployed on a new page</title>
+ </objectinfo><imagedata
fileref="images/tutorials/first_portlet/deployed.png" format="PNG"
width="444" />
+ </imageobject>
+ </mediaobject>
+ </para>
+ </section>
+
+ <section
id="sect-Reference_Guide-Deploying_your_first_Portlet-Package_Structure">
+ <title>Package Structure</title>
+ <bridgehead> Now that we have seen how to deploy an existing web application,
let's have a look inside. </bridgehead>
+ <para>
+ Like other Java Platform, Enterprise Edition (Java EE) applications, portlets are
packaged in WAR files. A typical portlet WAR file can include servlets, resource bundles,
images, HTML, <trademark class="trade">JavaServer</trademark> Pages
( <trademark class="trade">JSP</trademark> ), and other static or
dynamic files. The following is an example of the directory structure of the
HelloWorldPortlet 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" />
+ </areaspec>
+
+<programlisting>|-- SimplestHelloWorld-0.0.1.war
| `-- WEB-INF
| |-- classes
| | `-- org
@@ -228,54 +142,45 @@
| | `-- portlets
| | `-- SimplestHelloWorldPortlet.class
| |-- portlet.xml
-| `-- web.xml]]>
- </programlisting>
- <calloutlist>
- <callout arearefs="tutorials.simplest.javaclass">
- <para>
- The compiled Java class implementing
- <emphasis>javax.portlet.Portlet</emphasis>
- (through
- <emphasis>javax.portlet.GenericPortlet
- </emphasis>
- )
- </para>
- </callout>
- <callout arearefs="tutorials.simplest.portlet">
- <para>
- This is the mandatory descriptor files for
- portlets. It is used
- during deployment..
- </para>
- </callout>
- <callout arearefs="tutorials.simplest.web">
- <para>This is the mandatory descriptor for web
- applications.</para>
- </callout>
- </calloutlist>
- </programlistingco>
- </section>
+| `-- web.xml
+</programlisting>
+ <calloutlist>
+ <callout
arearefs="area-Reference_Guide-tutorials.simplest.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">
+ <para>
+ This is the mandatory descriptor files for portlets. It is used during
deployment..
+ </para>
+ </callout>
+ <callout arearefs="area-Reference_Guide-tutorials.simplest.web">
+ <para>
+ This is the mandatory descriptor for web applications.
+ </para>
+ </callout>
+ </calloutlist>
+ </programlistingco>
- <section>
- <title>Portlet Class</title>
- <bridgehead>Let's study the Java class in detail.
- </bridgehead>
- <para>
- The following file is the
- <filename>
-
SimplestHelloWorldPortlet/src/main/java/org/gatein/portal/examples/portlets/SimplestHelloWorldPortlet.java
- </filename>
- Java source.
- </para>
- <programlistingco>
- <areaspec>
- <area id="tutorials.simplest.extends" coords='10'
/>
- <area id="tutorials.simplest.doview" coords='13'
/>
- <area id="tutorials.simplest.writer" coords='15'
/>
- <area id="tutorials.simplest.write" coords='16'
/>
- <area id="tutorials.simplest.close" coords='17'
/>
- </areaspec>
- <programlisting role="JAVA"><![CDATA[package
org.gatein.portal.examples.portlets;
+ </section>
+
+ <section
id="sect-Reference_Guide-Deploying_your_first_Portlet-Portlet_Class">
+ <title>Portlet Class</title>
+ <bridgehead>Let's study the Java class in detail. </bridgehead>
+ <para>
+ The following file is the <filename>
SimplestHelloWorldPortlet/src/main/java/org/gatein/portal/examples/portlets/SimplestHelloWorldPortlet.java
</filename> Java source.
+ </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" />
+ </areaspec>
+
+<programlisting role="JAVA">package org.gatein.portal.examples.portlets;
import java.io.IOException;
import java.io.PrintWriter;
@@ -293,260 +198,140 @@
writer.write("Hello World !");
writer.close();
}
-}]]>
- </programlisting>
- <calloutlist>
- <callout arearefs="tutorials.simplest.extends">
- <para>
- All portlets must implement the
- <literal>javax.portlet.Portlet</literal>
- interface. The portlet API provides a convenient
- implementation of
- this interface, in the form of
- the
- <literal>javax.portlet.GenericPortlet</literal>
- class, which among other things, implements the
- <literal>Portlet render</literal>
- method to dispatch to abstract mode-specific
- methods to make it
- easier to support the standard
- portlet modes. As well, it 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="tutorials.simplest.doview">
- <para>
- As we extend from
- <literal>GenericPortlet</literal>
- , and are only interested in supporting the
- <literal>view</literal>
- mode, only the
- <literal>doView</literal>
- method needs to be implemented, and the
- <literal>GenericPortlet</literal>
- <literal>render</literal>
- implemention calls our implementation when the
- <literal>view</literal>
- mode is requested.
- </para>
- </callout>
- <callout arearefs="tutorials.simplest.writer">
- <para>
- Use the
- <emphasis>RenderResponse</emphasis>
- to obtain a writer to be used to produce
- content.
- </para>
- </callout>
- <callout arearefs="tutorials.simplest.write">
- <para>Write the markup to display.</para>
- </callout>
- <callout arearefs="tutorials.simplest.close">
- <para>Closing the writer.</para>
- </callout>
- </calloutlist>
- </programlistingco>
- <para>
- <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. In
- particular, 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>
- </section>
- <section id="first_portlet_descriptors">
- <title>Application Descriptors</title>
- <para>
- GateIn Portal requires certain descriptors to be
- included in a portlet WAR
- file. Thise descriptors are
- defined by the Jave EE (web.xml) and Portlet
- Specification (portlet.xml).
- </para>
- <para>
- The following is an example of the
- <filename>SimplestHelloWorldPortlet/WEB-INF/portlet.xml
- </filename>
- file. This file must adhere to its definition in the
- JSR-286 Portlet
- Specification. You may define more than
- one portlet application in this
- file:
- </para>
- <programlistingco>
- <areaspec>
- <area id="tutorials.simplest.portletname"
coords='8' />
- <area id="tutorials.simplest.portletclass"
- coords='9' />
- <area id="tutorials.simplest.supports" coords='12'
/>
- <area id="tutorials.simplest.portletinfo"
coords='15' />
- </areaspec>
- <programlisting><![CDATA[
-<portlet-app
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+}
+</programlisting>
+ <calloutlist>
+ <callout
arearefs="area-Reference_Guide-tutorials.simplest.extends">
+ <para>
+ All portlets must implement the
<literal>javax.portlet.Portlet</literal> interface. The portlet API provides a
convenient implementation of this interface, in the form of the
<literal>javax.portlet.GenericPortlet</literal> class, which among other
things, implements the <literal>Portlet render</literal> method to dispatch to
abstract mode-specific methods to make it easier to support the standard portlet modes. As
well, it 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">
+ <para>
+ As we extend from <literal>GenericPortlet</literal> , and are only
interested in supporting the <literal>view</literal> mode, only the
<literal>doView</literal> method needs to be implemented, and the
<literal>GenericPortlet</literal><literal>render</literal>
implemention calls our implementation when the <literal>view</literal> mode is
requested.
+ </para>
+ </callout>
+ <callout
arearefs="area-Reference_Guide-tutorials.simplest.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">
+ <para>
+ Write the markup to display.
+ </para>
+ </callout>
+ <callout arearefs="area-Reference_Guide-tutorials.simplest.close">
+ <para>
+ Closing the writer.
+ </para>
+ </callout>
+ </calloutlist>
+ </programlistingco>
+
+ <para>
+ <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. In particular, 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>
+ </section>
+
+ <section
id="sect-Reference_Guide-Deploying_your_first_Portlet-Application_Descriptors">
+ <title>Application Descriptors</title>
+ <para>
+ GateIn Portal requires certain descriptors to be included in a portlet WAR file.
Thise descriptors are defined by the Jave EE (web.xml) and Portlet Specification
(portlet.xml).
+ </para>
+ <para>
+ The following is an example of the
<filename>SimplestHelloWorldPortlet/WEB-INF/portlet.xml </filename> file. This
file must adhere to its definition in the JSR-286 Portlet Specification. You may define
more than one portlet application in this file:
+ </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" />
+ </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>
+ 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>]]>
- </programlisting>
- <calloutlist>
- <callout arearefs="tutorials.simplest.portletname">
- <para>
- Define the portlet name. It does not have to
- be the class name.
- </para>
- </callout>
- <callout arearefs="tutorials.simplest.portletclass">
- <para>
- The Fully Qualified Name (FQN) of your
- portlet class must be
- declared here.
- </para>
- </callout>
- <callout arearefs="tutorials.simplest.supports">
- <para>
- The
- <computeroutput><supports>
- </computeroutput>
- element declares all of the markup types that a
- portlet supports
- in the
- <literal>render</literal>
- method. This is accomplished via the
- <computeroutput><mime-type>
- </computeroutput>
- element, which is required for every portlet.
- The declared MIME
- types must match the capability
- of the portlet. As well, it allows
- you to pair
- which modes and window states are supported for
- each
- markup type. All portlets must support the
- <computeroutput>view</computeroutput>
- portlet mode, so this does not have to be
- declared. Use the
- <computeroutput><mime-type>
- </computeroutput>
- element to define which markup type your portlet
- supports, which
- in this example, is
- <computeroutput>text/html</computeroutput>
- . This section tells the portal that it only
- outputs HTML.
- </para>
- </callout>
- <callout arearefs="tutorials.simplest.portletinfo">
- <para>
- When rendered, the portlet's title is displayed
- as the header in
- the portlet window, unless it is
- overridden programmatically. In
- this example, the
- title would be
- <computeroutput>Simplest Hello World Portlet
- </computeroutput>
- .
- </para>
- </callout>
- </calloutlist>
- </programlistingco>
- </section>
- </section>
- <section>
- <title>
- <trademark class="trade">JavaServer</trademark>
- Pages Portlet Example
- </title>
- <section>
- <title>Introduction</title>
- <para>
- Now we will add more features to the previous example and
- also use a JSP
- page to render the markup. We will use the
- portlet tag library to generate
- links to our portlet in
- different ways and use the other standard portlet
- modes.
- This example can be found in the directory
- <literal>JSPHelloUser</literal>
- .
- Use
- <literal>mvn package</literal>
- then copy
- <filename>JSPHelloUser/target/JSPHelloUser-0.0.1.war
- </filename>
- in the
- <literal>deploy</literal>
- directory of JBoss Application Server.
- Point your brwoser
- to
- <literal></literal>
- , you should see the following:
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/tutorials/jsp_portlet/output.png"
- align="center" scalefit="1" />
- </imageobject>
- </mediaobject>
- <note>
- <para>
- The
- <literal>EDIT</literal>
- button only appears with logged-in users, which is
- not the case
- on the screenshot
- </para>
- </note>
- </para>
- </section>
- <section>
- <title>Package Structure</title>
- <para>
- The structure doesn't change much at the exception of
- adding some JSP files
- detailed later.
- </para>
- <para>
- The JSPHelloUser portlet contains the mandatory
- portlet application descriptors.
- The following is an example of the
- directory structure of
- the JSPHelloUser portlet:
- </para>
- <programlisting><![CDATA[JSPHelloUser-0.0.1.war
+ </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">
+ <para>
+ Define the portlet name. It does not have to be the class name.
+ </para>
+ </callout>
+ <callout
arearefs="area-Reference_Guide-tutorials.simplest.portletclass">
+ <para>
+ The Fully Qualified Name (FQN) of your portlet class must be declared here.
+ </para>
+ </callout>
+ <callout
arearefs="area-Reference_Guide-tutorials.simplest.supports">
+ <para>
+ The <computeroutput><supports> </computeroutput>
element declares all of the markup types that a portlet supports in the
<literal>render</literal> method. This is accomplished via the
<computeroutput><mime-type> </computeroutput> element, which is
required for every portlet. The declared MIME types must match the capability of the
portlet. As well, it allows you to pair which modes and window states are supported for
each markup type. All portlets must support the
<computeroutput>view</computeroutput> portlet mode, so this does not have to
be declared. Use the <computeroutput><mime-type>
</computeroutput> element to define which markup type your portlet supports, which
in this example, is <computeroutput>text/html</computeroutput> . This section
tells the portal that it only outputs HTML.
+ </para>
+ </callout>
+ <callout
arearefs="area-Reference_Guide-tutorials.simplest.portletinfo">
+ <para>
+ When rendered, the portlet's title is displayed as the header in the portlet
window, unless it is overridden programmatically. In this example, the title would be
<computeroutput>Simplest Hello World Portlet </computeroutput> .
+ </para>
+ </callout>
+ </calloutlist>
+ </programlistingco>
+
+ </section>
+
+ </section>
+
+ <section
id="sect-Reference_Guide-Tutorials-_JavaServer_Pages_Portlet_Example_">
+ <title><trademark class="trade">JavaServer</trademark>
Pages Portlet Example </title>
+ <section
id="sect-Reference_Guide-_JavaServer_Pages_Portlet_Example_-Introduction">
+ <title>Introduction</title>
+ <para>
+ Now we will add more features to the previous example and also use a JSP page to
render the markup. We will use the portlet tag library to generate links to our portlet in
different ways and use the other standard portlet modes. This example can be found in the
directory <literal>JSPHelloUser</literal> . Use <literal>mvn
package</literal> then copy
<filename>JSPHelloUser/target/JSPHelloUser-0.0.1.war </filename> in the
<literal>deploy</literal> directory of JBoss Application Server. Point your
brwoser to <literal></literal> , you should see the following:
+ <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 on the screenshot
+ </para>
+ </note>
+ </para>
+ </section>
+
+ <section
id="sect-Reference_Guide-_JavaServer_Pages_Portlet_Example_-Package_Structure">
+ <title>Package Structure</title>
+ <para>
+ The structure doesn't change much at the exception of adding some JSP files
detailed later.
+ </para>
+ <para>
+ The JSPHelloUser portlet contains the mandatory portlet application descriptors. The
following is an example of the directory structure of the JSPHelloUser portlet:
+ </para>
+
+<programlisting>JSPHelloUser-0.0.1.war
|-- META-INF
| |-- MANIFEST.MF
|-- WEB-INF
@@ -563,30 +348,25 @@
|-- edit.jsp
|-- hello.jsp
|-- help.jsp
- `-- welcome.jsp]]>
- </programlisting>
- </section>
- <section>
- <title>Portlet Class</title>
- <bridgehead>Let's study the Java class in detail.
- </bridgehead>
- <para>
- The following file is 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 id="tutorials.jsphello.doView" coords='18'
/>
- <area id="tutorials.jsphello.renderParameter"
- coords='21' />
- <area id="tutorials.jsphello.requestDispatcher"
- coords='25' />
- <area id="tutorials.jsphello.include" coords='26'
/>
- </areaspec>
- <programlisting role="JAVA"><![CDATA[package
org.gatein.portal.examples.portlets;
+ `-- welcome.jsp
+</programlisting>
+ </section>
+
+ <section
id="sect-Reference_Guide-_JavaServer_Pages_Portlet_Example_-Portlet_Class">
+ <title>Portlet Class</title>
+ <bridgehead>Let's study the Java class in detail. </bridgehead>
+ <para>
+ The following file is 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" />
+ </areaspec>
+
+<programlisting role="JAVA">package org.gatein.portal.examples.portlets;
import java.io.IOException;
@@ -619,72 +399,40 @@
prd.include(request, response);
}
}
-...]]></programlisting>
- <calloutlist>
- <callout arearefs="tutorials.jsphello.doView">
- <para>
- As in the first portlet, we override the
- <emphasis>doView</emphasis>
- method.
- </para>
- </callout>
- <callout
arearefs="tutorials.jsphello.renderParameter">
- <para>
- Here we try to obtain the value of the render
- parameter names
- <literal>yourname</literal>
- . If defined we want to redirect to the
- <filename>hello.jsp</filename>
- JSP page, otherwise to the
- <filename>welcome.jsp</filename>
- JSP page.
- </para>
- </callout>
- <callout
arearefs="tutorials.jsphello.requestDispatcher">
- <para>
- Very similar to the Servlet way, we get a
- request dispatcher on a
- file located within the
- web archive.
- </para>
- </callout>
- <callout arearefs="tutorials.jsphello.include">
- <para>
- The last step is to perform the inclusion of
- the markup obtained
- from the JSP.
- </para>
- </callout>
- </calloutlist>
- </programlistingco>
- <para>
- We have seen the
- <literal>VIEW</literal>
- portlet mode, the spec defines two other modes that can
- be used called
- <literal>EDIT</literal>
- and
- <literal>HELP</literal>
- . In order to enable those modes, they will need to be
- defined in the
- <filename>portlet.xml</filename>
- descriptor as we will see later. Having those modes
- defined will enable the
- corresponding buttons on the
- portlet's window.
- </para>
- <para>
- The generic portlet that is inherited dispatches the
- different views to
- methods named:
- <literal>doView</literal>
- ,
- <literal>doHelp</literal>
- and
- <literal>doEdit</literal>
- . Let's watch the code for those two last portlet modes.
- </para>
- <programlisting role="JAVA"><![CDATA[...
+...
+</programlisting>
+ <calloutlist>
+ <callout
arearefs="area-Reference_Guide-tutorials.jsphello.doView">
+ <para>
+ As in the first portlet, we override the <emphasis>doView</emphasis>
method.
+ </para>
+ </callout>
+ <callout
arearefs="area-Reference_Guide-tutorials.jsphello.renderParameter">
+ <para>
+ Here we try to obtain the value of the render parameter names
<literal>yourname</literal> . If defined we want to 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">
+ <para>
+ Very similar to the Servlet way, we get a request dispatcher on a file located
within the web archive.
+ </para>
+ </callout>
+ <callout
arearefs="area-Reference_Guide-tutorials.jsphello.include">
+ <para>
+ The last step is to perform the inclusion of the markup obtained from the JSP.
+ </para>
+ </callout>
+ </calloutlist>
+ </programlistingco>
+
+ <para>
+ We have seen the <literal>VIEW</literal> portlet mode, the spec defines
two other modes that can be used called <literal>EDIT</literal> and
<literal>HELP</literal> . In order to enable those modes, they will need to be
defined in the <filename>portlet.xml</filename> descriptor as we will see
later. Having those modes defined will enable the corresponding buttons on the
portlet's window.
+ </para>
+ <para>
+ The generic portlet that is inherited dispatches the different views to methods
named: <literal>doView</literal> , <literal>doHelp</literal> and
<literal>doEdit</literal> . Let's watch the code for those two last
portlet modes.
+ </para>
+
+<programlisting role="JAVA">...
protected void doHelp(RenderRequest rRequest, RenderResponse rResponse) throws
PortletException, IOException,
UnavailableException
{
@@ -700,337 +448,259 @@
PortletRequestDispatcher prd =
getPortletContext().getRequestDispatcher("/jsp/edit.jsp");
prd.include(rRequest, rResponse);
}
-...]]></programlisting>
-
- <para>
- If you have read the portlet specification carefully
- you should have notice
- that portlet calls happen in one or
- two phases. One when the portlet is
- just rendered, two
- when the portlet is actionned then rendered. An action
- phase is a phase where some state change. The render
- phase will have access
- to render parameters that will be
- passed each time the portlet is refreshed
- (with the
- exception of caching capabilities).
- </para>
- <para>
- The code to be executed during an action has to be
- implemented in the
- <emphasis>processAction</emphasis>
- method of the portlet.
- </para>
- <programlistingco>
- <areaspec>
- <area id="tutorials.jsphello.processAction"
- coords='2' />
- <area id="tutorials.jsphello.getActionParameter"
- coords='5' />
- <area id="tutorials.jsphello.setRenderParameter"
- coords='6' />
- </areaspec>
- <programlisting role="JAVA"><![CDATA[...
+...
+</programlisting>
+ <para>
+ If you have read the portlet specification carefully you should have notice that
portlet calls happen in one or two phases. One when the portlet is just rendered, two when
the portlet is actionned then rendered. An action phase is a phase where some state
change. The render phase will have access to render parameters that will be passed each
time the portlet is refreshed (with the exception of caching capabilities).
+ </para>
+ <para>
+ The code to be executed during an action has to be implemented in the
<emphasis>processAction</emphasis> method of the portlet.
+ </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" />
+ </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);
}
-...]]></programlisting>
- <calloutlist>
- <callout arearefs="tutorials.jsphello.processAction">
- <para>
- <literal>processAction</literal>
- is the method from GernericPorlet to override
- for the
- <emphasis>action</emphasis>
- phase.
- </para>
- </callout>
- <callout
arearefs="tutorials.jsphello.getActionParameter">
- <para>
- Here we retrieve the parameter obtained through
- an
- <emphasis>action URL</emphasis>
- .
- </para>
- </callout>
- <callout
arearefs="tutorials.jsphello.setRenderParameter">
- <para>
- Here we need to keep the value of
- <literal>yourname</literal>
- to make it available in the rendering phase.
- With the previous
- line, we are simply copying an
- action parameter to a render
- parameter for the
- sake of this example.
- </para>
- </callout>
- </calloutlist>
- </programlistingco>
- </section>
- <section>
- <title>
- <trademark class="trade">JSP</trademark>
- files and the Portlet Tag Library
- </title>
- <bridgehead>Let's have a look inside the JSP pages.
- </bridgehead>
- <para>
- The
- <filename>help.jsp</filename>
- and
- <filename>edit.jsp</filename>
- files are very simple, they simply display some text.
- Note that we used CSS
- styles as defined in the portlet
- specification. It ensures that the portlet
- will look
- "good" within the theme and accross portal vendors.
- </para>
- <programlisting role="XHTML"><![CDATA[<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"><![CDATA[<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>
- Now let's have a look at the landing page, it contains
- the links and form
- to call our portlet:
- </para>
- <programlistingco>
- <areaspec>
- <area id="tutorials.jsphello.taglib" coords='1'
/>
- <area id="tutorials.jsphello.method1" coords='13'
/>
- <area id="tutorials.jsphello.method2.1"
coords='20' />
- <area id="tutorials.jsphello.method2.2"
coords='24' />
- <area id="tutorials.jsphello.method3.1"
coords='30' />
- <area id="tutorials.jsphello.method3.2"
coords='31' />
- </areaspec>
+...
+</programlisting>
+ <calloutlist>
+ <callout
arearefs="area-Reference_Guide-tutorials.jsphello.processAction">
+ <para>
+ <literal>processAction</literal> is the method from GernericPorlet to
override for the <emphasis>action</emphasis> phase.
+ </para>
+ </callout>
+ <callout
arearefs="area-Reference_Guide-tutorials.jsphello.getActionParameter">
+ <para>
+ Here we retrieve the parameter obtained through an <emphasis>action
URL</emphasis> .
+ </para>
+ </callout>
+ <callout
arearefs="area-Reference_Guide-tutorials.jsphello.setRenderParameter">
+ <para>
+ Here we need to keep the value of <literal>yourname</literal> to make
it available in the rendering phase. With the previous line, we are simply copying an
action parameter to a render parameter for the sake of this example.
+ </para>
+ </callout>
+ </calloutlist>
+ </programlistingco>
- <programlisting><![CDATA[<%@ taglib
uri="http://java.sun.com/portlet" prefix="portlet" %>
+ </section>
+
+ <section
id="sect-Reference_Guide-_JavaServer_Pages_Portlet_Example_-_JSP_files_and_the_Portlet_Tag_Library_">
+ <title><trademark class="trade">JSP</trademark> files and
the Portlet Tag Library </title>
+ <bridgehead>Let's have a look inside the JSP pages. </bridgehead>
+ <para>
+ The <filename>help.jsp</filename> and
<filename>edit.jsp</filename> files are very simple, they simply display some
text. Note that we used CSS styles as defined in the portlet specification. It ensures
that the portlet will look "good" within the theme and accross 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>
+
+<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>
+ Now let's have a look at the landing page, it 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" />
+ </areaspec>
+
+<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>]]></programlisting>
- <calloutlist>
- <callout arearefs="tutorials.jsphello.taglib">
- <para>
- Since we will use the portlet taglib, we
- first need to declare it.
- </para>
- </callout>
- <callout arearefs="tutorials.jsphello.method1">
- <para>
- The first method showed here is the simplest
- one,
- <literal>portlet:renderURL</literal>
- will create a URL that will call the render
- phase of the current
- portlet and append the
- result at the place of the markup (Here
- within a
- tag...). We also added a parameter directly on
- the URL.
- </para>
- </callout>
- <callout arearefs="tutorials.jsphello.method2.1">
- <para>
- In this method instead of having a tag within
- another tag, which
- is not XML valid, we use the
- <literal>var</literal>
- attribute. Instead of printing the url the
- <literal>portlet:renderURL</literal>
- tag will store the result in the referenced
- variable (
- <literal>myRenderURL</literal>
- in our case).
- </para>
- </callout>
- <callout arearefs="tutorials.jsphello.method2.2">
- <para>
- The variable
- <literal>myRenderURL</literal>
- is used like any other JSP variable.
- </para>
- </callout>
- <callout arearefs="tutorials.jsphello.method3.1">
- <para>
- The third method mixes form submission and
- action request. Like in
- the second method, we
- used a temporary variable to put the created
- URL
- into.
- </para>
- </callout>
- <callout arearefs="tutorials.jsphello.method3.2">
- <para>The action URL is used in the HTML form.
- </para>
- </callout>
- </calloutlist>
- </programlistingco>
-
- <para>
- On the third method, first the action phase is triggered
- then later in the request, the render
- phase is triggered,
- which output some content back to the web browser based
- on the
- available render parameters.
- <mediaobject>
- <imageobject>
- <imagedata format="PNG"
- fileref="images/tutorials/jsp_portlet/process.png"
- scalefit="1" />
- </imageobject>
- </mediaobject>
- </para>
- </section>
- <section>
- <title>
- <trademark class="trade">JSF</trademark>
- example using the JBoss Portlet Bridge
- </title>
- <bridgehead>In order to write a portlet using JSF we need a
- piece of software called 'bridge' that
- lets us write a portlet application as if it was a JSF application, the
- bridge takes care of the
- interactions between the two layers.</bridgehead>
- <para>Such an example is available in examples/JSFHelloUser,
- it uses the JBoss Portlet Bridge.
- The configuration is slightly different from a JSP application, since
- it is a bit tricky it is usally a good
- idea to copy an existing application that starting from
scratch.</para>
- <para>
- First, as any JSF application, the file
- <literal>faces-config.xml</literal>
- is required. It includes
- the following required information in it:
- </para>
- <programlisting
role="XML"><![CDATA[<faces-config>
+<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">
+ <para>
+ Since we will use the portlet taglib, we first need to declare it.
+ </para>
+ </callout>
+ <callout
arearefs="area-Reference_Guide-tutorials.jsphello.method1">
+ <para>
+ The first method showed here is the simplest one,
<literal>portlet:renderURL</literal> will create a URL that will call the
render phase of the current portlet and append the result at the place of the markup (Here
within a tag...). We also added a parameter directly on the URL.
+ </para>
+ </callout>
+ <callout
arearefs="area-Reference_Guide-tutorials.jsphello.method2.1">
+ <para>
+ In this method instead of having a tag within another tag, which is not XML
valid, we use the <literal>var</literal> attribute. Instead of printing the
url the <literal>portlet:renderURL</literal> tag will store the result in the
referenced variable ( <literal>myRenderURL</literal> in our case).
+ </para>
+ </callout>
+ <callout
arearefs="area-Reference_Guide-tutorials.jsphello.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">
+ <para>
+ The third method mixes form submission and action request. Like in the second
method, we used a temporary variable to put the created URL into.
+ </para>
+ </callout>
+ <callout
arearefs="area-Reference_Guide-tutorials.jsphello.method3.2">
+ <para>
+ The action URL is used in the HTML form.
+ </para>
+ </callout>
+ </calloutlist>
+ </programlistingco>
+
+ <para>
+ On the third method, first the action phase is triggered then later in the request,
the render phase is triggered, which output some content back to the web browser based on
the available render parameters.
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/tutorials/jsp_portlet/process.png"
format="PNG" scalefit="1" width="444" />
+ </imageobject>
+ </mediaobject>
+ </para>
+ </section>
+
+ <section
id="sect-Reference_Guide-_JavaServer_Pages_Portlet_Example_-_JSF_example_using_the_JBoss_Portlet_Bridge_">
+ <title><trademark class="trade">JSF</trademark> example
using the JBoss Portlet Bridge </title>
+ <bridgehead>In order to write a portlet using JSF we need a piece of software
called 'bridge' that lets us write a portlet application as if it was a JSF
application, the bridge takes care of the interactions between the two
layers.</bridgehead>
+ <para>
+ Such an example is available in examples/JSFHelloUser, it uses the JBoss Portlet
Bridge. The configuration is slightly different from a JSP application, since it is a bit
tricky it is usally a good idea to copy an existing application that starting from
scratch.
+ </para>
+ <para>
+ First, as any JSF application, the file
<literal>faces-config.xml</literal> is required. It includes the following
required information in it:
+ </para>
+
+<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> ]]></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.
- </para>
- <para>
- The other difference compare to a regular portlet
- application, can be found in the portlet
- descriptor. All details about it can be found in the JSR-301
specification
- that the JBoss Portlet Bridge
- implements.
- </para>
- <programlistingco>
- <areaspec>
- <area id="tutorials.jsf.portlet" coords="9"
/>
- <area id="tutorials.jsf.view" coords="21"
/>
- <area id="tutorials.jsf.edit" coords="26"
/>
- <area id="tutorials.jsf.help" coords="31"
/>
- </areaspec>
- <programlisting><![CDATA[<?xml version="1.0"
encoding="UTF-8"?>
-<portlet-app
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+</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.
+ </para>
+ <para>
+ The other difference compare to a regular portlet application, can be found in the
portlet descriptor. All details about it can be found in the JSR-301 specification that
the JBoss Portlet Bridge implements.
+ </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" />
+ </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>
+ 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>]]></programlisting>
- <calloutlist>
- <callout arearefs="tutorials.jsf.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="tutorials.jsf.view">
- <para>This is a mandatory parameter to define
- what's the default page to display.</para>
- </callout>
- <callout arearefs="tutorials.jsf.edit">
- <para>This parameter defines which page to
- display on the 'edit' mode.</para>
- </callout>
- <callout arearefs="tutorials.jsf.help">
- <para>This parameter defines which page to
- display on the 'help' mode.</para>
- </callout>
- </calloutlist>
- </programlistingco>
- </section>
- </section>
- </section>
+ </portlet>
+</portlet-app>
+</programlisting>
+ <calloutlist>
+ <callout arearefs="area-Reference_Guide-tutorials.jsf.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">
+ <para>
+ This is a mandatory parameter to define what's the default page to display.
+ </para>
+ </callout>
+ <callout arearefs="area-Reference_Guide-tutorials.jsf.edit">
+ <para>
+ This parameter defines which page to display on the 'edit' mode.
+ </para>
+ </callout>
+ <callout arearefs="area-Reference_Guide-tutorials.jsf.help">
+ <para>
+ This parameter defines which page to display on the 'help' mode.
+ </para>
+ </callout>
+ </calloutlist>
+ </programlistingco>
+
+ </section>
+
+ </section>
+
+ </section>
+
</section>
+
+
Modified: portal/trunk/docs/reference-guide/en/modules/portlets/WebUI.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/portlets/WebUI.xml 2010-01-20 08:10:24
UTC (rev 1387)
+++ portal/trunk/docs/reference-guide/en/modules/portlets/WebUI.xml 2010-01-20 08:13:42
UTC (rev 1388)
@@ -1,75 +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-Web_User_Interface_WebUI">
- <title>Web User Interface - WebUI</title>
- <para>
- WebUI is the name of GateIn's own webframework. GateIn Portal is built with
- it and also many applications available in the GateIn platform
- suites.
- Using its own framework means that the way the portal is build will not interfere
- with any web technology used by the portlet deployed. Using a particular
technology
- would have make it more difficult for a user to use a different version (newer or
older)
- of the same technology. If one choose to create WebUI portlets, here is some
documentation.
- In general we recommend to use JSF as the framework of choice to develop new
portlets.
- </para>
- <para>
- The WebUI framework is a component tree based framework. The key aspects of WebUI
- are :
+ <title>Web User Interface - WebUI</title>
+ <para>
+ WebUI is the name of GateIn's own webframework. GateIn Portal is built with it and
also many applications available in the GateIn platform suites. Using its own framework
means that the way the portal is build will not interfere with any web technology used by
the portlet deployed. Using a particular technology would have make it more difficult for
a user to use a different version (newer or older) of the same technology. If one choose
to create WebUI portlets, here is some documentation. In general we recommend to use JSF
as the framework of choice to develop new portlets.
</para>
- <itemizedlist>
- <listitem>
- <para>
- Events based flow
+ <para>
+ The WebUI framework is a component tree based framework. The key aspects of WebUI are
:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Events based flow
</para>
- </listitem>
- <listitem>
- <para>
- Components configuration by annotation
+ </listitem>
+ <listitem>
+ <para>
+ Components configuration by annotation
</para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Groovy_Templates" />
- for rendering
- </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-AJAX_in_GateIn_Framework"
/>
- support
- </para>
- </listitem>
- <listitem>
- <para>
- Portlet API friendly
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Groovy_Templates" /> for
rendering
</para>
- </listitem>
- </itemizedlist>
- <section
id="sect-Reference_Guide-Web_User_Interface_WebUI-Resources">
- <title>Resources</title>
- <itemizedlist>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Portlet_Lifecycle" />
- : GateIn portlets are built with WebUI
- </para>
- </listitem>
- <listitem>
- <para>
- <xref linkend="sect-Reference_Guide-Portlet_Lifecycle" />
- : GateIn portal itself is a WebUI application
- </para>
- </listitem>
- <listitem>
- <para>
- How-to:
- <xref linkend="sect-Reference_Guide-Create_a_WebUI_Portlet"
/>
- : Learn how to write your own app with WebUI
- </para>
- </listitem>
- </itemizedlist>
- </section>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-AJAX_in_GateIn_Framework" />
support
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Portlet API friendly
+ </para>
+ </listitem>
+ </itemizedlist>
+ <section id="sect-Reference_Guide-Web_User_Interface_WebUI-Resources">
+ <title>Resources</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Portlet_Lifecycle" /> : GateIn
portlets are built with WebUI
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <xref linkend="sect-Reference_Guide-Portlet_Lifecycle" /> : GateIn
portal itself is a WebUI application
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ How-to: <xref linkend="sect-Reference_Guide-Create_a_WebUI_Portlet"
/> : Learn how to write your own app with WebUI
+ </para>
+ </listitem>
+ </itemizedlist>
+ </section>
</section>