thanks ravi,

is this work in my case attached one sample file where i am using

[Bindable]
            public var holidayModelLocator : HolidayModelLocator =
HolidayModelLocator.getInstance();



public function saveHoliday() : void
               {
                   var holidayVO : HolidayVO = new HolidayVO();
                   holidayVO.description = description.text;
                   holidayVO.title = txtTitle.text;
                   holidayVO.holidayDate = holidaydate.selectedDate;
                 var event : HolidaySaveEvent = new HolidaySaveEvent(
holidayVO );

CairngormEventDispatcher.getInstance().dispatchEvent(event);
                  PopUpManager.removePopUp(this);
               }

When i am calling this saveHoliday() function its change value of
holidayModelLocator. is it possible to run any function at that time when
holidayModelLocator change automatically through Cairngorm command.


thanks



On Tue, Mar 24, 2009 at 6:26 PM, Ravi Mishra <ravi.achi...@gmail.com> wrote:

>
> 1. Use getter and setter to populate that property.
> 2. Declare getter as Bindable
> 3. Dispatch event in setter when you set the value.
>
> Something like this
>
> private var _val:String;
>
> [Bindable(event="somethingChanged")]
> public function get val():String{
> return _val;
> }
>
> public function set val(value:String):void{
> _val = value;
> dispatchEvent(new Event("somethingChanged"));
> }
>
>
> And then add an event listener for this event on the trigger of
> creationComplete event.
>
>
> HTH,
>
> -Ravi
>
> On Mar 24, 5:14 pm, Gurnam Singh <saini.gur...@gmail.com> wrote:
> > yes u are right sir, but my problem is this my application get result
> from
> > database when its load, and then want to fill some fields with value but
> its
> > shows Null at that time.
> >
> >
> >
> > On Tue, Mar 24, 2009 at 5:14 PM, Ravi Mishra <ravi.achi...@gmail.com>
> wrote:
> >
> > > Only a simple change in your code
> >
> > > declare variable val as Bindable like i did it as follows:
> >
> > > [Bindable]
> > > private var val : String;
> >
> > > HTH,
> >
> > > -Ravi
> >
> > > On Mar 24, 4:11 pm, guru <saini.gur...@gmail.com> wrote:
> > > > Hi Frds,
> >
> > > > This is one sample application in which i am trying to show value in
> > > > label when VBox create.
> > > > then fill lablw with value.
> >
> > > > i want to know just one thing that is there any way to fill inner
> > > > component when outer component  creation complete. bez hole page
> > > > render in one go.
> >
> > > >       <?xml version="1.0" encoding="utf-8"?>
> > > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
> > > > layout="absolute">
> >
> > > >         <mx:Script >
> > > >                 <![CDATA[
> >
> > > >                         var val : String;
> >
> > > >                         public function test() : void{
> > > >                                 val = "testing value ";
> > > >                         }
> >
> > > >                 ]]>
> > > >         </mx:Script>
> >
> > > >         <mx:VBox width="100%" top="20" height="100%"
> > > creationComplete="{test
> > > > ()}" >
> >
> > > >                         <mx:Text text="------------------"
> width="420"/>
> > > >                         <mx:Text text="{val}"    width="387"/>
> >
> > > >     </mx:VBox>
> >
> > > > </mx:Application>
> >
> > --
> > Gurnam Singh
> >
>


-- 
Gurnam Singh

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to flex_india@googlegroups.com
To unsubscribe from this group, send email to 
flex_india+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Attachment: holidayDialog.mxml
Description: application/xv

Reply via email to