Author: smumford
Date: 2010-01-27 01:25:11 -0500 (Wed, 27 Jan 2010)
New Revision: 1451
Modified:
portal/trunk/docs/reference-guide/en/modules/development/Internationalization_Configuration.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
Log:
begin edits Ch2 Development
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-27
03:59:24 UTC (rev 1450)
+++
portal/trunk/docs/reference-guide/en/modules/development/Internationalization_Configuration.xml 2010-01-27
06:25:11 UTC (rev 1451)
@@ -8,7 +8,7 @@
<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> .
+ All aspects of internationalization in &PRODUCT; 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.
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-27
03:59:24 UTC (rev 1450)
+++
portal/trunk/docs/reference-guide/en/modules/development/Portal_Lifecycle.xml 2010-01-27
06:25:11 UTC (rev 1451)
@@ -15,11 +15,14 @@
<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 portal instance is simply a web application deployed as a WAR in an application
server. Portlets are also part of an enhanced WAR called a portlet application.
</para>
<para>
- 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.
+ &PRODUCT; doesn't require any particular setup for your portlet in most common
scenarios and the <filename>web.xml</filename> file can remain without any
&PRODUCT; specific configuration.
</para>
+ <para>
+ During deployment, &PRODUCT; will automatically and transparently inject a servlet
into the portlet application to be able to interact with it. This feature is dependent on
the underlying servlet container but will work out of the box on the proposed bundles.
+ </para>
</section>
<!--
@@ -88,12 +91,16 @@
<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 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)
+ This is equivalent to adding the following into
<filename>web.xml</filename>.
</para>
-
+ <note>
+ <para>
+ As the servlet is already configured this example is for information only.
+ </para>
+ </note>
<programlisting role="XML">
<servlet>
<servlet-name>TomcatGateInServlet</servlet-name>
@@ -107,7 +114,10 @@
</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.
+ It is possible to filter on the CommandServlet by filtering the URL pattern used by
the Servlet mapping.
+ </para>
+ <para>
+ The example below would create a servlet filter that calculates the time of execution
of a portlet request.
</para>
<para>
The filter class:
@@ -146,7 +156,7 @@
}
</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.
+ The Java EE web application configuration file
(<filename>web.xml</filename>) of the portlet on which we want to know the
time to serve a portlet request. As mentioned above nothing specific to &PRODUCT;
needs to be included, only the URL pattern to set has to be known.
</para>
<programlisting role="XML">
@@ -172,7 +182,7 @@
<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).
+ It is important to set <literal>INCLUDE</literal> 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>
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-27
03:59:24 UTC (rev 1450)
+++
portal/trunk/docs/reference-guide/en/modules/development/Right_To_Left_Framework.xml 2010-01-27
06:25:11 UTC (rev 1451)
@@ -5,18 +5,9 @@
]>
<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 text orientation depends on the current locale setting. The orientation is a Java
5 enum that provides a set of functionalities:
</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:
- </para>
<programlisting>
LT, // Western Europe
@@ -29,48 +20,68 @@
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.
+ The object defining the Orientation for the current request is the
<literal>UIPortalApplication</literal>. However it should be accessed at
runtime using the <literal>RequestContext</literal> that delegates to the
<literal>UIPortalApplication</literal>.
</para>
- </section>
+ <para>
+ In the case of a <literal>PortalRequestContext</literal> it is a direct
delegate as the <literal>PortalRequestContext</literal> has a reference to the
current <literal>UIPortalApplication</literal>.
+ </para>
+ <para>
+ In the case of a different context such as the
<literal>PortletRequestContext</literal>, it delegates to the parent context
given the fact that the root <literal>RequestContext</literal> is always a
<literal>PortalRequestContext</literal>.
+ </para>
<section
id="sect-Reference_Guide-RTL_Right_To_Left_Framework-Groovy_templates">
<title>Groovy templates</title>
<para>
- Orientation is obtained from implicit variables defined by the groovy binding
context:
+ Orientation is defined by implicit variables in the groovy binding context:
</para>
- <itemizedlist>
- <listitem>
- <para>
- orientation : the current orientation as an Orientation
- </para>
- </listitem>
- <listitem>
- <para>
- isLT : the value of orientation.isLT()
- </para>
- </listitem>
- <listitem>
- <para>
- isRT : the value of orientation.isRT()
- </para>
- </listitem>
- <listitem>
- <para>
- dir : the string 'ltr' if the orientation is LT or the string 'rtl'
if the orientation is RT
- </para>
- </listitem>
- </itemizedlist>
+ <variablelist>
+ <varlistentry>
+ <term>Orientation</term>
+ <listitem>
+ <para>
+ The current orientation as an Orientation
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>isLT</term>
+ <listitem>
+ <para>
+ The value of orientation.isLT()
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>isRT</term>
+ <listitem>
+ <para>
+ The value of orientation.isRT()
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>dir</term>
+ <listitem>
+ <para>
+ The string 'ltr' if the orientation is LT or the string 'rtl' if
the orientation is RT.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
</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.
+ </para>
+ <para>
+ For instance:
<filename>/web/skin/portal/webui/component/UIFooterPortlet/DefaultStylesheet-rt.css</filename>
will return the same stylesheet as
<filename>/web/skin/portal/webui/component/UIFooterPortlet/DefaultStylesheet.css</filename>
but processed for the RT orientation. The <parameter>-lt</parameter> suffix is
optional.
</para>
<para>
Stylesheet authors can annotate their stylesheet to create content that depends on the
orientation.
</para>
- <section id="sect-Reference_Guide-Stylesheet-Example_1">
+ <formalpara>
<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:
@@ -96,9 +107,9 @@
white-space: nowrap;
</programlisting>
</para>
- </section>
+ </formalpara>
- <section id="sect-Reference_Guide-Stylesheet-Example_2">
+ <formalpara>
<title>Example 2</title>
<para>
In this example we need to modify the padding according to the orientation:
@@ -121,7 +132,7 @@
padding: 0px 0px 0px 5px; /* orientation=rt */
</programlisting>
</para>
- </section>
+ </formalpara>
</section>
@@ -131,8 +142,16 @@
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 as the skin service. When an
image ends with the -rt suffix the portal will attempt to locate the original image and
create a mirror of it.
+ </para>
+ <para>
+ For instance: requesting the image
<filename>/GateInResources/skin/DefaultSkin/webui/component/UITabSystem/UITabs/background/NormalTabStyle-rt.gif</filename>
returns a mirror of the image
<filename>/GateInResources/skin/DefaultSkin/webui/component/UITabSystem/UITabs/background/NormalTabStyle.gif</filename>.
</para>
+ <note>
+ <para>
+ It is important to consider whether the image to be mirrored is symmetrical as this
will impact it's final appearance.
+ </para>
+ </note>
<para>
Here is an example combining stylesheet and images:
</para>
@@ -149,30 +168,43 @@
<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:
- <itemizedlist>
- <listitem>
- <para>
- getOrientation() : returns either the string lt or rt
- </para>
- </listitem>
- <listitem>
- <para>
- getDir() : returns either the string ltr or rtl
- </para>
- </listitem>
- <listitem>
- <para>
- isLT() : returns true for LT
- </para>
- </listitem>
- <listitem>
- <para>
- isRT() : returns true of RT
- </para>
- </listitem>
- </itemizedlist>
+ The <literal>eXo.core.I18n</literal> object provides the following
parameters for orientation:
</para>
+ <variablelist>
+ <varlistentry>
+ <term>getOrientation()</term>
+ <listitem>
+ <para>
+ Returns either the string lt or rt
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>getDir()</term>
+ <listitem>
+ <para>
+ Returns either the string ltr or rtl
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>isLT()</term>
+ <listitem>
+ <para>
+ Returns true for LT
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>isRT()</term>
+ <listitem>
+ <para>
+ Returns true of RT
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
</section>
</section>