I'm displaying lists of events, and need to provide a total of certain
values contained in each event. The display also contains controls to
filter what events are shown and the totals need to honor these filters.
I have the following code that works in initial display, but does not
update when filters are applied. How does one dynamically bind to a
"function" instead of a discrete value?
protected function staffDayTotal(day:Object):int
{
var staffTot:int = 0;
for (var i:int = 0; i < day.drawsQry.length; i++)
{
if (parentApplication.filterDraws(day.drawsQry[i]))
staffTot = staffTot + day.drawsQry[i].R_MDL_STFCNT;
}
return staffTot;
}
....
<mx:Label paddingLeft="0" paddingRight="0"
text="{staffDayTotal(totalCells.currentItem)}"
width="20%" minWidth="0" minHeight="0"
toolTip="Daily Total: Staff Count"/>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 and Flex 2
Build sales & marketing dashboard RIAâs for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT
Archive: http://www.houseoffusion.com/groups/Flex/message.cfm/messageid:4068
Subscription: http://www.houseoffusion.com/groups/Flex/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.37