Re: how to build a JSF 2.0 (MyFaces/Facelets) Project
On 3/14/2012 12:47 PM, ayouB __ wrote: Hello every one, I have sent a mail before that one where i explained problems i faced while configuring the developpement environnement, unfortunately that let me no where i spent a lot of time trying to find a solution but i didn't anyway thank you all for your replies and your collaboration :) The problem now is how to create and configure a jsf project under eclipse helios IDE, what JARs i need, how to dowload them and where can i find them, what version, and where should i put them (in my class path, in my web app ...). I'm really confused and i don't know what to do ! Please Help ^_^ http://www.eclipse.org/webtools/jsf/main.php -- Guy Rouillier
Re: ViewExpiredException - No saved view state could be found for the view identifier
On 8/31/2010 4:53 PM, Micah Klitgaard wrote: javax.faces.application.ViewExpiredException: /pages/login.xhtmlNo saved view state could be found for the view identifier: /pages/login.xhtml ViewExpiredException is one of the most common exceptions you'll encounter in JSF. I'd suggest you start by reading some background material on the JSF life cycle (just Google those three terms.) Try setting your session-timeout to 30 and state_saving_method to server. -- Guy Rouillier
Re: Getting ViewExpiredException
On 6/3/2010 9:39 AM, Mr. Himanshu Gupta wrote: I have a project in which whenever I try to navigate I get ViewExpiredException<http://java.sun.com/javaee/6/docs/api/javax/faces/application/ViewExpiredException.html> This is a very common issue. You've provided absolutely no information, so start by putting this in your web.xml: 30 Search the net for some articles on he JSF lifecycle and become intimately familiar with it. -- Guy Rouillier
Re: Tutorial for MyFaces PortletBridge with Facelets
Thanks. For some reason I didn't get that one email, but I found it in the archives. On 3/18/2010 6:41 PM, Michael Freedman wrote: It was attached to the e-mail I sent a little while ago (11:12am). Note: this code can only be run with a compliant JSR 301 or 329 Bridge. I.e. it relies on the standard/spec which states the bridge adds a request attribute prior to activating Faces that allows one to check to see if you are running within a portlet request without testing instanceof -- hence avoiding runtime dependencies on portlet classes. -Mike- On 3/18/2010 12:01 PM, Guy Rouillier wrote: Michael, we're using the stock FaceletPortletViewHandler to expose a facelet app as a portlet. Would be great to be able to use the same view handler to view the app directly. So, I'd like the source to your modifications if you are willing to share. Thanks. On 3/18/2010 1:10 PM, Michael Freedman wrote: The current facelets distributions contains a portlet demo that includes the source for FaceletPortletViewHandler.java. This is currently the best place to start. I have a version that I believe improves on this that I put together for a recent workshop -- basically similar to the above but it includes checks (that have no runtime dependencies on the portlet api) to see if we are running in a portlet request and delegates otherwise. I.e. its designed to work properly if the app is accessed both directly via the web or from a portal AND even if deployed in a web only installation -- no portlet container present. I hope to get this later version online at some point when I can package this workshop as an online tutorial but other higher priorities at the moment. I would of course be happy to send this source to anyone who wants it. -Mike- On 3/18/2010 9:56 AM, Kito Mann wrote: Michael, What would be the best way to distribute the portlet version of the Facelets view handler? --- Kito D. Mann | twitter: kito99 | Author, JSF in Action Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and consulting http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info | twitter: jsfcentral +1 203-404-4848 x3 Sign up for the JSFCentral newsletter: http://oi.vresp.com/?fid=ac048d0e17 On Thu, Mar 18, 2010 at 9:44 AM, Michael Freedman mailto:michael.freed...@oracle.com>> wrote: Not quite true. Facelets native ViewHandler is servlet dependent. The trick for running Facelets in a portlet environment via a bridge is to provide an alternative ViewHandler using the portlet APIs and configuring this ViewHandler in your faces-config.xml. So yes the MyFace Portlet bridge doesn't inherently include this ViewHandler (it requires facelet dependent code) it is easy to add/generate to your app. In fact I gave a workshop recently where one of the samples was to complete such a ViewHandler and package in an app with the MyFaces Portlet Bridge to run a facelets sample as a portlet. -Mike- On 3/18/2010 9:31 AM, ferna...@lozano.eti.br <mailto:ferna...@lozano.eti.br> wrote: Hi there, AFAIK facelets is not supported by the current portlet-bridge JSRs (both for PortletAPI 1.0 and 2.0) so MyFaces Portlet Bridge, which is the RI for both JSRs, does not support facelets. []s, Fernand Lozano HiI'd like to know if there is a kind of reference documentation available for running the MyFaces Portlet Bridge with MyFaces 1.2.6, Facelets on LifeRay 5.2.3.Thanks in advanceMirko -- Guy Rouillier
Re: Tutorial for MyFaces PortletBridge with Facelets
Michael, we're using the stock FaceletPortletViewHandler to expose a facelet app as a portlet. Would be great to be able to use the same view handler to view the app directly. So, I'd like the source to your modifications if you are willing to share. Thanks. On 3/18/2010 1:10 PM, Michael Freedman wrote: The current facelets distributions contains a portlet demo that includes the source for FaceletPortletViewHandler.java. This is currently the best place to start. I have a version that I believe improves on this that I put together for a recent workshop -- basically similar to the above but it includes checks (that have no runtime dependencies on the portlet api) to see if we are running in a portlet request and delegates otherwise. I.e. its designed to work properly if the app is accessed both directly via the web or from a portal AND even if deployed in a web only installation -- no portlet container present. I hope to get this later version online at some point when I can package this workshop as an online tutorial but other higher priorities at the moment. I would of course be happy to send this source to anyone who wants it. -Mike- On 3/18/2010 9:56 AM, Kito Mann wrote: Michael, What would be the best way to distribute the portlet version of the Facelets view handler? --- Kito D. Mann | twitter: kito99 | Author, JSF in Action Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and consulting http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info | twitter: jsfcentral +1 203-404-4848 x3 Sign up for the JSFCentral newsletter: http://oi.vresp.com/?fid=ac048d0e17 On Thu, Mar 18, 2010 at 9:44 AM, Michael Freedman mailto:michael.freed...@oracle.com>> wrote: Not quite true. Facelets native ViewHandler is servlet dependent. The trick for running Facelets in a portlet environment via a bridge is to provide an alternative ViewHandler using the portlet APIs and configuring this ViewHandler in your faces-config.xml. So yes the MyFace Portlet bridge doesn't inherently include this ViewHandler (it requires facelet dependent code) it is easy to add/generate to your app. In fact I gave a workshop recently where one of the samples was to complete such a ViewHandler and package in an app with the MyFaces Portlet Bridge to run a facelets sample as a portlet. -Mike- On 3/18/2010 9:31 AM, ferna...@lozano.eti.br <mailto:ferna...@lozano.eti.br> wrote: Hi there, AFAIK facelets is not supported by the current portlet-bridge JSRs (both for PortletAPI 1.0 and 2.0) so MyFaces Portlet Bridge, which is the RI for both JSRs, does not support facelets. []s, Fernand Lozano HiI'd like to know if there is a kind of reference documentation available for running the MyFaces Portlet Bridge with MyFaces 1.2.6, Facelets on LifeRay 5.2.3.Thanks in advanceMirko -- Guy Rouillier
Re: problem with
On 2/15/2010 12:55 AM, Krishna K. Pandit wrote: Can any one tell me how to create in backing bean. We simply generate a List of SelectItem in our backing beans, and then put that list onto our facelet page: backing bean: List selectionItems = new ArrayList(); for (some iteration of a group) { selectionItems.add(new SelectItem(option_string, value_string)); } facelet: -- Guy Rouillier
Disabled error handling, but still showing up
I followed the instructions for disabling MyFaces error handling here: http://wiki.apache.org/myfaces/Handling_Server_Errors I implemented the method of using a simple JSP page. I tested the solution and it worked fine for all my test cases. I forced a simple exception, and I left the page timeout so as to see a ViewExpiredException. In both cases, my error.jsp was invoked. However, this past Friday while testing something completely unrelated, the MyFaces error page popped up with: javax.crypto.BadPaddingException - Given final block not properly padded My app runs under SSL (https). Any ideas why my error page was not invoked and instead the standard MyFaces error page was displayed? Here are the changes I made to web.xml. We are using facelets. Thanks. org.apache.myfaces.ERROR_HANDLING false facelets.DEVELOPMENT false javax.faces.el.EvaluationException /error.jsp java.lang.Exception /error.jsp java.lang.RuntimeException /error.jsp javax.servlet.ServletException /error.jsp 500 /error.jsp -- Guy Rouillier