Quantcast

AjaxCheckBox inconsistently showing state (value)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

AjaxCheckBox inconsistently showing state (value)

eugenebalt
I have an AjaxCheckBox; when selected, several components get hidden, otherwise the extra components are shown.

It works, but several times, when selecting the AjaxCheckBox, the extra components go away correctly, but the value of the AjaxCheckBox quickly changes from selected *back* to non-selected. The final result of this Ajax update is that the checkbox is shown un-selected even though it should be selected.

On any subsequent clicks, the state is synchronized. This inconsistent state never happens again.

What could it be? As far as I can tell, this AjaxCheckBox is not directly getting updated from any other sources (it's not target.addComponent-added from other Ajax actions). Thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: AjaxCheckBox inconsistently showing state (value)

eugenebalt
Actually, the solution I found is to do this in the AjaxCheckBox's onUpdate():

arg0.addComponent(this);

This works - the checkbox always returns to the correct value after switching it. But what could possibly lead to this? Why would there be a situation where I need to addComponent(this)?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: AjaxCheckBox inconsistently showing state (value)

eugenebalt
Problem resolved - there was another large Ajax update from another component that was interfering and hadn't finished yet.
Loading...