I have a custom list item renderer and would like to change the behavior of its updateDisplayList() method depending on whether the item is currently selected.
When the user changes the selection in the list, updateDisplayList() is called for the newly deselected and selected items. My first thought was to inspect the selectedItems attribute of the parent list and adjust the drawing accordingly. However, it seems that the item renderer's updateDisplayList() method is invoked prior to the list's selectedItems attribute being updated. What I've ended up doing seems really clunky to me. The parent list component listens for "change" events. The event handler gets the list item renderer for each selected row and invokes invalidateDisplayList(). In response, the list item renderers' updateDisplayList() methods are invoked. At this point, the parent list's selectedItems attribute correctly reflects the current selection, so the list item renderer can draw correctly. Of course, the list component must also keep track of the array of most- recently selected items so they can be redrawn in the unselected state when the selection changes. What a mess. Does anyone have a better technique? Thanks. Tobias. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

