Model Updates not effective when using immediate="true"

Hi,

is it possible to populate some form fields from an actionListener method when using immediate="true". I want to select an ID from a dataTable row and load the user with this id into the form. I need immediate="true" to skip validation. All works well, but when i set the properties of the backing bean, the values are not displayed in the form.

Because of the immediate="true" the actionListener method is called inside the APPLY_REQUEST_VALUES and the UPDATE_MODEL phase is skipped.

How can one solve this?

[538 byte] By [zzza] at [2007-11-27 9:52:23]
# 1

I think that the whole immediate="true" portion is a red herring here. If I recall, you have a table of users and a form for editing a user below it. You are trying to populate the form when a row is the table is selected.

What do you do with the user you load in the action listener method? How are value attributes of the input components of the form set?

RaymondDeCampoa at 2007-7-13 0:21:27 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

Hi RaymondDeCampo,

the problem is solved.

Calling an actionListener was the problem.

The actionListener method was called and i updated my bean there.

But when calling an actionListener with immediate="true", then the old view is restored --> so my values have never been displayed in the fields.

The solution is to call an action method and return an outcome, that returns to the same page. This forces a new view to be created ... with the values inside the bean.

Hope this helps some more people

zzza at 2007-7-13 0:21:27 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...