Hi if you use java as backend do you serilaze the object ?

if so you can map the date objec to the date object in actionscript and
back..

here is a datefilter connetced to a arraycollection.

public function chkToDay():void
{
            //Allways set to null first!!!! else you get filter inside
the filter!
             myArrayCollection.filterFunction=null;
             myArrayCollection.refresh();
             myArrayCollection.filterFunction=toDayDateFilterFunc;
             /* Refresh the collection view to apply the filter. */
             myArrayCollection.refresh();
}

and the filter function

private function toDayDateFilterFunc(item:Object):Boolean
{
             var toDay:Date = new Date();
             //item.date is if you have a public var named date in your
DTO(Data Transfer Object)
             return item.date== toDay;
}

Cato


--- In [email protected], "cox.blair" <[EMAIL PROTECTED]> wrote:
>
> Hi everyone,
>
> With the help of another poster I was pointed in the correct direction
> to solve a problem I have:
>
> The two links were helpful:
>
>
http://livedocs.adobe.com/flex/3/html/help.html?content=controls_12.html
>
>
http://blog.flexexamples.com/2008/03/12/using-a-combobox-to-filter-items\
-in-a-datagrid-in-flex/
>
> Based on the above information, I was able to accomplish all my tasks,
> except being able to sort dates.
>
> Problem #1 - How to format the date so that it displays as 2008-10-01.
> I have it all the way up to 2008-10-1. Apparently the 'day' is
> represented as a single digit. That won't work - using a MySQL db.
>
> Problem #2 - I am apparently lacking in my knowledge of ActionScript
> to correctly write the proper script to filter the date. What I can't
> seem to figure out is the correct syntax for working with dates, or
> perhaps simply a string or number containing "-" dashes?
>
> Sorry, I'm not providing code you to ponder over, I really only need a
> reference to start with so I can learn as I go. I've been searching
> but have not been able to locate a reference which deals with sorting
> dates?
>
> Thanks,
>


Reply via email to