In Apply Req Values the "submitted parameter" goes to the UI component.
Not the backing bean.

action methods are executed in Phase5

ValueChangeListeners in Phase 3, so before UpdateModelValues is called.

You may use onchange=submit(); with some *special* javascript, to
invoke the "action method". See [1] and [2] for more.

-Matthias

[1] http://wiki.apache.org/myfaces/SubmitPageOnValueChange
[2] http://wiki.apache.org/myfaces/JavascriptWithJavaServerFaces

On 6/1/06, Remo Liechti <[EMAIL PROTECTED]> wrote:
Hi Cagatay,
If you take a look at:
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/images/jsfIntro-lifecycle
.gif

I thought the setters are called in "Apply Request Values" and not in
"Update model values". Thanks for your clarification.


I tried the hint with the immediate tag:
<h:selectOneMenu id="selectedKpiGroup"
value="#{flowScope.KPIBrowserBean.currentKpiGroup}" immediate="true"
valueChangeListener="#{flowScope.KPIBrowserBean.kpiGroupChanged}"
onchange="submit()">
                        <f:selectItems
value="#{flowScope.KPIBrowserBean.kpiGroups}" />
                </h:selectOneMenu>


This did not work, still:
UPDATER(event) currentKpiGroup: 2
SETTER currentKpiGroup grp: 3

My question is, how do I get the setter set before the event is
processed?

Remo



________________________________________
From: Cagatay Civici [mailto:[EMAIL PROTECTED]
Sent: Donnerstag, 1. Juni 2006 15:29
To: MyFaces Discussion
Subject: Re: JSF Livecycle Problem - Events before setters!


Hi,

Setters are called at update model actually, not at apply request phase.


I don't see anything wrong about the console print out because value
change events are not like button action events. They are called after
process validations(before setter) phase whereas button action events
are called at invoke application(after setter). They are different.

Cagatay,



--
Matthias Wessendorf
Aechterhoek 18
48282 Emsdetten
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Reply via email to