Hi,

Tried to answer this (partially) on the forum, hope it makes sense:

http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=60&catid=585&threadid=1266270&enterthread=y

Regards,

Ciarán

On 5/8/07, Ian Skinner <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
> 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"/>
>

Reply via email to