Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7862453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:08:00+00:00 2026-06-02T23:08:00+00:00

I have a problem understanding the JSF Phases. I have the followed problem. On

  • 0

I have a problem understanding the JSF Phases. I have the followed problem.

On my main page i create a panelGroup, and includes a xhtml dynamicaly.

    <h:panelGroup id="padding">
        <ui:include src="#{navigationHandler.currentPage}" />
    </h:panelGroup>

In my menubar i have some code like this:

    <p:submenu label="#{translator.menuentry_insured}">
        <p:menuitem value="#{translator.menuentry_add_insured}"    actionListener="#{navigationHandler.addInsured}"    update=":padding" />
        <p:menuitem value="#{translator.menuentry_search_insured}" actionListener="#{navigationHandler.searchInsured}" update=":padding"/>
    </p:submenu>

When I click on the menuitem, first the “currentPage” method is called, returning the page currently active. After that, the actionListener is called, setting the page to the new page. If I click again on the same link, then the correct page is shown.

I know the problem is in the JSF lifecycle (“restore view” phase before “invoke application” phase), but I don’t know how to solve this.

Here is a output from my own PhaseListener, just for debugging purpose:

BEFORE: RESTORE_VIEW 1
    Using current page: addInsured.xhtml
AFTER: RESTORE_VIEW 1
BEFORE: APPLY_REQUEST_VALUES 2
AFTER: APPLY_REQUEST_VALUES 2
BEFORE: PROCESS_VALIDATIONS 3
AFTER: PROCESS_VALIDATIONS 3
BEFORE: UPDATE_MODEL_VALUES 4
AFTER: UPDATE_MODEL_VALUES 4
BEFORE: INVOKE_APPLICATION 5
    Setting current page to searchInsured.xhtml
AFTER: INVOKE_APPLICATION 5
BEFORE: RENDER_RESPONSE 6
AFTER: RENDER_RESPONSE 6

Is there any solution? What I am doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T23:08:01+00:00Added an answer on June 2, 2026 at 11:08 pm

    I believe you are confusing JSF Components (usually seen with prefixs of ‘h’, ‘f’, ‘p’) with facelet components (usually seen with prefix of ‘ui’). They aren’t the same thing. JSF Component usually become part of the tree and participate in the JSF phases. Facelet component only exist during RESTORE_VIEW. I usually think of facelet components as preprocessors. They normally generate JSF components.

    In your example, <ui:include src="#{navigationHandler.currentPage}" /> is replaced with whatever JSF Components specified in the source file referred to by navigationHandler.currentPage at the time of RESTORE_VIEW. After RESTORE_VIEW, there is no more <ui:include />, so it isn’t re-evaluated and doesn’t update.

    During INVOKE_APPLICATION, navigationHandler.currentPage is updated, but the component tree is still the same. If you could force a self redirect during INVOKE_APPLICATION, then the lifecycle would be restarted and <ui:include src="#{navigationHandler.currentPage}"/> would be re-evaluated.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem in understanding OOP... This is it : Sometime's you create
I have the following basic (and maybe stupid) understanding problem in JSF: There is
I have a little problem understanding how to create a child class's contructor, which
I seem to have a problem understanding how to conditionally test a boolean value
I think I have a problem in understanding the proper way of using MVC.
I have an understanding problem of how the following code works: XMLInputFactory xif =
I think i have a basic problem in understanding the dojo toolkit. Well I
I'm having problems with understanding how jQuery create headers for ajax post. I have
I am facing a situation that I have problem understanding... I am writing a
I have a problem understanding why a certain implicit conversion is not working as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.