XML
  Home arrow XML arrow Flex List Controls
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
XML

Flex List Controls
By: Keith Lee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 2
    2009-07-07


    Table of Contents:
  • Flex List Controls
  • Creating an XML List
  • Adding an Item Renderer
  • A Reusable Item Renderer

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Flex List Controls
    ( Page 1 of 4 )

    The List Control is a fundamental control for use in Flex. It can be used in many different situations and can display all types of data. Anything from images to plain text and even basic HTML (supported by Flex) can be used. Keep reading for an introduction to this versatile control.

    Creating a Basic List with XML Data

    Whether you're developing large scale applications or just quick tools, you'll more than likely need to use a list when developing your applications. In this article, I cover the creation of a basic List Control with data population via XMLList. In my next article we move into customizing the list control by adding our own itemRenderer.

    We start the creation of our List control with the following MXML:

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx=http://www.adobe.com/2006/mxml 
    layout="absolute"> <mx:Panel label="My List"> <mx:List> </mx:Panel> </mx:Application>

    Our ever-present <?xml> and <mx:Application> tags will wrap the entire application. The <mx:Panel> tag supplies our application with a nice container for our list. The 'title' attribute will become the title of the panel. Last but not least, we have the all-important <mx:List> tag. You should be able to copy and paste this code into Flex Builder and compile and run it. Here is our first stab at a list control:

    Our List control is rather plain at this point. This is mainly because we don't have any data in this list. The way in which Flex will allow us to add data to this list is through something called the data provider. The data provider is used for all data aware controls (list, datagrids, trees, menu's, etc).

    We have a few different options of what type of data provider we can use. A very common type is the XMLList or XML. In some applications, the server may be providing data that may be better typed with an array. Arrays are also valid data providers. For this discussion, we wont get into too much detail about the data provider. We will use an XML List.



     
     
    >>> More XML Articles          >>> More By Keith Lee
     

       

    XML ARTICLES

    - Flex Array Collection Sort and Filtering
    - The Flex Tree Control
    - Flex List Controls
    - Working with Flex and Datagrids
    - How to Set Up Podcasting and Vodcasting
    - Creating an RSS Reader Application
    - Building an RSS File
    - An Introduction to XUL Part 6
    - An Introduction to XUL Part 5
    - An Introduction to XUL Part 4
    - An Introduction to XUL Part 3
    - An Introduction to XUL Part 2
    - An Introduction to XUL Part 1
    - XML Matters: Practical XML Data Design and M...
    - Practical XML Data Design and Manipulation f...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    Stay green...Green IT