Author: rdickens
Date: 2013-01-21 00:12:50 -0500 (Mon, 21 Jan 2013)
New Revision: 9068
Modified:
epp/docs/branches/6.0/Developer_Guide/en-US/chapter-5-GDG_Application_development.xml
Log:
Grammar and spelling corrections
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-21
05:12:43 UTC (rev 9067)
+++
epp/docs/branches/6.0/Developer_Guide/en-US/chapter-5-GDG_Application_development.xml 2013-01-21
05:12:50 UTC (rev 9068)
@@ -30,7 +30,7 @@
<section id="sid-819805">
<title>Portlet Development</title>
<para>
- JBoss Enterprise Portal interface is fully customizable with applications
called portlets. Application development can be done by using the plain Portlet
specification JSR286 (refer to the "Portlet Primer" chapter in the JBoss
Portal Platform Reference Guide 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 "Getting started with JBoss Portlet Bridge" chapter of the
JBoss Portal Platform Reference Guide).
+ JBoss Enterprise Portal interface is fully customizable with applications
called portlets. Application development can be done by using the plain Portlet
specification JSR286 (refer to the "Portlet Primer" 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 "Getting started with
JBoss Portlet Bridge" chapter of the JBoss Portal Platform
<citetitle>Reference Guide)</citetitle>.
</para>
<remark>FIXME: Insert link to "[Starting a Portlet
Project]"</remark>
<para>
@@ -43,9 +43,7 @@
<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.
+ 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">
@@ -53,40 +51,16 @@
<title>How to Use JBoss Portal Platform BOM</title>
<remark>FIXME: Link to Quickstarts section when it's
available</remark>
<para>
- Let us look at the
- <code>pom.xml</code>
- file from Simplest Hello World
- link linkend="sid-55378941">Quickstart/link
- below, which contains all necessary details.
+ Let us look at the <code>pom.xml</code> file from Simplest Hello
World link linkend="sid-55378941">Quickstart/link below, which contains all
necessary details.
</para>
<para>
- In its
- <code><dependencyManagement></code>
- section, it declares
+ In its <code><dependencyManagement></code> section,
it declares
<code><dependency></code>
<code>gatein-3.5-bom</code>
with
<code><scope></code>
<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><dependencies></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><version></code>
- ,
- <code><type></code>
- or
- <code><scope></code>
- . All those details are managed by
- <code>gatein-3.5-bom</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><dependencies></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><version></code>,
<code><type></code> or
<code><scope></code>. All those details are managed by
<code>gatein-3.5-bom</code>.
</para>
<example>
<title>Simplest Hello World Portlet</title>
@@ -126,10 +100,10 @@
<dependencyManagement>
<dependencies>
<!--
- Define the version of GateIn we build for. In its dependencyManagement,
- GateIn Bill of Materials (BOM) 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.
+ Define the version of JBoss Portal Platform we build for. In its
dependencyManagement,
+ JBoss Portal Platform Bill of Materials (BOM) 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.
-->
<dependency>
<groupId>org.jboss.bom</groupId>
@@ -178,9 +152,7 @@
</programlisting>
</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.
+ 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>
@@ -192,17 +164,11 @@
<title>The Java Part</title>
<remark>FIXME: Link to Quickstarts section when it's
available</remark>
<para>
- After setting up the the Maven
- <code>pom.xml</code>
- file as shown in the
- <link linkend="sid-55378991">previous section</link>
- , we can continue with implementing a basic JSR286 compatible portlet.
Simplest Hello World Portlet from the
- link linkend="sid-55378941">GateIn Quickstarts/link
- collection shows the very essence of every JSR286 Portlet:
+ After setting up the the Maven <code>pom.xml</code> file as shown
in the <link linkend="sid-55378991">previous section</link>, we can
continue with implementing a basic JSR286 compatible portlet. Simplest Hello World Portlet
from the link linkend="sid-55378941">GateIn Quickstarts/link collection shows
the very essence of every JSR286 Portlet:
</para>
<example>
<title>SimplestHelloWorldPortlet.java</title>
- <programlisting>
+ <programlisting language="Java">
package org.jboss.portal.portlet.samples;
import java.io.IOException;
@@ -252,15 +218,7 @@
</listitem>
</itemizedlist>
<para>
- In this simplest portlet variant we have decided not to support EDIT and HELP
portlet modes. To add them, just override the
- <code>doEdit()</code>
- and
- <code>doHelp</code>
- from
- <code>javax.portlet.GenericPortlet</code>
- and configure the
- <code>portlet.xml</code>
- file accordingly.
+ 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">
@@ -269,7 +227,7 @@
<para>
The
<code>portlet.xml</code>
- file for a plain JSR286 portlet is pretty straigtforward:
+ file for a plain JSR286 portlet is as follows:
</para>
<example>
<title>portlet.xml</title>
@@ -301,11 +259,8 @@
<title>web.xml</title>
<para>
- There is no need to configure any filters, servlets, mapping & co.
for a plain JSR286 portlet to work but maven-war-plugin by default requires the
- <code>web.xml</code>
- . To solve it, just include a
- <code>web.xml</code>
- file which contains solely the root element like the following:
+ 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>
@@ -355,7 +310,7 @@
<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 just a component library for JavaServer Faces, the guidelines for using both
of them is very similar. More precisely, setup for a JavaServer Faces portlet project is a
superset of a RichFaces project setup. In accordance with that, you need to read both
+ 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"/>
@@ -370,19 +325,13 @@
<title>Example Code</title>
<remark>FIXME: Link to Quickstarts section when it's
available</remark>
<para>
- This section cites code from JSF2 Hello World Portlet from the
- link linkend="sid-55378941">JBoss Portal Platform
Quickstarts/link
- collection.
+ 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
- <code>pom.xml</code>
- against what we have shown as a general case in the
- <xref linkend="sid-55378991"/>
- section: We need to add different dependencies for JSF:
+ There is only one noticeable difference in
<code>pom.xml</code> against what we have shown as a general case in the
<xref linkend="sid-55378991"/> section. The dependencies are different for
JSF:
</para>
<example>
<title>pom.xml</title>
@@ -457,57 +406,57 @@
. This bean is implemented in Java as follows:
</para>
<informalexample>
- <programlisting>
-26. /**
-27. * {@link HelloBean} is the JSF backing bean for the application, holding the input
data to be re-displayed.
-28. */
-29. @ManagedBean(name = "helloBean")
-30. @SessionScoped
-31. public class HelloBean implements Serializable {
-32.
-33. private static final long serialVersionUID = -6239437588285327644L;
-34.
-35. /**
-36. * Stores the name which will be used to greet the application user.
-37. */
-38. private String name;
-39.
-40. /**
-41. * Initializes {@link #name} with the value {@code "World"}.
-42. */
-43. @PostConstruct
-44. public void postContruct() {
-45. this.name = "World";
-46. }
-47.
-48. /**
-49. * Returns {@link #name}.
-50. *
-51. * @return {@link #name}
-52. */
-53. public String getName() {
-54. return name;
-55. }
-56.
-57. /**
-58. * Set {@link #name}.
-59. *
-60. * @param name
-61. */
-62. public void setName(String name) {
-63. this.name = name;
-64. }
-65.
-66. /**
-67. * Resets {@link #name} to the default value {@code "World"}.
-68. *
-69. * @param ae ignored
-70. */
-71. public void reset(ActionEvent ae) {
-72. this.name = "World";
-73. }
-74.
-75. }
+ <programlisting language="Java">
+ /**
+ * {@link HelloBean} is the JSF backing bean for the application, holding the input data
to be re-displayed.
+ */
+ @ManagedBean(name = "helloBean")
+ @SessionScoped
+ public class HelloBean implements Serializable {
+
+ private static final long serialVersionUID = -6239437588285327644L;
+
+ /**
+ * Stores the name which will be used to greet the application user.
+ */
+ private String name;
+
+ /**
+ * Initializes {@link #name} with the value {@code "World"}.
+ */
+ @PostConstruct
+ public void postContruct() {
+ this.name = "World";
+ }
+
+ /**
+ * Returns {@link #name}.
+ *
+ * @return {@link #name}
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Set {@link #name}.
+ *
+ * @param name
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * Resets {@link #name} to the default value {@code "World"}.
+ *
+ * @param ae ignored
+ */
+ public void reset(ActionEvent ae) {
+ this.name = "World";
+ }
+
+ }
</programlisting>
</informalexample>
<para>
@@ -634,9 +583,9 @@
<title>Custom CSS</title>
<para>
- Portlet Bridge supports loading of CSS resources in the "JSF
way". Just use the
+ Portlet Bridge supports loading of CSS resources in the "JSF
way". Use the
<code><h:outputStylesheet library="css"
name="jsf2-hello-world-portlet.css" /></code>
- as we do in the
+ as in the
<code>main.xhtml</code>
file above. The
<code>jsf2-hello-world-portlet.css</code>
@@ -662,20 +611,20 @@
<example>
<title>jsf2-hello-world-portlet.css</title>
<programlisting>
-17. div.jsf2HelloWorldPortlet {
-18. padding: 10px;
-19. /* In the following we use a JSF Expression Language expression rather then plain
relative path.
-20. Plain relative paths do not work in JSF portlets. The expression
#{resource['...']} is
-21. dynamically evaluated to a proper public URL. The path
'/css/background/jsf-logo.png'
-22. used in the expression is relative to resources folder of this web
application.
-23. See
https://docs.jboss.org/author/display/PBR/Resource+Serving */
-24. background: url(#{resource['/css/background/jsf-logo.png']}) no-repeat;
-25. background-position-x: 753px;
-26. background-position-y: 10px;
-27. }
-28. div.jsf2HelloWorldPortlet p {
-29. width: 713px;
-30. }
+ 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'
+ 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-position-x: 753px;
+ background-position-y: 10px;
+ }
+ div.jsf2HelloWorldPortlet p {
+ width: 713px;
+ }
</programlisting>
</example>
</section>
@@ -690,7 +639,7 @@
resource bundle are stored under
<code>src/main/resources/org/jboss/as/quickstarts/jsf</code>
. The following settings in
- <code>faces-config.xml</code>
+ <filename>faces-config.xml</filename>
are needed so that this bundle can be used in JSF templates.
</para>
<example>
@@ -1138,19 +1087,17 @@
<para>
To deploy to other than default
<code>localhost:9999</code>
- JBoss instance, copy the following configuration
-
- just after
+ JBoss Portal Platform instance, copy the following configuration just
after
<code><version>${jboss.as.plugin.version}</version></code>
in the
- <code>pom.xml</code>
+ <filename>pom.xml</filename>
file and adjust it to suit your needs.
Note that
<code><username></code>
and
<code><password></code>
- elements can be omitted sometimes, depending on your JBoss security
settings.
+ elements can be omitted sometimes, depending on JBoss Portal Platform's
security settings.
</para>
<informalexample>