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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:53:44+00:00 2026-06-09T01:53:44+00:00

I have defined an f:metadata section on my xhtml page as shown below with

  • 0

I have defined an f:metadata section on my xhtml page as shown below with a f:viewParam as shown in the below excrept:

<html xmlns="http://www.w3.org/1999/xhtml" (...)>

<f:metadata>
    <f:viewParam name="cust-id" value="#{CustomerCEVController.customer}" 
        converter="#{customerConverter}" converterMessage="blah blah."
        required="false"
    />
</f:metadata>


    <ui:composition template="/templates/commonLayout.xhtml">
        <ui:define name="title">
        (...)
        <ui:define name="body">
        (...)

.. and have declared a CustomerConverter class for the cust-id parameter. The converter class getAsObject method for the property cust-id and the getter method for the backing bean customer field are all called in the PROCESS VALIDATIONS JSF lifecycle phase called BEFORE the setter method for the customer field which is called in the UPDATE MODEL VALUES life-cycle phase. As a result, at the time where the getter is called, the field is not properly initialized by the converter. So the sequence is like this (where CustomerCEVController is the backing bean class):

[ PROCESS VALIDATIONS phase START ]
[ CustomerConverter#getAsObject called ]
[ CustomerCEVController#getCustomer called ]
[ PROCESS VALIDATIONS phase END ]
[ UPDATE MODEL VALUES START ]
[ CustomerCEVController#setCustomer called ]

I am reporting the sequence based on the interspersion of logging output and a lifecycle listener I’ve registered.
Am I missing something and if not, how can I ensure that the customer field is properly set by the converter before it is ever accessed ?

  • 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-09T01:53:47+00:00Added an answer on June 9, 2026 at 1:53 am

    The sequence is absolutely fine. I don’t understand why exactly this forms a problem for you. Perhaps you’re doing some business job in the getter or setter while it doesn’t belong in those methods at all? You’d need a <f:event type="preRenderView"> instead to perform that business job.

    The getter is been called during the end of validations phase because at that moment the decision will be made whether to publish a ValueChangeEvent or not. For that the initial (“old”) value is needed which will then be compared to the submitted/converted/validated (“new”) value. When those values are inequal, then both will be passed as “old” and “new” value of the published ValueChangeEvent.

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

Sidebar

Related Questions

I have defined a rectangle drawable like this: <shape xmlns:android=http://schemas.android.com/apk/res/android android:shape=rectangle> <corners android:radius=4dip/> <solid
I got the tutorial http://www.rmunn.com/sqlalchemy-tutorial/tutorial.html When I compile got the error message The debugged
I have defined following control template for my custom control. <ControlTemplate TargetType={x:Type local:CustomControl}> <Grid
I have defined the following class using COM to use the IGroupPolicyObject using C#.NET:
I have defined a ConfigurationProperty class, which is basicly a key-value pair (with key
I have defined the following two functions test <- function(t) { return( (0.5*eta^2/theta)*(1-exp(-2*theta*t)) )
I have defined CSS in MasterPage so that all pages can use the same
I have defined a table type PL/SQL variable and added some data there. create
I have defined an array like so : var myArray = {myNewArray: ['string1' ,
I have defined many constants in GlobalVar.h and other .h files. I import these

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.