dev@jsf-extensions.java.net

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

From: <jacob_at_hookom.net>
Date: Wed, 16 Aug 2006 10:44:56 -0400
I don't know if you are running into troubled waters here by temporarily changing component state.  The point of avatar was to process the component model in the most natural and external way possible.  Dan does bring up an interesting use case where the component event fired internally decides to change some state which you've asserted ownership over.


  Ed Burns wrote:
On Tue, 15 Aug 2006 18:05:57 -0400, Dan Labrecque - Sun Microsystems <Dan.Labrecque@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