You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Matthieu <be...@gmail.com> on 2011/01/03 15:11:46 UTC

Strange behavior on a JSF page

Hello everyone,

I'm trying to understand a very strange behavior. I'm using a webpage with a
tomahawk selectOneRow and a form.
The form input fields are supposed to be filled with values when the user
selects one rows, so he can also change the values and submit them.

well, it just won't work. When trying to select a row, the webpage comes
back with the initial values. After a little inspection, i have a trace
which shows me the values are correctly set when the user selects a row, but
the JSF system set the values back to their initial values before showing
the page back!

Am i understanding JSF the wrong way?

Re: Strange behavior on a JSF page

Posted by Matthieu <be...@gmail.com>.
ah. found out the problem; nevermind.



On Mon, Jan 3, 2011 at 5:54 PM, Matthieu <be...@gmail.com> wrote:

> ok so i get the problem a little more now. I found out the lifecycle
> explanation and discovered my 'processRowSelection' is done in
> the PROCESS_VALIDATIONS phase.
>
> But then, during the UPDATE_MODEL_VALUES phase, my rowIndex is first set to
> the correct value (i.e. the one i selected), and then set to 0. Why is that
> so ?
>
>
> On Mon, Jan 3, 2011 at 3:11 PM, Matthieu <be...@gmail.com> wrote:
>
>> Hello everyone,
>>
>> I'm trying to understand a very strange behavior. I'm using a webpage with
>> a tomahawk selectOneRow and a form.
>> The form input fields are supposed to be filled with values when the user
>> selects one rows, so he can also change the values and submit them.
>>
>> well, it just won't work. When trying to select a row, the webpage comes
>> back with the initial values. After a little inspection, i have a trace
>> which shows me the values are correctly set when the user selects a row, but
>> the JSF system set the values back to their initial values before showing
>> the page back!
>>
>> Am i understanding JSF the wrong way?
>>
>
>

Re: Strange behavior on a JSF page

Posted by Matthieu <be...@gmail.com>.
ok so i get the problem a little more now. I found out the lifecycle
explanation and discovered my 'processRowSelection' is done in
the PROCESS_VALIDATIONS phase.

But then, during the UPDATE_MODEL_VALUES phase, my rowIndex is first set to
the correct value (i.e. the one i selected), and then set to 0. Why is that
so ?

On Mon, Jan 3, 2011 at 3:11 PM, Matthieu <be...@gmail.com> wrote:

> Hello everyone,
>
> I'm trying to understand a very strange behavior. I'm using a webpage with
> a tomahawk selectOneRow and a form.
> The form input fields are supposed to be filled with values when the user
> selects one rows, so he can also change the values and submit them.
>
> well, it just won't work. When trying to select a row, the webpage comes
> back with the initial values. After a little inspection, i have a trace
> which shows me the values are correctly set when the user selects a row, but
> the JSF system set the values back to their initial values before showing
> the page back!
>
> Am i understanding JSF the wrong way?
>