Hi Helmut,

i can't reproduce the differend behavior. Can you recheck this an post
a code example if this exists with the current nightly?

If your valueChangeListener was inside a button with immediate=true
(e.g. inside a popup on such a button), there was a problem with the
immediate of descendent commands (TOBAGO-262) but this should not
affect valueChangeEvents.

Regards,
 Volker


2007/2/1, H. Swaczinna <[EMAIL PROTECTED]>:
Hello Volker,

no, without ajax, the model is updated first and then the
valueChangeListener is called. And the bevaviour with ajax was
some days (snapshots) ago the same as without. So I build my
application code based on this behaviour ... :-(

But yes, you're right, ValueChangeListeners should be fired in
validationPhase. So the baviour of Tobago (myFaces?) is inconsistent.

Regards
Helmut

>Hi Helmut,
>
>this is the correct behavior.
>
>ValueChangeListeners are fired in validationPhase (see jsf1.1 spec 3.2.5.3),
>setters are executed in updateModelPhase.
>
>Should be the same as without ajax.
>
>Regards,
>  Volker
>
>2007/2/1, H. Swaczinna <[EMAIL PROTECTED]>:
>> Hello,
>>
>> I've a selectBooleanCheckbox with a nested command tag with a
>> renderedPartially attribute. The selectBooleanCheckbox has a
>> valueChangeListener. The valueChangeListener should be called and
>> then some part of the page reloaded when the checkbox is clicked. This
>> works in general but the lifecycle sequence is not correct. The
>> valueChangeListener is called first and then the value is written back
>> to the model. It should be vice versa.
>>
>> JSP:
>>
>> <tc:panel id='panel'>
>> ...
>>     <tc:selectBooleanCheckbox id="checkbox"
>>       valueChangeListener="#{controller.valueChangeListener}"
>>       value="#{controller.checkbox}">
>>     <f:facet name="change">
>>       <tc:command>
>>         <tc:attribute name="renderedPartially"
>>           value="panel"/>
>>       </tc:command>
>>     </f:facet>
>>     </tc:selectBooleanCheckbox>
>> ...
>>
>> Java:
>>
>>   public void valueChangeListener(ValueChangeEvent e) {
>>     LOG.debug("valueChangeListener: " + e.getNewValue());
>>   }
>>
>>   public void setCheckbox(Boolean checkbox) {
>>     LOG.debug("setCheckbox: " + checkbox);
>>   }
>>
>> LOG:
>>
>> ...
>> controller - valueChangeListener: true
>> controller - setCheckbox: true
>> ...
>>
>>
>> Regards
>> Helmut
>>

Reply via email to