Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
PrettyFaces compatibility with MyFaces (problem and solution)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Aleksei Valikov  
View profile  
 More options Feb 10, 9:30 am
From: Aleksei Valikov <vali...@gmx.net>
Date: Tue, 10 Feb 2009 15:30:34 +0100
Local: Tues, Feb 10 2009 9:30 am
Subject: PrettyFaces compatibility with MyFaces (problem and solution)

Hi,

I've encountered the problem when using PrettyFaces with MyFaces.

I have a very simple navigation case in my faces-config.xml:

        <navigation-rule>
                <navigation-case>
                        <from-outcome>Start.</from-outcome>
                        <to-view-id>/index.xhtml</to-view-id>
                        <redirect />
                </navigation-case>
        </navigation-rule>        

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.

Bye.
/lexi

  NullViewWorkaroundNavigationHandler.java
1K Download

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave  
View profile  
 More options Feb 10, 9:50 am
From: Dave <ngt...@gmail.com>
Date: Tue, 10 Feb 2009 06:50:19 -0800 (PST)
Local: Tues, Feb 10 2009 9:50 am
Subject: Re: PrettyFaces compatibility with MyFaces (problem and solution)
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:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aleksei Valikov  
View profile  
 More options Feb 10, 10:27 am
From: Aleksei Valikov <vali...@gmx.net>
Date: Tue, 10 Feb 2009 16:27:46 +0100
Local: Tues, Feb 10 2009 10:27 am
Subject: Re: [prettyfaces-users] Re: PrettyFaces compatibility with MyFaces (problem and solution)
Hi.

> 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.

Bye.
/lexi


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lincoln Baxter, III  
View profile  
 More options Feb 10, 5:08 pm
From: "Lincoln Baxter, III" <linc...@ocpsoft.com>
Date: Tue, 10 Feb 2009 17:08:10 -0500
Local: Tues, Feb 10 2009 5:08 pm
Subject: Re: [prettyfaces-users] Re: PrettyFaces compatibility with MyFaces (problem and solution)

Which version of the RI?

PrettyFaces currently only supports JSF1.2 and above.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lincoln Baxter, III  
View profile  
 More options Feb 10, 5:16 pm
From: "Lincoln Baxter, III" <linc...@ocpsoft.com>
Date: Tue, 10 Feb 2009 17:16:02 -0500
Local: Tues, Feb 10 2009 5:16 pm
Subject: Re: [prettyfaces-users] PrettyFaces compatibility with MyFaces (problem and solution)

It sounds like this is a bug in the MyFaces implementation, like you
said. Is there a MyFaces update that addresses this issue?

If not, it may be worth adding to the PrettyFaces NavHandler. I'm open
to suggestions


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google