Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 179879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:29:08+00:00 2026-05-11T14:29:08+00:00

I have a List that uses a custom ItemRenderer. Is there a way for

  • 0

I have a List that uses a custom ItemRenderer. Is there a way for the owner (List) to dispatch a custom event I have created, to all instances of it’s ItemRenderer?

For example, I want to dispatch an event that will add text to a textbox within the item renderer. One or more item renderers will be able to respond to this event depending on certain user interactions.

Is there a way?

Thanks 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T14:29:08+00:00Added an answer on May 11, 2026 at 2:29 pm

    If your custom ItemRenderer instances have access to the List instance somehow, it’s straigh forward – just register your event handling method:

    theList.addEventListener(YourCustomEvent.CUSTOM_EVENT, itemRendererCustomHander); 

    If you don’t have direct access (which I assume), you can still do it indirectly, e.g. through a delegate of the ItemRenderer’s class object. Make an instance of a subclass of EventDispatcher a static property of the ItemRenderer class, and in your ItemRenderer constructor, register an event handler with it:

    public class ItemRenderer {     public static var eventDelegate:YourCustomEventDispatcher;      public function ItemRenderer() {         eventDelegate.addEventListener(YourCustomEvent.CUSTOM_EVENT, itemRendererCustomHander);         (...)     }      public function itemRendererCustomHander(event:YourCustomEvent) {         (...)     } } 

    Now, when you create theList (either in ActionScript or in the initialize event handler of your MXML component), make a new YourCustomEventDispatcher, give to it a reference to theList, and add it to ItemRenderer. YourCustomEventDispatcher registers a private event handler for YourCustomEvent with theList, and just redispatches it. Since all ItemRenderer instances have in turn registered for YourCustomEvent with YourCustomEventDispatcher, theLists’s YourCustomEvent reaches all ItemRenderers via one hop.

    This is basically an implementation of the Observer design pattern.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a list that uses a itemRendererFunction to get custom item renderers. Is
I have a template where I've created a custom list style, and ensured that
I have a HorizontalList control that uses a custom ItemRenderer to represent each item
I have used a list view that uses a grid view in WPF. I
I have a small application that uses a SharePoint list as the data source.
I have a function that uses Pattern#compile and a Matcher to search a list
We have an ASP.Net page that uses a checkbox to toggle between a list
I have a method I'm writing that uses reflection to list a class's static
I have a List that contains items, for example: 1) https:\\10.12.23\\ 2) https:\\12.23.12.25\\ 3)
I have a custom ListView that uses a custom ArrayAdapter (which basically just overrides

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.