Author: smumford
Date: 2011-07-12 01:57:11 -0400 (Tue, 12 Jul 2011)
New Revision: 14002
Modified:
docs/enterprise/trunk/PortletBridge/en-US/configuration.xml
Log:
JBEPP-943: Corrected javax.portlet.faces.RENDER_POLICY
Modified: docs/enterprise/trunk/PortletBridge/en-US/configuration.xml
===================================================================
--- docs/enterprise/trunk/PortletBridge/en-US/configuration.xml 2011-07-06 01:54:19 UTC
(rev 14001)
+++ docs/enterprise/trunk/PortletBridge/en-US/configuration.xml 2011-07-12 05:57:11 UTC
(rev 14002)
@@ -4,21 +4,21 @@
%BOOK_ENTITIES;
]>
<chapter id="sect-Reference_Guide-Bridge_Configuration">
- <title>Bridge Configuration</title>
- <para>
- The 329 specification is aimed at making the developer's life as easy as possible
with JSF+Portlet development. You will see below that there are minimal settings to
getting any JSF web application up and running in the Portal environment.
- </para>
- <para>
- If you are new to these concepts, we highly recommend you refer to <xref
linkend="sect-Reference_Guide-Getting_started_with_JBoss_Portlet_Bridge-Maven_Archetypes"
/>.
- </para>
- <section
id="sect-Reference_Guide-Bridge_Configuration-Core_Setup_and_Configuration">
- <title>Core Setup and Configuration</title>
- <section
id="sect-Reference_Guide-Core_Setup_and_Configuration-portlet.xml">
- <title>portlet.xml</title>
- <para>
- The basic JSR-329 portlet configuration.
- </para>
-
+ <title>Bridge Configuration</title>
+ <para>
+ The 329 specification is aimed at making the developer's life as easy as
possible with JSF+Portlet development. You will see below that there are minimal settings
to getting any JSF web application up and running in the Portal environment.
+ </para>
+ <para>
+ If you are new to these concepts, we highly recommend you refer to <xref
linkend="sect-Reference_Guide-Getting_started_with_JBoss_Portlet_Bridge-Maven_Archetypes"
/>.
+ </para>
+ <section
id="sect-Reference_Guide-Bridge_Configuration-Core_Setup_and_Configuration">
+ <title>Core Setup and Configuration</title>
+ <section
id="sect-Reference_Guide-Core_Setup_and_Configuration-portlet.xml">
+ <title>portlet.xml</title>
+ <para>
+ The basic JSR-329 portlet configuration.
+ </para>
+
<programlisting language="XML" role="XML"><![CDATA[
<portlet>
<portlet-name>yourPortletName</portlet-name>
@@ -41,27 +41,27 @@
<value>/jsf/help.xhtml</value>
</init-param>
]]></programlisting>
- <para>
- When <parameter>preserveActionParams</parameter> is set to
<parameter>TRUE</parameter>, the bridge must maintain any request parameters
assigned during the portlet's action request.
- </para>
- <para>
- The request parameters are maintained in the<emphasis>"bridge request
scope"</emphasis>. When this attribute is not present or is
<parameter>FALSE</parameter> the action's request parameters are only
maintained for the duration of the <emphasis>portlet request
scope</emphasis>.
- </para>
-
+ <para>
+ When <parameter>preserveActionParams</parameter> is set to
<parameter>TRUE</parameter>, the bridge must maintain any request parameters
assigned during the portlet's action request.
+ </para>
+ <para>
+ The request parameters are maintained in the<emphasis>"bridge
request scope"</emphasis>. When this attribute is not present or is
<parameter>FALSE</parameter> the action's request parameters are only
maintained for the duration of the <emphasis>portlet request
scope</emphasis>.
+ </para>
+
<programlisting language="XML" role="XML"><![CDATA[
<init-param>
<name>javax.portlet.faces.preserveActionParams</name>
<value>true</value>
</init-param>
]]></programlisting>
- </section>
-
- <section
id="sect-Reference_Guide-Core_Setup_and_Configuration-faces_config.xml">
- <title>faces-config.xml</title>
- <para>
- The <parameter>PortletViewHandler</parameter> ensures that each JSF
portlet instance is properly namespaced.
- </para>
-
+ </section>
+
+ <section
id="sect-Reference_Guide-Core_Setup_and_Configuration-faces_config.xml">
+ <title>faces-config.xml</title>
+ <para>
+ The <parameter>PortletViewHandler</parameter> ensures that
each JSF portlet instance is properly namespaced.
+ </para>
+
<programlisting language="XML" role="XML"><![CDATA[
<faces-config>
<application>
@@ -72,15 +72,15 @@
</application>
...
]]></programlisting>
- </section>
-
- <section
id="sect-Reference_Guide-Core_Setup_and_Configuration-Facelets_Configuration">
- <title>Facelets Configuration</title>
- <para>
- The following <filename>web.xml</filename> setting is only for
<literal>Facelets</literal> based applications
- </para>
- <section id="sect-Reference_Guide-Facelets_Configuration-web.xml">
- <title>web.xml</title>
+ </section>
+
+ <section
id="sect-Reference_Guide-Core_Setup_and_Configuration-Facelets_Configuration">
+ <title>Facelets Configuration</title>
+ <para>
+ The following <filename>web.xml</filename> setting is only
for <literal>Facelets</literal> based applications
+ </para>
+ <section
id="sect-Reference_Guide-Facelets_Configuration-web.xml">
+ <title>web.xml</title>
<programlisting language="XML" role="XML"><![CDATA[
<web-app
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -93,7 +93,7 @@
<param-value>org.jboss.portletbridge.application.FaceletPortletViewHandler</param-value>
</context-param>
]]></programlisting>
-
+
<programlisting language="XML" role="XML"><![CDATA[
<context-param>
<param-name>javax.portlet.faces.RENDER_POLICY</param-name>
@@ -105,45 +105,45 @@
</web-app>
]]></programlisting>
- <variablelist>
- <title>RenderPolicy Options</title>
- <varlistentry>
- <term>ALWAYS_DELEGATE</term>
- <listitem>
- <para>
- Indicates the bridge should not render the view itself but rather always delegate
the rendering.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>NEVER_DELEGATE</term>
- <listitem>
- <para>
- Indicates the bridge should always render the view itself and never delegate.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>DEFAULT</term>
- <listitem>
- <para>
- Directs the bridge to first delegate the render and if and only if an Exception is
thrown then render the view based on its own logic. If the configuration parameter is not
present or has an invalid value the bridge renders using default behavior. I.e. as if
DEFAULT is set.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </section>
+ <variablelist>
+ <title>RenderPolicy Options</title>
+ <varlistentry>
+ <term>ALWAYS_DELEGATE</term>
+ <listitem>
+ <para>
+ Indicates the bridge should not render the view itself but rather
always delegate the rendering.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>NEVER_DELEGATE</term>
+ <listitem>
+ <para>
+ Indicates the bridge should always render the view itself and
never delegate.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>DEFAULT</term>
+ <listitem>
+ <para>
+ Directs the bridge to first delegate the render and if and only
if an Exception is thrown then render the view based on its own logic. If the
configuration parameter is not present or has an invalid value the bridge renders using
default behavior. I.e. as if DEFAULT is set.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </section>
- </section>
-
- <section
id="sect-Reference_Guide-Core_Setup_and_Configuration-JSP_Only_Configuration">
- <title>JSP Only Configuration</title>
- <para>
- The following <filename>web.xml</filename> setting is only for JSP based
applications. Download the demonstration application <ulink
url="http://anonsvn.jboss.org/repos/portletbridge/trunk/examples/jsf...;.
- </para>
- <section id="sect-Reference_Guide-JSP_Only_Configuration-web.xml">
- <title>web.xml</title>
-
+ </section>
+
+ <section
id="sect-Reference_Guide-Core_Setup_and_Configuration-JSP_Only_Configuration">
+ <title>JSP Only Configuration</title>
+ <para>
+ The following <filename>web.xml</filename> setting is only
for JSP based applications. Download the demonstration application <ulink
url="http://anonsvn.jboss.org/repos/portletbridge/trunk/examples/jsf...;.
+ </para>
+ <section
id="sect-Reference_Guide-JSP_Only_Configuration-web.xml">
+ <title>web.xml</title>
+
<programlisting language="XML" role="XML"><![CDATA[
<web-app
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -151,7 +151,7 @@
version="2.4">
<context-param>
- <param-name>javax.portlet.faces.renderPolicy</param-name>
+ <param-name>javax.portlet.faces.RENDER_POLICY</param-name>
<param-value>
NEVER_DELEGATE
</param-value>
@@ -160,40 +160,40 @@
</web-app>
]]></programlisting>
- </section>
+ </section>
- </section>
-
- <section
id="sect-Reference_Guide-Core_Setup_and_Configuration-JSR_329">
- <title>JSR-329</title>
- <para>
- The Jboss Portlet Bridge can be used with a any compatible implementation (for
example, <literal>MyFaces</literal> implementation). Simply put the following
into <filename>web.xml</filename>:
- </para>
-
+ </section>
+
+ <section
id="sect-Reference_Guide-Core_Setup_and_Configuration-JSR_329">
+ <title>JSR-329</title>
+ <para>
+ The Jboss Portlet Bridge can be used with a any compatible implementation
(for example, <literal>MyFaces</literal> implementation). Simply put the
following into <filename>web.xml</filename>:
+ </para>
+
<programlisting language="XML" role="XML"><![CDATA[
<context-param>
<param-name>javax.portlet.faces.BridgeImplClass</param-name>
<param-value>org.apache.myfaces.portlet.faces.bridge.BridgeImpl</param-value>
</context-param>
]]></programlisting>
- </section>
+ </section>
- </section>
-
- <!-- End 301 core setup -->
- <section
id="sect-Reference_Guide-Bridge_Configuration-RichFaces_Setup_and_Configuration_Options">
- <title>RichFaces Setup and Configuration Options</title>
- <section
id="sect-Reference_Guide-RichFaces_Setup_and_Configuration_Options-web.xml">
- <title>web.xml</title>
- <para>
- The following configuration is designated for portlets using the
<application>RichFaces</application> library. These settings will vary based
on your individual needs.
- </para>
- <para>
- See <ulink
url="http://www.jboss.org/file-access/default/members/jbossrichfaces...
this section</ulink> of the <application>RichFaces</application>
documentation for more details.
- </para>
- <para>
- Sometimes it is better to use the "<parameter>ALL</parameter>"
load strategy in portlets so you do not need to worry about loading the
"framework.pack.js" and "ui.pack.js" files manually in your portlet
header.
- </para>
+ </section>
+
+ <!-- End 301 core setup -->
+ <section
id="sect-Reference_Guide-Bridge_Configuration-RichFaces_Setup_and_Configuration_Options">
+ <title>RichFaces Setup and Configuration Options</title>
+ <section
id="sect-Reference_Guide-RichFaces_Setup_and_Configuration_Options-web.xml">
+ <title>web.xml</title>
+ <para>
+ The following configuration is designated for portlets using the
<application>RichFaces</application> library. These settings will vary based
on your individual needs.
+ </para>
+ <para>
+ See <ulink
url="http://www.jboss.org/file-access/default/members/jbossrichfaces...
this section</ulink> of the <application>RichFaces</application>
documentation for more details.
+ </para>
+ <para>
+ Sometimes it is better to use the
"<parameter>ALL</parameter>" load strategy in portlets so you do not
need to worry about loading the "framework.pack.js" and "ui.pack.js"
files manually in your portlet header.
+ </para>
<programlisting language="XML" role="XML"><![CDATA[
<context-param>
@@ -205,23 +205,23 @@
<param-value>ALL</param-value>
</context-param>
]]></programlisting>
- <note>
- <para>
- If you use the "<parameter>NONE</parameter>" strategy, you
must include the following scripts in your portlet or portal page header. If you are using
<application>JBoss Portal</application>, you can add this to the
<filename>jboss-portlet.xml</filename> file.
- </para>
- </note>
- <para>
- The <literal>org.ajax4jsf.RESOURCE_URI_PREFIX</literal> configuration
cross-references the path to your scripts below. These settings are required for
<application>RichFaces</application> using the
"<parameter>NONE</parameter>" strategy.
- </para>
-
+ <note>
+ <para>
+ If you use the "<parameter>NONE</parameter>"
strategy, you must include the following scripts in your portlet or portal page header. If
you are using <application>JBoss Portal</application>, you can add this to the
<filename>jboss-portlet.xml</filename> file.
+ </para>
+ </note>
+ <para>
+ The <literal>org.ajax4jsf.RESOURCE_URI_PREFIX</literal>
configuration cross-references the path to your scripts below. These settings are required
for <application>RichFaces</application> using the
"<parameter>NONE</parameter>" strategy.
+ </para>
+
<programlisting language="XML" role="XML"><![CDATA[
<script src="/faces/rfRes/org/ajax4jsf/framework.pack.js"
type="text/javascript"></script>
<script src="/faces/rfRes/org/richfaces/ui.pack.js"
type="text/javascript"></script>
<link rel="stylesheet" type="text/css"
href="/faces/rfRes/org/richfaces/skin.xcss"/>
]]></programlisting>
- <para>
- <application>Seam</application> automatically configures your Ajax4JSF
Filter, so if you are running a <application>Seam</application> portlet, you
do not need the following Filter configuration (however, you do need the
<literal>RESOURCE_URI_PREFIX</literal> no matter what).
- </para>
+ <para>
+ <application>Seam</application> automatically configures your
Ajax4JSF Filter, so if you are running a <application>Seam</application>
portlet, you do not need the following Filter configuration (however, you do need the
<literal>RESOURCE_URI_PREFIX</literal> no matter what).
+ </para>
<programlisting language="XML" role="XML"><![CDATA[
<context-param>
@@ -246,9 +246,9 @@
</web-app>
]]></programlisting>
- </section>
-
- <!-- DO NOT UNCOMMENT <section>
+ </section>
+
+ <!-- DO NOT UNCOMMENT <section>
<title>jboss-portlet.xml</title>
<para>
To avoid scripts loading more than once from different portlet windows you
can define additional scripts in
@@ -266,16 +266,16 @@
</section> -->
- </section>
-
- <section
id="sect-Reference_Guide-Bridge_Configuration-Seam_Setup_and_Configuration_Options">
- <title>Seam Setup and Configuration Options</title>
- <section
id="sect-Reference_Guide-Seam_Setup_and_Configuration_Options-Configuration">
- <title>Configuration</title>
- <para>
- The <literal>ExceptionHandler</literal> is used to clean
<application>Seam</application> contexts and transactions after errors.
- </para>
-
+ </section>
+
+ <section
id="sect-Reference_Guide-Bridge_Configuration-Seam_Setup_and_Configuration_Options">
+ <title>Seam Setup and Configuration Options</title>
+ <section
id="sect-Reference_Guide-Seam_Setup_and_Configuration_Options-Configuration">
+ <title>Configuration</title>
+ <para>
+ The <literal>ExceptionHandler</literal> is used to clean
<application>Seam</application> contexts and transactions after errors.
+ </para>
+
<programlisting language="XML" role="XML"><![CDATA[
<context-param>
<param-name>org.jboss.portletbridge.ExceptionHandler</param-name>
@@ -284,29 +284,29 @@
</param-value>
</context-param>
]]></programlisting>
- <para>
- If you are using this bridge version from <literal>2.0.0.BETA</literal>
through <literal>2.0.0.CR1</literal>, you must define the following
<filename>web.xml</filename> parameter to use the JBoss Portlet Bridge
provided Seam Phase Listener. This is done by the bridge automatically (if needed) in
<literal>2.0.0.FINAL</literal>.
- </para>
-
+ <para>
+ If you are using this bridge version from
<literal>2.0.0.BETA</literal> through
<literal>2.0.0.CR1</literal>, you must define the following
<filename>web.xml</filename> parameter to use the JBoss Portlet Bridge
provided Seam Phase Listener. This is done by the bridge automatically (if needed) in
<literal>2.0.0.FINAL</literal>.
+ </para>
+
<programlisting language="XML" role="XML"><![CDATA[
<context-param>
<param-name>javax.faces.LIFECYCLE_ID</param-name>
<param-value>SEAM_PORTLET</param-value>
</context-param>
]]></programlisting>
- </section>
+ </section>
- </section>
-
- <section
id="sect-Reference_Guide-Bridge_Configuration-Portlet_2.0_Coordination">
- <title>Portlet 2.0 Coordination</title>
- <note>
- <title>Schema and XSD Definitions</title>
- <para>
- It is important to ensure, before using either of the following mechanisms, that the
proper 2.0 schema and xsd are defined at the top of your
<filename>portlet.xml</filename>.
- </para>
- </note>
-
+ </section>
+
+ <section
id="sect-Reference_Guide-Bridge_Configuration-Portlet_2.0_Coordination">
+ <title>Portlet 2.0 Coordination</title>
+ <note>
+ <title>Schema and XSD Definitions</title>
+ <para>
+ It is important to ensure, before using either of the following
mechanisms, that the proper 2.0 schema and xsd are defined at the top of your
<filename>portlet.xml</filename>.
+ </para>
+ </note>
+
<programlisting language="XML" role="XML"><![CDATA[
<portlet-app
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
version="2.0"
@@ -315,43 +315,43 @@
http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">
]]></programlisting>
- <section
id="sect-Reference_Guide-Portlet_2.0_Coordination-Sending_and_Receiving_Events">
- <title>Sending and Receiving Events</title>
- <section
id="sect-Reference_Guide-Sending_and_Receiving_Events-Configuration">
- <title>Configuration</title>
- <para>
- Just like with any portlet 2.0 event consumer and receiver, you must define them in
the <filename>portlet.xml</filename>.
- </para>
+ <section
id="sect-Reference_Guide-Portlet_2.0_Coordination-Sending_and_Receiving_Events">
+ <title>Sending and Receiving Events</title>
+ <section
id="sect-Reference_Guide-Sending_and_Receiving_Events-Configuration">
+ <title>Configuration</title>
+ <para>
+ Just like with any portlet 2.0 event consumer and receiver, you must
define them in the <filename>portlet.xml</filename>.
+ </para>
<!--Unsure if community reference is appropriate enterprise doc. As per QE concern
(anross
- <para>
- To see a working example, checkout the Seam Booking Demo portlet. <ulink
url="http://anonsvn.jboss.org/repos/portletbridge/tags/2.0.0.FINAL/e...
/>
- </para> -->
- <para>
- You must also define the following <emphasis>init params</emphasis> in
your <filename>portlet.xml</filename>.
- </para>
-
-<programlisting language="XML"
role="XML"><![CDATA[ <init-param>
- <name>javax.portlet.faces.autoDispatchEvents</name>
- <value>true</value>
- </init-param>
- <init-param>
- <name>javax.portlet.faces.bridgeEventHandler</name>
- <value>org.foo.eventhandler</value>
- </init-param>
+ <para>
+ To see a working example, checkout the Seam Booking Demo portlet.
<ulink
url="http://anonsvn.jboss.org/repos/portletbridge/tags/2.0.0.FINAL/e...
/>
+ </para> -->
+ <para>
+ You must also define the following <emphasis>init
params</emphasis> in your <filename>portlet.xml</filename>.
+ </para>
+
+<programlisting language="XML" role="XML"><![CDATA[
<init-param>
+ <name>javax.portlet.faces.autoDispatchEvents</name>
+ <value>true</value>
+ </init-param>
+ <init-param>
+ <name>javax.portlet.faces.bridgeEventHandler</name>
+ <value>org.foo.eventhandler</value>
+ </init-param>
]]></programlisting>
- <para>
- While future versions on the 2.0 bridge will automate the dispatching and consuming
of events, at the moments you must dispatch the event in the JSF or Seam backing bean.
- </para>
-
+ <para>
+ While future versions on the 2.0 bridge will automate the dispatching
and consuming of events, at the moments you must dispatch the event in the JSF or Seam
backing bean.
+ </para>
+
<programlisting language="XML" role="XML"><![CDATA[ if
(response instanceof StateAwareResponse) {
StateAwareResponse stateResponse = (StateAwareResponse) response;
stateResponse.setEvent(Foo.QNAME, new Bar());
}
]]></programlisting>
- <para>
- You must also create the event handler class by implementing the
<literal>BridgeEventHandler</literal> interface to process the event payload.
- </para>
-
+ <para>
+ You must also create the event handler class by implementing the
<literal>BridgeEventHandler</literal> interface to process the event payload.
+ </para>
+
<programlisting language="XML" role="XML"><![CDATA[
public class BookingEventHandler implements BridgeEventHandler
{
@@ -362,27 +362,27 @@
}
]]></programlisting>
- </section>
+ </section>
- </section>
-
- <section
id="sect-Reference_Guide-Portlet_2.0_Coordination-Public_Render_Parameters">
- <title>Public Render Parameters</title>
- <section
id="sect-Reference_Guide-Public_Render_Parameters-Configuration">
- <title>Configuration</title>
- <para>
- Public Render Parameters (or PRPs) are one of the most powerful and simple Portlet
2.0 features. Several portlets (JSF or otherwise) can share the same render parameters.
This feature can be use to present a cohesive UI to the user across all portlets on the
page. An example would be using an employee ID to display relative data.
- </para>
- <para>
- The bridge maps a render parameter to a backing bean using settings in your
<filename>faces-config.xml</filename> and
<filename>portlet.xml</filename>.
- </para>
- <para>
- A clear and working example can be found in the Seam Booking Demo portlet. <ulink
url="http://anonsvn.jboss.org/repos/portletbridge/tags/2.0.0.FINAL/e...
/>
- </para>
- <para>
- You must define the following <emphasis>init params</emphasis> in your
<filename>portlet.xml</filename>.
- </para>
-
+ </section>
+
+ <section
id="sect-Reference_Guide-Portlet_2.0_Coordination-Public_Render_Parameters">
+ <title>Public Render Parameters</title>
+ <section
id="sect-Reference_Guide-Public_Render_Parameters-Configuration">
+ <title>Configuration</title>
+ <para>
+ Public Render Parameters (or PRPs) are one of the most powerful and
simple Portlet 2.0 features. Several portlets (JSF or otherwise) can share the same render
parameters. This feature can be use to present a cohesive UI to the user across all
portlets on the page. An example would be using an employee ID to display relative data.
+ </para>
+ <para>
+ The bridge maps a render parameter to a backing bean using settings
in your <filename>faces-config.xml</filename> and
<filename>portlet.xml</filename>.
+ </para>
+ <para>
+ A clear and working example can be found in the Seam Booking Demo
portlet. <ulink
url="http://anonsvn.jboss.org/repos/portletbridge/tags/2.0.0.FINAL/e...
/>
+ </para>
+ <para>
+ You must define the following <emphasis>init
params</emphasis> in your <filename>portlet.xml</filename>.
+ </para>
+
<programlisting language="XML" role="XML"><![CDATA[
<init-param>
<name>javax.portlet.faces.bridgePublicRenderParameterHandler</name>
@@ -391,10 +391,10 @@
...
<supported-public-render-parameter>myCoolPRP</supported-public-render-parameter>
]]></programlisting>
- <para>
- Create a managed bean and <literal>public-parameter-mappings</literal>
in your <filename>faces-config.xml</filename>. This should be a basic bean
that you can bind the passed parameter to a string with
<emphasis>getter</emphasis> and <emphasis>setter</emphasis>.
- </para>
-
+ <para>
+ Create a managed bean and
<literal>public-parameter-mappings</literal> in your
<filename>faces-config.xml</filename>. This should be a basic bean that you
can bind the passed parameter to a string with <emphasis>getter</emphasis> and
<emphasis>setter</emphasis>.
+ </para>
+
<programlisting language="XML" role="XML"><![CDATA[
<managed-bean>
<managed-bean-name>bookingPRP</managed-bean-name>
@@ -413,20 +413,20 @@
</application-extension>
</application>
]]></programlisting>
- <para>
- You must set the parameter in the JSF or Seam backing bean, if you are providing one
from your portlet.
- </para>
-
+ <para>
+ You must set the parameter in the JSF or Seam backing bean, if you
are providing one from your portlet.
+ </para>
+
<programlisting language="XML" role="XML"><![CDATA[
if (response instanceof StateAwareResponse) {
StateAwareResponse stateResponse = (StateAwareResponse) response;
stateResponse.setRenderParameter("hotelName",selectedHotel.getName());
}
]]></programlisting>
- <para>
- Then you must also implement the
<literal>BridgePublicRenderParameterHandler</literal> interface to process any
updates from the received parameter.
- </para>
-
+ <para>
+ Then you must also implement the
<literal>BridgePublicRenderParameterHandler</literal> interface to process any
updates from the received parameter.
+ </para>
+
<programlisting language="XML" role="XML"><![CDATA[
public void processUpdates(FacesContext context)
{
@@ -440,31 +440,31 @@
}
}
]]></programlisting>
- </section>
+ </section>
- </section>
-
- <section
id="sect-Reference_Guide-Portlet_2.0_Coordination-Serving_Your_JSF_Resources_in_a_Portlet">
- <title>Serving Your JSF Resources in a Portlet</title>
- <section
id="sect-Reference_Guide-Serving_Your_JSF_Resources_in_a_Portlet-Configuration">
- <title>Configuration</title>
- <para>
- We have setup a few examples to show you how to use
<literal>EL</literal> and a simple bean that will allow you to use the portlet
resource serving mechanism within a JSF portlet.
- </para>
- <para>
- In <ulink
url="http://anonsvn.jboss.org/repos/portletbridge/tags/2.0.0.CR1/exa...;,
you can see a very simple implementations of a Map object that uses the bridge to get and
encode a resource url served from the portlets web application.
- </para>
- <para>
- So, when you have the normal "<filename>/images</filename>",
"<filename>/styles</filename>" and other resource folders in your
web application, you can use the following <literal>EL</literal> expression to
serve them in your JSF application.
- </para>
-
+ </section>
+
+ <section
id="sect-Reference_Guide-Portlet_2.0_Coordination-Serving_Your_JSF_Resources_in_a_Portlet">
+ <title>Serving Your JSF Resources in a Portlet</title>
+ <section
id="sect-Reference_Guide-Serving_Your_JSF_Resources_in_a_Portlet-Configuration">
+ <title>Configuration</title>
+ <para>
+ We have setup a few examples to show you how to use
<literal>EL</literal> and a simple bean that will allow you to use the portlet
resource serving mechanism within a JSF portlet.
+ </para>
+ <para>
+ In <ulink
url="http://anonsvn.jboss.org/repos/portletbridge/tags/2.0.0.CR1/exa...;,
you can see a very simple implementations of a Map object that uses the bridge to get and
encode a resource url served from the portlets web application.
+ </para>
+ <para>
+ So, when you have the normal
"<filename>/images</filename>",
"<filename>/styles</filename>" and other resource folders in your
web application, you can use the following <literal>EL</literal> expression to
serve them in your JSF application.
+ </para>
+
<programlisting language="XML" role="XML">
#{resource['/img/the-path-to-my-image.png']}
</programlisting>
- <para>
- Just copy the <literal>ResourceBean.java</literal> code above, and add
an entry to your <filename>faces-config.xml</filename> for the bean:
- </para>
-
+ <para>
+ Just copy the <literal>ResourceBean.java</literal> code
above, and add an entry to your <filename>faces-config.xml</filename> for the
bean:
+ </para>
+
<programlisting language="XML" role="XML"><![CDATA[
<managed-bean>
<managed-bean-name>resource</managed-bean-name>
@@ -472,11 +472,11 @@
<managed-bean-scope>application</managed-bean-scope>
</managed-bean>
]]></programlisting>
- </section>
+ </section>
- </section>
+ </section>
- </section>
+ </section>
</chapter>