powered by Jive Software

Bug in RosterItemVO - Binding not working correctly for the status getter

Hello,

I think there is a bug on the RosterItemVO. I have a List that shows the current users on the Roster and their status. The status is being shown on a Label binded to the status of each RosterItemVO. Unfortunately, the status shown is always wrong - when a user is available, it shows offline, and the reverse is also true. I debugged, and figured out that on the moment that the binding is dispatched, the private _status field on RosterItemVO has the value of “available” but the getter returns “offline”.

Looking at the code I realized that the getter is doing this:

if(!online)
return “Offline”;
return _status ? _status : “Available”;

On the moment _status changes (and the binding occurs), the “online” property is still false (it changes after the status), so it will return “Offline”.

To solve this bug, on the setter of the “online” property, there is the need of a dispatchEvent(new Event(“statusChange”)), or some other of the possible techniques to make the binding occur again.

On another words, the status getter depends on “_status” and “online”, so when one of this value changes, bindings for “status” should be run. But currently bindings are only run on the moment where _status changes, so when “online” changes Flex components won’t get the new and correct status.

This is creating some problems for us. Is there any quick workaround that you recommend (considering that our renderers only have access to the instance of RosterItemVO?). Also, if this bug is accepted how can we keep track of it, so we know when it’s corrected? If we fix it, can we send the fix to you so you can submit for the next release?

Thank you,

João Saleiro

Patches against current svn are welcome.