users@woodstock.java.net

Re: Asynchronously submit and refresh. How to?

From: Dan Labrecque <Dan.Labrecque_at_Sun.COM>
Date: Tue, 27 May 2008 12:03:39 -0400

Stefan Bley wrote:
> Hi Dan,
>
>
> Dan Labrecque wrote:
>
>> That said, instead of setting dd2DefaultOptions via the change listener
>> method, perhaps you can just clear it? Setting options via the getter
>> method seems to work much better. When this method is invoked during the
>> JSF rendering phase, the text field and calendar values are available.
>>
>>
>
> I'm not quite sure what you mean. Do you propose to clear the dropdown
> during the Ajax request and then invoke a full request to update the bean
> properties?
>

No, this is the same request. I'm simply suggesting that the
dd2DefaultOptions getter method create the options. This method will be
invoked during the rendering phase, when the menu renders its options.

> I do not understand why cal1's and txt1's values are not store in the bean
> during the Ajax request. As far as I've understood the refresh() method, all
> components in refresh("compId1,compId2,...") are submitted, thus their
> values are stored in the bean. But obviously they aren't...
>

JSF does not guarantee any ordering here, but it appears the text field
and calendar are updated after the menu. That is, after the menu is
updated and its value change listener is invoked.

Dan