Dude

I simply need to dispatch itemSelect event.
Using the BindingUtils, setting binding on the selectedIndex property does
not fulfill my purpose of dispatching the itemselect  event.

This is complicated since i cant use the creation complete nor the binding
bcos

The list does not allow me to access its individual selected item.

My plan of action was to dispatch itemSelect event assigning the required
things to my new event taking it from the list but thats not working
Need to find some other solution

Here is a snippet of it

leftList.dataProvider=libfiles;
                        leftList.selectedIndex=0;
                        var l:ListEvent=new ListEvent(ListEvent.ITEM_CLICK);
                        l.itemRenderer=leftList.itemRenderer //problem area
     //cant do
                        l.itemRenderer.data=leftList.selectedItem as
IListItemRenderer;//this gives the data what i actually needed//no hassels
here
                        leftList.dispatchEvent(l);


On Wed, Jul 29, 2009 at 7:03 PM, hsivaramakrish...@gmail.com <
hsivaramakrish...@gmail.com> wrote:

>
> A good way would be to use data binding. whenever the selectedIndex is
> set using a bindable variable, the binding would trigger and you could
> do your magic on the right list. Take a look at BindingUtils Class
> documentation.
>
> Harish
> Evangelist, Adobe India.
>
> On Jul 29, 3:49 pm, Amol Pandhare <genius.ge...@gmail.com> wrote:
> > Hey Hissam,
> >
> > You might be having a click listener on the left list and a function
> > associated to it. On the same list keep a creationComplete listener and
> > point it to the same listener function as that of the click event. And
> for
> > the listener function to work make the event type of the attribute as
> Event,
> > the super class, instead of say ListEvent. Dont forget to set the
> selected
> > index of the left list.
> >
> > This should help.
> >
> > Regards,
> > Amol.
> >
> > On Wed, Jul 29, 2009 at 4:00 PM, HISSAM <hissam.sher...@gmail.com>
> wrote:
> > > I have already tried that!!
> >
> > > On Wed, Jul 29, 2009 at 6:26 PM, sheetal <sheetalnilw...@gmail.com>
> wrote:
> >
> > >> Try setting the selected index of that list and dispatch click event
> > >> on the list.
> >
> > >> On Jul 29, 3:14 pm, HISSAM <hissam.sher...@gmail.com> wrote:
> > >> > I have 2 list(left list /right list ) and click on an item of left-
> > >> > list , data is changed of the right list respective with the item
> > >> > selected in the lest list.
> >
> > >> > This is working fine with no hassels at all.
> >
> > >> > My requirement is
> >
> > >> > At the start i want the 1st item of the right list be selected and
> > >> > dispatch the respective event to change the data of the left list.
> >
> > >> > How do i go about?
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to