SlideShare a Scribd company logo
1 of 20
Download to read offline
Custom
  ItemRenderers
                                                                                             Replace with
                                                                                              a graphic
         Ryan Frishberg and                                                                 White Master
                                                                                         5.5” Tall & 4.3” Wide
            Joan Lafferty
          Flex 360 – May 19,
                 2009




Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential.   1
Introduction and Resources


                                                                            Additional Resources:


                                                                            Alex’s Blog: http://blogs.adobe.com/
                                                                             aharui


                                                                            Peter Ent’s Blog: http://
                                                                             weblogs.macromedia.com/pent


                                                                            Spark Containers and ItemRenderers (Early
                                                                             Draft) :http://blogs.adobe.com/flexdoc/
                                                                             pdf/sparkContainersAndRenderers.pdf




                                                                                                                         ®




Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential.   2
Agenda

     Types of ItemRenderers
     Virtualization of ItemRenderers
       Common Problems and Solutions
           Editors, and Reusable itemRenderers.
   Building for Performance
   ItemRenderers in Flex 4 (Gumbo)




                                                                                         ®




Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential.   3
itemRenderer

   A list renders data, usually in a label
   You can use item renderers to render the data however
    you want
   itemRenderer is a property on List classes typed to
    take an IFactory.

            <mx:List
            itemRenderer=“MySuperSweetItemRenderer”>
                <mx:dataProvider>
                     …
                </mx:dataProvider>
            </mx:List>


                                                                                         ®




Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential.   4
Types of ItemRenderers

   Two main types:
           Custom Item Renderers
           Drop-in Item Renderers (IDropInListItemRenderer)


   Three ways to create them:
           New ActionScript Class
           New MXML Class
           Inline



                                                                                         ®




Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential.   5
Custom ItemRenderers

   Most basic item renderer
   What developers use most of the time
   Your item renderer is specific to the data you want to
    display.
   Item renderer implements IDataRenderer
            <?xml version=quot;1.0quot; encoding=quot;utf-8quot;?>

            <mx:VBox xmlns:mx=quot;http://www.adobe.com/2006/mxmlquot;>

                <mx:Label text=quot;{data.lastName + ', ' +
            data.firstName}quot; />

            </mx:VBox>

                                                                                         ®




Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential.   6
Three ways to create a custom item renderer

   New ActionScript Class
   New MXML Class
   Inline




                                                                                         ®




Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential.   7
Drop-in ItemRenderers

   What most Flex framework components implement
   Drop in item renderers implement
    IDropInListItemRenderer (a.k.a. –
    ISchemaLessListItemRenderer)
   Doesn’t just give you the data property, but it gives
    you the listData
   Why do you need this? How to create an item renderer
    for multiple DataGrid columns?
   You can “drop in” the item render, and it’ll just display
    the data—no matter what the data is


                                                                                         ®




Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential.   8
Reusable Renderers

   Most itemRenderers are written to associate a renderer
    with a column.
    <mx:Label text=“{data.firstName}” fontStyle=“italic”/>

   To make an itemRenderer reusable, do not associate it
    with a column.
   Use the listData property on your itemRenderer to
    determine what data you are representing.




                                                                                         ®




Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential.   9
Reusable Renderers: Using listData

   To use listData, your itemRenderer must implement
    IDropInListItemRenderer.


   Components like CheckBox, Button, NumericStepper,
    Text and DateField already implement
    IDropInListItemRenderer.


   Containers do not implement IDropInListItemRenderer.




                                                                                          ®




Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential.   10
Sizing an item renderer

   The explicit width of an itemRender is always the size
    of its container (or the column size in a datagrid)


   The height of an itemRender is always rowHeight
    unless variableRowHeight = true (false by default)


   By default, the width of a List is 200 pixels and the
    number of rows displayed is 7.


   Reverse this for horizontal lists

                                                                                          ®




Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential.   11
Column 1 Column 2 Column 3 Column 4                                                         Column 5     Column 6
• Virtualization/Renderer 1-3 • Cell 1-4
   Cell 1-1 • Cell 1-2 • Cell Recycling                                                     • Cell 1-5   • Cell 1-6
• Cell 2-1 • Cell 2-2 • Cell 2-3 • Cell 2-4                                                 • Cell 2-5   • Cell 2-6
• Cell 3-1 • Cell 3-2 • Cell 3-3 • Cell 3-4                                                 • Cell 3-5   • Cell 3-6
• Cell 4-1 • Cell 4-2 • Cell 4-3 • Cell 4-4                                                 • Cell 4-5   • Cell 4-6
• Cell 5-1 • Cell 5-2 • Cell 5-3 • Cell 5-4                                                 • Cell 5-5   • Cell 5-6
• Cell 6-1 • Cell 6-2 • Cell 6-3 • Cell 6-4                                                 • Cell 6-5   • Cell 6-6
• Cell 7-1 • Cell 7-2 • Cell 7-3 • Cell 7-4                                                 • Cell 7-5   • Cell 7-6




                                                                                                                      ®




  Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential.   12
Renderers as Editors

   Setting a custom itemRenderer like a CheckBox or
    DateField does not mean your data is saved.
   List component should be editable.
   Set rendererIsEditor=true.
   Set editorDataField if the default property of your
    renderer is not “text”.




                                                                                          ®




Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential.   13
Example: Slider as a Renderer and Editor

     Slider does not implement IDataRenderer


   Set editable=true, itemRenderer=“MySlider”,
    rendererIsEditor=“true” editorDataField=“value”


               <mx:DataGridColumn
                   dataField=quot;ratingquot;
                   headerText=quot;Rating (1 to 10)quot;
                   itemRenderer=quot;MySliderquot;
                   rendererIsEditor=quot;truequot;
                   editorDataField=quot;valuequot;>




                                                                                          ®




Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential.   14
Performance

   We are smart about creating itemRenderers, but there
    are still lots of item renderers on screen in a 20x20
    datagrid.


   Item renderers need to be performant because there
    are so many of them.




                                                                                          ®




Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential.   15
Performance: Tips for Speed

   Layout’s often expensive and unnecessary for item
    renderers
           Instead, base your renderers off of UIComponent
            and layout the items explicitly yourself


   Developing your item renderers in MXML can be more
    expensive. For example, you probably don’t need to
    use data-binding.
           Instead just use ActionScript – you know when the
            data is changing (data setter gets called), so there’s
            really no need for binding

                                                                                          ®




Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential.   16
ItemRenderers in Gumbo

   DataGroup is the basic, skinless component used to
    render data on screen.


   SkinnableDataContainer is the skinnable version of
    DataGroup.


   List extends SkinnableDataContainer and adds
    selection, keyboard handling, and a few other things.




                                                                                          ®




Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential.   17
ItemRenderers in Gumbo

   itemRendererFunctions make it easy to deal with
    heterogenous data items
   Data containers support both Data Items and Visual
    Elements
   No more IDropInListItemRenderer – those properties
    are pushed down to the item renderer directly now
   Item renderers are in charge of all aspects of it’s
    visuals, which means it must draw highlighting for
    hover and selection
   Support for differently sized item renderers is much
    improved—new typicalItem property.

                                                                                          ®




Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential.   18
Resources

   Ryan’s Blog:
http://frishy.blogspot.com/


   Joan’s Blog:
http://butterfliesandbugs.wordpress.com




                                                                                          ®




Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential.   19
®




Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential.   20

More Related Content

What's hot

E2 appspresso hands on lab
E2 appspresso hands on labE2 appspresso hands on lab
E2 appspresso hands on labNAVER D2
 
HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1James Pearce
 
ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)
ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)
ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)Clément Wehrung
 
Wordcamp abq cf-cpt
Wordcamp abq cf-cptWordcamp abq cf-cpt
Wordcamp abq cf-cptmy easel
 
Introduction To Django (Strange Loop 2011)
Introduction To Django (Strange Loop 2011)Introduction To Django (Strange Loop 2011)
Introduction To Django (Strange Loop 2011)Jacob Kaplan-Moss
 
Experience Manager 6 Developer Features - Highlights
Experience Manager 6 Developer Features - HighlightsExperience Manager 6 Developer Features - Highlights
Experience Manager 6 Developer Features - HighlightsCédric Hüsler
 

What's hot (8)

E2 appspresso hands on lab
E2 appspresso hands on labE2 appspresso hands on lab
E2 appspresso hands on lab
 
HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1HTML5 and the dawn of rich mobile web applications pt 1
HTML5 and the dawn of rich mobile web applications pt 1
 
ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)
ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)
ePub 3, HTML 5 & CSS 3 (+ Fixed-Layout)
 
Wordcamp abq cf-cpt
Wordcamp abq cf-cptWordcamp abq cf-cpt
Wordcamp abq cf-cpt
 
Introduction To Django (Strange Loop 2011)
Introduction To Django (Strange Loop 2011)Introduction To Django (Strange Loop 2011)
Introduction To Django (Strange Loop 2011)
 
Experience Manager 6 Developer Features - Highlights
Experience Manager 6 Developer Features - HighlightsExperience Manager 6 Developer Features - Highlights
Experience Manager 6 Developer Features - Highlights
 
WordPress and Ajax
WordPress and AjaxWordPress and Ajax
WordPress and Ajax
 
Django Heresies
Django HeresiesDjango Heresies
Django Heresies
 

Viewers also liked

Design as Derivative: Weapons of Mass Disruption
Design as Derivative: Weapons of Mass DisruptionDesign as Derivative: Weapons of Mass Disruption
Design as Derivative: Weapons of Mass DisruptionGong Szeto
 
4.1第四章 多主体系统仿真的软件工具
4.1第四章 多主体系统仿真的软件工具4.1第四章 多主体系统仿真的软件工具
4.1第四章 多主体系统仿真的软件工具zhang shuren
 
Ignite Paris 2009 - Is World of Warcraft the best leadership training solution?
Ignite Paris 2009 - Is World of Warcraft the best leadership training solution?Ignite Paris 2009 - Is World of Warcraft the best leadership training solution?
Ignite Paris 2009 - Is World of Warcraft the best leadership training solution?Charles Nouyrit
 
Ignite Denver - RIA Developers win co-workers and influence people
Ignite Denver - RIA Developers win co-workers and influence peopleIgnite Denver - RIA Developers win co-workers and influence people
Ignite Denver - RIA Developers win co-workers and influence people360|Conferences
 
Adrian Pomilio - Flex Ajax Bridge and Legacy Applications
Adrian Pomilio - Flex Ajax Bridge and Legacy ApplicationsAdrian Pomilio - Flex Ajax Bridge and Legacy Applications
Adrian Pomilio - Flex Ajax Bridge and Legacy Applications360|Conferences
 
Ryan Phelan - Bending and Flexing
Ryan Phelan - Bending and FlexingRyan Phelan - Bending and Flexing
Ryan Phelan - Bending and Flexing360|Conferences
 
Ignite Denver - 5 minutes on the Hackintosh
Ignite Denver - 5 minutes on the HackintoshIgnite Denver - 5 minutes on the Hackintosh
Ignite Denver - 5 minutes on the Hackintosh360|Conferences
 
Ignite Denver - Future Location and Social Networks
Ignite Denver - Future Location and Social NetworksIgnite Denver - Future Location and Social Networks
Ignite Denver - Future Location and Social Networks360|Conferences
 
Bryc Barrand - The art of project management in large-scale Flex projects
Bryc Barrand - The art of project management in large-scale Flex projectsBryc Barrand - The art of project management in large-scale Flex projects
Bryc Barrand - The art of project management in large-scale Flex projects360|Conferences
 
Social Media for the low tech company
Social Media for the low tech companySocial Media for the low tech company
Social Media for the low tech company360|Conferences
 
Ignite Denver - Digital Theatrics
Ignite Denver - Digital TheatricsIgnite Denver - Digital Theatrics
Ignite Denver - Digital Theatrics360|Conferences
 
Christophe Jolif - Flex Data Visualization going one step further with IBM IL...
Christophe Jolif - Flex Data Visualization going one step further with IBM IL...Christophe Jolif - Flex Data Visualization going one step further with IBM IL...
Christophe Jolif - Flex Data Visualization going one step further with IBM IL...360|Conferences
 
Chad Udell - Developers are from Mars, Designers are from Venus
Chad Udell - Developers are from Mars, Designers are from VenusChad Udell - Developers are from Mars, Designers are from Venus
Chad Udell - Developers are from Mars, Designers are from Venus360|Conferences
 
Ignite Denver - Ignite a Cigar
Ignite Denver - Ignite a CigarIgnite Denver - Ignite a Cigar
Ignite Denver - Ignite a Cigar360|Conferences
 
Ryan Campbell - OpenFlux and Flex 4
Ryan Campbell - OpenFlux and Flex 4Ryan Campbell - OpenFlux and Flex 4
Ryan Campbell - OpenFlux and Flex 4360|Conferences
 
Tom Gonzalez - Adv Data Visualization
Tom Gonzalez - Adv Data VisualizationTom Gonzalez - Adv Data Visualization
Tom Gonzalez - Adv Data Visualization360|Conferences
 
Storytelling in Life Management club (rus)
Storytelling in Life Management club (rus)Storytelling in Life Management club (rus)
Storytelling in Life Management club (rus)dan voronov
 

Viewers also liked (20)

Design as Derivative: Weapons of Mass Disruption
Design as Derivative: Weapons of Mass DisruptionDesign as Derivative: Weapons of Mass Disruption
Design as Derivative: Weapons of Mass Disruption
 
4.1第四章 多主体系统仿真的软件工具
4.1第四章 多主体系统仿真的软件工具4.1第四章 多主体系统仿真的软件工具
4.1第四章 多主体系统仿真的软件工具
 
Ignite Paris 2009 - Is World of Warcraft the best leadership training solution?
Ignite Paris 2009 - Is World of Warcraft the best leadership training solution?Ignite Paris 2009 - Is World of Warcraft the best leadership training solution?
Ignite Paris 2009 - Is World of Warcraft the best leadership training solution?
 
Ignite Denver - RIA Developers win co-workers and influence people
Ignite Denver - RIA Developers win co-workers and influence peopleIgnite Denver - RIA Developers win co-workers and influence people
Ignite Denver - RIA Developers win co-workers and influence people
 
Adrian Pomilio - Flex Ajax Bridge and Legacy Applications
Adrian Pomilio - Flex Ajax Bridge and Legacy ApplicationsAdrian Pomilio - Flex Ajax Bridge and Legacy Applications
Adrian Pomilio - Flex Ajax Bridge and Legacy Applications
 
Ignite Denver - Robots!
Ignite Denver - Robots!Ignite Denver - Robots!
Ignite Denver - Robots!
 
Ryan Phelan - Bending and Flexing
Ryan Phelan - Bending and FlexingRyan Phelan - Bending and Flexing
Ryan Phelan - Bending and Flexing
 
Ignite Denver - 5 minutes on the Hackintosh
Ignite Denver - 5 minutes on the HackintoshIgnite Denver - 5 minutes on the Hackintosh
Ignite Denver - 5 minutes on the Hackintosh
 
Ignite Denver - Future Location and Social Networks
Ignite Denver - Future Location and Social NetworksIgnite Denver - Future Location and Social Networks
Ignite Denver - Future Location and Social Networks
 
Bryc Barrand - The art of project management in large-scale Flex projects
Bryc Barrand - The art of project management in large-scale Flex projectsBryc Barrand - The art of project management in large-scale Flex projects
Bryc Barrand - The art of project management in large-scale Flex projects
 
Social Media for the low tech company
Social Media for the low tech companySocial Media for the low tech company
Social Media for the low tech company
 
Ignite Denver - Digital Theatrics
Ignite Denver - Digital TheatricsIgnite Denver - Digital Theatrics
Ignite Denver - Digital Theatrics
 
Christophe Jolif - Flex Data Visualization going one step further with IBM IL...
Christophe Jolif - Flex Data Visualization going one step further with IBM IL...Christophe Jolif - Flex Data Visualization going one step further with IBM IL...
Christophe Jolif - Flex Data Visualization going one step further with IBM IL...
 
Chad Udell - Developers are from Mars, Designers are from Venus
Chad Udell - Developers are from Mars, Designers are from VenusChad Udell - Developers are from Mars, Designers are from Venus
Chad Udell - Developers are from Mars, Designers are from Venus
 
Ignite Denver 3
Ignite Denver 3Ignite Denver 3
Ignite Denver 3
 
Ignite Denver - Ignite a Cigar
Ignite Denver - Ignite a CigarIgnite Denver - Ignite a Cigar
Ignite Denver - Ignite a Cigar
 
Ryan Campbell - OpenFlux and Flex 4
Ryan Campbell - OpenFlux and Flex 4Ryan Campbell - OpenFlux and Flex 4
Ryan Campbell - OpenFlux and Flex 4
 
Tom Gonzalez - Adv Data Visualization
Tom Gonzalez - Adv Data VisualizationTom Gonzalez - Adv Data Visualization
Tom Gonzalez - Adv Data Visualization
 
Community Engagement
Community EngagementCommunity Engagement
Community Engagement
 
Storytelling in Life Management club (rus)
Storytelling in Life Management club (rus)Storytelling in Life Management club (rus)
Storytelling in Life Management club (rus)
 

Similar to Ryan Fishberg and Joan Lafferty - ItemsRenderers

Prototyping Adobe AIR Applications with Fireworks CS4
Prototyping Adobe AIR Applications with Fireworks CS4Prototyping Adobe AIR Applications with Fireworks CS4
Prototyping Adobe AIR Applications with Fireworks CS4Juan Sanchez
 
Search Engines and Flash: Secrets, Tricks, and Black Magic
Search Engines and Flash: Secrets, Tricks, and Black MagicSearch Engines and Flash: Secrets, Tricks, and Black Magic
Search Engines and Flash: Secrets, Tricks, and Black Magicguestb1f3a
 
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)Fabien Potencier
 
Smart Client Development
Smart Client DevelopmentSmart Client Development
Smart Client DevelopmentTamir Khason
 
Apache Jackrabbit Oak on MongoDB
Apache Jackrabbit Oak on MongoDBApache Jackrabbit Oak on MongoDB
Apache Jackrabbit Oak on MongoDBMongoDB
 
Plugins 2.0: The Overview
Plugins 2.0: The OverviewPlugins 2.0: The Overview
Plugins 2.0: The OverviewAtlassian
 
JavaScript 2.0 in Dreamweaver CS4
JavaScript 2.0 in Dreamweaver CS4JavaScript 2.0 in Dreamweaver CS4
JavaScript 2.0 in Dreamweaver CS4alexsaves
 
Orlando DNN Usergroup Pres 12/06/11
Orlando DNN Usergroup Pres 12/06/11Orlando DNN Usergroup Pres 12/06/11
Orlando DNN Usergroup Pres 12/06/11Jess Coburn
 
When To Use Ruby On Rails
When To Use Ruby On RailsWhen To Use Ruby On Rails
When To Use Ruby On Railsdosire
 
Journey To The Front End World - Part3 - The Machine
Journey To The Front End World - Part3 - The MachineJourney To The Front End World - Part3 - The Machine
Journey To The Front End World - Part3 - The MachineIrfan Maulana
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)mfrancis
 
RoR 101: Session 2
RoR 101: Session 2RoR 101: Session 2
RoR 101: Session 2Rory Gianni
 
Developing for LinkedIn's Application Platform
Developing for LinkedIn's Application PlatformDeveloping for LinkedIn's Application Platform
Developing for LinkedIn's Application PlatformTaylor Singletary
 
Developing Lightning Components for Communities.pptx
Developing Lightning Components for Communities.pptxDeveloping Lightning Components for Communities.pptx
Developing Lightning Components for Communities.pptxDmitry Vinnik
 
Jun Heider - Flex Application Profiling By Example
Jun Heider - Flex Application Profiling By ExampleJun Heider - Flex Application Profiling By Example
Jun Heider - Flex Application Profiling By Example360|Conferences
 
Does my DIV look big in this?
Does my DIV look big in this?Does my DIV look big in this?
Does my DIV look big in this?glen_a_smith
 
Webpack & EcmaScript 6 (Webelement #32)
Webpack & EcmaScript 6 (Webelement #32)Webpack & EcmaScript 6 (Webelement #32)
Webpack & EcmaScript 6 (Webelement #32)srigi
 

Similar to Ryan Fishberg and Joan Lafferty - ItemsRenderers (20)

Prototyping Adobe AIR Applications with Fireworks CS4
Prototyping Adobe AIR Applications with Fireworks CS4Prototyping Adobe AIR Applications with Fireworks CS4
Prototyping Adobe AIR Applications with Fireworks CS4
 
Hello Gumbo
Hello GumboHello Gumbo
Hello Gumbo
 
Search Engines and Flash: Secrets, Tricks, and Black Magic
Search Engines and Flash: Secrets, Tricks, and Black MagicSearch Engines and Flash: Secrets, Tricks, and Black Magic
Search Engines and Flash: Secrets, Tricks, and Black Magic
 
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
 
Smart Client Development
Smart Client DevelopmentSmart Client Development
Smart Client Development
 
Apache Jackrabbit Oak on MongoDB
Apache Jackrabbit Oak on MongoDBApache Jackrabbit Oak on MongoDB
Apache Jackrabbit Oak on MongoDB
 
Plugins 2.0: The Overview
Plugins 2.0: The OverviewPlugins 2.0: The Overview
Plugins 2.0: The Overview
 
JavaScript 2.0 in Dreamweaver CS4
JavaScript 2.0 in Dreamweaver CS4JavaScript 2.0 in Dreamweaver CS4
JavaScript 2.0 in Dreamweaver CS4
 
Orlando DNN Usergroup Pres 12/06/11
Orlando DNN Usergroup Pres 12/06/11Orlando DNN Usergroup Pres 12/06/11
Orlando DNN Usergroup Pres 12/06/11
 
When To Use Ruby On Rails
When To Use Ruby On RailsWhen To Use Ruby On Rails
When To Use Ruby On Rails
 
Journey To The Front End World - Part3 - The Machine
Journey To The Front End World - Part3 - The MachineJourney To The Front End World - Part3 - The Machine
Journey To The Front End World - Part3 - The Machine
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
 
RoR 101: Session 2
RoR 101: Session 2RoR 101: Session 2
RoR 101: Session 2
 
T5 Oli Aro
T5 Oli AroT5 Oli Aro
T5 Oli Aro
 
Developing for LinkedIn's Application Platform
Developing for LinkedIn's Application PlatformDeveloping for LinkedIn's Application Platform
Developing for LinkedIn's Application Platform
 
Developing Lightning Components for Communities.pptx
Developing Lightning Components for Communities.pptxDeveloping Lightning Components for Communities.pptx
Developing Lightning Components for Communities.pptx
 
Jun Heider - Flex Application Profiling By Example
Jun Heider - Flex Application Profiling By ExampleJun Heider - Flex Application Profiling By Example
Jun Heider - Flex Application Profiling By Example
 
Does my DIV look big in this?
Does my DIV look big in this?Does my DIV look big in this?
Does my DIV look big in this?
 
Open Social Summit Korea
Open Social Summit KoreaOpen Social Summit Korea
Open Social Summit Korea
 
Webpack & EcmaScript 6 (Webelement #32)
Webpack & EcmaScript 6 (Webelement #32)Webpack & EcmaScript 6 (Webelement #32)
Webpack & EcmaScript 6 (Webelement #32)
 

More from 360|Conferences

Metaio Mobile Augmented Reality
Metaio Mobile Augmented RealityMetaio Mobile Augmented Reality
Metaio Mobile Augmented Reality360|Conferences
 
Mobile Apps- Business Toolkit for the Manager
Mobile Apps- Business Toolkit for the ManagerMobile Apps- Business Toolkit for the Manager
Mobile Apps- Business Toolkit for the Manager360|Conferences
 
Making Real Money with Mobile Apps
Making Real Money with Mobile AppsMaking Real Money with Mobile Apps
Making Real Money with Mobile Apps360|Conferences
 
Inside Mobile Widgets Publish
Inside Mobile Widgets PublishInside Mobile Widgets Publish
Inside Mobile Widgets Publish360|Conferences
 
Ignite Denver 4 Master Deck
Ignite Denver 4 Master DeckIgnite Denver 4 Master Deck
Ignite Denver 4 Master Deck360|Conferences
 
Oğuz Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...
Oğuz	Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...Oğuz	Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...
Oğuz Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...360|Conferences
 
Tyler Wright - Undo History with Flight
Tyler Wright - Undo History with FlightTyler Wright - Undo History with Flight
Tyler Wright - Undo History with Flight360|Conferences
 
Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!
Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!
Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!360|Conferences
 
Erik Loehfelm - Experience Design with Flash Catalyst and Flex Gumbo
Erik Loehfelm - Experience Design with Flash Catalyst and Flex GumboErik Loehfelm - Experience Design with Flash Catalyst and Flex Gumbo
Erik Loehfelm - Experience Design with Flash Catalyst and Flex Gumbo360|Conferences
 
Giorgio Natilli - Blaze DS Connectivity Framework
Giorgio Natilli - Blaze DS Connectivity FrameworkGiorgio Natilli - Blaze DS Connectivity Framework
Giorgio Natilli - Blaze DS Connectivity Framework360|Conferences
 
Douglas Knudsen - Great Mash Up
Douglas Knudsen - Great Mash UpDouglas Knudsen - Great Mash Up
Douglas Knudsen - Great Mash Up360|Conferences
 
Wes Leonardo - Putting AIR into your Application
Wes Leonardo - Putting AIR into your ApplicationWes Leonardo - Putting AIR into your Application
Wes Leonardo - Putting AIR into your Application360|Conferences
 
Samuel Asher Rivello - PureMVC Hands On Part 1
Samuel Asher Rivello - PureMVC Hands On Part 1Samuel Asher Rivello - PureMVC Hands On Part 1
Samuel Asher Rivello - PureMVC Hands On Part 1360|Conferences
 
Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2360|Conferences
 
Ben Elmore - Do You Speak Flex
Ben Elmore - Do You Speak FlexBen Elmore - Do You Speak Flex
Ben Elmore - Do You Speak Flex360|Conferences
 
Francisco Inchauste - RIA Mojo - Making your Flex application standout with a...
Francisco Inchauste - RIA Mojo - Making your Flex application standout with a...Francisco Inchauste - RIA Mojo - Making your Flex application standout with a...
Francisco Inchauste - RIA Mojo - Making your Flex application standout with a...360|Conferences
 

More from 360|Conferences (20)

InsideMobile Keynote
InsideMobile KeynoteInsideMobile Keynote
InsideMobile Keynote
 
Metaio Mobile Augmented Reality
Metaio Mobile Augmented RealityMetaio Mobile Augmented Reality
Metaio Mobile Augmented Reality
 
Web Os Hands On
Web Os Hands OnWeb Os Hands On
Web Os Hands On
 
Mobile Apps- Business Toolkit for the Manager
Mobile Apps- Business Toolkit for the ManagerMobile Apps- Business Toolkit for the Manager
Mobile Apps- Business Toolkit for the Manager
 
Making Real Money with Mobile Apps
Making Real Money with Mobile AppsMaking Real Money with Mobile Apps
Making Real Money with Mobile Apps
 
Unlocking Android
Unlocking AndroidUnlocking Android
Unlocking Android
 
Inside Mobile Widgets Publish
Inside Mobile Widgets PublishInside Mobile Widgets Publish
Inside Mobile Widgets Publish
 
You Know WebOS
You Know WebOSYou Know WebOS
You Know WebOS
 
Ignite Denver 4 Master Deck
Ignite Denver 4 Master DeckIgnite Denver 4 Master Deck
Ignite Denver 4 Master Deck
 
Oğuz Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...
Oğuz	Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...Oğuz	Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...
Oğuz Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...
 
Tyler Wright - Undo History with Flight
Tyler Wright - Undo History with FlightTyler Wright - Undo History with Flight
Tyler Wright - Undo History with Flight
 
Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!
Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!
Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!
 
Erik Loehfelm - Experience Design with Flash Catalyst and Flex Gumbo
Erik Loehfelm - Experience Design with Flash Catalyst and Flex GumboErik Loehfelm - Experience Design with Flash Catalyst and Flex Gumbo
Erik Loehfelm - Experience Design with Flash Catalyst and Flex Gumbo
 
Giorgio Natilli - Blaze DS Connectivity Framework
Giorgio Natilli - Blaze DS Connectivity FrameworkGiorgio Natilli - Blaze DS Connectivity Framework
Giorgio Natilli - Blaze DS Connectivity Framework
 
Douglas Knudsen - Great Mash Up
Douglas Knudsen - Great Mash UpDouglas Knudsen - Great Mash Up
Douglas Knudsen - Great Mash Up
 
Wes Leonardo - Putting AIR into your Application
Wes Leonardo - Putting AIR into your ApplicationWes Leonardo - Putting AIR into your Application
Wes Leonardo - Putting AIR into your Application
 
Samuel Asher Rivello - PureMVC Hands On Part 1
Samuel Asher Rivello - PureMVC Hands On Part 1Samuel Asher Rivello - PureMVC Hands On Part 1
Samuel Asher Rivello - PureMVC Hands On Part 1
 
Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2
 
Ben Elmore - Do You Speak Flex
Ben Elmore - Do You Speak FlexBen Elmore - Do You Speak Flex
Ben Elmore - Do You Speak Flex
 
Francisco Inchauste - RIA Mojo - Making your Flex application standout with a...
Francisco Inchauste - RIA Mojo - Making your Flex application standout with a...Francisco Inchauste - RIA Mojo - Making your Flex application standout with a...
Francisco Inchauste - RIA Mojo - Making your Flex application standout with a...
 

Recently uploaded

SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 

Recently uploaded (20)

SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 

Ryan Fishberg and Joan Lafferty - ItemsRenderers

  • 1. Custom ItemRenderers Replace with a graphic Ryan Frishberg and White Master 5.5” Tall & 4.3” Wide Joan Lafferty Flex 360 – May 19, 2009 Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 1
  • 2. Introduction and Resources  Additional Resources:  Alex’s Blog: http://blogs.adobe.com/ aharui  Peter Ent’s Blog: http:// weblogs.macromedia.com/pent  Spark Containers and ItemRenderers (Early Draft) :http://blogs.adobe.com/flexdoc/ pdf/sparkContainersAndRenderers.pdf ® Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 2
  • 3. Agenda  Types of ItemRenderers  Virtualization of ItemRenderers  Common Problems and Solutions  Editors, and Reusable itemRenderers.  Building for Performance  ItemRenderers in Flex 4 (Gumbo) ® Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 3
  • 4. itemRenderer  A list renders data, usually in a label  You can use item renderers to render the data however you want  itemRenderer is a property on List classes typed to take an IFactory. <mx:List itemRenderer=“MySuperSweetItemRenderer”> <mx:dataProvider> … </mx:dataProvider> </mx:List> ® Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 4
  • 5. Types of ItemRenderers  Two main types:  Custom Item Renderers  Drop-in Item Renderers (IDropInListItemRenderer)  Three ways to create them:  New ActionScript Class  New MXML Class  Inline ® Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 5
  • 6. Custom ItemRenderers  Most basic item renderer  What developers use most of the time  Your item renderer is specific to the data you want to display.  Item renderer implements IDataRenderer <?xml version=quot;1.0quot; encoding=quot;utf-8quot;?> <mx:VBox xmlns:mx=quot;http://www.adobe.com/2006/mxmlquot;> <mx:Label text=quot;{data.lastName + ', ' + data.firstName}quot; /> </mx:VBox> ® Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 6
  • 7. Three ways to create a custom item renderer  New ActionScript Class  New MXML Class  Inline ® Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 7
  • 8. Drop-in ItemRenderers  What most Flex framework components implement  Drop in item renderers implement IDropInListItemRenderer (a.k.a. – ISchemaLessListItemRenderer)  Doesn’t just give you the data property, but it gives you the listData  Why do you need this? How to create an item renderer for multiple DataGrid columns?  You can “drop in” the item render, and it’ll just display the data—no matter what the data is ® Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 8
  • 9. Reusable Renderers  Most itemRenderers are written to associate a renderer with a column. <mx:Label text=“{data.firstName}” fontStyle=“italic”/>  To make an itemRenderer reusable, do not associate it with a column.  Use the listData property on your itemRenderer to determine what data you are representing. ® Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 9
  • 10. Reusable Renderers: Using listData  To use listData, your itemRenderer must implement IDropInListItemRenderer.  Components like CheckBox, Button, NumericStepper, Text and DateField already implement IDropInListItemRenderer.  Containers do not implement IDropInListItemRenderer. ® Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 10
  • 11. Sizing an item renderer  The explicit width of an itemRender is always the size of its container (or the column size in a datagrid)  The height of an itemRender is always rowHeight unless variableRowHeight = true (false by default)  By default, the width of a List is 200 pixels and the number of rows displayed is 7.  Reverse this for horizontal lists ® Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 11
  • 12. Column 1 Column 2 Column 3 Column 4 Column 5 Column 6 • Virtualization/Renderer 1-3 • Cell 1-4 Cell 1-1 • Cell 1-2 • Cell Recycling • Cell 1-5 • Cell 1-6 • Cell 2-1 • Cell 2-2 • Cell 2-3 • Cell 2-4 • Cell 2-5 • Cell 2-6 • Cell 3-1 • Cell 3-2 • Cell 3-3 • Cell 3-4 • Cell 3-5 • Cell 3-6 • Cell 4-1 • Cell 4-2 • Cell 4-3 • Cell 4-4 • Cell 4-5 • Cell 4-6 • Cell 5-1 • Cell 5-2 • Cell 5-3 • Cell 5-4 • Cell 5-5 • Cell 5-6 • Cell 6-1 • Cell 6-2 • Cell 6-3 • Cell 6-4 • Cell 6-5 • Cell 6-6 • Cell 7-1 • Cell 7-2 • Cell 7-3 • Cell 7-4 • Cell 7-5 • Cell 7-6 ® Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 12
  • 13. Renderers as Editors  Setting a custom itemRenderer like a CheckBox or DateField does not mean your data is saved.  List component should be editable.  Set rendererIsEditor=true.  Set editorDataField if the default property of your renderer is not “text”. ® Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 13
  • 14. Example: Slider as a Renderer and Editor  Slider does not implement IDataRenderer  Set editable=true, itemRenderer=“MySlider”, rendererIsEditor=“true” editorDataField=“value” <mx:DataGridColumn dataField=quot;ratingquot; headerText=quot;Rating (1 to 10)quot; itemRenderer=quot;MySliderquot; rendererIsEditor=quot;truequot; editorDataField=quot;valuequot;> ® Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 14
  • 15. Performance  We are smart about creating itemRenderers, but there are still lots of item renderers on screen in a 20x20 datagrid.  Item renderers need to be performant because there are so many of them. ® Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 15
  • 16. Performance: Tips for Speed  Layout’s often expensive and unnecessary for item renderers  Instead, base your renderers off of UIComponent and layout the items explicitly yourself  Developing your item renderers in MXML can be more expensive. For example, you probably don’t need to use data-binding.  Instead just use ActionScript – you know when the data is changing (data setter gets called), so there’s really no need for binding ® Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 16
  • 17. ItemRenderers in Gumbo  DataGroup is the basic, skinless component used to render data on screen.  SkinnableDataContainer is the skinnable version of DataGroup.  List extends SkinnableDataContainer and adds selection, keyboard handling, and a few other things. ® Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 17
  • 18. ItemRenderers in Gumbo  itemRendererFunctions make it easy to deal with heterogenous data items  Data containers support both Data Items and Visual Elements  No more IDropInListItemRenderer – those properties are pushed down to the item renderer directly now  Item renderers are in charge of all aspects of it’s visuals, which means it must draw highlighting for hover and selection  Support for differently sized item renderers is much improved—new typicalItem property. ® Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 18
  • 19. Resources  Ryan’s Blog: http://frishy.blogspot.com/  Joan’s Blog: http://butterfliesandbugs.wordpress.com ® Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 19
  • 20. ® Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 20