dev@jsf-extensions.java.net

Re: [JSF-EXT] Jacob: Seeking Review: 7-Immediate

From: Dan Labrecque - Sun Microsystems <Dan.Labrecque_at_Sun.COM>
Date: Wed, 16 Aug 2006 09:30:04 -0400

Ed Burns wrote:
>>>>>> On Tue, 15 Aug 2006 18:05:57 -0400, Dan Labrecque - Sun Microsystems <Dan.Labrecque_at_Sun.COM> said:
>>>>>>
>
> DL> I would like immediate behavior during the AJAX request, but I do not
> DL> want this to persist for subsequent page submits. For example, I would
> DL> like to use the immediate behavior to auto-validate a text field during
> DL> an AJAX request because I do not want its value to be updated. However,
> DL> if the user clicks a button to submit the page, I expect the text field
> DL> value to be updated. If the immediate property is persisted, how will
> DL> the text field value be updated in the model?
>
> JH> I agree with Dan.
>
> Yes, I anticipated this question and have an implementation strategy to
> solve it. How about I guarantee that any components that have their
> immediate property changed from false to true will have it changed back
> to false again at the end of the transaction.
>
> I will use a finally block to make sure this happens even in the case of
> exceptions.
>
> Would that satisfy your concerns?
>

I believe that would work, as long as the original value is restored.
For example, if the web app developer has set the component's immediate
value to true, I would expect no change here.

Thanks,
Dan