When my bean is invoked, it simply returns "Start." as navigation. Under JSF RI, the browser gets redirected to /index.xhtml, as intended. With MyFaces no redirection happens.
I've traced the problem and it appears that MyFaces has a small bug. When this navigation case is handled, there is no view root in the current Faces context. JSF RI handles this gracefully, MyFaces throws a NPE, navigation hanlder breaks and no redirection happens.
I saw two possibilities to resolve this problem:
* Move to JSF RI. * Implement a workaround for "null" view root in the navigation handler.
First case wa not suitable for us, so I implemented the workaround. I've attached my navigation handler which check if view root is null in the current Faces context. If this is the case, a new dummy view root is created. Navigation is then handled normally by the inherited (parent) handler.
I'm posting this in case someone else has the same problem.
fyi, i tried implementing pretty-faces with JSF RI but encountered
errors.
Pretty-faces seems to work only with myFaces.
Anyone try pretty-faces with jsf ri successfully?
Best regards,
Dave
On Feb 10, 10:30 pm, Aleksei Valikov <vali...@gmx.net> wrote:
> When my bean is invoked, it simply returns "Start." as navigation.
> Under JSF RI, the browser gets redirected to /index.xhtml, as
> intended. With MyFaces no redirection happens.
> I've traced the problem and it appears that MyFaces has a small bug.
> When this navigation case is handled, there is no view root in the
> current Faces context. JSF RI handles this gracefully, MyFaces throws
> a NPE, navigation hanlder breaks and no redirection happens.
> I saw two possibilities to resolve this problem:
> * Move to JSF RI.
> * Implement a workaround for "null" view root in the navigation handler.
> First case wa not suitable for us, so I implemented the workaround.
> I've attached my navigation handler which check if view root is null
> in the current Faces context. If this is the case, a new dummy view
> root is created. Navigation is then handled normally by the inherited
> (parent) handler.
> I'm posting this in case someone else has the same problem.
> fyi, i tried implementing pretty-faces with JSF RI but encountered > errors. > Pretty-faces seems to work only with myFaces. > Anyone try pretty-faces with jsf ri successfully?
Me. Works both on JSF RI and MyFaces (with the workaround), I've tried both.
On Tue, 2009-02-10 at 06:50 -0800, Dave wrote:
> Hi lexi,
> fyi, i tried implementing pretty-faces with JSF RI but encountered
> errors.
> Pretty-faces seems to work only with myFaces.
> Anyone try pretty-faces with jsf ri successfully?
> Best regards,
> Dave
> On Feb 10, 10:30 pm, Aleksei Valikov <vali...@gmx.net> wrote:
> > Hi,
> > I've encountered the problem when using PrettyFaces with MyFaces.
> > I have a very simple navigation case in my faces-config.xml:
> > When my bean is invoked, it simply returns "Start." as navigation.
> > Under JSF RI, the browser gets redirected to /index.xhtml, as
> > intended. With MyFaces no redirection happens.
> > I've traced the problem and it appears that MyFaces has a small bug.
> > When this navigation case is handled, there is no view root in the
> > current Faces context. JSF RI handles this gracefully, MyFaces throws
> > a NPE, navigation hanlder breaks and no redirection happens.
> > I saw two possibilities to resolve this problem:
> > * Move to JSF RI.
> > * Implement a workaround for "null" view root in the navigation handler.
> > First case wa not suitable for us, so I implemented the workaround.
> > I've attached my navigation handler which check if view root is null
> > in the current Faces context. If this is the case, a new dummy view
> > root is created. Navigation is then handled normally by the inherited
> > (parent) handler.
> > I'm posting this in case someone else has the same problem.