As long as ProgramModel.woCalSelectedDayData is bindable, the binding will
work. But you're only going to be getting a pointer to the same object. Your
"local" instance is the same instance as you would get with
ProgramModel.getInstance().woCalSelectedDayData so any filters you apply
will also affect anything else that's bound to the same object.

If you want local filtering, you will have to use a ListCollectionView and
bind its source to pm.woCalSelectedDayData.

//Assuming PM is a singleton

private var pm : ProgramModel = ProgramModel.getInstance();

[Bindable]
private var filteredList : ListCollectionView = new
ListCollectionView(pm.woCalSelectedDayData);

function setupBindings()
{
  BindingUtils.bindProperty(filteredList, "list", pm,
"woCalSelectedDayData");
}

function setupFilter()
{
  filteredList.filter = someFunction;
}

Now there might be a typo in this, but if it doesn't work, then your
PM.woCalSelectedDayData property isn't properly bindable.

-Josh

On Wed, Sep 24, 2008 at 2:01 PM, jitendra jain <[EMAIL PROTECTED]
> wrote:

>  Hi Manu, may be your pm.woCalSelectedDay is not updated. Please check it
> first ...
> Because iam damn sure it will work .
>
> Thanks,
>
> with Regards,
> Jitendra Jain
> Software Engineer
> 91-9979960798
>
> ----- Original Message ----
> From: Manu Dhanda <[EMAIL PROTECTED]>
> To: [email protected]
> Sent: Wednesday, 24 September, 2008 9:22:43 AM
> Subject: Re: [flexcoders] [Bindable] is not getting updated..
>
>
> Hi..
>
> Josh,
>
> The way you said will work as I said earlier that ProgramModel is updated.
> But the problem is I want to bind model to a local variable and after that
> I
> want to do some filtering on that. Filtering I don't want to apply to my
> model, but want to keep it to my local.
>
> Jitendra,
>
> I tried it both ways. Using "ProgramModel. getInstance( )" as well as
> "ProgramModel. getInstance" .
>
> Both results in the same values.
>
> Thanks,
> Manu.
>
> Josh McDonald-4 wrote:
> >
> > [Bindable]
> > public var pm : ProgramModel = ProgramModel. getInstance( );
> >
> > ....
> >
> > <mx:List id="lfList" dataProvider= "{ pm.woCalSelectedDay
> Data.programList
> > }/>
> >
> >
> > On Wed, Sep 24, 2008 at 12:22 PM, Manu Dhanda
> > <manuraj.dhanda@ gmail.com <manuraj.dhanda%40gmail.com>>wrote:
> >
> >>
> >> Ok, here is my concerned code snippet:
> >>
> >> <mx:Canvas ...>
> >> ...
> >> ....
> >>
> >> [Bindable] public var woCalVO:WOCalVO =
> >> ProgramModel. getInstance( ).woCalSelectedD ayData;
> >>
> >> private function onInitialize( ):void{
> >>
> >>
> >> BindingUtils. bindProperty( this,"woCalVO" ,ProgramModel. getInstance(
> ),"woCalSelected DayData") ;
> >>
> >> filterReset( ); // doing some filtering on woCalVO.programList , but
> >> it is
> >> useless until i get this updated.
> >> setFilter();
> >> }
> >>
> >> <mx:List id="lfList" dataProvider= "{woCalVO. programList} />
> >>
> >> ...
> >> .....
> >> <mx:Canvas/>
> >>
> >> Now, by assumptions, "woCalVO" should be updated to
> >> "woCalSelectedDayDa ta"
> >> on every change. But, it doesn't.
> >> OR Do I need to fire any Flex event like Data_CHANGE or something to
> make
> >> it
> >> work. And now, what should be the ideal way to make it work?
> >>
> >> Thanks everyone being 'n bearing me for soo long.
> >>
> >> -Manu.
> >>
> >>
> >>
> >> Haykel BEN JEMIA wrote:
> >> >
> >> > someVar must be bindable and dispatch an event.If you have a setter
> and
> >> > getter for the property, or it's a public property, just use the
> >> > [Bindable]
> >> > metatag.
> >> > Otherwise, if you only have a getter, you have to use the
> >> > [Bindable(event= "event
> >> > name")] syntax with the getter and dispatch the given event every time
> >> the
> >> > property is changed.
> >> >
> >> >
> >> >
> >> > On Tue, Sep 23, 2008 at 1:13 PM, Manu Dhanda
> >> > <manuraj.dhanda@ gmail.com <manuraj.dhanda%40gmail.com>>wrote:
> >> >
> >> >>
> >> >> Do I explicitly need to dispatch any event for
> >> BindUtils.bindPrope rty(...)
> >> >> to
> >> >> happen ??
> >> >>
> >> >> Cuz, I am not getting my "xyz" var changed with the change in
> someVar.
> >> >>
> >> >> Note: I am putting this line of code
> >> >> (BindingUtils. bindProperty( this,"xyz" ,MyModel. getInstance,
> "someVar" )
> >> in
> >> >> creationComplete( ).
> >> >>
> >> >> Thanks,
> >> >> Manu.
> >> >>
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble. com/-Bindable- -is-not-getting- updated..
> -tp19600797p1964 
> 0742.html<http://www.nabble.com/-Bindable--is-not-getting-updated..-tp19600797p19640742.html>
> >> Sent from the FlexCoders mailing list archive at Nabble.com.
> >>
> >>
> >> ------------ --------- --------- ------
> >>
> >> --
> >> Flexcoders Mailing List
> >> FAQ: http://groups. yahoo.com/ group/flexcoders /files/flexcoder
> sFAQ.txt<http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt>
> >> Alternative FAQ location:
> >> https://share. acrobat.com/ adc/document. do?docid= 942dbdc8-
> e469-446f- b4cf-1e62079f684 
> 7<https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847>
> >> Search Archives:
> >> http://www.mail- archive.com/ flexcoders% 40yahoogroups.. 
> >> comYahoo<http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo>!
> Groups
> >> Links
> >>
> >>
> >>
> >>
> >
> >
> > --
> > "Therefore, send not to know For whom the bell tolls. It tolls for thee."
> >
> > http://flex. joshmcdonald. info/ <http://flex.joshmcdonald.info/>
> >
> > :: Josh 'G-Funk' McDonald
> > :: 0437 221 380 :: [EMAIL PROTECTED] com <josh%40gfunk007.com>
> >
> >
>
> --
> View this message in context: http://www.nabble. com/-Bindable-
> -is-not-getting- updated.. -tp19600797p1964 
> 1557.html<http://www.nabble.com/-Bindable--is-not-getting-updated..-tp19600797p19641557.html>
> Sent from the FlexCoders mailing list archive at Nabble.com.
>
>
> ------------------------------
> Unlimited freedom, unlimited storage. Get it 
> now<http://in.rd.yahoo.com/tagline_mail_2/*http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/>
> 
>



-- 
"Therefore, send not to know For whom the bell tolls. It tolls for thee."

http://flex.joshmcdonald.info/

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]

Reply via email to