• Post Reply Bookmark Topic Watch Topic
  • New Topic

Render Response phase question  RSS feed

Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to find out what the specified behavior of the Render Response phase is supposed to be, and have discovered that the JSF spec seems oddly unclear on the topic.

Here is the question: during the Render Response phase, is the JSF Servlet supposed to call the getters for mapped backing bean properties for rendered pages, or does it get the value for the component from the in-memory component itself? Alternatively, is the behavior unspecified on purpose, giving JSF implementors the ability to do this or not, as they see fit?

The answer has implications for JSF application design...or, at least, some things developers will need to code around for portability. I may want to change the value in my backing bean as a result of code executing during the Invoke Application phase. To the best of my understanding, this will not automatically change the value in the component tree (nor should it, in my opinion). If we can assume that these two things are out of phase with one another, which one does Render Response use?

I did some experimentation on this using MyFaces, and (at least in 1.1.5) it appeared to consistently call the getter for a mapped property during Render Response. But the spec does not seem to say that it must�which leads me to wonder if I should depend on this for portability.

Anyone have any idea? Either what it�s supposed to do according to the spec (I could just be reading it wrong�specifications are not fun to read), or what rules I must follow in order to keep my application portable across JSF implementations. If I know I can�t change the value in my backing bean after the Update Model Values phase, fine�but that might force me to make such behavior �front-loaded� before that phase by making the component immediate. I�m not sure that will be an option all the time.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!