JSR-168 JSF portlet

22016, modified 20 Years ago. New Member Posts: 14 Join Date: 3/6/06 Recent Posts
Hello everyone,<br /><br />I have been using WebSphere portal for the past 2 years with my company. Just started learning LifeRay over the past weekend. I think its great so far. I&#39;m already addicted to it.<br /><br />I attempted to develop a JSR-168 JSF portlet and noticed that com.sun.faces.portlet.FacesPortlet does not support doEdit(), doHelp(), doConfigure(), actionPerformed(), etc. <br /><br />I was a little surprised to find the only portlet mode in the JSF model is VIEW. This makes my choice of whether or not to use JSF pretty simple, definitely not. What do you guys think about JSF in the JSR 168 model with only VIEW mode?<br /><br />Russ<br /><br />
thumbnail
11148, modified 20 Years ago. Liferay Legend Posts: 2655 Join Date: 7/27/05 Recent Posts
<br /><br />...<br /><br />I was a little surprised to find the only portlet mode in the JSF model is VIEW. This makes my choice of whether or not to use JSF pretty simple, definitely not. What do you guys think about JSF in the JSR 168 model with only VIEW mode?<br /><br />...<br />
<br /><br />Russ,<br /><br />I am using Liferay 3.6.1 with VIEW, EDIT, and HELP modes for my JSF portlets. It works great, and personally, I think JSF portlets are the best way to exploit Liferay for all its worth. JSF and Portlets were designed to work together seamlessly, and I have definitely found this to be the case. Additionally, I&#39;ve found that JSF is GREAT with respect to the EDIT mode, because the JSF-EL can be used to store/retreive portlet preferences. As a side note, I&#39;m hoping to release my code that does this as an open source project. I have to get approval from the execs at my company though first.<br /><br />There three things you need to do in order to make all three modes work:<br /><br />1. Your portlet.xml file needs to contain the following XML markup:<br /><br /><!--fonto:Courier New--><span style="font-family:Courier New"><!--/fonto--> &lt;portlet-class&gt;com.sun.faces.portlet.FacesPortlet&lt;/portlet-class&gt;<br /> &lt;init-param&gt;<br /> &lt;name&gt;com.sun.faces.portlet.INIT_VIEW&lt;/name&gt;<br /> &lt;value&gt;/jsp/endecafaces/SearchPortlet.jsp&lt;/value&gt;<br /> &lt;/init-param&gt;<br /> &lt;init-param&gt;<br /> &lt;name&gt;com.sun.faces.portlet.INIT_EDIT&lt;/name&gt;<br /> &lt;value&gt;/jsp/endecafaces/SearchPortletEdit.jsp&lt;/value&gt;<br /> &lt;/init-param&gt;<br /> &lt;init-param&gt;<br /> &lt;name&gt;com.sun.faces.portlet.INIT_HELP&lt;/name&gt;<br /> &lt;value&gt;/jsp/endecafaces/SearchPortletHelp.jsp&lt;/value&gt;<br /> &lt;/init-param&gt;<br /> &lt;expiration-cache&gt;0&lt;/expiration-cache&gt;<br /> &lt;supports&gt;<br /> &lt;mime-type&gt;text/html&lt;/mime-type&gt;<br /> &lt;portlet-mode&gt;VIEW&lt;/portlet-mode&gt;<br /> &lt;portlet-mode&gt;EDIT&lt;/portlet-mode&gt;<br /> &lt;portlet-mode&gt;HELP&lt;/portlet-mode&gt;<br /> &lt;/supports&gt;<!--fontc--></span><!--/fontc--><br /><br />2. You need a version of the Sun JSF Portlet Bridge (jsf-portlet.jar) that supports all three modes. The original one <a href="https://javaserverfaces.dev.java.net/servlets/ProjectDocumentList?folderID=3389&expandFolder=3389&folderID=1703" target="_blank">downloadable from the java.net site</a> is way behind the jsf-portlet.jar that comes with the newly released <a href="http://developers.sun.com/prodtech/javatools/jscreator/" target="_blank">Java Studio Creator 2 (JSC2) </a>. You need to download JSC2 (which is free) in order to get the latest one that supports all three modes.<br /><br />3. You need to include the JSC2 jsf-portlet.jar in the WEB-INF/lib folder of your Liferay deployed portlet.<br /><br /><br />Best of luck,<br /><br />Neil
22016, modified 20 Years ago. New Member Posts: 14 Join Date: 3/6/06 Recent Posts
<br />Russ,<br /><br />I am using Liferay 3.6.1 with VIEW, EDIT, and HELP modes for my JSF portlets. It works great, and personally, I think JSF portlets are the best way to exploit Liferay for all its worth. JSF and Portlets were designed to work together seamlessly, and I have definitely found this to be the case. Additionally, I&#39;ve found that JSF is GREAT with respect to the EDIT mode, because the JSF-EL can be used to store/retreive portlet preferences. As a side note, I&#39;m hoping to release my code that does this as an open source project. I have to get approval from the execs at my company though first.<br /><br />There three things you need to do in order to make all three modes work:<br /><br />1. Your portlet.xml file needs to contain the following XML markup:<br /><br /><!--fonto:Courier New--><span style="font-family:Courier New"><!--/fonto--> &lt;portlet-class&gt;com.sun.faces.portlet.FacesPortlet&lt;/portlet-class&gt;<br /> &lt;init-param&gt;<br /> &lt;name&gt;com.sun.faces.portlet.INIT_VIEW&lt;/name&gt;<br /> &lt;value&gt;/jsp/endecafaces/SearchPortlet.jsp&lt;/value&gt;<br /> &lt;/init-param&gt;<br /> &lt;init-param&gt;<br /> &lt;name&gt;com.sun.faces.portlet.INIT_EDIT&lt;/name&gt;<br /> &lt;value&gt;/jsp/endecafaces/SearchPortletEdit.jsp&lt;/value&gt;<br /> &lt;/init-param&gt;<br /> &lt;init-param&gt;<br /> &lt;name&gt;com.sun.faces.portlet.INIT_HELP&lt;/name&gt;<br /> &lt;value&gt;/jsp/endecafaces/SearchPortletHelp.jsp&lt;/value&gt;<br /> &lt;/init-param&gt;<br /> &lt;expiration-cache&gt;0&lt;/expiration-cache&gt;<br /> &lt;supports&gt;<br /> &lt;mime-type&gt;text/html&lt;/mime-type&gt;<br /> &lt;portlet-mode&gt;VIEW&lt;/portlet-mode&gt;<br /> &lt;portlet-mode&gt;EDIT&lt;/portlet-mode&gt;<br /> &lt;portlet-mode&gt;HELP&lt;/portlet-mode&gt;<br /> &lt;/supports&gt;<!--fontc--></span><!--/fontc--><br /><br />2. You need a version of the Sun JSF Portlet Bridge (jsf-portlet.jar) that supports all three modes. The original one <a href="https://javaserverfaces.dev.java.net/servlets/ProjectDocumentList?folderID=3389&expandFolder=3389&folderID=1703" target="_blank">downloadable from the java.net site</a> is way behind the jsf-portlet.jar that comes with the newly released <a href="http://developers.sun.com/prodtech/javatools/jscreator/" target="_blank">Java Studio Creator 2 (JSC2) </a>. You need to download JSC2 (which is free) in order to get the latest one that supports all three modes.<br /><br />3. You need to include the JSC2 jsf-portlet.jar in the WEB-INF/lib folder of your Liferay deployed portlet.<br />Best of luck,<br /><br />Neil<br />
<br /><br />Whoa. thanks for the info. that changes everything for me. thank you<br />