Stefan Bley wrote:
> Hi Arnaud,
>
> thanks for your reply.
>
> I tried as you suggested. The event is triggered, but the values from cal1
> and txt1 are not stored in the Bean's properties. I verify this through a
> logging call in the event handler. :confused:
>
The refresh example Arnaud provided is correct. However, ask yourself
the following questions while debugging your example. Note that if you
can retrieve the text field value during a simple page submit, using an
Ajax request should yield the same result.
1. Are you using the correct, fully qualified component ID?
2. Does the backing bean have the correct getter/setter signature
expected by JSF?
3. Are there any validation or required errors preventing components
from being updated?
4. What is the behavior when the backing bean is session scoped?
5. What is the behavior during a page submit?
> Furthermore, how could I make refresh 2 components, say dd2 and dd3?
>
You can submit more than one value with a refresh, but only one
component may be redrawn at a time.
Dan
> Cheers, Stevy
>
>
> Arnaud Brand wrote:
>
>> Instead using
>>
>> dd1.submit("form1:cal1,form1:txt1");
>> dd2.refresh("form1:dd1");
>> I would rather try
>> dd2.refresh("form1:dd1,form1:cal1,form1:txt1");
>> This should submit dd1, cal1 and txt1, trigger your event listener and
>> refresh dd2.
>>
>> 2 reasons for that :
>> - if your bean "Bean" is scoped at the request level your second call
>> (dd2.refresh) will have "lost" the values from your first call
>> (dd1.submit).
>> - it might be that dd2.refresh is called before dd1.submit actually
>> returns (because submit is asynchronous), so may be your dd2 values are
>> set in the bean after having already been read by dd2.refresh.
>>
>> I hope that helps. Have a nice evening,
>> Arnaud
>>
>>
>
>