I am looking at JSF spec. It is not clear to me. If the spec have had some examples/scenarios, it would have been much nicer.
 
Apply Request value Phase:

During the decoding of request values, some components perform special processing, including:

  1.  Components that implement ActionSource (such as UICommand), which recognize that they were activated, will queue an ActionEvent. The event will be delivered at the end of Apply Request Values phase, or at the end of Invoke Application phase, depending upon the state of the immediate property on the activated component.
  2.  Components that implement EditableValueHolder (such as UIInput), and whose immediate property is set to true, will cause the conversion and validation processing (including the potential to fire ValueChangeEvent events) that normally happens during Process Validations phase to occur during Apply Request Values phase instead.
If I have <commandLink> or commandButton that has immediate=true, the all their action listeners will be executed in Apply Request Value phase before updating model. IF immediate=false, all the action listeners will be executed after ACTION(Invoke application). My understanding of Invoke Application is the action method binding such as "#{backingBean.submit}". correct?
 
For #2, conversion is updating model data from local data? IF immedaite=true for <inputText>, will this update model data(conversion) before Update Model phase? Any usage for immediate=true for UIInput?
 
I am confused with life cycle, and do not have confidence on coding until this clear up. Thanks for any ideas/comments.  

Joshua Davis <[EMAIL PROTECTED]> wrote:
> For #2, I don't remember when actionListeners are
> executed, but one
> quick thing to try would be to use action instead of
> actionListener
> and see if it makes any difference. It seems to me
> that what you've
> posted in your second scenario should work, though.


I'm pretty sure actionListener is invoked before
action. This way the event handler (actionListener)
can affect the outcome of an action (well... at least
that's how I'm using it, don't know if that's exactly right).


Click here to donate to the Hurricane Katrina relief effort.

Reply via email to