How do I access listData for a DataGrid itemRenderer?

I want to make simple reusable components in .mxml to use in
my dataGrid classes. I do NOT want to specify the data field
because I might use the same renderer in multiple columns of the
same Grid (for example a check box renderer) and I do not want to
make several identical components whose only difference is the
value they draw from "data". To do this, I need access to
"listData". Specifically listData.dataField. According to the docs
I need to implement mx.controls.listClasses.IDropInListRenderer. I
have tried the following in my mxml code:
<mx:Component id="reusableEditor">
<mx:HBox
implements="mx.controls.dataGridClasses.DataGridItemRenderer">
import mx.controls.dataGridClasses
.. contents and logic for displaying
data[listData.dataField]..
</mx:HBox>
</mx:Component>
I get an unhelpful error in Flex Builder saying that "An
internal build error has occurred" and only now guess that it comes
from the line
"implements="mx.controls.dataGridClasses.DataGridItemRenderer""
(when I remove that line, things work fine). I have not found
anywhere to check if I am implementing this correctly because there
is no example to work from that does what I want to do--even though
I use DataGrid 100s of times more often than any other list class!
The TreeRenderer example later in the docs is the only code
addressing this issue but it involves an AS Class that does not
extend (as far as I can tell) a Container like HBox and implements
no interface.
To put the question simply, how can I get access to
listData???

the <mx:DataGridItemRenderer> tag was not the solution
either...
I finally figured out what the ambiguous compiler error
meant... I hadn't implemented the functions required for the
interface. Below is working code that either declared as an
internal component or an external .mxml file will display the value
of its column without explicitely defining what that value is.
Although this component is extremely simple, it was very
difficult to figure out how to implement from the docs... I hope
someone from Adobe takes note.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Script>
<![CDATA[
[Bindable]
public var dp:Array = [{num:2, bool:true}, {num:3,
bool:false}];
]]>
</mx:Script>
<!-- BrainlesslySimpleCheckBoxRenderer class -->
<mx:Component id="cbren3">
<mx:HBox horizontalAlign="center" verticalAlign="middle"
implements="mx.managers.IFocusManagerComponent,
mx.controls.listClasses.IDropInListItemRenderer">
<mx:Script>
<![CDATA[
import mx.controls.listClasses.BaseListData;
import mx.controls.dataGridClasses.DataGridListData;
private var _listData:DataGridListData;
[Bindable("dataChange")]
public function get listData():BaseListData {
return _listData;
public function set listData(value:BaseListData):void {
_listData = DataGridListData(value);
override public function drawFocus(focused:Boolean):void {
check.setFocus();
override protected function
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
super.updateDisplayList(unscaledWidth, unscaledHeight);
if (super.data) {
var dgListData:DataGridListData =
DataGridListData(listData);
//for some reason, setting check.selected here results in
buggy behavior
//check.selected = data[dgListData.dataField];
//defining a getter based on the "dataChange" event seems to
update the CheckBox value properly when
//clicked, rolledOut, sorted, etc...
//also, doing it this way circumvents those annoying "Data
binding will not be able to detect changes... blah blah"
[Bindable("dataChange")]
public function get val():Boolean {
return Boolean(data[_listData.dataField]);
]]>
</mx:Script>
<mx:Boolean id="blorch" />
<mx:CheckBox id="check" selected="{val}"
change="blorch=check.selected"
updateComplete="blorch=check.selected" />
</mx:HBox>
</mx:Component>
<mx:DataGrid id="test" editable="true"
dataProvider="{dp}">
<mx:columns>
<mx:DataGridColumn dataField="num" headerText="num" />
<mx:DataGridColumn dataField="bool" headerText="Sent"
itemRenderer="{cbren3}" rendererIsEditor="true"
editorDataField="blorch">
</mx:DataGridColumn>
<mx:DataGridColumn dataField="num" headerText="num"
editable="true" />
</mx:columns>
</mx:DataGrid>
</mx:Application>
if anyone has suggestions or feedback, please let me know...
I am still trying to figure out the best way to do this.

Similar Messages

  • How do i access word for mac on my macbook air?

    how do i access word for mac on my macbook air?

    Purchase it.  Here's one link to an Amazon site to buy one of the many Office configurations:
    http://www.amazon.com/Office-Mac-Home-Student-2011/dp/B003YCOJA8/ref=sr_1_3?s=so ftware&ie=UTF8&qid=1349217216&sr=1-3&keywords=office+for+mac
    You would receive Office on a CD, and need a disk drive for your MacBook Air to access so you could download the software.

  • I have FaceTime on my macbook pro but want to add it to my Mac pro.  Since I've already purchased the app, it won't allow me to purchase it again.  Can I use the app for both computers?  How can I access FaceTime for this computer v. 10.6.8?

    I have FaceTime on my Macbook Pro but want to add it to my Mac Pro v. 10.6.8.  Since I've previously purchased it in the app store, it won't allow me to purchase it again.  Can I use the same app for both of my computers?  If so, how do I access the app to download it?

    If you upgrade to Lion it comes bundeled with it!
    To get it on your Mac Pro just copy the aplication from the aplication folder on your MacBook.  You can do this via a thumb drive or over a local network connection.

  • How do I access iwork for ios docs stored in icloud on all ios devices

    How do I access ios-iwork icloud docs on all my ios devices?
    ios 7.1.2 on all ios devices. Have zero access to my icloud docs on mobile devices since ios 7.0.

    Make sure you are signed in to iCloud using the same AppleID as used for the files.
    Settings app > iCloud > Documents&Data. Make sure each of the iWorks apps is turned on.
    Go to the settings for each app and make sure (Use iCloud)
    For 2 or 3 above, if they are already on, turn them off and then back on.

  • How to Create ACCESS key for different users

    How to create or generate an ACCESS KEY which is required to make changes to the table V_FAGL_ACTIVEC (For New General ledger) for IDES 6.0. Is it created in table DEVACCESS, if so where or is it created in SU01 where user id's are maintained. Since I am working on IDES, I thought probably we can create it for each user in SU01, but dont know the steps to do it. Please help me. It is urgent.

    Hi
    ACCESS KEY - First of all its provided by SAP. You can get the key from http://service.sap.com -> SAP SUPPORT PORTAL -> Keys & Requests -> SCCR Keys -> Registration. Here u can register a DEVELOPER or an OBJECT, by this time SAP will give the ACCESS KEYS.
    **Note : To access http://service.sap.com u should have S number login or like that.
    Only after obtaining that ACCESS KEY, SAP will allow the DEVELOPER to create some objects or change or modify Delivered objects.
    Why ACCESS KEY - For creating or accessing any object some one should be responsible. Suppose, any issue arises with an object then can easily track the details who has created or modified.
    Reward with suitable points

  • I have bought Adobe DW CS4 on CD and would like this version for download to my new laptop. How can I access it for no extra charge?

    I have bought Adobe DW CS4 (a few years ago) on CD and would like this version for download to my new laptop. How can I access it?

    cecilia linhart wrote:
    would like this version for download to my new laptop.
    Why are you "downloading" if you have the CD?
    Check if CS4 will run onyour new machine
    System requirements | CS4, Point Products

  • How to change access path for 'where' clause by using HINTS?

    I searched a loooot of posts and haven't found a solution for my case. I don't even know whether it is possible or not. Is it possible to change the sequence of Oracle "Predicate Information"?
    Here is my SQL and Oracle's execution plan.
      SELECT Max(logId) AS logId FROM online_users_t
      WHERE online_users_date >= to_date('2011-09-19 10:00:00') - 3.2 AND online_users_date <= to_date('2011-09-19 10:00:00') AND online_users_result in (1, -1)
      GROUP BY online_users_user
    | Id  | Operation                    | Name               | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |                    | 24800 |   629K|  1336   (1)| 00:00:17 |
    |   1 |  HASH GROUP BY               |                    | 24800 |   629K|  1336   (1)| 00:00:17 |
    |*  2 |   TABLE ACCESS BY INDEX ROWID| ONLINE_USERS_T     | 38833 |   985K|  1334   (1)| 00:00:17 |
    |*  3 |    INDEX RANGE SCAN          | ONLINE_USERS_T_IDX |   116K|       |   313   (1)| 00:00:04 |
    Predicate Information (identified by operation id):
       2 - filter("ONLINE_USERS_RESULT"=(-1) OR "ONLINE_USERS_RESULT"=1)
       3 - access("ONLINE_USERS_DATE">=TO_DATE(' 2011-09-16 05:12:00', 'syyyy-mm-dd
                  hh24:mi:ss') AND "ONLINE_USERS_DATE"<=TO_DATE(' 2011-09-19 10:00:00', 'syyyy-mm-dd
                  hh24:mi:ss'))I have 2 conditions in my 'where' clause, one is date range and the other is 'online_users_result in (1, -1)'. It seems that Oracle filter the table by using 'online_users_result in (1, -1)' first, then access it through date range.
    What I want to do is firstly filtering the table by using date range followed by other things. How can I do it?
    Any clue or help would be highly appreciated.
    Thanks in advance.

    It seems that Oracle filter the table by using 'online_users_result in (1, -1)' first, then access it through date range. No it's not.
    What I want to do is firstly filtering the table by using date range followed by other things. How can I do it?That's precisely what it's doing now.
    It is using the T_IDX index to quickly find all rows that satisfy the range predicate on the date column.
    And then filter those rows to only retrieve the ones that satisfy the other predicate (... in (1,-1)).

  • How to get Access key for ABAP Program development in HANA Studio

    Hi,
    I have got instance for ABAP on HANA development system.
    But while creating new program it is asking me for Access key, since I do not have user id pwd for service market place I couldnt able to create the access key.
    Can any one suggest the way to create ACCESS KEY??
    Thanks,
    Ram

    Dear Ram,
    it seems that you need to follow the chapter 6.1 in the documentation...:
    Kind regards, Stephan

  • My laptop has my home filmed videos in the pho library. When I open the library in iTunes the videos are not show. How can I access them for sharing?

    My laptop has a photo library with my pictures and home made video. I have changed the format of the videos to apple. When O open the library in iTunes for sharing I only get the photos and the videos are excluded from the list. How can I get them included for sharing?

    Here are Apple's instructions:
    If you are using iPhoto ’06 or earlier, you will need to follow these steps to tell iPhoto where the Library is now located:
    Hold down the Option key on the keyboard and open iPhoto. Keep the Option key held down until you are prompted to create or choose an iPhoto Library.
    Click Choose Library.
    Locate and select the iPhoto Library in its new location.
    (from http://support.apple.com/kb/HT1229 )
    Below (in the link below) is what you should see when holding down the option key and opening iPhoto. Keep holding down the option key until this dialogue comes up. You want to select the Choose Library button.
    http://appleclinic.wordpress.com/2008/04/06/change-default-dir-iphoto/

  • How to configure Accessibility support for JIniatiator 1.1.8.16

    Hai
    I want to give accessibility support of JInitiator1.1.8.16. I have installed JInitiator1.1.8.16 to access oracle forms. Basically I like to run Monkey.jar(Accessibility tool) on orcale form pages so that I can get all the events in the oracle form pages.
    For stand alone Java application and JRE plugins I can able to get the events using the Monkey.jar. But I cant get the events for the JInitiator1.1.8.16 using Monkey.jar. So please give me some notes so that i can get events for oracle form pages with JInitiator1.1.8.16 using Monkey.jar.Thanks in Advance
    Magesh Kumar
    Caravel Info Systems Pvt Ltd.,
    Bangalore,India

    This forum is meant for discussions about OTN content/site and services.
    Questions about Oracle products and technologies will NOT be answered in this forum. Please post your product or technology related questions in the appropriate product or technology forums, which are monitored by Oracle product managers.
    Product forums:
    http://forums.oracle.com/forums/index.jsp?cat=9
    Technology forums:
    http://forums.oracle.com/forums/index.jsp?cat=10

  • How do I access bios for my Satellite L45 - S4687?

    I can't seem find info on how to access my bios anywhere. If someone can help I'd greatly appreciate it!

    Satellite L45-S4687 
    Maybe this helps.
       BIOS Setup / BIOS settings -- access instructions
    -Jerry

  • How to retrieve access rights for an user/usergroup ?

    Hello everybody.
    I'm working on BO XI 3.1. And I have to develop with the .NET SDK package an application that retrieves the following data :
    - the access rights to WEBI application and properties for each user/user group.
    - the access rights to each folder and properties for each user/user group.
    etc
    The idea is to retrieve for an user/usergroup the access right on each property of WEBI application and softwares. and same thing for folders....
    I'm looking at the .NET SDK package contents but it takes me a lot of time, even too compared to my deadlines. So I'm looking for help.
    Does anyone have an idea about class of objects, properties and methods to use ?
    Thank you in advance for your help.

    Thanks for these samples.
    The list of user and usergroups is very interesting to audit CMC but my need is different : for example, I'm looking a method to retrieve the level access (full control, no access, ...) of an usergoup on each webi's property. The reason ? To know for example which usergroups have fullcontrol access on the right name "edit SQL" ?
    I think it's hard to retrieve but very interesting to audit CMC...

  • I have CS3 for Windows on my old laptop.  How can I access downloads for my new laptop?

    The original CD's are in storage and not accessible.

    If you are not seeing the version in "Your Downloads" in our online store, the best option is to contact our Customer Care teams - http://www.adobe.com/support/contact/

  • Win 8.1 domain workstation. Block all access, except for a fews users/groups and domain controller information/date.

    Hi!
    Win 8.1 pro, domain workstation. How Block all access, except for a fews users/groups and domain controller information/date.
    Nuance:
    From domain AD is locked Workstation Firewall "Domain profile" edit.
    Possible?
    cenubit

    Hi GirtsR,
    I am not sure the command to use the SID to accomplish what you want to achieve, if you only know the SID, you could take use Powershell to find the related information, more information, please check:
    Working with SIDs
    And a similar thread for reference:
    How to find user/group known only SID
    More reference: Default local groups.
    Best regards
    Michael Shao
    TechNet Community Support

  • How do I access technical support. There is something wrong with my program - it gvies and error message - can't open but will fix the problem the next time it opens.  Which it does not do.  I uninstalled and reinstalled the program, but the same error ap

    How do I access someone for technical support?  what telephone number can I use?

    Find the LR cache folder and delete it. Find the LR preview folder and delete it. Then try opening LR.

Maybe you are looking for

  • Sync/async wsdl not published

    Hello, I've successfully made a sync/async wsdl from an asynchronous java process. I was able to test it via web services test explorer and a self made java client, but I need to integrate its wsdl on a third party product (ws register) and I can't f

  • Content-type problems while using struts+tomcat+apache+mod_jk

    Hi! Could anyone tell me how to solve the following problem. Struts-application works under apache + mod_jk + tomcat 3.3.1. Operating system is Linux. It's impossible to me to make tomcat to send HTTP-answers in UTF-8. I was trying the following: 1.

  • How can I modify the logon screen on the portal

    Hi, We have designed some BI queries, when we open Query Designer and execute them (CTRL + R) an Internet Explorer open and ask us to log on this BI Portal. On this Portal login screen, I can only provide my user name and password. We would like the

  • HT1414 how to get back my contacts

    am just restore my iphone with laptop and get new version but am lost my contacts but i have no backup on itune and phone plz tell me how to get back my contacts plz plz help me sonebody its very important for me

  • Canon 5D Mark III, Lightroom4 tethered not working

    Canon 5D Mark III is not working in tethered mode with Lightroom 4. Any idea when this will be updated?