[gatein-commits] gatein SVN: r9104 - epp/docs/branches/6.0/Developer_Guide/en-US.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Jan 30 23:39:22 EST 2013


Author: jaredmorgs
Date: 2013-01-30 23:39:21 -0500 (Wed, 30 Jan 2013)
New Revision: 9104

Modified:
   epp/docs/branches/6.0/Developer_Guide/en-US/Revision_History.xml
   epp/docs/branches/6.0/Developer_Guide/en-US/chapter-5-GDG_Application_development.xml
   epp/docs/branches/6.0/Developer_Guide/en-US/chapter-6-GDG_JavaScript_Development.xml
Log:
Changes incorporated for https://docs.jboss.org/author/display/GTNPORTAL35/Custom+Internationalization+Resource+Bundles

Modified: epp/docs/branches/6.0/Developer_Guide/en-US/Revision_History.xml
===================================================================
--- epp/docs/branches/6.0/Developer_Guide/en-US/Revision_History.xml	2013-01-31 02:44:30 UTC (rev 9103)
+++ epp/docs/branches/6.0/Developer_Guide/en-US/Revision_History.xml	2013-01-31 04:39:21 UTC (rev 9104)
@@ -5,7 +5,7 @@
   <simpara>
     <revhistory>
       <revision>
-        <revnumber>6.0.0-8</revnumber>
+        <revnumber>6.0.0-9</revnumber>
         <date>Thu Jan 31 2013</date>
         <author>
           <firstname>Jared</firstname>

Modified: epp/docs/branches/6.0/Developer_Guide/en-US/chapter-5-GDG_Application_development.xml
===================================================================
--- epp/docs/branches/6.0/Developer_Guide/en-US/chapter-5-GDG_Application_development.xml	2013-01-31 02:44:30 UTC (rev 9103)
+++ epp/docs/branches/6.0/Developer_Guide/en-US/chapter-5-GDG_Application_development.xml	2013-01-31 04:39:21 UTC (rev 9104)
@@ -30,28 +30,25 @@
   <section id="sid-819805">
     <title>Portlet Development</title>
     <para>
-            JBoss Portal Platform's interface is fully customizable with applications called portlets. Application development can be done by using the plain Portlet specification JSR286 (refer to the &quot;Portlet Primer&quot; chapter in the JBoss Portal Platform <citetitle>Reference Guide</citetitle> for more information), but it is also possible to use the JBoss Portlet Bridge to write applications with JavaServerFaces (JSF), RichFaces or Seam (refer to the &quot;Getting started with JBoss Portlet Bridge&quot; chapter of the JBoss Portal Platform <citetitle>Reference Guide)</citetitle>.
+            JBoss Portal Platform&apos;s interface is fully customizable with applications called portlets. Application development can be done by using the plain Portlet specification JSR286 (refer to the &quot;Portlet Primer&quot; chapter in the JBoss Portal Platform <citetitle>Reference Guide</citetitle> for more information), but it is also possible to use the JBoss Portlet Bridge to write applications with JavaServerFaces (JSF), RichFaces or Seam (refer to the &quot;Getting started with JBoss Portlet Bridge&quot; chapter of the JBoss Portal Platform <citetitle>Reference Guide)</citetitle>.
          </para>
     <para>
             Whichever technology you choose, refer to <link linkend="sid-55378991">Starting a Portlet Project</link> to learn how to set up your project in a robust and effective way using the JBoss Portal Platform Bill of Materials (BOM).
          </para>
-      <section id="sid-55378991">
-        
-        <title>Starting a Portlet Project</title>
-        <section id="sid-55378991_StartingaPortletProject-TheBOMConcept">
-          
-          <title>The BOM Concept</title>
-          <para>
+    <section id="sid-55378991">
+      <title>Starting a Portlet Project</title>
+      <section id="sid-55378991_StartingaPortletProject-TheBOMConcept">
+        <title>The BOM Concept</title>
+        <para>
             To make the management of dependencies easier, JBoss Portal Platform Team has prepared the Bill of Materials (BOM) needed for developing typical portlet applications. BOM is a Maven <code>pom.xml</code> file which specifies the versions, types and scopes of dependencies which are granted to be compatible with (or indeed in many cases provided by) JBoss Portal Platform.
           </para>
-        </section>
-        <section id="sid-55378991_StartingaPortletProject-HowtoUseBOM">
-          
-          <title>How to Use JBoss Portal Platform BOM</title>
-          <para>
+      </section>
+      <section id="sid-55378991_StartingaPortletProject-HowtoUseBOM">
+        <title>How to Use JBoss Portal Platform BOM</title>
+        <para>
             Let us look at the <code>pom.xml</code> file from Simplest Hello World Portket example below, which contains all necessary details.
           </para>
-          <para>
+        <para>
             In its <code>&lt;dependencyManagement&gt;</code> section, it declares 
             <code>&lt;dependency&gt;</code>
             <code>gatein-3.5-bom</code>
@@ -60,11 +57,11 @@
             <code>import</code>
             . It indicates that the dependency will <emphasis role="italics">de facto</emphasis> be replaced with the dependencies in its <code>dependencyManagement</code>      section. Due to this fact, in the <code>&lt;dependencies&gt;</code> section of the Simplest Hello World <code>pom.xml</code>, we can declare the <code>javax.portlet:portlet-api</code> dependency without specifying its <code>&lt;version&gt;</code>, <code>&lt;type&gt;</code> or <code>&lt;scope&gt;</code>. All those details are managed by <code>gatein-3.5-bom</code>.
           </para>
-          <example>
-            <title>Simplest Hello World Portlet</title>
-            <programlisting language="XML">
-&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
+        <example>
+          <title>Simplest Hello World Portlet</title>
+          <programlisting language="XML">
+&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
+    xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&quot;&gt;
     &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
 
     &lt;artifactId&gt;simplest-hello-world-portlet&lt;/artifactId&gt;
@@ -148,24 +145,22 @@
 
 &lt;/project&gt;
 </programlisting>
-          </example>
-          <para>
+        </example>
+        <para>
             Further steps, after you have set up the <code>pom.xml</code> file for your project, depend on the technology you have chosen for writing portlets.
           </para>
-        </section>
       </section>
-      <section id="sid-55477012">
-        
-        <title>Standard Portlet Development (JSR286)</title>
-        <section id="sid-55477012_StandardPortletDevelopmentJSR286-TheJavaPart">
-          
-          <title>The Java Part</title>
-          <para>
-            After setting up the the Maven <code>pom.xml</code> file as shown in the previous section, we can continue with implementing a basic JSR286 compatible portlet. Simplest Hello World Portlet from the JBoss Portal Platform <link linkend="sid-55378941">Quickstarts</link> collection shows the very essence of every JSR286 Portlet:
+    </section>
+    <section id="sid-55477012">
+      <title>Standard Portlet Development (JSR286)</title>
+      <section id="sid-55477012_StandardPortletDevelopmentJSR286-TheJavaPart">
+        <title>The Java Part</title>
+        <para>
+            After setting up the the Maven <code>pom.xml</code> file as shown in the previous section, we can continue with implementing a basic JSR286 compatible portlet. An example of such a portlet is contained in the JBoss Portal Platform Quickstart &quot;Simplest Hello World Portlet&quot;
           </para>
-          <example>
-            <title>SimplestHelloWorldPortlet.java</title>
-            <programlisting language="Java">
+        <example>
+          <title>SimplestHelloWorldPortlet.java</title>
+          <programlisting language="Java">
 package org.jboss.portal.portlet.samples;
 
 import java.io.IOException;
@@ -182,55 +177,54 @@
  */
 public class SimplestHelloWorldPortlet extends GenericPortlet {
     /**
-     * Serves the VIEW mode. Writes "Hello World !" to the response writer.
+     * Serves the VIEW mode. Writes &quot;Hello World !&quot; to the response writer.
      * 
      * @see javax.portlet.GenericPortlet#doView(javax.portlet.RenderRequest, javax.portlet.RenderResponse)
      */
     @Override
     public void doView(RenderRequest request, RenderResponse response) throws IOException {
         PrintWriter writer = response.getWriter();
-        writer.write("Hello World !");
+        writer.write(&quot;Hello World !&quot;);
         writer.close();
     }
 }
 </programlisting>
-          </example>
-          <para>As you can see in the listing, we have done two important things:</para>
-          <itemizedlist>
-            <listitem>
-              <para>
+        </example>
+        <para>As you can see in the listing, we have done two important things:</para>
+        <itemizedlist>
+          <listitem>
+            <para>
                 We extended
                 <code>javax.portlet.GenericPortlet</code>
                 from
                 <code>javax.portlet:portlet-api</code>
                 artifact.
               </para>
-            </listitem>
-            <listitem>
-              <para>
+          </listitem>
+          <listitem>
+            <para>
                 We have overriden the
                 <code>doView()</code>
                 method.
               </para>
-            </listitem>
-          </itemizedlist>
-          <para>
+          </listitem>
+        </itemizedlist>
+        <para>
             In this simplest portlet variant, EDIT and HELP portlet modes are not supported. To add them, override the <code>doEdit()</code> and <code>doHelp</code> from <code>javax.portlet.GenericPortlet</code> and configure the <code>portlet.xml</code> file accordingly.
           </para>
-        </section>
-        <section id="sid-55477012_StandardPortletDevelopmentJSR286-portlet.xml">
-          
-          <title>portlet.xml</title>
-          <para>
+      </section>
+      <section id="sid-55477012_StandardPortletDevelopmentJSR286-portlet.xml">
+        <title>portlet.xml</title>
+        <para>
             The
             <code>portlet.xml</code>
             file for a plain JSR286 portlet is as follows:
           </para>
-          <example>
-            <title>portlet.xml</title>
-            <programlisting language="XML">
-&lt;portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" version="2.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"&gt;
+        <example>
+          <title>portlet.xml</title>
+          <programlisting language="XML">
+&lt;portlet-app xmlns=&quot;http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd&quot; version=&quot;2.0&quot;
+    xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd&quot;&gt;
     &lt;portlet&gt;
         &lt;description&gt;Simplest Hello World Portlet is the very essence of every possible Portlet.&lt;/description&gt;
         &lt;portlet-name&gt;SimplestHelloWorldPortlet&lt;/portlet-name&gt;
@@ -250,33 +244,31 @@
     &lt;/portlet&gt;
 &lt;/portlet-app&gt;
 </programlisting>
-          </example>
-        </section>
-        <section id="sid-55477012_StandardPortletDevelopmentJSR286-web.xml">
-          
-          <title>web.xml</title>
-          <para>
+        </example>
+      </section>
+      <section id="sid-55477012_StandardPortletDevelopmentJSR286-web.xml">
+        <title>web.xml</title>
+        <para>
             There is no need to configure filters, servlets or mapping for a plain JSR286 portlet to work but maven-war-plugin by default requires the
             <code>web.xml</code>. To solve it, include a <code>web.xml</code> file which contains solely the root element:
           </para>
-          <example>
-            <title>web.xml</title>
-            <programlisting language="XML">
-&lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
-        version="2.5"&gt;
+        <example>
+          <title>web.xml</title>
+          <programlisting language="XML">
+&lt;web-app xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
+        xsi:schemaLocation=&quot;http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&quot;
+        version=&quot;2.5&quot;&gt;
         &lt;!-- 
             There is no need to configure any filters, servlets, mapping &amp; co. for this demo to work
             but maven-war-plugin by default requires this file.
         --&gt;
 &lt;/web-app&gt;
 </programlisting>
-          </example>
-        </section>
-        <section id="sid-55477012_StandardPortletDevelopmentJSR286-FurtherSteps">
-          
-          <title>Further Steps</title>
-          <para>
+        </example>
+      </section>
+      <section id="sid-55477012_StandardPortletDevelopmentJSR286-FurtherSteps">
+        <title>Further Steps</title>
+        <para>
             After having done all the above, it is time to
             <link linkend="sid-55379158">build and deploy the portlet</link>
             ,
@@ -285,53 +277,48 @@
             <ulink url="https://docs.jboss.org/author/pages/viewpage.action?pageId=54264655">add it to a page</ulink>
             so that you can test its functionality.
           </para>
-        </section>
-        <section id="sid-55477012_StandardPortletDevelopmentJSR286-Seealso">
-          
-          <title>See also</title>
-          <itemizedlist>
-            <listitem>
-              <para>
+      </section>
+      <section id="sid-55477012_StandardPortletDevelopmentJSR286-Seealso">
+        <title>See also</title>
+        <itemizedlist>
+          <listitem>
+            <para>
                 <ulink url="https://docs.jboss.org/author/pages/viewpage.action?pageId=54264602">Portlet Primer</ulink>
               </para>
-            </listitem>
-            <listitem>
-              <para>
+          </listitem>
+          <listitem>
+            <para>
                 <ulink url="http://jcp.org/en/jsr/detail?id=286">JSR286</ulink>
               </para>
-            </listitem>
-          </itemizedlist>
-        </section>
+          </listitem>
+        </itemizedlist>
       </section>
-      <section id="sid-55477014">
-        
-        <title>JSF2 Portlet Development</title>
-        <para>
+    </section>
+    <section id="sid-55477014">
+      <title>JSF2 Portlet Development</title>
+      <para>
           The Portlet Bridge pre-installed in JBoss Portal Platform allows for implementing portlets with JavaServer Faces (JSF) 2.1 and RichFaces (RF) 4.2.3. As RichFaces is a component library for JavaServer Faces, the guidelines for using both of them are very similar. More precisely, the setup for a JavaServer Faces portlet project is a superset of a RichFaces project setup. In accordance with that, you need to read both
           <xref linkend="sid-55477016"/>
           and
           <xref linkend="sid-55477018"/>
           when developing with RichFaces.
         </para>
-        <section id="sid-55477016">
-          
-          <title>Basic JSF Portlet Development</title>
-          <para>JSF stands for JavaServer Pages. The JSF version delivered by the built-in Portlet Bridge is 2.1.</para>
-          <section id="sid-55477016_BasicJSFPortletDevelopment-ExampleCode">
-            
-            <title>Example Code</title>
+      <section id="sid-55477016">
+        <title>Basic JSF Portlet Development</title>
+        <para>JSF stands for JavaServer Pages. The JSF version delivered by the built-in Portlet Bridge is 2.1.</para>
+        <section id="sid-55477016_BasicJSFPortletDevelopment-ExampleCode">
+          <title>Example Code</title>
+          <para>
+            This section mentions code from the JSF2 Hello World Portlet example in the JBoss Portal Platform Quickstarts,  available for download from <ulink url="https://access.redhat.com/"/> as part of your JBoss Portal Platform subscription.
+          </para>
+          <section id="sid-55477016_BasicJSFPortletDevelopment-pom.xml">
+            <title>pom.xml</title>
             <para>
-              This section cites code from JSF2 Hello World Portlet from the <link linkend="sid-55378941">JBoss Portal Platform Quickstarts</link> collection.
-            </para>
-            <section id="sid-55477016_BasicJSFPortletDevelopment-pom.xml">
-              
-              <title>pom.xml</title>
-              <para>
                 There is only one noticeable difference in <filename>pom.xml</filename> against what we have shown as a general case in the <link linkend="sid-55378991">Starting a Portlet Project</link> section. The dependencies are different for JSF:
               </para>
-              <example>
-                <title>pom.xml</title>
-                <programlisting language="XML">
+            <example>
+              <title>pom.xml</title>
+              <programlisting language="XML">
      &lt;dependencies&gt;
          &lt;!-- 
              The versions, scopes and types of these dependencies are managed in gatein-*-bom.
@@ -349,20 +336,19 @@
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
 </programlisting>
-              </example>
-            </section>
-            <section id="sid-55477016_BasicJSFPortletDevelopment-JSFTemplateFiles">
-              
-              <title>JSF Template Files</title>
-              <para>
+            </example>
+          </section>
+          <section id="sid-55477016_BasicJSFPortletDevelopment-JSFTemplateFiles">
+            <title>JSF Template Files</title>
+            <para>
                 In the following listing you can see the beginning of a typical JSF portlet template. It is taken from
                 <code>main.xhtml</code>
                 file located in
                 <code>src/main/webapp/pages</code>
                 directory.
               </para>
-              <para>Code Snippet error: Read timed out.</para>
-              <para>
+            <para>Code Snippet error: Read timed out.</para>
+            <para>
                 Note that
                 <code>&lt;f:view&gt;</code>
                 as a root element of the portlet template above prevents an erroneous
@@ -375,7 +361,7 @@
                 <code>&lt;h:body&gt;</code>
                 elements are always needed for JSF Facelets to work.
               </para>
-              <para>
+            <para>
                 The following listing shows the use of several JSF elements, such as
                 <code>&lt;h:outputLabel&gt;</code>
                 ,
@@ -386,27 +372,26 @@
                 <code>&lt;h:form&gt;</code>
                 .
               </para>
-              <para>Code Snippet error: Read timed out.</para>
-              <para>
+            <para>Code Snippet error: Read timed out.</para>
+            <para>
                 The complete source code of the above template can be found in
                 <code>src/main/webapp/pages/main.xhtml</code>
                 of JSF2 Hello World Portlet project.
               </para>
-            </section>
-            <section id="sid-55477016_BasicJSFPortletDevelopment-JavaBeans">
-              
-              <title>Java Beans</title>
-              <para>
+          </section>
+          <section id="sid-55477016_BasicJSFPortletDevelopment-JavaBeans">
+            <title>Java Beans</title>
+            <para>
                 In the JSF template file shown above, we refer to
                 <code>helloBean</code>
                 . This bean is implemented in Java as follows:
               </para>
-              <informalexample>
-                <programlisting language="Java">
+            <informalexample>
+              <programlisting language="Java">
  /**
   * {@link HelloBean} is the JSF backing bean for the application, holding the input data to be re-displayed.
   */
- @ManagedBean(name = "helloBean")
+ @ManagedBean(name = &quot;helloBean&quot;)
  @SessionScoped
  public class HelloBean implements Serializable {
  
@@ -418,11 +403,11 @@
      private String name;
  
      /**
-      * Initializes {@link #name} with the value {@code "World"}.
+      * Initializes {@link #name} with the value {@code &quot;World&quot;}.
       */
      @PostConstruct
      public void postContruct() {
-         this.name = "World";
+         this.name = &quot;World&quot;;
      }
  
      /**
@@ -444,18 +429,18 @@
      }
  
      /**
-      * Resets {@link #name} to the default value {@code "World"}.
+      * Resets {@link #name} to the default value {@code &quot;World&quot;}.
       * 
       * @param ae ignored
       */
      public void reset(ActionEvent ae) {
-         this.name = "World";
+         this.name = &quot;World&quot;;
      }
  
  }
 </programlisting>
-              </informalexample>
-              <para>
+            </informalexample>
+            <para>
                 The
                 <code>@ManagedBean</code>
                 and
@@ -464,18 +449,17 @@
                 <code>faces-config.xml</code>
                 file.
               </para>
-            </section>
-            <section id="sid-55477016_BasicJSFPortletDevelopment-portlet.xml">
-              
+          </section>
+          <section id="sid-55477016_BasicJSFPortletDevelopment-portlet.xml">
+            <title>portlet.xml</title>
+            <para>portlet.xml is the place where we tie the JSF templates with the portlet.</para>
+            <example>
               <title>portlet.xml</title>
-              <para>portlet.xml is the place where we tie the JSF templates with the portlet.</para>
-              <example>
-                <title>portlet.xml</title>
-                <programlisting language="XML">
-&lt;portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" version="2.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd
-   http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"&gt;
+              <programlisting language="XML">
+&lt;portlet-app xmlns=&quot;http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd&quot; version=&quot;2.0&quot;
+    xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
+    xsi:schemaLocation=&quot;http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd
+   http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd&quot;&gt;
     &lt;portlet&gt;
         &lt;description&gt;A simple JSF2 portlet.&lt;/description&gt;
         &lt;portlet-name&gt;jsf2HelloWorldPortlet&lt;/portlet-name&gt;
@@ -516,8 +500,8 @@
 
    
 </programlisting>
-              </example>
-              <para>
+            </example>
+            <para>
                 Note that the
                 <code>javax.portlet.faces.defaultViewId.*</code>
                 <code>init-params</code>
@@ -527,20 +511,19 @@
                 <code>&lt;portlet-class&gt;</code>
                 will serve the purpose for most JSF portlets.
               </para>
-            </section>
-            <section id="sid-55477016_BasicJSFPortletDevelopment-web.xml">
-              
-              <title>web.xml</title>
-              <para>
+          </section>
+          <section id="sid-55477016_BasicJSFPortletDevelopment-web.xml">
+            <title>web.xml</title>
+            <para>
                 JSF portlets require a few tweaks in the
                 <code>web.xml</code>
                 file:
               </para>
-              <example>
-                <title>web.xml</title>
-                <programlisting language="XML">
-&lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
-    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"&gt;
+            <example>
+              <title>web.xml</title>
+              <programlisting language="XML">
+&lt;web-app xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns=&quot;http://java.sun.com/xml/ns/javaee&quot; xmlns:web=&quot;http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&quot;
+    xsi:schemaLocation=&quot;http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&quot; version=&quot;2.5&quot;&gt;
     &lt;display-name&gt;jsf2-hello-world-portlet&lt;/display-name&gt;
     &lt;context-param&gt;
         &lt;description&gt;See https://docs.jboss.org/author/display/PBR/Render+Policy&lt;/description&gt;
@@ -573,14 +556,13 @@
     &lt;/servlet-mapping&gt;
 &lt;/web-app&gt;
 </programlisting>
-              </example>
-            </section>
-            <section id="sid-55477016_BasicJSFPortletDevelopment-CustomCSS">
-              
-              <title>Custom CSS</title>
-              <para>
-                Portlet Bridge supports loading of CSS resources in the "JSF way". Use the
-                <code>&lt;h:outputStylesheet library="css" name="jsf2-hello-world-portlet.css" /&gt;</code>
+            </example>
+          </section>
+          <section id="sid-55477016_BasicJSFPortletDevelopment-CustomCSS">
+            <title>Custom CSS</title>
+            <para>
+                Portlet Bridge supports loading of CSS resources in the &quot;JSF way&quot;. Use the
+                <code>&lt;h:outputStylesheet library=&quot;css&quot; name=&quot;jsf2-hello-world-portlet.css&quot; /&gt;</code>
                 as in the
                 <code>main.xhtml</code>
                 file above. The
@@ -589,32 +571,32 @@
                 <code>resources/css</code>
                 folder of the web application.
               </para>
-              <para>
+            <para>
                 Note that relative paths like
-                <code>url('css/background/jsf-logo.png')</code>
+                <code>url(&apos;css/background/jsf-logo.png&apos;)</code>
                 do not work when used in CSS loaded via
                 <code>&lt;h:outputStylesheet ...&gt;</code>
                 . Rather a JSF Expression Language expression
-                <code>#{resource['/css/background/jsf-logo.png']</code>
+                <code>#{resource[&apos;/css/background/jsf-logo.png&apos;]</code>
                 } needs to be used. This expression is dynamically evaluated to a proper public URL. The path
-                <code>'/css/background/jsf-logo.png'</code>
+                <code>&apos;/css/background/jsf-logo.png&apos;</code>
                 used in the expression is relative to
                 <code>resources</code>
                 folder of the web application. See also
                 <ulink url="https://docs.jboss.org/author/pages/viewpage.action?pageId=51806374">Resource Serving</ulink>
                 .
               </para>
-              <example>
-                <title>jsf2-hello-world-portlet.css</title>
-                <programlisting>
+            <example>
+              <title>jsf2-hello-world-portlet.css</title>
+              <programlisting>
  div.jsf2HelloWorldPortlet {
      padding: 10px;
      /* In the following we use a JSF Expression Language expression rather then plain relative path. 
-        Plain relative paths do not work in JSF portlets. The expression #{resource['...']} is 
-        dynamically evaluated to a proper public URL. The path '/css/background/jsf-logo.png' 
+        Plain relative paths do not work in JSF portlets. The expression #{resource[&apos;...&apos;]} is 
+        dynamically evaluated to a proper public URL. The path &apos;/css/background/jsf-logo.png&apos; 
         used in the expression is relative to  resources folder of this web application.
         See https://docs.jboss.org/author/display/PBR/Resource+Serving */
-     background: url(#{resource['/css/background/jsf-logo.png']}) no-repeat;
+     background: url(#{resource[&apos;/css/background/jsf-logo.png&apos;]}) no-repeat;
      background-position-x: 753px;
      background-position-y: 10px;
  }
@@ -622,12 +604,11 @@
      width: 713px; 
  }
 </programlisting>
-              </example>
-            </section>
-            <section id="sid-55477016_BasicJSFPortletDevelopment-Internationalization">
-              
-              <title>Internationalization</title>
-              <para>
+            </example>
+          </section>
+          <section id="sid-55477016_BasicJSFPortletDevelopment-Internationalization">
+            <title>Internationalization</title>
+            <para>
                 Internationalization is supported via standard Java Resource bundles. In our example project the
                 <code>*.property</code>
                 files of
@@ -638,11 +619,11 @@
                 <filename>faces-config.xml</filename>
                 are needed so that this bundle can be used in JSF templates.
               </para>
-              <example>
-                <title>faces-config.xml</title>
-                <programlisting language="XML">
-&lt;faces-config xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd" version="2.0"&gt;
+            <example>
+              <title>faces-config.xml</title>
+              <programlisting language="XML">
+&lt;faces-config xmlns=&quot;http://java.sun.com/xml/ns/javaee&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
+    xsi:schemaLocation=&quot;http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd&quot; version=&quot;2.0&quot;&gt;
     &lt;application&gt;
         &lt;!-- Declare the internationalization resources --&gt;
         &lt;resource-bundle&gt;
@@ -657,20 +638,19 @@
     &lt;/application&gt;
 &lt;/faces-config&gt;
 </programlisting>
-              </example>
-              <para>
+            </example>
+            <para>
                 Note that in the above faces-config.xml, we have made our bundle visible in JSF templates under the variable
                 <code>msgs</code>
                 . Its individual entries can then be accessed using the usual Expression Language dot notation: e.g.
                 <code>#{msgs.Name</code>
                 }.
               </para>
-            </section>
           </section>
-          <section id="sid-55477016_BasicJSFPortletDevelopment-FurtherSteps">
-            
-            <title>Further Steps</title>
-            <para>
+        </section>
+        <section id="sid-55477016_BasicJSFPortletDevelopment-FurtherSteps">
+          <title>Further Steps</title>
+          <para>
               After having done all the above, it is time to
               <link linkend="sid-55379158">build and deploy the portlet</link>
               ,
@@ -679,42 +659,36 @@
               <ulink url="https://docs.jboss.org/author/pages/viewpage.action?pageId=54264655">add it to a page</ulink>
               so that you can test its functionality.
             </para>
-          </section>
-          <section id="sid-55477016_BasicJSFPortletDevelopment-Seealso">
-            
-            <title>See also</title>
-            <itemizedlist>
-              <listitem>
-                <para>
+        </section>
+        <section id="sid-55477016_BasicJSFPortletDevelopment-Seealso">
+          <title>See also</title>
+          <itemizedlist>
+            <listitem>
+              <para>
                   <ulink url="https://docs.jboss.org/author/pages/viewpage.action?pageId=54264602">Portlet Primer</ulink>
                 </para>
-              </listitem>
-            </itemizedlist>
-          </section>
+            </listitem>
+          </itemizedlist>
         </section>
-        <section id="sid-55477018">
-          
-          <title>JSF Portlet Development with RichFaces</title>
-          <para>
+      </section>
+      <section id="sid-55477018">
+        <title>JSF Portlet Development with RichFaces</title>
+        <para>
             As we have already noted, RichFaces (RF) is just a component library for JavaServer Faces (JSF). Therefore, everything said in the
             <xref linkend="sid-55477016"/>
             chapter applies here too.
           </para>
-          <section id="sid-55477018_JSFPortletDevelopmentwithRichFaces-ExampleCode">
-            
-            <title>Example Code</title>
-            <para>
-              This section cites code from JSF2+RF4 Hello World Portlet from the
-              <link linkend="sid-55378941">JBoss Portal Platform Quickstarts</link>
-              collection.
-            </para>
-            <section id="sid-55477018_JSFPortletDevelopmentwithRichFaces-pom.xml">
-              
+        <section id="sid-55477018_JSFPortletDevelopmentwithRichFaces-ExampleCode">
+          <title>Example Code</title>
+          <para>
+            This section mentions code from the JSF2+RF4 Hello World Portlet example in the JBoss Portal Platform Quickstarts,  available for download from <ulink url="https://access.redhat.com/"/> as part of your JBoss Portal Platform subscription.
+          </para>
+          <section id="sid-55477018_JSFPortletDevelopmentwithRichFaces-pom.xml">
+            <title>pom.xml</title>
+            <para>We need to add several RF-specific dependencies to the general JSF ones:</para>
+            <example>
               <title>pom.xml</title>
-              <para>We need to add several RF-specific dependencies to the general JSF ones:</para>
-              <example>
-                <title>pom.xml</title>
-                <programlisting language="XML">
+              <programlisting language="XML">
      &lt;dependencies&gt;
          &lt;!-- 
              The versions, scopes and types of these dependencies are managed in gatein-*-bom.
@@ -751,71 +725,69 @@
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
 </programlisting>
-              </example>
-            </section>
-            <section id="sid-55477018_JSFPortletDevelopmentwithRichFaces-JSFTemplateFiles">
-              
-              <title>JSF Template Files</title>
-              <para>
+            </example>
+          </section>
+          <section id="sid-55477018_JSFPortletDevelopmentwithRichFaces-JSFTemplateFiles">
+            <title>JSF Template Files</title>
+            <para>
                 We use
                 <code>&lt;rich:*&gt;</code>
                 components in the templates:
               </para>
-              <example>
-                <title>Form with rich: components in main.xhtml</title>
-                <programlisting language="XML">
+            <example>
+              <title>Form with rich: components in main.xhtml</title>
+              <programlisting language="XML">
          &lt;/p&gt;
-         &lt;h:form id="jsf2HelloWorldPortlet"&gt;
-             &lt;h:panelGrid columns="2"&gt;
-                 &lt;h:outputLabel value="#{msgs.Greeting}" for="greeting"/&gt;
-                 &lt;rich:select id="greeting" value="#{helloBean.greeting}"&gt;
-                     &lt;f:selectItems value="#{helloBean.greetings}" /&gt;
-                     &lt;f:ajax render="output" event="selectitem"/&gt;
+         &lt;h:form id=&quot;jsf2HelloWorldPortlet&quot;&gt;
+             &lt;h:panelGrid columns=&quot;2&quot;&gt;
+                 &lt;h:outputLabel value=&quot;#{msgs.Greeting}&quot; for=&quot;greeting&quot;/&gt;
+                 &lt;rich:select id=&quot;greeting&quot; value=&quot;#{helloBean.greeting}&quot;&gt;
+                     &lt;f:selectItems value=&quot;#{helloBean.greetings}&quot; /&gt;
+                     &lt;f:ajax render=&quot;output&quot; event=&quot;selectitem&quot;/&gt;
                  &lt;/rich:select&gt;
                  
-                 &lt;h:outputLabel value="#{msgs.Name}" for="nameInput"/&gt;
-                 &lt;h:inputText id="nameInput" value="#{helloBean.name}"&gt;
-                     &lt;f:validateLength minimum="1" maximum="50" /&gt;
-                     &lt;f:ajax render="output" event="keyup"/&gt;
+                 &lt;h:outputLabel value=&quot;#{msgs.Name}&quot; for=&quot;nameInput&quot;/&gt;
+                 &lt;h:inputText id=&quot;nameInput&quot; value=&quot;#{helloBean.name}&quot;&gt;
+                     &lt;f:validateLength minimum=&quot;1&quot; maximum=&quot;50&quot; /&gt;
+                     &lt;f:ajax render=&quot;output&quot; event=&quot;keyup&quot;/&gt;
                  &lt;/h:inputText&gt;
              &lt;/h:panelGrid&gt;
              &lt;p&gt;
-                 &lt;h:panelGroup id="output"&gt;
-                     &lt;strong&gt;&lt;h:outputText value="#{helloBean.greeting} #{helloBean.name}!" rendered="#{not empty helloBean.name}"/&gt;&lt;/strong&gt;
+                 &lt;h:panelGroup id=&quot;output&quot;&gt;
+                     &lt;strong&gt;&lt;h:outputText value=&quot;#{helloBean.greeting} #{helloBean.name}!&quot; rendered=&quot;#{not empty helloBean.name}&quot;/&gt;&lt;/strong&gt;
                  &lt;/h:panelGroup&gt;
              &lt;/p&gt;
              &lt;p&gt;
-                 &lt;h:commandButton id="reset" value="#{msgs.Reset}" actionListener="#{helloBean.reset}"&gt;
-                     &lt;f:ajax render="@form" /&gt;
+                 &lt;h:commandButton id=&quot;reset&quot; value=&quot;#{msgs.Reset}&quot; actionListener=&quot;#{helloBean.reset}&quot;&gt;
+                     &lt;f:ajax render=&quot;@form&quot; /&gt;
                  &lt;/h:commandButton&gt; - #{msgs.ResetComment}
              &lt;/p&gt;
              &lt;p&gt;
-                 &lt;h:commandButton id="reload" value="#{msgs.Reload}" /&gt; - #{msgs.ReloadComment}
+                 &lt;h:commandButton id=&quot;reload&quot; value=&quot;#{msgs.Reload}&quot; /&gt; - #{msgs.ReloadComment}
              &lt;/p&gt;
 </programlisting>
-              </example>
-              <para>The complete source code of the above template can be found in src/main/webapp/pages/main.xhtml of JSF2+RF4 Hello World Portlet quickstart.</para>
-            </section>
-            <section id="sid-55477018_JSFPortletDevelopmentwithRichFaces-JavaBeans">
-              
-              <title>Java Beans</title>
-              <para>
+            </example>
+            <para>The complete source code of the above template can be found in src/main/webapp/pages/main.xhtml of JSF2+RF4 Hello World Portlet quickstart.</para>
+          </section>
+          <section id="sid-55477018_JSFPortletDevelopmentwithRichFaces-JavaBeans">
+            <title>Java Beans</title>
+            <para>
                 The HelloBean presented in the
                 <xref linkend="sid-55477016"/>
                 chapter was extended firstly to provide a list of greeting phrases selectable in the drop-down box on the main.xhtml page and secondly to be able to store the greeting phrase selected in the drop-down box.
               </para>
-              <example>
-                <title>HelloBean.java</title>
-                <programlisting language="Java">
+            <example>
+              <title>HelloBean.java</title>
+              <programlisting language="Java">
      /**
-      * Static list of greetings. Contains {@code "Hello"} and {@code "Hi"}.
+      * Static list of greetings. Contains {@code &quot;Hello&quot;} and {@code &quot;Hi&quot;}.
       */
      private static final List&lt;SelectItem&gt; GREETINGS;
  
      static {
          List&lt;SelectItem&gt; l = new ArrayList&lt;SelectItem&gt;(2);
-         l.add(new SelectItem("Hello"));
-         l.add(new SelectItem("Hi"));
+         l.add(new SelectItem(&quot;Hello&quot;));
+         l.add(new SelectItem(&quot;Hi&quot;));
          GREETINGS = Collections.unmodifiableList(l);
      }
  
@@ -824,10 +796,10 @@
       */
      private String greeting;
 </programlisting>
-              </example>
-              <example>
-                <title>HelloBean.java</title>
-                <programlisting language="Java">
+            </example>
+            <example>
+              <title>HelloBean.java</title>
+              <programlisting language="Java">
      /**
       * Returns {@link #greeting}.
       * 
@@ -857,23 +829,22 @@
  
  
      /**
-      * Resets {@link #name} to the default value {@code "World"} and {@link #greeting} with the default value {@code "Hello"}.
+      * Resets {@link #name} to the default value {@code &quot;World&quot;} and {@link #greeting} with the default value {@code &quot;Hello&quot;}.
       * 
       * @param ae ignored
       */
      public void reset(ActionEvent ae) {
-         this.name = "World";
-         this.greeting = "Hello";
+         this.name = &quot;World&quot;;
+         this.greeting = &quot;Hello&quot;;
      }
  
  }
 </programlisting>
-              </example>
-            </section>
-            <section id="sid-55477018_JSFPortletDevelopmentwithRichFaces-portlet.xml">
-              
-              <title>portlet.xml</title>
-              <para>
+            </example>
+          </section>
+          <section id="sid-55477018_JSFPortletDevelopmentwithRichFaces-portlet.xml">
+            <title>portlet.xml</title>
+            <para>
                 There is no substantial change in portlet.xml against the
                 <xref linkend="sid-55477016"/>
                 chapter. Only
@@ -886,13 +857,13 @@
                 <code>&lt;title&gt;</code>
                 have been changed.
               </para>
-              <example>
-                <title>portlet.xml</title>
-                <programlisting language="XML">
-&lt;portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" version="2.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd
-   http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"&gt;
+            <example>
+              <title>portlet.xml</title>
+              <programlisting language="XML">
+&lt;portlet-app xmlns=&quot;http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd&quot; version=&quot;2.0&quot;
+    xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
+    xsi:schemaLocation=&quot;http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd
+   http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd&quot;&gt;
     &lt;portlet&gt;
         &lt;description&gt;A simple portlet usinf JSF2 and RF4.&lt;/description&gt;
         &lt;portlet-name&gt;jsf2Rf4HelloWorldPortlet&lt;/portlet-name&gt;
@@ -931,21 +902,20 @@
     &lt;/portlet&gt;
 &lt;/portlet-app&gt;
 </programlisting>
-              </example>
-            </section>
-            <section id="sid-55477018_JSFPortletDevelopmentwithRichFaces-web.xml">
-              
-              <title>web.xml</title>
-              <para>
+            </example>
+          </section>
+          <section id="sid-55477018_JSFPortletDevelopmentwithRichFaces-web.xml">
+            <title>web.xml</title>
+            <para>
                 We set a few more
                 <code>init-params</code>
                 in web.xml for RichFaces components to work:
               </para>
-              <example>
-                <title>web.xml</title>
-                <programlisting language="XML">
-&lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
-    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"&gt;
+            <example>
+              <title>web.xml</title>
+              <programlisting language="XML">
+&lt;web-app xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns=&quot;http://java.sun.com/xml/ns/javaee&quot; xmlns:web=&quot;http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&quot;
+    xsi:schemaLocation=&quot;http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&quot; version=&quot;2.5&quot;&gt;
     &lt;display-name&gt;jsf2-rf4-hello-world-portlet&lt;/display-name&gt;
     &lt;context-param&gt;
         &lt;description&gt;See https://docs.jboss.org/author/display/PBR/Installing+Portlet+Bridge#InstallingPortletBridge-DisableautomaticinclusionofPortletBridge&lt;/description&gt;
@@ -1017,31 +987,28 @@
 
 &lt;/web-app&gt;
 </programlisting>
-              </example>
-            </section>
-            <section id="sid-55477018_JSFPortletDevelopmentwithRichFaces-CustomCSS">
-              
-              <title>Custom CSS</title>
-              <para>
+            </example>
+          </section>
+          <section id="sid-55477018_JSFPortletDevelopmentwithRichFaces-CustomCSS">
+            <title>Custom CSS</title>
+            <para>
                 Fully analogous with
                 <link linkend="sid-55477016">plain JSF portlets</link>
                 .
               </para>
-            </section>
-            <section id="sid-55477018_JSFPortletDevelopmentwithRichFaces-Internationalization">
-              
-              <title>Internationalization</title>
-              <para>
+          </section>
+          <section id="sid-55477018_JSFPortletDevelopmentwithRichFaces-Internationalization">
+            <title>Internationalization</title>
+            <para>
                 Fully analogous with
                 <link linkend="sid-55477016">plain JSF portlets</link>
                 .
               </para>
-            </section>
           </section>
-          <section id="sid-55477018_JSFPortletDevelopmentwithRichFaces-FurtherSteps">
-            
-            <title>Further Steps</title>
-            <para>
+        </section>
+        <section id="sid-55477018_JSFPortletDevelopmentwithRichFaces-FurtherSteps">
+          <title>Further Steps</title>
+          <para>
               After having done all the above, it is time to
               <link linkend="sid-55379158">build and deploy the portlet</link>
               ,
@@ -1050,36 +1017,34 @@
               <ulink url="https://docs.jboss.org/author/pages/viewpage.action?pageId=54264655">add it to a page</ulink>
               so that you can test its functionality.
             </para>
-          </section>
-          <section id="sid-55477018_JSFPortletDevelopmentwithRichFaces-Seealso">
-            
-            <title>See also</title>
-            <itemizedlist>
-              <listitem>
-                <para>
+        </section>
+        <section id="sid-55477018_JSFPortletDevelopmentwithRichFaces-Seealso">
+          <title>See also</title>
+          <itemizedlist>
+            <listitem>
+              <para>
                   <ulink url="https://docs.jboss.org/author/pages/viewpage.action?pageId=54264602">Portlet Primer</ulink>
                 </para>
-              </listitem>
-            </itemizedlist>
-          </section>
+            </listitem>
+          </itemizedlist>
         </section>
       </section>
-      <section id="sid-55379158">
-        
-        <title>Building and Deploying Portlets</title>
-        <orderedlist>
-          <listitem>
-            <para>Make sure you have your JBoss Portal Platform instance is running.</para>
-          </listitem>
-          <listitem>
-            <para>Open a command line and navigate to the root directory of your portlet project.</para>
-          </listitem>
-          <listitem>
-            <para>Type this command to build and deploy the archive:</para>
-            <informalexample>
-              <programlisting>mvn clean package jboss-as:deploy</programlisting>
-            </informalexample>
-            <para>
+    </section>
+    <section id="sid-55379158">
+      <title>Building and Deploying Portlets</title>
+      <orderedlist>
+        <listitem>
+          <para>Make sure you have your JBoss Portal Platform instance is running.</para>
+        </listitem>
+        <listitem>
+          <para>Open a command line and navigate to the root directory of your portlet project.</para>
+        </listitem>
+        <listitem>
+          <para>Type this command to build and deploy the archive:</para>
+          <informalexample>
+            <programlisting>mvn clean package jboss-as:deploy</programlisting>
+          </informalexample>
+          <para>
               To deploy to other than default
               <code>localhost:9999</code>
               JBoss Portal Platform instance, copy the following configuration just after
@@ -1092,24 +1057,24 @@
               <code>&lt;username&gt;</code>
               and
               <code>&lt;password&gt;</code>
-              elements can be omitted sometimes, depending on JBoss Portal Platform's security settings.
+              elements can be omitted sometimes, depending on JBoss Portal Platform&apos;s security settings.
               
             </para>
-            <informalexample>
-              <programlisting language="XML">&lt;configuration&gt;
+          <informalexample>
+            <programlisting language="XML">&lt;configuration&gt;
     &lt;hostname&gt;127.0.0.1&lt;/hostname&gt;
     &lt;port&gt;9999&lt;/port&gt;
     &lt;username&gt;admin&lt;/username&gt;
     &lt;password&gt;secret&lt;/password&gt;
 &lt;/configuration&gt;</programlisting>
-            </informalexample>
-            <para>
+          </informalexample>
+          <para>
               This will deploy
               <code>target/simplest-hello-world-portlet.war</code>
               to the running instance of the portal.
             </para>
-          </listitem>
-        </orderedlist>
-      </section>
+        </listitem>
+      </orderedlist>
     </section>
+  </section>
 </chapter>

Modified: epp/docs/branches/6.0/Developer_Guide/en-US/chapter-6-GDG_JavaScript_Development.xml
===================================================================
(Binary files differ)



More information about the gatein-commits mailing list