{"id":4445,"date":"2013-02-12T08:55:18","date_gmt":"2013-02-12T16:55:18","guid":{"rendered":"http:\/\/localhost\/exoblog\/?p=4445"},"modified":"2023-06-05T16:25:28","modified_gmt":"2023-06-05T14:25:28","slug":"portlet-development-in-exo-platform-with-jsf-and-richfaces-part-13","status":"publish","type":"post","link":"https:\/\/www.exoplatform.com\/blog\/portlet-development-in-exo-platform-with-jsf-and-richfaces-part-13\/","title":{"rendered":"Portlet Development in eXo Platform with JSF and RichFaces (Part 1\/3)"},"content":{"rendered":"<p>eXo Platform comes with a set of advanced portlets to build rich applications quickly. But you may want to develop your own portlets to fit your needs.<\/p>\n<p>The development of a portlet using the raw portlet API can be a bit painful; it is often preferable to use a higher-level framework such as JSF. JSF is a request-driven MVC web framework based on a component-driven UI design model, and is part of the JEE standard.<\/p>\n<p>This article is the first of a set of three tutorials that will teach you how to develop a portlet with JSF 2.0 and RichFaces 4, and leverage eXo Platform content and social capabilities.<\/p>\n<p>RichFaces is a set of advanced JSF components that will allow us to add even more richness to our applications.<\/p>\n<p><!--more--><\/p>\n<p>The source code of this first tutorial is available <a href=\"https:\/\/github.com\/thomasdelhomenie\/exo-jsfportletbridge-portlet\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/p>\n<h2>Prerequisites<\/h2>\n<ul>\n<li>Download the latest version of <a href=\"https:\/\/www.exoplatform.com\/\" target=\"_blank\" rel=\"noopener\">eXo Platform 3.5<\/a>.<\/li>\n<li>Install and configure <a href=\"http:\/\/maven.apache.org\/download.html\" target=\"_blank\" rel=\"noopener\">Apache Maven<\/a>.<\/li>\n<\/ul>\n<p>To be able to run a JSF application in a portal context, we need a JSF Portlet Bridge. This technology is also part of the JEE standard, and thus several implementations are available. For this tutorial the <a href=\"http:\/\/www.jboss.org\/portletbridge\" target=\"_blank\" rel=\"noopener\">JBoss implementation<\/a> will be used, but you don\u2019t have to install anything as it will be added as a library in your portlet via Maven.<\/p>\n<h2>Creating the JSF Portlet Bridge project<\/h2>\n<p>The JBoss JSF Portlet Bridge project provides a Maven archetype to easily create a fresh JSF Portlet Bridge project with JSF 2.0 and the latest version of the Portlet Bridge (3.0.0.Beta1 at the time of writing). Type the following command:<\/p>\n<pre class=\"wrap:true lang:default decode:true \">mvn archetype:generate -DarchetypeGroupId=org.jboss.portletbridge.archetypes -DarchetypeArtifactId=2.0-basic -DarchetypeVersion=3.0.0.Beta1 -DgroupId=org.exoplatform -DartifactId=exo-jsfportletbridge-portlet<\/pre>\n<p>Maven will prompt you to change the default values of the project\u2019s properties. You can leave the defaults unchanged by simply pressing Enter.<\/p>\n<p>Your project is now created. However, some little changes need to be made to make it fully operational.<\/p>\n<p><strong>portlet.xml<\/strong><\/p>\n<ul>\n<li>Change the portlet-app tag as follows:<\/li>\n<\/ul>\n<pre class=\"wrap:true lang:default decode:true \">&lt;portlet-app xmlns=\"http:\/\/java.sun.com\/xml\/ns\/portlet\/portlet-app_2_0.xsd\"\n             version=\"2.0\"\n             xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\n             xsi:schemaLocation=\"http:\/\/java.sun.com\/xml\/ns\/portlet\/portlet-app_2_0.xsd\n             http:\/\/java.sun.com\/xml\/ns\/portlet\/portlet-app_2_0.xsd\"&gt;<\/pre>\n<ul>\n<li>Move the portlet-info tag under the supports tag.<\/li>\n<\/ul>\n<p><strong>faces-config.xml<\/strong><\/p>\n<ul>\n<li>Remove everything under the faces-config tag:<\/li>\n<\/ul>\n<pre class=\"wrap:true lang:default decode:true \">&lt;faces-config xmlns=\"http:\/\/java.sun.com\/xml\/ns\/javaee\"\n              xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\n              xsi:schemaLocation=\"http:\/\/java.sun.com\/xml\/ns\/javaee http:\/\/java.sun.com\/xml\/ns\/javaee\/web-facesconfig_2_0.xsd\"\n              version=\"2.0\"&gt;\n&lt;\/faces-config&gt;<\/pre>\n<p><strong>pom.xml<\/strong><\/p>\n<p>Optionally, the pom.xml file can be updated to use the latest available version of the JSF libraries by changing:<\/p>\n<pre class=\"wrap:true lang:default decode:true \">&lt;properties&gt;\n  &lt;jsf.version&gt;2.0.3-b03&lt;\/jsf.version&gt;\n&lt;\/properties&gt;<\/pre>\n<p>with the new value. For example:<\/p>\n<pre class=\"wrap:true lang:default decode:true \">&lt;properties&gt;\n  &lt;jsf.version&gt;2.1.2&lt;\/jsf.version&gt;\n&lt;\/properties&gt;<\/pre>\n<p>Your project is now ready, and can be built to be deployed in eXo Platform. You can build your project by launching the following command at the root of your project: <span class=\"navCode\">mvn clean install<\/span>.<\/p>\n<p>A war file should be available in the target folder of your project (<span class=\"navCode\">JSF2RIPortlet.war<\/span> by default).<\/p>\n<h2>Deploying the portlet in eXo Platform<\/h2>\n<p>The next step is to deploy the portlet in eXo Platform. To do so:<\/p>\n<ul>\n<li>Start eXo Platform 3.5;<\/li>\n<li>Once started, copy the war file of the portlet into the webapps directory. If the portlet deploys correctly, you should see the following lines in the console:<\/li>\n<\/ul>\n<pre class=\"wrap:true lang:default decode:true \">[date] org.apache.catalina.startup.HostConfig deployWAR\nINFO: D\u00e9ploiement de l\u2019archive JSF2RIPortlet.war de l\u2019application web\n[date] com.sun.faces.config.ConfigureListener contextInitialized\nINFO: Initialisation de Mojarra 2.1.2 (FCS 20110610) pour le contexte \u00ab\/JSF2RIPortlet\u00bb\n[date] javax.portlet.faces.GenericFacesPortlet init\nINFO: Init GenericFacesPortlet for portlet riPortlet\n[date] javax.portlet.faces.GenericFacesPortlet calculateBridgeClassName\nINFO: Bridge class name is org.jboss.portletbridge.AjaxPortletBridge\n<\/pre>\n<p>The portlet has been deployed successfully in eXo Platform. It should now be added to a page of the portal:<\/p>\n<ul>\n<li>Go to <span class=\"navCode\">http:\/\/localhost:8080\/portal\/private\/acme<\/span>;<\/li>\n<li>Connect with john\/gtn;<\/li>\n<li>Go to the Application menu;<\/li>\n<\/ul>\n<p><a href=\"\/blog\/wp-content\/uploads\/2013\/02\/application-menu.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-4448\" title=\"application-menu\" src=\"https:\/\/www.exoplatform.com\/blog\/\/wp-content\/uploads\/2013\/02\/application-menu.png\" alt=\"Application Menu\" width=\"600\" srcset=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/application-menu.png 1440w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/application-menu-300x188.png 300w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/application-menu-1024x640.png 1024w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/application-menu-768x480.png 768w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/application-menu-1250x781.png 1250w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/application-menu-720x450.png 720w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/application-menu-500x313.png 500w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/application-menu-360x225.png 360w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/application-menu-200x125.png 200w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/application-menu-100x63.png 100w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/application-menu-48x30.png 48w\" sizes=\"(max-width: 1440px) 100vw, 1440px\" \/><\/a><\/p>\n<ul>\n<li>Click on Portlets. The list of all the deployed portlets is available on the left side. We will now make the portlet addable to the portal\u2019s pages;<\/li>\n<li>Select our portlet (<span class=\"navCode\">RiPortlet<\/span> in the <span class=\"navCode\">JSF2RIPortlet<\/span> category);<\/li>\n<li>In the right part, click on \u201cClick here to add this portlet to a category\u201d;<\/li>\n<li>Select a category (Adoption, for example);<\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/registry-category.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-4449\" title=\"registry-category\" src=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/registry-category.png\" alt=\"registry category\" width=\"600\" srcset=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/registry-category.png 1440w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/registry-category-300x182.png 300w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/registry-category-1024x622.png 1024w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/registry-category-768x466.png 768w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/registry-category-1250x759.png 1250w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/registry-category-720x437.png 720w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/registry-category-500x303.png 500w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/registry-category-360x219.png 360w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/registry-category-200x121.png 200w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/registry-category-100x61.png 100w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/registry-category-49x30.png 49w\" sizes=\"(max-width: 1440px) 100vw, 1440px\" \/><\/a><\/p>\n<ul>\n<li>Click on Save;<\/li>\n<li>Come back to the acme site\u2019s home page (<span class=\"navCode\">My Sites &gt; acme<\/span> in the top bar).<\/li>\n<\/ul>\n<p>The next step is to create a page to contain our portlet:<\/p>\n<ul>\n<li>In the top bar, click on <span class=\"navCode\">Add Page<\/span> in <span class=\"navCode\">Edit &gt; Page<\/span>;<\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/addpage-menu.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-4450\" title=\"addpage-menu\" src=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/addpage-menu.png\" alt=\"addpage menu\" width=\"600\" srcset=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/addpage-menu.png 1440w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/addpage-menu-300x188.png 300w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/addpage-menu-1024x640.png 1024w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/addpage-menu-768x480.png 768w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/addpage-menu-1250x781.png 1250w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/addpage-menu-720x450.png 720w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/addpage-menu-500x313.png 500w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/addpage-menu-360x225.png 360w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/addpage-menu-200x125.png 200w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/addpage-menu-100x63.png 100w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/addpage-menu-48x30.png 48w\" sizes=\"(max-width: 1440px) 100vw, 1440px\" \/><\/a><\/p>\n<ul>\n<li>In the left side, click on the up arrow to add the page at the root;<\/li>\n<li>In the right side, enter \u201ccomics-store\u201d as the name and \u201cComics Store\u201d as the display name (guess what this tutorial will deal with!). Leave the other fields as they are. Note that you can easily define titles in other languages;<\/li>\n<li>Click on Next;<\/li>\n<li>We will use the default empty dashboard, so click on Next;<\/li>\n<li>In the portlet catalog, find the RiPortlet and drag it onto the page;<\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/dragdrop-portlet.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-4451\" title=\"dragdrop-portlet\" src=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/dragdrop-portlet.png\" alt=\"dragdrop portlet\" width=\"600\" srcset=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/dragdrop-portlet.png 1440w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/dragdrop-portlet-300x188.png 300w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/dragdrop-portlet-1024x640.png 1024w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/dragdrop-portlet-768x480.png 768w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/dragdrop-portlet-1250x781.png 1250w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/dragdrop-portlet-720x450.png 720w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/dragdrop-portlet-500x313.png 500w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/dragdrop-portlet-360x225.png 360w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/dragdrop-portlet-200x125.png 200w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/dragdrop-portlet-100x63.png 100w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/dragdrop-portlet-48x30.png 48w\" sizes=\"(max-width: 1440px) 100vw, 1440px\" \/><\/a><\/p>\n<ul>\n<li>Click on the Save icon (upper right).<\/li>\n<\/ul>\n<p>The portlet is now available on our new page:<\/p>\n<p><a href=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/comicsstorepage-firstversion.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-4452\" title=\"comicsstorepage-firstversion\" src=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/comicsstorepage-firstversion.png\" alt=\"comicsstorepage firstversion\" width=\"600\" srcset=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/comicsstorepage-firstversion.png 1440w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/comicsstorepage-firstversion-300x182.png 300w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/comicsstorepage-firstversion-1024x622.png 1024w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/comicsstorepage-firstversion-768x466.png 768w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/comicsstorepage-firstversion-1250x759.png 1250w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/comicsstorepage-firstversion-720x437.png 720w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/comicsstorepage-firstversion-500x303.png 500w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/comicsstorepage-firstversion-360x219.png 360w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/comicsstorepage-firstversion-200x121.png 200w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/comicsstorepage-firstversion-100x61.png 100w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/comicsstorepage-firstversion-49x30.png 49w\" sizes=\"(max-width: 1440px) 100vw, 1440px\" \/><\/a><\/p>\n<h2>Adding RichFaces<\/h2>\n<p>RichFaces is a set of advanced JSF components. To use it in your project, edit your <span class=\"navCode\">pom.xml<\/span> file to add the following dependencies:<\/p>\n<pre class=\"wrap:true lang:default decode:true \">&lt;dependency&gt;\n  &lt;groupId&gt;org.richfaces.ui&lt;\/groupId&gt;\n  &lt;artifactId&gt;richfaces-components-ui&lt;\/artifactId&gt;\n  &lt;version&gt;4.1.0.Final&lt;\/version&gt;\n&lt;\/dependency&gt;\n&lt;dependency&gt;\n  &lt;groupId&gt;org.richfaces.core&lt;\/groupId&gt;\n  &lt;artifactId&gt;richfaces-core-impl&lt;\/artifactId&gt;\n  &lt;version&gt;4.1.0.Final&lt;\/version&gt;\n&lt;\/dependency&gt;<\/pre>\n<p>Then, add the following lines to your <span class=\"navCode\">web.xml<\/span>:<\/p>\n<pre class=\"wrap:true lang:default decode:true \">&lt;context-param&gt;\n  &lt;param-name&gt;org.richfaces.resourceMapping.enabled&lt;\/param-name&gt;\n  &lt;param-value&gt;false&lt;\/param-value&gt;\n&lt;\/context-param&gt;\n\n&lt;context-param&gt;\n  &lt;param-name&gt;org.richfaces.skin&lt;\/param-name&gt;\n  &lt;param-value&gt;ruby&lt;\/param-value&gt;\n&lt;\/context-param&gt;<\/pre>\n<p>Finally, in your JSF views, add the following namespace:<\/p>\n<pre class=\"wrap:true lang:default decode:true \">xmlns:a4j=\"http:\/\/richfaces.org\/a4j\" xmlns:rich=\"http:\/\/richfaces.org\/rich\"<\/pre>\n<p>You can now use all the RichFaces components in your pages.<\/p>\n<p>As an example, we will add a tabPanel component to the page. The code is simply taken from the <a href=\"http:\/\/showcase.richfaces.org\/\" target=\"_blank\" rel=\"noopener\" class=\"broken_link\">RichFaces demo website<\/a>. Just edit the <span class=\"navCode\">src\/main\/webapp\/home.xhtml<\/span> file and add these lines before <span class=\"navCode\">&lt;\/h:body&gt;<\/span>:<\/p>\n<pre class=\"wrap:true lang:default decode:true \">&lt;rich:tabPanel switchType=\"client\"&gt;\n  &lt;rich:tab header=\"Overview\"&gt;\n    RichFaces is a component library for JSF and an advanced framework for\n    easily integrating AJAX capabilities into business applications.\n    &lt;ul&gt;\n      &lt;li&gt;100+ AJAX enabled components in two libraries&lt;\/li&gt;\n      &lt;li&gt;a4j: page centric AJAX controls&lt;\/li&gt;\n      &lt;li&gt;rich: self contained, ready to use components&lt;\/li&gt;\n      &lt;li&gt;Whole set of JSF benefits while working with AJAX&lt;\/li&gt;\n      &lt;li&gt;Skinnability mechanism&lt;\/li&gt;\n      &lt;li&gt;Component Development Kit (CDK)&lt;\/li&gt;\n      &lt;li&gt;Dynamic resources handling&lt;\/li&gt;\n      &lt;li&gt;Testing facilities for components, actions, listeners, and pages&lt;\/li&gt;\n      &lt;li&gt;Broad cross-browser support&lt;\/li&gt;\n      &lt;li&gt;Large and active community&lt;\/li&gt;\n    &lt;\/ul&gt;\n  &lt;\/rich:tab&gt;\n  &lt;rich:tab header=\"JSF 2 and RichFaces 4\"&gt;\n    &lt;p&gt;We are working hard on RichFaces 4.0 which will have full JSF 2 integration. That is not all though, here is\n    a summary of updates and features:&lt;\/p&gt;\n    &lt;ul&gt;\n      &lt;li&gt;Redesigned modular repository and build system.&lt;\/li&gt;\n      &lt;li&gt;Simplified Component Development Kit with annotations, faces-config extensions, advanced templates\nsupport and more..&lt;\/li&gt;\n      &lt;li&gt;Ajax framework improvements extending the JSF 2 specification.&lt;\/li&gt;\n      &lt;li&gt;Component review for consistency, usability, and redesign following semantic HTML principles where\npossible.&lt;\/li&gt;\n      &lt;li&gt;Both server-side and client-side performance optimization.&lt;\/li&gt;\n      &lt;li&gt;Strict code clean-up and review.&lt;\/li&gt;\n    &lt;\/ul&gt;\n  &lt;\/rich:tab&gt;\n&lt;\/rich:tabPanel&gt;<\/pre>\n<p>Build your war file and copy\/paste it into eXo Platform\u2019s webapps directory. There\u2019s no need to restart; the portlet is hot-redeployed!<\/p>\n<p>You should see the following message in the console:<\/p>\n<pre class=\"wrap:true lang:default decode:true \">[date] org.apache.catalina.startup.HostConfig deployWAR\nINFO: D\u00e9ploiement de l\u2019archive JSF2RIPortlet.war de l\u2019application web\n[date] com.sun.faces.config.ConfigureListener contextInitialized\nINFO: Initialisation de Mojarra 2.1.2 (FCS 20110610) pour le contexte \u00ab\/JSF2RIPortlet\u00bb\n[date] org.richfaces.cache.CacheManager getCacheFactory\nINFO: Selected fallback cache factory\n[date] org.richfaces.cache.lru.LRUMapCacheFactory createCache\nINFO: Creating LRUMap cache instance using parameters: {facelets.DEVELOPMENT=false, org.richfaces.resourceMapping.enabled=false, javax.faces.FACELETS_VIEW_MAPPINGS=*.xhtml, org.richfaces.skin=ruby, javax.portlet.faces.RENDER_POLICY=ALWAYS_DELEGATE, javax.faces.STATE_SAVING_METHOD=server, javax.faces.DEFAULT_SUFFIX=.xhtml}\n[date] org.richfaces.cache.lru.LRUMapCacheFactory createCache\nINFO: Creating LRUMap cache instance of 512 items capacity\n[date] org.richfaces.application.InitializationListener onStart\nINFO: RichFaces Core Implementation by JBoss, a division of Red Hat, Inc., version v.4.1.0.Final\n[date] javax.portlet.faces.GenericFacesPortlet init\nINFO: Init GenericFacesPortlet for portlet riPortlet\n[date] javax.portlet.faces.GenericFacesPortlet calculateBridgeClassName\nINFO: Bridge class name is org.jboss.portletbridge.AjaxPortletBridge<\/pre>\n<p>Just reload your portal page and the tabPanel component will appear:<\/p>\n<p><a href=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/comicsstorepage-richfaces.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-4453\" title=\"comicsstorepage-richfaces\" src=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/comicsstorepage-richfaces.png\" alt=\"comicsstorepage richfaces\" width=\"600\" srcset=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/comicsstorepage-richfaces.png 1440w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/comicsstorepage-richfaces-300x182.png 300w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/comicsstorepage-richfaces-1024x622.png 1024w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/comicsstorepage-richfaces-768x466.png 768w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/comicsstorepage-richfaces-1250x759.png 1250w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/comicsstorepage-richfaces-720x437.png 720w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/comicsstorepage-richfaces-500x303.png 500w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/comicsstorepage-richfaces-360x219.png 360w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/comicsstorepage-richfaces-200x121.png 200w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/comicsstorepage-richfaces-100x61.png 100w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2013\/02\/comicsstorepage-richfaces-49x30.png 49w\" sizes=\"(max-width: 1440px) 100vw, 1440px\" \/><\/a><\/p>\n<p>Your JSF\/RichFaces portlet is now fully working!<\/p>\n<p>You may notice that the style of the elements on the page has changed. This is due to the skin capabilities of RichFaces. You can easily alter the style by changing the value of the context parameter <span class=\"navCode\">org.richfaces.skin<\/span> in the <span class=\"navCode\">web.xml<\/span> file (you have set \u2018ruby\u2019 for this example). RichFaces comes with a set of ready-to-use skins, and you can of course create your own.<\/p>\n<p>This tutorial has shown you how to create your own portlets easily using JSF, a standard Java web framework.<\/p>\n<p>The next tutorials will show you how to leverage eXo Platform features in your business portlets.<\/p>\n<p><span style=\"font-size: 10px;\">(<a href=\"http:\/\/thomasdelhomenie.wordpress.com\/2012\/05\/08\/jsf-2-richfaces-portlet-in-exo-part-13\/\" target=\"_blank\" rel=\"noopener\">original article from Thomas blog<\/a>)<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"eXo Platform comes with a set of advanced portlets to build rich applications quickly. But you may want to develop your own portlets to fit your needs. The development of a portlet using the raw portlet API can be a bit painful; it is often preferable to use a higher-level framework such as JSF. JSF [&hellip;]","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[699],"tags":[],"lang":"en","translations":{"en":4445},"pll_sync_post":[],"_links":{"self":[{"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/posts\/4445"}],"collection":[{"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/comments?post=4445"}],"version-history":[{"count":0,"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/posts\/4445\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/media?parent=4445"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/categories?post=4445"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/tags?post=4445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}