From do-not-reply at jboss.org Wed Sep 19 02:42:19 2012 Content-Type: multipart/mixed; boundary="===============4809161100036732007==" MIME-Version: 1.0 From: do-not-reply at jboss.org To: gatein-commits at lists.jboss.org Subject: [gatein-commits] gatein SVN: r8849 - in epp/docs/branches/6.0/Reference_Guide/en-US: extras/PortletBridge_Configuration and 4 other directories. Date: Wed, 19 Sep 2012 02:42:19 -0400 Message-ID: <201209190642.q8J6gJZ8030992@svn01.web.mwc.hst.phx2.redhat.com> --===============4809161100036732007== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: jaredmorgs Date: 2012-09-19 02:42:19 -0400 (Wed, 19 Sep 2012) New Revision: 8849 Modified: epp/docs/branches/6.0/Reference_Guide/en-US/Reference_Guide.xml epp/docs/branches/6.0/Reference_Guide/en-US/Revision_History.xml epp/docs/branches/6.0/Reference_Guide/en-US/extras/PortletBridge_Configu= ration/default197.xml epp/docs/branches/6.0/Reference_Guide/en-US/extras/PortletBridge_Configu= ration/default200.xml epp/docs/branches/6.0/Reference_Guide/en-US/extras/PortletBridge_Configu= ration/default202.xml epp/docs/branches/6.0/Reference_Guide/en-US/extras/PortletBridge_Getting= Started/default218.xml epp/docs/branches/6.0/Reference_Guide/en-US/extras/PortletBridge_Getting= Started/default219.xml epp/docs/branches/6.0/Reference_Guide/en-US/extras/PortletBridge_Portlet= _Development/default224.xml epp/docs/branches/6.0/Reference_Guide/en-US/extras/PortletBridge_Portlet= _Development/default225.xml epp/docs/branches/6.0/Reference_Guide/en-US/modules/PortletDevelopment/G= lobal_Portlet.xml epp/docs/branches/6.0/Reference_Guide/en-US/modules/PortletDevelopment/P= ortletBridge.xml epp/docs/branches/6.0/Reference_Guide/en-US/modules/PortletDevelopment/P= ortletBridge/configuration.xml epp/docs/branches/6.0/Reference_Guide/en-US/modules/PortletDevelopment/P= ortletBridge/portlet_development.xml Log: BZ#856417 - First draft of Portlet Bridge rework Modified: epp/docs/branches/6.0/Reference_Guide/en-US/Reference_Guide.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- epp/docs/branches/6.0/Reference_Guide/en-US/Reference_Guide.xml 2012-09= -17 03:31:58 UTC (rev 8848) +++ epp/docs/branches/6.0/Reference_Guide/en-US/Reference_Guide.xml 2012-09= -19 06:42:19 UTC (rev 8849) @@ -3,66 +3,20 @@ %BOOK_ENTITIES; ]> - + - + Authentication and Authorization - Portlet Bridge - - <remark/>Overview -
- Portlet Bridge - A portlet bridge allows non-native application frameworks to= run in a portal environment, independent to the underlying portlet API, or= portlet concept. This functionality provides a developer flexibility to co= ntinue writing applications in a preferred language, and allows a controlle= d transition to new technologies. -
-
- JBoss Portlet Bridge - The JBoss Portlet Bridge is a non-final draft implementation= of the JSR-329 specification which supports the JSF 1.2 and 2.0 runtime wi= thin a JSR 168 or 286 portlet and with added enhancements to support other = web frameworks (such as Seam and RichFaces). - -The project follows the spec from JSR-301 to JSR-329 and now maintains an = alpha version (3.0) compatible with JSF 2.0 and RichFaces 4.0. -
-
- File Locations - BZ#856417 - NEEDINFO - Do not have the root configuration = directory for Portlet Bridge. Asked Ken in email on 17th Sep. - Configuration files for Portlet Bridge are located in the &l= t;DIRECTORY PATH GOES HERE>. - - - portlet.xml - - Contains the primary configuration information for t= he portlet. Information such as the GenericFacesPortlet location, and which= Java Server Faces (JSF) pages to render are stored in this file. - - - - faces-config.xml - - Contains - - - - web.xml - - - - - -
-
- - Configuration -
- - - Web Services for Remote Portlets (WSRP) - Modified: epp/docs/branches/6.0/Reference_Guide/en-US/Revision_History.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- epp/docs/branches/6.0/Reference_Guide/en-US/Revision_History.xml 2012-0= 9-17 03:31:58 UTC (rev 8848) +++ epp/docs/branches/6.0/Reference_Guide/en-US/Revision_History.xml 2012-0= 9-19 06:42:19 UTC (rev 8849) @@ -8,8 +8,8 @@ - 5.2.2-100 - Wed Sep 05 2012 + 6.0.0-1 + Thu Sep 19 2012 Jared Morgan @@ -17,38 +17,10 @@ - Prepared guide for JBoss Enterprise Portal Platform 5.= 2.2 GA. Refer to 5.2.2 Release Notes for a summary of changes to this guide= . + BZ#856417 - First draft containing Portlet Bridge work= . - - 5.2.1-100 - Tue Apr 17 2012 - - Jared - Morgan - - - - - Prepared guide for JBoss Enterprise Portal Platform 5.= 2.1 GA. Refer to 5.2.1 Release Notes for a summary of changes to this guide= . - - - - - 5.2.0-100 - Wed Dec 14 2011 - - Scott - Mumford - - - - - Publication build. - - - Modified: epp/docs/branches/6.0/Reference_Guide/en-US/extras/PortletBridge_= Configuration/default197.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- epp/docs/branches/6.0/Reference_Guide/en-US/extras/PortletBridge_Config= uration/default197.xml 2012-09-17 03:31:58 UTC (rev 8848) +++ epp/docs/branches/6.0/Reference_Guide/en-US/extras/PortletBridge_Config= uration/default197.xml 2012-09-19 06:42:19 UTC (rev 8849) @@ -1,20 +1,54 @@ - + + yourPortletName javax.portlet.faces.GenericFacesPortlet - + javax.portlet.faces.defaultViewId.view /welcome.xhtml - + javax.portlet.faces.defaultViewId.edit /jsf/edit.xhtml - + javax.portlet.faces.defaultViewId.help /jsf/help.xhtml + + + javax.portlet.faces.preserveActionParams + true + + + + javax.portlet.faces.autoDispatchEvents + true + + + + javax.portlet.faces.bridgeEventHandler + org.jboss.example.booking.BookingEventHandler + + + + + [namespace]:[Eve= nt_name] + + + + [namespace]:[eve= nt_name] + [the appropriate class to map the application type to] + + + + [namespace]:[even= t_name] + + Modified: epp/docs/branches/6.0/Reference_Guide/en-US/extras/PortletBridge_= Configuration/default200.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- epp/docs/branches/6.0/Reference_Guide/en-US/extras/PortletBridge_Config= uration/default200.xml 2012-09-17 03:31:58 UTC (rev 8848) +++ epp/docs/branches/6.0/Reference_Guide/en-US/extras/PortletBridge_Config= uration/default200.xml 2012-09-19 06:42:19 UTC (rev 8849) @@ -3,8 +3,11 @@ xsi:schemaLocation=3D"http://java.sun.com/xml/ns/j2ee http://java.= sun.com/xml/ns/j2ee/web-app_2_4.xsd" version=3D"2.4"> ... - - - org.ajax4jsf.VIEW_HANDLERS - org.jboss.portletbridge.application.FaceletPortletView= Handler - + + + javax.portlet.faces.RENDER_POLICY + + + ALWAYS_DELEGATE + + Modified: epp/docs/branches/6.0/Reference_Guide/en-US/extras/PortletBridge_= Configuration/default202.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- epp/docs/branches/6.0/Reference_Guide/en-US/extras/PortletBridge_Config= uration/default202.xml 2012-09-17 03:31:58 UTC (rev 8848) +++ epp/docs/branches/6.0/Reference_Guide/en-US/extras/PortletBridge_Config= uration/default202.xml 2012-09-19 06:42:19 UTC (rev 8849) @@ -2,12 +2,12 @@ xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=3D"http://java.sun.com/xml/ns/j2ee http://java.= sun.com/xml/ns/j2ee/web-app_2_4.xsd" version=3D"2.4"> - - - javax.portlet.faces.RENDER_POLICY - - NEVER_DELEGATE - - - ... + + + javax.portlet.faces.RENDER_POLICY + + NEVER_DELEGATE + + + Modified: epp/docs/branches/6.0/Reference_Guide/en-US/extras/PortletBridge_= GettingStarted/default218.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- epp/docs/branches/6.0/Reference_Guide/en-US/extras/PortletBridge_Gettin= gStarted/default218.xml 2012-09-17 03:31:58 UTC (rev 8848) +++ epp/docs/branches/6.0/Reference_Guide/en-US/extras/PortletBridge_Gettin= gStarted/default218.xml 2012-09-19 06:42:19 UTC (rev 8849) @@ -1 +1 @@ - + Modified: epp/docs/branches/6.0/Reference_Guide/en-US/extras/PortletBridge_= GettingStarted/default219.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- epp/docs/branches/6.0/Reference_Guide/en-US/extras/PortletBridge_Gettin= gStarted/default219.xml 2012-09-17 03:31:58 UTC (rev 8848) +++ epp/docs/branches/6.0/Reference_Guide/en-US/extras/PortletBridge_Gettin= gStarted/default219.xml 2012-09-19 06:42:19 UTC (rev 8849) @@ -1,4 +1,4 @@ - - org.jboss.portletbridge.WRAP_SCRIPTS - true - + + org.jboss.portletbridge.WRAP_SCRIPTS + true + Modified: epp/docs/branches/6.0/Reference_Guide/en-US/extras/PortletBridge_= Portlet_Development/default224.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- epp/docs/branches/6.0/Reference_Guide/en-US/extras/PortletBridge_Portle= t_Development/default224.xml 2012-09-17 03:31:58 UTC (rev 8848) +++ epp/docs/branches/6.0/Reference_Guide/en-US/extras/PortletBridge_Portle= t_Development/default224.xml 2012-09-19 06:42:19 UTC (rev 8849) @@ -1,7 +1,7 @@ - /register.jspx - - edit - /edit.jspx?javax.portlet.faces.PortletMode=3Dedit - - \ No newline at end of file + /register.xhtml + + edit + /edit.xhtml?javax.portlet.faces.PortletMode=3Dedit + + Modified: epp/docs/branches/6.0/Reference_Guide/en-US/extras/PortletBridge_= Portlet_Development/default225.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- epp/docs/branches/6.0/Reference_Guide/en-US/extras/PortletBridge_Portle= t_Development/default225.xml 2012-09-17 03:31:58 UTC (rev 8848) +++ epp/docs/branches/6.0/Reference_Guide/en-US/extras/PortletBridge_Portle= t_Development/default225.xml 2012-09-19 06:42:19 UTC (rev 8849) @@ -1,7 +1,7 @@ - /edit.jspx* - - view - #{sessionScope['javax.portlet.faces.viewIdHistory.view']} - - \ No newline at end of file + /edit.xhtml* + + view + #{sessionScope['javax.portlet.faces.viewIdHistory.view']}<= /to-view-id> + + Modified: epp/docs/branches/6.0/Reference_Guide/en-US/modules/PortletDevelo= pment/Global_Portlet.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- epp/docs/branches/6.0/Reference_Guide/en-US/modules/PortletDevelopment/= Global_Portlet.xml 2012-09-17 03:31:58 UTC (rev 8848) +++ epp/docs/branches/6.0/Reference_Guide/en-US/modules/PortletDevelopment/= Global_Portlet.xml 2012-09-19 06:42:19 UTC (rev 8849) @@ -40,11 +40,8 @@ </portlet-app> - The path to the global portlet.xml is the val= ue of gatein.portlet.config in the configurati= on.properties.xml file. By default The file path is EPP_DIST/jboss-as/server/PROFILE/conf/gatein/portlet.xml + The path to the global portlet.xml is the val= ue of gatein.portlet.config in the configurati= on.properties.xml file. By default, the file path is <= replaceable>EPP_DIST/jboss-as/server/PROFILE/conf/gatein/portlet.xml - - For JBoss: The file path is EPP_DIST/jboss-as/server/default/conf/gat= ein/portlet.xml. -
Global Metadata Elements Modified: epp/docs/branches/6.0/Reference_Guide/en-US/modules/PortletDevelo= pment/PortletBridge/configuration.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- epp/docs/branches/6.0/Reference_Guide/en-US/modules/PortletDevelopment/= PortletBridge/configuration.xml 2012-09-17 03:31:58 UTC (rev 8848) +++ epp/docs/branches/6.0/Reference_Guide/en-US/modules/PortletDevelopment/= PortletBridge/configuration.xml 2012-09-19 06:42:19 UTC (rev 8849) @@ -5,663 +5,58 @@ ]>
Bridge Configuration - - 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 runnin= g in the Portal environment. - -
- Core Setup and Configuration -
- portlet.xml - - The basic JSR-329 portlet configuration. +
+ portlet.xml + To have access to all portlet 2 specification features, you mus= t declare the portlet schema definition as prescribed in the port= let.xml file. The <init-param> directives are explained in= more detail if required below the portlet.xml code. + The XML below describes the basic directives required for a JSF2= portlet. +Some directives are optional, and are called-out in the file. <= /para> + + + <init-param> directives + + preserveActionParams + + Specifies how request parameters are maintained during a p= ortal action request. + + When the entire portlet is written in JSF, this paramete= r must be set to true. If your portlet uses a mix of= view technologies, set this parameter to false, or = do not specify it. + + + When set to true, the bridge must m= aintain any request parameters assigned during the portlet's bridge request scope action request. +When set to false, or not defined, the action&apos= ;s request parameters are only maintained for the duration of the portlet request scope. - - - When preserveActionParams is set to= TRUE, the bridge must maintain any request paramete= rs assigned during the portlet's action request. - - - The request parameters are maintained in the &qu= ot;bridge request scope". When this attribute is not presen= t or is FALSE the action's request parameters a= re only maintained for the duration of the portlet request scope<= /emphasis>. - - -
-
- faces-config.xml - + + + + autoDispatchEvents + + Explicitly specifies that GenericFacesPortlet overrides ev= ent handling to dispatch all events to the Bridge. + GenericFacesPortlet overrides event handling by default, w= ithout supplying this directive. However, this parameter can be set to true so the behavior is explicitly stated in the configu= ration file. + + + + + Other directives + + <supported-publishing-event> + + Specifies that the portlet can publish an event to the por= tal. + The value of the <qname> parameter specifies a names= pace (for example, jbp:), and the name to use when publishing the event (fo= r example, BookingEvent). + + + + <event-definition> + + Specifies how the event namespace and publishing name link= to an actual type within a portlet application. + The directive requires a <qname> element, and a <= value-type> element. + + + +
+
+ faces-config.xml + The PortletViewHandler ensures that= each JSF portlet instance is properly namespaced. - -
-
- Facelets Configuration - - The following web.xml setting is only= for Facelets based applications - -
- web.xml - - - - RenderPolicy Options - - ALWAYS_DELEGATE - - - Indicates the bridge should not render the= view itself but rather always delegate the rendering. - - - - - NEVER_DELEGATE - - - Indicates the bridge should always render = the view itself and never delegate. - - - - - DEFAULT - - - Directs the bridge to first delegate the r= ender. If an exception is thrown, the bridge renders 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 as it would if DEFAULT was = set. - - - - -
-
-
- JSP Only Configuration - - The following web.xml setting is only= for JSP based applications. Download the demonstration application here. - -
- web.xml - -
-
-
-
- RichFaces Setup and Configuration Options -
- web.xml - - The following configuration is designated for portlets usi= ng the RichFaces library. These settings will va= ry based on your individual needs. - - - See this section of the RichFaces documentation for more details. - - - Sometimes it is better to use the "ALL" 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. - - - - - If you use the "NONE"= strategy, you must include the following scripts in your portlet or portal= page header. If you are using JBoss Portal, you= can add this to the jboss-portlet.xml file. - - - - The org.ajax4jsf.RESOURCE_URI_PREFIX co= nfiguration cross-references the path to your scripts below. These settings= are required for RichFaces using the "NONE" strategy. Replace all richFacesP= ortlet text in the example with the actual name of the portle= t resource. - - - Seam automatically configures y= our Ajax4JSF Filter, so if you are running a Seam portlet, you do not need the following Filter configuration (however, you= do need the RESOURCE_URI_PREFIX no matter what). - - -
-
- Configure RichFaces to work with WSRP and PortletBridge - - Use the following settings in web.xml= when running WSRP portlets: - - <context-param> - <param-name>org.jboss.portletbridge.WRAP_SCRIPTS</param-n= ame> - <param-value>false</param-value> - </context-param> -.... - <context-param> - <param-name>org.richfaces.LoadStyleStrategy</param-name&g= t; - <param-value>ALL</param-value> - </context-param> - <context-param> - <param-name>org.richfaces.LoadScriptStrategy</param-name&= gt; - <param-value>DEFAULT</param-value> - </context-param> - - - The styles below must also be manually added to the facele= ts template header in the EPP_DIST/jbo= ss-as/portletbridge/examples/richFacesPortlet-VERSION.war:richFacesPortlet.war/templates/main.xhtml file. - - <link rel=3D"s= tylesheet" type=3D"text/css" href=3D"/richFacesPortlet/= faces/rfRes/org/richfaces/renderkit/html/css/basic_both.xcss"/> -<link rel=3D"stylesheet" type=3D"text/css" href=3D&= quot;/richFacesPortlet/faces/rfRes/org/richfaces/renderkit/html/css/extende= d_both.xcss"/> -<link rel=3D"stylesheet" type=3D"text/css" href=3D&= quot;/richFacesPortlet/faces/rfRes/org/richfaces/skin.xcss"/> - - - The table below outlines the current status of RichFaces f= eatures when used in both local and remote portlets. - - - RichFaces Feature Status - - - - Richfaces Component - Supported as Local Portlet - Supported as Remote Portlet using WSRP - - - - - - a4j:commandButton - - Yes - Yes - - - - a4j:commandLink - - Yes - Yes - - - - a4j:jsFunction - - Yes - Yes - - - - a4j:push - - Yes - Yes - - - - a4j:poll - - Yes - Yes - - - - a4j:queue - - No - No - - - - a4j:status - - Yes - Yes - - - - a4j:keepAlive - - Yes - Yes - - - - a4j:include - - Yes - Yes - - - - a4j:loadStyle - - No - No - - - - a4j:loadScript - - Yes - Yes - - - - a4j:ajaxValidator - - Yes - Yes - - - - a4j:beanValidator - - Yes - Yes - - - - a4j:graphValidator - - Yes - Yes - - - - a4j:mediaOutput - - No - Yes - - - - a4j:outputPanel - - Yes (except Firefox 3.5) - Yes - - - - a4j:log - - Yes - Yes - - - - rich:dataTable - - Yes (except Firefox 3.6 and IE8) - No - - - - a4j:dataFilterSlider - - Yes - Yes - - - - rich:dataGrid - - Yes - No - - - - rich:dataList - - Yes - Yes - - - - rich:datascroller - - No - No - - - - rich:extendedDataTable - - Yes (except IE7) - No - - - - rich:repeat - - Yes - Yes - - - - rich:scrollableDataTable - - Yes (except Firefox 3.6) - Yes - - - - drag-drop support - - Yes - Yes - - - - rich:contextMenu - - No - No - - - - rich:dropDownMenu - - Yes - Yes - - - - rich:tree - - Yes (except Firefox 3.5) - Yes - - - - rich:modalPanel - - Yes - Yes - - - - rich:paint2d - - Yes - Yes - - - - rich:panel - - Yes - Yes - - - - rich:panelBar - - Yes - Yes - - - - rich:panelMenu - - Yes - Yes - - - - rich:progressBar - - Yes - Yes - - - - rich:separator - - Yes - Yes - - - - rich:simpleTogglePanel - - Yes - Yes - - - - rich:spacer - - Yes - Yes - - - - rich:tabPanel - - Yes - Yes (except tab deletion) - - - - rich:togglePanel - - Yes - Yes - - - - rich:toolBar - - Yes - Yes - - - - rich:toolTip - - Yes - Yes - - - - rich:calendar - - Yes - No - - - - rich:colorPicker - - Yes - Yes - - - - rich:comboBox - - Yes - Yes - - - - rich:editor - - No - No - - - - rich:fileUpload - - No - No - - - - rich:inplaceSelect - - Yes - Yes - - - - rich:inplaceInput - - Yes - Yes - - - - rich:inputNumberSpinner - - Yes (except IE7) - Yes - - - - rich:inputNumberSlider - - Yes - Yes - - - - rich:suggestionBox - - Yes - Yes - - - - rich:listShuttle - - Yes - Yes - - - - rich:orderingList - - Yes - Yes - - - - rich:pickList - - Yes - Yes - - - -
-
-
-
- Seam Setup and Configuration Options -
- Configuration - - The ExceptionHandler is used to clean <= application>Seam contexts and transactions after errors. - - - +
-
- Portlet 2.0 Coordination - - Schema and XSD Definitions - - It is important to ensure, before using either of the foll= owing mechanisms, that the proper 2.0 schema and xsd are defined at the top= of your portlet.xml. - - - -
- Sending and Receiving Events -
- Configuration - - Just like with any portlet 2.0 event consumer and rece= iver, you must define them in the portlet.xml. - - - You must also define the following init para= ms in your portlet.xml. - - - - While future versions of the 2.0 bridge will automate = the dispatching and consuming of events, at the moment you must dispatch th= e event in the JSF or Seam backing bean. - - - - You must also create the event handler class by implem= enting the BridgeEventHandler interface to process the e= vent payload. - - -
-
-
- Public Render Parameters -
- Configuration - - Public Render Parameters (or PRPs) are one of the most= powerful and simple Portlet 2.0 features. Several portlets (JSF or otherwi= se) can share the same render parameters. This feature can be used to prese= nt a cohesive UI to the user across all portlets on the page. An example wo= uld be using an employee ID to display relative data. - - - The bridge maps a render parameter to a backing bean u= sing settings in your faces-config.xml and p= ortlet.xml. - - - A clear and working example can be found in the Seam B= ooking Demo portlet. - - - You must define the following init params in your portlet.xml. - - - - Create a managed bean and public-parameter-ma= ppings in your faces-config.xml. This should= be a basic bean that you can bind the passed parameter to a string with getter and setter. - - - - You must set the parameter in the JSF or Seam backing = bean, if you are providing one from your portlet. - - - - Then you must also implement the BridgePublic= RenderParameterHandler interface to process any updates from the = received parameter. - - -
-
-
- Serving Your JSF Resources in a Portlet -
- Configuration - - We have setup a few examples to show you how to use EL and a simple bean that will allow you to use the portle= t resource serving mechanism within a JSF portlet. - - - In ResourceBean.java,= you can see a very simple implementation of a Map object that uses the bri= dge to get and encode a resource URL served from the portlet application. - - - So, when you have the normal "/images", "/styles" and other resourc= e folders in your web application, you can use the following EL expression to serve them in your JSF application. - - - - Just copy the ResourceBean.java cod= e above, and add an entry to your faces-config.xml for= the bean: - - -
-
-
Modified: epp/docs/branches/6.0/Reference_Guide/en-US/modules/PortletDevelo= pment/PortletBridge/portlet_development.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- epp/docs/branches/6.0/Reference_Guide/en-US/modules/PortletDevelopment/= PortletBridge/portlet_development.xml 2012-09-17 03:31:58 UTC (rev 8848) +++ epp/docs/branches/6.0/Reference_Guide/en-US/modules/PortletDevelopment/= PortletBridge/portlet_development.xml 2012-09-19 06:42:19 UTC (rev 8849) @@ -8,6 +8,48 @@ This chapter demonstrates common development tasks described by th= e 329 specification. +
+ Portlet tags + Portlet Bridge supports the following tags from section PLT.26 o= f the Portlet 2.0 Spec (JSR 286): + + + actionURL + + + renderURL + + + resourceURL + + + namespace + + + param + + + property + + + When using the tag library, the following namespace needs to be = added to the facelet page of the application. + xmlns:pbr=3D"http://jboss.org/portletbridge"= + + renderURL example + Generate a Portlet Render URL that enables switching between P= ortlet modes. + <pbr:renderURL var=3D"rende= rUrl" portletMode=3D"edit"> +</pbr:renderURL> +<h:outputLink value=3D"#{renderUrl}">Edit Mode</h:outpu= tLink> + + + namespace example + This portlet tag is particularly useful for prefixing JavaScri= pt functions within a given portlet. This ensures that the JavaScript funct= ion name does not clash with a name from another portlet, or from the same = portlet displayed on the same page multiple times. + An example for defining a JavaScript method is: + <script type=3D'text/javasc= ript'> + function <pbr:namespace />DoSomething() { + } +</script> + +
Excluding Attributes from the Bridge Request Scope @@ -18,18 +60,56 @@
+
+ JSF facelet view + When creating a JSF Facelet view document, it is common to see c= ontent wrapped with the following code. + <!DOCTYPE html PUBLIC "-//W3= C//DTD XHTML 1.0 Transitional//EN" "> +<html xmlns=3D"http://www.w3.org/1999/xhtml" xmlns:h=3D"= http://java.sun.com/jsf/html" xmlns:f=3D"http://java.sun.com/jsf/= core" + xmlns:ui=3D"http://java.sun.com/jsf/facelets" xmlns:a4j=3D&q= uot;http://richfaces.org/a4j"> +<!-- Unnecessary content removed for clarity --> +</html> + Because a single portlet only reflects a potentially small porti= on of the HTML markup for a page, a JSF portlet returning the above markup = for each portlet can be distracting, and potentially problematic. + The recommended way to wrap the content of a JSF Facelet view do= cument for a portlet is to use the <f:view> element. Using <f:view= > means that only the relevant content of the portlet mark-up is returne= d to the page. + <f:view xmlns=3D"http://www.= w3.org/1999/xhtml" xmlns:h=3D"http://java.sun.com/jsf/html" = xmlns:f=3D"http://java.sun.com/jsf/core" + xmlns:ui=3D"http://java.sun.com/jsf/facelets" xmlns:a4j=3D&q= uot;http://richfaces.org/a4j"> +<!-- Unnecessary content removed for clarity --> +</f:view> + + While not specifically relevant to portlet, it is important to= include <h:head> and <h:body> elements to allow JSF to process= the facelet correctly. + +
+
+ Error handling + To display error pages for specific exceptions in a JSF portlet,= the following code is required in the web.xml file. + <error-page> + <exception-type>javax.servlet.ServletException</exception-type&= gt; + <location>/faces/error.xhtml</location> +</error-page> +<error-page> + <exception-type>javax.faces.application.ViewExpiredException</e= xception-type> + <location>/faces/error.xhtml</location> +</error-page> + The above error page definitions are appropriate for a JSF portl= et that has a FacesServlet mapping such as /faces/. + If the FacesServlet mapping was **.jsf, the location would be e= rror, error.jsf or error.xhtml. + There is no requirement when using FacesServlet suffix mapping t= o append an extension, the name of the view is all that is required for the= page to be found + + Remember to add a link from any error page to the normal flow = of the JSF application, otherwise the same error page will be constantly di= splayed. + +
- Supporting PortletMode Changes + Switching Portlet Modes A PortletMode represents a distinct render = path within an application. There are three standard modes: view<= /emphasis>, edit, and help. The bridge's ExternalContext.encodeActionURL recognizes the query string parameter javax.portlet.faces.P= ortletMode and uses this parameter's value to set the portle= t mode on the underlying portlet actionURL or response. - - - Once processed it then removes this parameter from the query s= tring. This means the following navigation rule causes one to render the /edit.jspx viewId in the portlet edit mode: - - + + Once processed it then removes this parameter from the query s= tring. + + /edit.xhtml navigation rule + This navigation rule causes one to render the /edit= .xhtml viewId in the portlet edit mode. + +
Navigating to a mode's last viewId @@ -45,7 +125,11 @@ This is most easily expressed via an EL exp= ression. For example: - + + /register.xhtml viewId navigation rule + BZ#856417 - added from "Portlet Mode's last = viewId" Confluence sectionThis navigation rule causes one to= render the /edit.xhtml viewId in the portlet edit mod= e. + +
Note to Portlet Developers @@ -131,7 +215,7 @@ However, if these do not meet your use case or you have a diff= erent strategy, you can use one of the following methods.
- Storing Components in <parameter>PortletSession.APPLICATION_S= COPE</parameter> + Storing Components in PortletSession.APPLICATION_SCOPE Sometimes it is beneficial to store your Seam= components in the portlet APPLICATION_SCOPE. @@ -171,33 +255,156 @@
- Linking to Portlet/JSF Pages Using h:outputlink - - For linking to any JSF/Facelets page within your portlet web a= pplication, you can use the following. + Linking to a Facelets page within the same portlet + To link any JSF/Facelets page within a portlet web application, = use the following code. + BZ#856417 - This code sample is the same in the Confluence doc= s.
- Redirecting to an External Page or Resource + Redirecting to an external page or resource - To link to a non JSF view, jboss.org for = example, you can use the following parameter. + To link to a non JSF view, jboss.org for = example, you can use the following code. - - Then in your backing bean, you must call a redirect= (). + In the backing bean, a redirect() must = be called. - FacesContext.getCurren= tInstance().getExternalContext().redirect("http://www.jboss.org"); - + public class YourBean { + public void yourListener() { + FacesContext.getCurrentInstance().getExternalContext().redirect("= http://www.jboss.org"); + } +}
Using Provided EL Variables + BZ#856417 - Added the table from Confluence - All EL variables found in the JSR-329 (Port= let 2.0) specification are available in the JBoss Portlet Bridge. For examp= le, you can use the following to edit the portlet preferences on the UI: + All EL variables found in the JSR-329 (Port= let 2.0) specification are available in the JBoss Portlet Bridge. + + + <tgroup cols=3D"2"> + <colspec colname=3D"c1"/> + <colspec colname=3D"c2"/> + <tbody> + <row> + <entry>portalConfig</entry> + <entry> + <para>Object of type javax.portlet.PortletConfig +</para> + </entry> + </row> + <row> + <entry>actionRequest</entry> + <entry> + <para>Object of type</para> + <para>javax.portlet.ActionRequest</para> + <para>(only accessible when processing an ActionRequest)</pa= ra> + </entry> + </row> + <row> + <entry>actionResponse</entry> + <entry> + <para>Object of type</para> + <para>javax.portlet.ActionResponse</para> + <para>(only accessible when processing an ActionResponse)</p= ara> + </entry> + </row> + <row> + <entry>eventRequest</entry> + <entry> + <para>Object of type</para> + <para>javax.portlet.EventRequest</para> + <para>(only accessible when processing an EventRequest)</par= a> + </entry> + </row> + <row> + <entry>eventResponse</entry> + <entry> + <para>Object of type</para> + <para>javax.portlet.EventResponse</para> + <para>(only accessible when processing an EventRequest)</par= a> + </entry> + </row> + <row> + <entry>renderRequest</entry> + <entry> + <para>Object of type</para> + <para>javax.portlet.RenderRequest</para> + <para>(only accessible when processing an RenderResponse)</p= ara> + </entry> + </row> + <row> + <entry>renderResponse</entry> + <entry> + <para>Object of type</para> + <para>javax.portlet.RenderResponse</para> + <para>(only accessible when processing an RenderResponse)</p= ara> + </entry> + </row> + <row> + <entry>resourceRequest</entry> + <entry> + <para>Object of type</para> + <para>javax.portlet.ResourceRequest</para> + <para>(only accessible when processing an ResourceRequest)</= para> + </entry> + </row> + <row> + <entry>resourceResponse</entry> + <entry> + <para>Object of type</para> + <para>javax.portlet.ResourceResponse</para> + <para>(only accessible when processing an ResourceResponse)<= /para> + </entry> + </row> + <row> + <entry>portletSession</entry> + <entry> + <para>Current PortletSession object +</para> + </entry> + </row> + <row> + <entry>portletSessionScope</entry> + <entry> + <para>Map of PortletSession attributes in PORTLET_SCOPE. JSP= Expression returns immutable Map, but Faces Expression returns mutable Map= .</para> + </entry> + </row> + <row> + <entry>httpSessionScope</entry> + <entry> + <para>Mutable Map of PortletSession attributes in APPLICATIO= N_SCOPE</para> + </entry> + </row> + <row> + <entry>portletPreferences</entry> + <entry> + <para>Current PortletPreferences object</para> + </entry> + </row> + <row> + <entry>portletPreferencesValues</entry> + <entry> + <para>Immutable Map containing entries equivalent to Portlet= Preferences.getMap()</para> + </entry> + </row> + <row> + <entry>mutablePortletPreferencesValues</entry> + <entry> + <para>Mutable Map of type Map<String, javax.portlet.faces= .preference.Preference>. This EL variable provides read/write access to = each portlet preference.</para> + </entry> + </row> + </tbody> + </tgroup> + </table> + <example> + <title/> + <para>This code allows you to edit the portlet preferences on the UI </para> - <programlisting language=3D"XML" role=3D"XML"><xi:include xmlns:xi=3D"= http://www.w3.org/2001/XInclude" href=3D"../../../extras/PortletBridge_Port= let_Development/default241.xml" parse=3D"text"/></programlisting> - <para> - Then in your backing bean, you must call the PortletPreference= s.store() method. + <programlisting language=3D"XML" role=3D"XML"><xi:include xmlns:xi= =3D"http://www.w3.org/2001/XInclude" href=3D"../../../extras/PortletBridge_= Portlet_Development/default241.xml" parse=3D"text"/></programlisting> + <para>In the backing bean, call the PortletPreferences.store() meth= od. </para> - <programlisting language=3D"Java" role=3D"Java"><xi:include xmlns:xi= =3D"http://www.w3.org/2001/XInclude" href=3D"../../../extras/PortletBridge_= Portlet_Development/default242.java" parse=3D"text"/></programlisting> + <programlisting language=3D"Java" role=3D"Java"><xi:include xmlns:xi= =3D"http://www.w3.org/2001/XInclude" href=3D"../../../extras/PortletBridge_= Portlet_Development/default242.java" parse=3D"text"/></programlisting> + </example> </section> </section> Modified: epp/docs/branches/6.0/Reference_Guide/en-US/modules/PortletDevelo= pment/PortletBridge.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- epp/docs/branches/6.0/Reference_Guide/en-US/modules/PortletDevelopment/= PortletBridge.xml 2012-09-17 03:31:58 UTC (rev 8848) +++ epp/docs/branches/6.0/Reference_Guide/en-US/modules/PortletDevelopment/= PortletBridge.xml 2012-09-19 06:42:19 UTC (rev 8849) @@ -1,13 +1,877 @@ -<?xml version=3D'1.0' encoding=3D'utf-8' ?> +<?xml version=3D'1.0' encoding=3D'UTF-8'?> <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.= oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ <!ENTITY % BOOK_ENTITIES SYSTEM "Reference_Guide.ent"> %BOOK_ENTITIES; ]> <chapter id=3D"chap-Reference_Guide-Building_JSF_Portlets"> - <title>Building JSF Portlets - - - - + JBoss Portlet Bridge +
+ Portlet Bridge + A portlet bridge is a mediator that allows non-native applicatio= n frameworks to run in a portal environment, independent to the underlying = portlet API, or portlet concept. This functionality provides a developer fl= exibility to continue writing applications in a preferred language, and all= ows a controlled transition to new technologies. +
+
+ JBoss Portlet Bridge + The JBoss Portlet Bridge is a non-final draft implementation of = the JSR-329 specification. It supports the JSF 1.2 and 2.0 runtime within a= JSR 168 or 286 portlet. +The project follows the spec from JSR-301 to JSR-329, with version 3.0 of = the bridge compatible with JSF 2.0 and RichFaces 4.0. + + JBoss Portlet Bridge allows JSF applications to run using supported JBos= s frameworks such as Seam and RichF= aces. + + + The bridge is used to execute Faces requests on= behalf of the portlet. During each request, the Faces e= nvironment is setup and handled by the bridge. + + + Part of this implementation acts as a Faces con= troller, much like the FacesServlet does in the direct client request envir= onment. + + + The other part of this implementation is provided by implementing = a variety of (standard) Faces extensions. + +
+
+ File Locations + BZ#856417 - NEEDINFO - will we be packaging the portletbridge = binaries in this folder for EPP 6? + The binaries required for Portlet Bridge applications, and exam= ple applications that can be used to learn and understand JSF applications = are located in in EPP_HOME/portletbridge. + Configuration files for Portlet Bridge are located in the follow= ing locations: + BZ#856417 - NEEDINFO - basing these file paths on what I under= stand the structure will be using EAP 6. DOMAIN in this case refers to /man= aged or /standalone + + + EPP_DIST/DOMAIN/conf/gatein/portlet.xml + + + EPP_HOME/DOMAIN/portlet_name.war/WEB-INF/faces-config.= xml + + + EPP_HOME/DOMAIN/portlet_name.war/WEB-INF/web.xml + + + + + + portlet.xml + + + Contains the primary configuration information for the p= ortlet. Information such as the GenericFacesPortlet location, and which Jav= a Server Faces (JSF) pages to render are stored in this file. + + + + + faces-config.xml + + + Contains configuration directives that are specific to J= SF applications. The specific directives will be covered as needed througho= ut this guide. + + + + + web.xml + + + Contains configuration directives that apply to the web = application in general. + + + +
+
+ Portlet application + A portlet application is defined as a single web archive (WAR). = + All portlets that are part of the same WAR are considered to for= m part of the same portlet application. +
+
+ Bridgelets + Bridgelets are extensions that sit on top of the portlet bridge = framework. They extend the functionality of other JBoss portlet application= s, and are critical in JSF portlet development. + Bridglets are made available in the impl development binary, loc= ated in EPP_HOME/portletbridge. +
+
+ Seam Bridgelet + PortalIdentity Seam bridgelet allows you to implement Single Sign-On (SSO) between Seam and JBoss Enterprise Portal Platform. + + + This bridgelet is configured in the application's comp= onents.xml file, by specifying the following directive: + +
+
+ RichFaces Bridgelet + + Richfaces does not account for multiple com= ponents on the same portal page by default. This following web.xm= l bridgelet renders all RichFaces com= ponent javascript portal-friendly. + + +
+ +
+ Render Policy Parameters + Different JSF View Declaration Languages require different behav= ior from the JBoss Portlet Bridge when it comes to rendering views. Instruc= ting the Bridge on which policy to use is done using the javax.portlet.face= s.RENDER_POLICY <context-param> directive in web.xml. + + RenderPolicy Options + + ALWAYS_DELEGATE + + + Indicates the bridge should not render the= view itself, but rather always delegate the rendering. + + + + + NEVER_DELEGATE + + + Indicates the bridge should always render = the view itself and never delegate. + + + + + DEFAULT + + + Directs the bridge to first delegate the r= ender. If an exception is thrown, the bridge renders 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 as it would if DEFAULT was = set. + + + + +
+
+ Facelets Configuration + + The following web.xml setting is only= for Facelets based applications. +
+ web.xml + +
+
+
+ JSP Only Configuration + + The following web.xml setting is only= for JSP based applications. Download the demonstration application here. + +
+ web.xml + +
+
+
+ RichFaces Setup and Configuration Options + BZ#856417 - NEEDINFO - these sections remain untouched in the = EPP 6 work to date. Should they be reviewed? +
+ Richfaces web.xml settings + BZ#856417 - NEEDINFO - Is this Richfaces configuration= still relevant for PBR v3.0? + The following configuration is designated for portlets usi= ng the RichFaces library. These settings will va= ry based on your individual needs. + + + See this section of the RichFaces docume= ntation for more details. + + + Sometimes it is better to use the "ALL" 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. + + + + + If you use the "NONE"= strategy, you must include the following scripts in your portlet or portal= page header. If you are using JBoss Portal, you= can add this to the jboss-portlet.xml file. + + + + The org.ajax4jsf.RESOURCE_URI_PREFIX co= nfiguration cross-references the path to your scripts below. These settings= are required for RichFaces using the "NONE" strategy. Replace all richFacesP= ortlet text in the example with the actual name of the portle= t resource. + + + Seam automatically configures y= our Ajax4JSF Filter, so if you are running a Seam portlet, you do not need the following Filter configuration (however, you= do need the RESOURCE_URI_PREFIX no matter what). + + +
+
+ Configure RichFaces to work with WSRP and PortletBridge + BZ#856417 - NEEDINFO - Are we supporting this in EPP 6? + + Use the following settings in web.xml= when running WSRP portlets: + + <context-param> + <param-name>org.jboss.portletbridge.WRAP_SCRIPTS</param-n= ame> + <param-value>false</param-value> + </context-param> +.... + <context-param> + <param-name>org.richfaces.LoadStyleStrategy</param-name&g= t; + <param-value>ALL</param-value> + </context-param> + <context-param> + <param-name>org.richfaces.LoadScriptStrategy</param-name&= gt; + <param-value>DEFAULT</param-value> + </context-param> + + + The styles below must also be manually added to the facele= ts template header in the EPP_DIST/jbo= ss-as/portletbridge/examples/richFacesPortlet-VERSION.war:richFacesPortlet.war/templates/main.xhtml file. + + <link rel=3D"s= tylesheet" type=3D"text/css" href=3D"/richFacesPortlet/= faces/rfRes/org/richfaces/renderkit/html/css/basic_both.xcss"/> +<link rel=3D"stylesheet" type=3D"text/css" href=3D&= quot;/richFacesPortlet/faces/rfRes/org/richfaces/renderkit/html/css/extende= d_both.xcss"/> +<link rel=3D"stylesheet" type=3D"text/css" href=3D&= quot;/richFacesPortlet/faces/rfRes/org/richfaces/skin.xcss"/> + + + The table below outlines the current status of RichFaces f= eatures when used in both local and remote portlets. + +
+ RichFaces Feature Status + + + + Richfaces Component + Supported as Local Portlet + Supported as Remote Portlet using WSRP + + + + + + a4j:commandButton + + Yes + Yes + + + + a4j:commandLink + + Yes + Yes + + + + a4j:jsFunction + + Yes + Yes + + + + a4j:push + + Yes + Yes + + + + a4j:poll + + Yes + Yes + + + + a4j:queue + + No + No + + + + a4j:status + + Yes + Yes + + + + a4j:keepAlive + + Yes + Yes + + + + a4j:include + + Yes + Yes + + + + a4j:loadStyle + + No + No + + + + a4j:loadScript + + Yes + Yes + + + + a4j:ajaxValidator + + Yes + Yes + + + + a4j:beanValidator + + Yes + Yes + + + + a4j:graphValidator + + Yes + Yes + + + + a4j:mediaOutput + + No + Yes + + + + a4j:outputPanel + + Yes (except Firefox 3.5) + Yes + + + + a4j:log + + Yes + Yes + + + + rich:dataTable + + Yes (except Firefox 3.6 and IE8) + No + + + + a4j:dataFilterSlider + + Yes + Yes + + + + rich:dataGrid + + Yes + No + + + + rich:dataList + + Yes + Yes + + + + rich:datascroller + + No + No + + + + rich:extendedDataTable + + Yes (except IE7) + No + + + + rich:repeat + + Yes + Yes + + + + rich:scrollableDataTable + + Yes (except Firefox 3.6) + Yes + + + + drag-drop support + + Yes + Yes + + + + rich:contextMenu + + No + No + + + + rich:dropDownMenu + + Yes + Yes + + + + rich:tree + + Yes (except Firefox 3.5) + Yes + + + + rich:modalPanel + + Yes + Yes + + + + rich:paint2d + + Yes + Yes + + + + rich:panel + + Yes + Yes + + + + rich:panelBar + + Yes + Yes + + + + rich:panelMenu + + Yes + Yes + + + + rich:progressBar + + Yes + Yes + + + + rich:separator + + Yes + Yes + + + + rich:simpleTogglePanel + + Yes + Yes + + + + rich:spacer + + Yes + Yes + + + + rich:tabPanel + + Yes + Yes (except tab deletion) + + + + rich:togglePanel + + Yes + Yes + + + + rich:toolBar + + Yes + Yes + + + + rich:toolTip + + Yes + Yes + + + + rich:calendar + + Yes + No + + + + rich:colorPicker + + Yes + Yes + + + + rich:comboBox + + Yes + Yes + + + + rich:editor + + No + No + + + + rich:fileUpload + + No + No + + + + rich:inplaceSelect + + Yes + Yes + + + + rich:inplaceInput + + Yes + Yes + + + + rich:inputNumberSpinner + + Yes (except IE7) + Yes + + + + rich:inputNumberSlider + + Yes + Yes + + + + rich:suggestionBox + + Yes + Yes + + + + rich:listShuttle + + Yes + Yes + + + + rich:orderingList + + Yes + Yes + + + + rich:pickList + + Yes + Yes + + + +
+
+
+
+ Seam Setup and Configuration Options + BZ#856417 - NEEDINFO - these sections remain untouched in the = EPP 6 work to date. Should they be reviewed? +
+ Configuration + + The ExceptionHandler is used to clean <= application>Seam contexts and transactions after errors. + + + +
+
+ Sending and Receiving Events + + The bridge considers a portlet event a model event, which means the ev= ent is targeted to the applications data model, not its view. + + Because JSF events primarily concern its view, the bridge proces= ses the portlet events manually. Provisions are made to ensure that any mod= el changes resulting from processing the event are updated in the view. + + Because event payloads are arbitrarily complex however, the man= ual data processing is left primarily to the portlet application to support= . +
+ Sending Events + The following event configuration references the eventing imp= lemented in the Seam Booking Demo, available for exploration in = EPP_HOME/portletbridge/examples/seamEAR.ear. The concepts described are the same for sending events using other = event handlers. + Explicitly specify that the GenericFacesPortlet should overrid= e event handling and dispatch all events to the bridge by defining the auto= DispatchEvents <init-param> in portlet.xml. + If the application is written entirely in JSF (as opposed to a= mix of view technologies), this <init-param> must be set to true. + <init-param> + <name>javax.portlet.faces.autoDispatchEvents</name> + <value>true</value> +</init-param> + Enable the portlet to publish an event to the portal, by defin= ing the <supported-publishing-event> in portlet.xml. + <supported-publishing-event> + <qname xmlns:jbp=3D"urn:jboss:portal:samples:event">jbp:= BookingEvent</qname> +</supported-publishing-event> + Define how the event namespace (<qname>) is linked to an= actual type within the application by defining the <event-definition>= ; directive in portlet.xml. + <event-definition> + <qname xmlns:jbp=3D"urn:jboss:portal:samples:event">jbp:= BookingEvent</qname> + <value-type>org.jboss.example.booking.BookingEvent</value-type&= gt; +</event-definition> + To publish an event, define an event type that represents the = actual object that will be attached to the event. + + Event type example + The type requires the @XmlRootElement annotation to allow th= e event to be serialized into a JAXB object for publishing. + +(a)XmlRootElement +public class BookingEvent implements Serializable { + = + private String id; + public static final QName QNAME =3D new QName("urn:jboss:portal:sam= ples:event", "BookingEvent"); + = + public BookingEvent(String id) { + this.id =3D id; + } + = + public String getId() { + return id; + } +} + + To dispatch an event to other portlets within the portal, one = approach is to use a bean method triggered by an action. + + Dispatch event example + Object response =3D FacesContext= .getCurrentInstance().getExternalContext().getResponse(); + if (response instanceof StateAwareResponse) { + String id =3D "an id"; + StateAwareResponse stateResponse =3D (StateAwareResponse) response; + stateResponse.setEvent(BookingEvent.QNAME, new BookingEvent(id)); + } + +
+
+ Receiving Events + The following event configuration references the eventing imp= lemented in the Seam Booking Demo, available for exploration in = EPP_HOME/portletbridge/examples/seamEAR.ear. The concepts described are the same for receiving events using othe= r event handlers. + Define that the portlet can receive an event, by specifying br= idgeEventHandler as a parameter of an <init-param> directive in portlet.xml. + <init-param> + <name>javax.portlet.faces.bridgeEventHandler</name> + <value>org.jboss.example.booking.BookingEventHandler</value> +</init-param> + Define that the portlet can also receive an event from the por= tal, by specifying a <supported-processing-event> directive in portal.xml + <supported-processing-event> + <qname xmlns:jbp=3D"urn:jboss:portal:samples:event">jbp:= BookingEvent</qname> +</supported-processing-event> + To process a received event within a portlet, specify in the p= ortlet code that the event handler implements the BridgeEventHandler. + public class BookingEventHandler implements BridgeEv= entHandler { + public EventNavigationResult handleEvent(FacesContext context, Event eve= nt) { + // Process event payload as appropriate + } +} +
+
+ Public Render Parameters + + Public Render Parameters (or PRPs) are one of the most= powerful and simple Portlet 2.0 features. Several portlets (JSF or otherwi= se) can share the same PRPs. This feature can be used 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. + + + The bridge automates public render parameter processing. + + + A public render parameter can be mapped to an object's accessor (= get/set method) designed to handle a = String representation of the value through a Faces ValueExpression. + + Unlike Events, PRPs can only be used to set/get a string value= , and not an object. + + When a new public render parameter value is received in a request, the= bridge sets the value by calling the ValueExpression&ap= os;s setValue(). + + + The bridge maps a render parameter to a backing bean u= sing settings in the faces-config.xml and po= rtlet.xml files. + + + At the end of a request, if the current value of any mapped public ren= der parameter does not match the current incoming value, the bridge sets th= e new value in an outgoing public render parameter (if feasible in the give= n phase). + +
+ PRP portlet configuration + The following PRP portlet configuration references the Seam= Booking Demo, available for exploration in EPP_HOME= /portletbridge/examples/seamEAR.ear. The concepts = described are the same for receiving PRP events in other implementations. + PRPs must be configured in both the portlet that sends (sets= ) the PRP, and the portlet that retrieves (gets) the PRP. + <portlet> +<!-- Unnecessary configuration information removed for clarity --> + <supported-public-render-parameter>hotelName</supported-public-= render-parameter> +</portlet> + = +<public-render-parameter> + <identifier>hotelName</identifier> + <qname xmlns:j=3D"http://jboss.org/params">j:hotelName&l= t;/qname> +</public-render-parameter> + In the portlet that retrieves the PRP, a PRP handler must be= specified as an <init-param> directive. + <init-param> + = +<name>javax.portlet.faces.bridgePublicRenderParameterHandler</nam= e> + <value>org.jboss.example.booking.BookingPRPHandler</value> +</init-param> +
+
+ Application configuration + A public render parameter example is imp= lemented in the Seam Booking Demo portlet, which is located in <= filename>EPP_HOME/portletbridge/SeamEAR.ear. Continue= reading the configuration procedures to understand the configuration steps= behind the SeamEAR.ear example. +
+ Set Parameter + To set the PRP, create a Bean method for the portlet setti= ng the parameter that is triggered from a UI action, and sets the PRP onto = the response. + Object response =3D FacesConte= xt.getCurrentInstance().getExternalContext().getResponse(); +if (response instanceof StateAwareResponse) { + StateAwareResponse stateResponse =3D (StateAwareResponse) response; + stateResponse.setRenderParameter("hotelName", "Name of Ho= tel"); +} +
+
+ Retrieve parameter + The retrieving portlet requires a Bean with a getter/sette= r for the parameter, to enable Portlet Bridge to set the parameter. + public class BookingPRP { + private String hotelName; + = + public String getHotelName() { + return hotelName; + } + = + public void setHotelName(String hotelName) { + this.hotelName =3D hotelName; + } +} + To set the value on the bean, the Bridge needs to be info= rmed which PRP to retrieve and which Bean to set it on. + If the getter/setter Bean is defined with a EL name of boo= kingPRP, the following configuration is required in faces-config= .xml. + <application> + <application-extension> + <bridge:public-parameter-mappings> + <bridge:public-parameter-mapping> + <parameter>[bookingMapPortlet]:[hotelName]</paramete= r> + <model-el>#{bookingPRP.hotelName}</model-el> + </bridge:public-parameter-mapping> + </bridge:public-parameter-mappings> + </application-extension> +</application> + + Specifying the portlet name restricts model updates to t= he specified portlet only. If the portlet name is omitted and only the rend= er parameter specified, every portlet within the web application that suppo= rts that render parameter will have its model updated. + + + + [bookingMapPortlet] + + The arbitrary name of the portlet, as set in portlet.xml + + + + [hotelName] + + The arbitrary name of the render parameter. + + + + The handler specified in the portlet.xml requires a bean to process the updates to the model, as a result of th= e Public Render Parameter. + public class BookingPRPHandler= implements BridgePublicRenderParameterHandler { + public void processUpdates(FacesContext context) { + ELContext elContext =3D context.getELContext(); + BookingPRPBean bean =3D (BookingPRPBean) elContext.getELResolver().get= Value(elContext, null, "bookingPRP"); + = + if(null !=3D bean) { + System.out.println("******processUpdates from BookingPRPHandler= : " + bean.getHotelName()); + } + } +} +
+
+
+
+ Portlet Session + To share data with other portlets within the same portlet appl= ication, use name/value pairs within the PortletSession. + +Object objSession =3D FacesContext.getCurrentInstance().getExternalContext= ().getSession(false); + try { + if (objSession instanceof PortletSession) { + PortletSession portalSession =3D (PortletSession)objSession; + portalSession.setAttribute("your parameter name", "pa= rameter value", PortletSession.APPLICATION_SCOPE); + } + } + In the JSP or Facelets page, the value string can be retrieved= using the following code. + +#{httpSessionScope['your parameter name']} +
+
+
+ Resource serving + When using resources from a JSF portlet, it is important to ensu= re that they are accessed in a way that allows JBoss Portlet Bridge to con= struct an appropriate Portal URL to the resource being requested. + The correct way to reference a resource is to locate it within t= he web application, in the / resources directory. This= placement allows the resource to be retrieved using JSF2 resource handling= . + #{resource['/stylesheet.css']} + In this instance, stylesheet.css would be present in the root of= the /resources directory, because it does not specify= a resource library. For resources that do specify a library, these must be= placed in the library sub-directory. +
+ Serving Your JSF Resources in a Portlet + + The bridge deals with portlet served resources in one of two ways: + + + + + If the request is for a non-JSF resource, the bridge handles the reque= st by acquiring a request dispatcher and forwarding the request to the name= d resource. + + + + + If the request is for a JSF resource, the bridge runs the full JSF lif= e-cycle ensuring that data is processed and the resource (markup) is render= ed. + + + +
+ Configuration + Some examples demonstrating how to use EL= and a simple bean are provided in EPP_HOME/portletbridge/example= s/richFacesPortlet.war//WEB-INF/src/org/richfaces/demo/common/ResourceBean.= java + When you have the normal "/images&= quot;, "/styles" and other resource folders = in your web application, you can use the following EL ex= pression to serve them in your JSF application. + + + Copy the ResourceBean.java code above, an= d add an entry to the faces-config.xml for the bean. + + +
+
+
+ - --===============4809161100036732007==--