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 3453304
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T09:21:32+00:00 2026-05-18T09:21:32+00:00

I was reading an article today about Lifecycle on JSF. I have some trouble

  • 0

I was reading an article today about Lifecycle on JSF.

I have some trouble to understand these points :

1 – Phase 3 :Process validations – This is the phase in which the component may validate their new values. If the new value is valid and differs form the previous value a value-change event will be created and put in a queue. So in our example if the user change the name before submitting the form, a ValueChangeEvent object will be created by the UIInput component Object corresponding to the Name textbox and queued it for processing at the end of this phase.This is how the valueChangeInput method in the backing bean get invoked.

How can JSF know the difference between old value and the new one? The instances of the View Object are 2? The previous (the one before the request) and the new? (which have the values on the FacesContext added by the last process, Apply request Values)

2 – Phase 5: Invoke Application – Once all the values of the request has been successfully set to the backing bean the action events queued during the apply request values phase will be processed. In our case the submit buttons action method .

So it send directly the instance of FacesContext to the last phase (Render response) that convert UI elements (and their values) to Html. So, when is that the getter methods (of the bean) are called?

Cheers

  • 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-05-18T09:21:32+00:00Added an answer on May 18, 2026 at 9:21 am

    How can JSF know the difference between old value and the new one? The instances of the View Object are 2? The previous (the one before the request) and the new? (which have the values on the FacesContext added by the last process, Apply request Values)

    The old value is the current model value. The new value is the submitted value. With following example,

    <h:inputText value="#{bean.value}" />
    

    JSF will basically do the following (conversion/validation omitted for brevity):

    Object oldValue = bean.getValue();
    Object newValue = request.getParameter(clientId);
    if (oldValue == null ? newValue != null : !oldValue.equals(newValue)) {
        // Create and queue ValueChangeEvent.
    }
    

    So it send directly the instance of FacesContext to the last phase (Render response) that convert UI elements (and their values) to Html.

    Not exactly that way, but yes, the render response will kick in when the invoke action is finished.


    So, when is that the getter methods (of the bean) are called?

    Yes, that happens during render response only when they are bound in the view.

    You can find here another article which explains the JSF lifecycle in a more practical manner.

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

Sidebar

Related Questions

After reading this article about validating with service layer I have some doubts. First:
Some time ago i was reading an article about new MS DBMS technology. It's
After reading an article about the subject from O'Reilly , I wanted to ask
I was reading this article about Double-Checked locking and out of the main topic
I was reading an article on MSDN Magazine about using the Enumerable class in
I was reading the great article about binding and unbinding events (because I am
I was reading today about researchers discovering that NVidia's Phys-X libraries use x87 FP
I was reading this article today on two different regular expression algorithms. According to
After reading an interesting article about unit testing behavior instead of state, I came
I read some articles about HTTP headers compression. Today I installed YSlow and it

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.