How to Reference What Was Clicked in a TileList using an ItemRenderer

Hi,
I've got a Tilelist and I'm using an ItemRenderer, which is a Button.
I don't understand how to reference what was clicked. So, if the first tile (which is the first Obect) is clicked, how do I know that that particular one was clicked.
<mx:TileList 
    id="myTL"
    dataProvider="{myAC}"
    width="400"
        height="400"
        columnCount="2"
        rowCount="2" />
<mx:ArrayCollection id="myAC">
    <mx:Array>
    <mx:Object id="first" label="1" />
    <mx:Object label="2" />
    <mx:Object label="3" />
    <mx:Object label="4" />
    </mx:Array>
</mx:ArrayCollection>
ItemRenderer:
<mx:Button xmlns:mx="http://www.adobe.com/2006/mxml"
click="Alert.show( 'This was Clicked')">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
]]>
</mx:Script>
</mx:Button>
Thank you.
-Laxmidi

Hi Laxmidi,
Using the itemClick event you can acheive this using the event Object. Check the sample code below:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application 
xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
import mx.events.ListEvent; 
import mx.controls.List; 
import mx.controls.Alert; 
import mx.events.ItemClickEvent; 
private function onItemClick(event:ListEvent):void
var strAlert:String = "Item Row Index Clicked : " + event.rowIndex + "\n";strAlert +=
"Item Column Index Clicked : " + event.columnIndex + "\n";Alert.show(strAlert);
]]>
</mx:Script>
<mx:TileList id="myTL" dataProvider="{myAC}" itemClick="onItemClick(event)" width="400" height="400" columnCount="2" rowCount="2">
<mx:itemRenderer>
<mx:Component>
<mx:Button xmlns:mx="http://www.adobe.com/2006/mxml" click="Alert.show( 'This was Clicked')">
<mx:Script>
<![CDATA[
import mx.controls.Alert;]]>
</mx:Script>
</mx:Button>
</mx:Component>
</mx:itemRenderer>
</mx:TileList>
<mx:ArrayCollection id="myAC">
<mx:Array>
<mx:Object id="first" label="1" />
<mx:Object label="2" />
<mx:Object label="3" />
 <mx:Object label="4" />
 </mx:Array>
 </mx:ArrayCollection>
 </mx:Application>
You can also try this by writing the Click event on the Button in the TileList itemRenderer as well where you can access easily the data of the itemClicked easily using the data Object.
Thanks,
Bhasker

Similar Messages

  • How to get rid of "click to activate and use this control"

    Hi,
    Any idea how to get rid of "click to activate and use this control".
    I don't want user to click to start working with the form.
    We are using IE6, forms9i and 10g application server.
    Thanks in advance.
    Kumar

    I got the solution...
    Metalink - Note:357545.1
    Kumar

  • How to get what was typed on a window which is inside another window

    Hey guys!
    I'm having a problem, i have created a program and when you click on a certain button a small window appears which was created from a class that i named Window...anyway this small window asks for a name, but somehow i can't send what was written in that window to the program that contains the main window...
    i've tried creating a method in the class Window, which is called public String returnName(){ return, name;} but this doesn't return anything.
    i hope you guys understand what i'm trying to say, if you do, any ideas of how i could do this???!!
    -O.D.

    this is the class Name1Window:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.*;
    import javax.swing.JTextField;
    public class Name1Window extends Frame implements ActionListener, WindowListener
         Label name;
         TextField txName;
         Button ok;
         Panel Pnl, PnlName, PnlOk;
         private String n;
         private String ln;
         public Name1Window()
              n= "";
              ln="";
              setSize(200,110);
              setTitle("Search");
              Pnl= new Panel();
              Pnl.setLayout(new GridLayout(2,1));
              PnlName= new Panel();
              PnlName.setLayout(new GridLayout(2,2));
              PnlOk=new Panel();
              PnlOk.setLayout(new GridLayout(1,1));
              name= new Label("Name");
              txName= new TextField(10);
              ok= new Button("OK");
              PnlName.add(name);
              PnlName.add(txName);
              PnlOk.add(ok);
              Pnl.setBackground(new Color(161, 187, 241));
              Pnl.add(PnlName);
              Pnl.add(PnlOk);
              add(Pnl);
              ok.addActionListener(this);
              addWindowListener(this);
         public void actionPerformed(ActionEvent e)
          {//If the user clicks ok:
               if(e.getSource()==ok)
                    String n1, ap1;
                   n1= txName.getText();
                   //calls the method save name and sends whatever was typed in txName:
                   saveName(n1);
                    dispose();
         public void saveName(String n2)
              this.n= n2;
              //If you write a System.out.println(n) it WILL print what was typed!!
               public String returnName()
              return n;//It's gonna return a " "
               public void windowClosing(WindowEvent e)
               //It exits the small window; Name1Window
               dispose();
                public void windowOpened(WindowEvent e){}
          public void windowClosed(WindowEvent e){}
          public void windowActivated(WindowEvent e){}
          public void windowDeactivated(WindowEvent e){}
          public void windowIconified(WindowEvent e){}
          public void windowDeiconified(WindowEvent e){}
    }

  • How to tell what was the latest patch installed on VMware ESX Server 3i, 3.5.0, 207095

    Hello Guys,
    I have been running an old server that was installed as a test system on a DELL workstation - Optiplex GX620 (32 bit).
    During the installation I had to confirgure the file: /usr/lib/vmware/installer/Core/TargetFilter.py to change the following line:
    "return interface.GetInterfaceType() == ScsiInterface.SCSI_IFACE_TYPE_IDE" to read:
    "return interface.GetInterfaceType() == ScsiInterface.SCSI_IFACE_TYPE_ISCSI" this made it worked and I have been using it for 3 years now. However, at this time I was hoping to update it with the latest patches and updates and I cannot figure out if I have ESXi or just ESX, nor what was my last update and what is required next.
    I have used this command to get the following output:
    # vmware -v
    VMware ESX Server 3i 3.5.0 build-207095
    ... I believe the 3i indicates that I have an ESXi 3.5.0 but is build-207095 the same buid as ESXi 3.5.0 Update 5?
    If not, how do I go about updating it? What is the KB # I should download?
    I can manage it using vSphere Client 5.5 and I can SSH into it using Putty.
    Note: When I run... "# esxupdate --bundle=ESXe350-201302401-I-SG.zip update" from within the folder where its at in the datastore, nothing happens... just a new line is scrolled.
    Also...
    # esxupdate query
    <?xml version="1.0"?>
    <query-response>
      <installed-packages>
        <package ID="ESX-207095">
          <name>firmware</name>
          <version>3.5.0</version>
          <rel>207095</rel>
        </package>
        <package ID="ESX-CLIENT-204907">
          <name>viclient</name>
          <version>2.5.0</version>
          <rel>204907</rel>
        </package>
        <package ID="ESX-TOOLS-207095">
          <name>tools</name>
          <version>3.5.0</version>
          <rel>207095</rel>
        </package>
      </installed-packages>
    </query-response>
    /vmfs/volumes/525300ce-5ff6ad3d-e2ed-0014222aedb7/Patches/ESXe350-201302401-O-SG #
    ... is there any further update for this system? I believe so as the Heartbleed patch etc. was not around when I was installing this server back in 2010.

    Hello Richardson Porto,
    I wanted to tell you that I appreciate the help so far.
    Also wanted to point out to you, that the KB indicated above is older than Update 5, which from your instructions is what I have installed. That KB is for U2.
    Now, the document definitely has step by step instructions on installing, querying etc. But my problem is ... NOT ALL COMMANDS WORK FOR ME!
    This is why I am here because all the instructions I have been reading does not work with my flavor of ESX 3.5.0, 207095... WHY? It has me stumped.
    For example, here are some commands the doc asked me to do and they failed: (Note that I had to unzip the folder on my windows box and upload it to /tmp using vSphere Client)
    /tmp # ls
    ESX350-201302402-BG      ESX350-201302402-BG.zip  vmhsdaemon-0
    /tmp # unzip ESX350-201302402-BG.zip
    -ash: unzip: not found                                                                                          -----------------------THIS COMMAND WAS NOT FOUND ?
    /tmp # cd ESX350-201302402-BG
    /tmp/ESX350-201302402-BG # esxupdate info
    Invalid command info                                                                                          -----------------------THIS COMMAND WAS INVALID ?
    /tmp/ESX350-201302402-BG # esxupdate update                                       -----------------------NOTHING HAPPENED HERE ?
    /tmp/ESX350-201302402-BG # ls -lh
    -rw-------    1 root     root       321.3k Dec 13 15:24 VMware-esx-scripts-3.5.0-988599.i386.rpm
    -rw-------    1 root     root         1.6k Dec 13 15:24 contents.xml
    -rw-------    1 root     root          701 Dec 13 15:24 contents.xml.sig
    -rw-------    1 root     root         1.4k Dec 13 15:24 descriptor.xml
    drwxr-xr-x    1 root     root          512 Dec 13 15:24 headers
    /tmp/ESX350-201302402-BG #
    NOTE: All these commands were run sequentially and I just copied and paste it from my SSH Client (PuTTy.exe)
    Is there a toolkit I need to install to have these commands or what really am I missing here? Host is in Maintenance Mode and the 1 VM that's on it is off!
    I am going to start a new discussion with this NEW ISSUE, since the Heading of this DISCUSSION has already been SOLVED! Thanks again!

  • How to view what was returned in wwsec_api.person_info

    How would someone go about viewing what was returned in wwsec_api.person_info, I understand it returns a record but I'm not sure what the columns are other than a few that I figured out such as first_name, last_name.

    Andrew,
    This information is stored in the Oracle Internet Directory (OID). The PDK-June (available very soon) contains 2 sample portlets accessing user information from the OID, such as first name, last name, or email address.
    Note, that your portal version must be 9.0.2.6, or higher to get these portlets to work.
    The is_runnable functionality on the Java side is implemented in the form of security managers.
    Hope this helps,
    Peter

  • Identify What was Clicked

    I have a click event listener on a group component. I'm trying to figure out if a label was clicked or anywhere else in the group was clicked. The event.currentTarget is just returning the group in all instances.
    I originally had a click event set on the label and a click event on the group, but I end up with two events. Since the click event on the label is designed to remove the Group from display, remove event listeners, etc., the second click even then throws an error, because the Group no longer exists.
    The code below should give you a good idea as to what I am trying to do. Currently the groupClick() function will throw an error. I typed in in this way to explain what I am trying to accomplish.
    <?xml version="1.0" encoding="utf-8"?>
    <!-- Specify the root tag and namespace. -->
    <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:mx="library://ns.adobe.com/flex/mx"
    height="200" width="200" click="groupClick(event)">
    <fx:Script>
      <![CDATA[
       import flash.events.MouseEvent;
       private function groupClick(event:MouseEvent):void {
                   // Do this if clicking anywhere that is NOT on the closeX label
                   this.parentDocument.openGroupList.selectedIndex = this.parentDocument.openGroupListAC.getItemIndex(this as Group);
                   this.parentDocument.openGroupListClick();
                   // Do this if clicking on the closeX label
                   this.removeEventListener(MouseEvent.MOUSE_MOVE, this.parentDocument.mouseMoveHandler);
                   this.parentDocument.openGroupListAC.removeItemAt(this.parentDocument.openGroupListAC.getI temIndex(this as Group));  
       ]]>
      </fx:Script>
    <s:Label top="7" right="7" text="X" id="closeX" fontSize="14" color="0xffffff" buttonMode="true" useHandCursor="true"/>
    </s:Group>
    I could use:
    if (String(event.target).indexOf('closeX') > 0) {
                   this.removeEventListener(MouseEvent.MOUSE_MOVE, this.parentDocument.mouseMoveHandler);
                   this.parentDocument.openGroupListAC.removeItemAt(this.parentDocument.openGroupListAC.getI temIndex(this as Group));
    else { ....
    That works, but string comparisons seem rather inefficient. If someone has a better way, I'd like to know!!
    Message was edited by: JFillman

    Event.currentTarget is the object you called addEventListener on.
    Event.target is the original dispatcher of the event.  For bubbling events, it can be some child object, but some objects like Label may not be mouse targets.
    -Alex

  • I have a charge of $33.78 on my account and I have not idea how to view what was purchased for that amount...can anyone help me find out?

    Shouldn't there be a way to view what has been purchased and when on your account!!!  Or at the very least I should be able to speak to SOMEBODY about my account!

    You have always been able to view your purchase history.  Go to your account in the itunes store. The drop down menu will show when you click the arrow next to your user name.

  • How to audit what was done in AD?

    if a user modifies an object in AD how do you audit that?  We had some computer accounts deleted and no one will admit to it so I want to know in the future how to prove who did this.
    mqh7

    Hi,
    Here is a more detailed article below for you:
    AD DS Auditing Step-by-Step Guide
    http://technet.microsoft.com/en-us/library/cc731607(v=WS.10).aspx
    Regards,
    Amy

  • How to change what search engine the adress bar uses when typing in a search to something that isn't Google

    I currently left all Google services I used, Gmail, Chrome, etc.. because of the recent selling info to the gov and what not and although it may or may not be true I am being safe and switched to Firefox and a different email provider. Anyway so far I like Firefox I am using DuckDuckGo as my current default search and I would like to use it as my search engine when I type in a search in the address bar, by default it's Google how do I change it to a search provider I want to like DuckDuckGo?

    Hello,
    If you have installed DuckDuckGo on Firefox, you can follow these steps:
    # Type '''about:config''' in the address bar.
    # A warning appears, click "I'll be careful, I promise!"
    # Type '''browser.search.defaultEngine''' in the search box at the top of the page.
    # Double-click the item that appears.
    # Set the value to '''DuckDuckGo''' or whatever search engine that you would like to use (case sensitive I think).
    (I have attached a screenshot).

  • VERY basic - how to decide what type of architectu​re to use?

    Forgive me if I'm breaking any forum rules with this post - I'm very new to this.
    I'm trying to write a Labview program to perform a functional test on an electronic product.  The test is fairly sequential - plug in the unit, apply a certain voltage, step up the voltage until the unit turns on, then turn on an electronic load, measure the load voltage, then step up the input voltage again, etc.  The power supply and electronic load that I'm using both have Labview drivers. 
    I'm brand new to Labview, and I have no resources in my company to help me out.  I have taken the Core 1 and 2 training class.  The problem is, I'm not really sure how to start.  Would this be a producer/consumer architecture?  A QSM?  I've been scouring these forums the past couple of days, but most of the discussions are advanced.  I don't understand all the acronyms.  A lot of the replies here assume you have some knowledge of Labview, and I don't.  Part of the problem is that I don't even know enough to ask a specific question, and that's why this post is so vague.
    I'm a competent PLC/HMI programmer but don't have any experience in other languages.
    I also want to be able to use variables for my limits so that I can easily change the pass/fail limits.  (For instance, I want the voltage and current pass/fail limits to be configurable from a "maintenance" screen on the Labview interface, but I don't know how to create multiple screens or password protect them).

    I have stated my opinion reagarding the QSM* design pattern previously and will not repeat it again here aside from "I avoid them like the plague".
    Architecture questions are good question but hardly "very basic" although some architectures can be very basic.
    I would recomend a State Machine that uses Action Engines to control your widgets.
    in this thread AND this thread I wrote extensively and included design documents for apps I developed. I invite you to look those over and start developing your own design that meets your needs.
    Ben
    * It is imposible to fully document all of the possible transitions of a QSM and since my application all are fully documented, the QSM is not an option. A Queued Message Handler on the other hand is different.
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How to tell what fonts are missing in a Photosohp CS5 document?

    Hello!  I have received some work from a graphic designer.  I need to modify some of the text in the document.  When I open the document I get an error message:
    Some text layers might need to be updated before they can be used for vector based output.  Do you want to update these layers now?  [Update] [No]
    If I click [Update] it replaces the font with Myriad Pro.  If I click [No] the text looks the way the designer intended, but I have the exclamation mark-triangle symbol over the layer with the text.  If I try to edit the text I get another warning:
    Editing or rendering the text layer "Text Layer" will cause its layout to change.  Continue?  [Cancel]  [OK]
    The same behavior described above occurs.  If I click [Cancel] I obviously can't edit the text.  If I click [OK] it changes the font to Myriad Pro.
    I would like to determine what font the layer is using.  I could swear that previous versions of Photoshop would tell me what fonts were missing when I opened a document.  I can't use the text tool to select the text without it changing the font.  Other posts have mentioned using the text tool to look at the text drop-down to find a greyed-out font which indicates the missing font.  I do not have that.  I only have perhaps 200 fonts installed.  Can anyone tell me how to determine what fonts a .PSD document is using?  I would prefer not to bug the graphic designer if possible.  Thanks much!
    ~ Dan

    Not sure why you are getting ""Font is present on the system but requires a layout change.", usually you do not get that instead the name of the font shows.
    We use extensis Universal Type Client, so the fonts load automatically upon opening files, and never really get missing fonts in Photoshop.
    Actually fontbook has auto font loading if you want to give that a try. Fontbook >> Preferences

  • How to identify what queries are embeded in workbook in bi 7?

    Hi all,
    How to identify what are all the queries are used in the workbook in Bi 7?
    can anyone help me on this!!
    Thanks
    pooja

    Hi,
    Please check the table RSRWORKBOOK. Enter the name of the work book, it will give you the GENUID of the query. Pass these values to table RSRREPDIR. You will get the names of the queries.
    - Jaimin

  • How to I undo what was done after clicking on a link from a spammed email?

    Hello...
    I am usually Never one to click on any suspicious emails, let alone links within the emails, but I recieved an email from my Uncle that looked slightly suspicious, but I let myself click on the link within it. It turned out to be a spammed email with a BS link from "msnbc" reharding jobs. What happened when I clicked that spammed link, and what can I do to undo what was done? I am terrified that I unintentionally installed something on my Mac Air through clicking on this link. What do I need to do to erase what was do, and how to I find out what was done? Thank you very much for your help. I greatly appreciate any advice.

    Without knowing what webpage the link opened and what you did after you opened it, it is impossible to be 100% certain of anything that may have resulted from that. An email itself cannot install anything. If the webpage did not result in any unusual activity, and you did not deliberately install or supply any personal information then you have no cause for concern.
    "Unusual activity" would include symptoms such as a webpage you cannot close or navigate away from, and that would be a mere nuisance that is easily solved. If Safari or the browser you used is behaving normally then rest easy.
    Most of these spam emails do nothing but bombard you with ads or attempt to install a browser "toolbar" that does the same. Malicious emails include phishing scams and most of them are laughable (but they are getting better). Others carry Windows malware that cannot affect your Mac.
    To edit your profile click on your name at the top of this page (where it says Welcome, saratee14), scroll down to the heading My Products, click edit, and on the page that follows select your version of OS X from the dropdown menu. The only reason I questioned this was to confirm you have been updating OS X.

  • In previous version of Itunes I could view what was phyically on my nano by clicking on "on this device" this no longer available. How do i view what is on my nano?

    In previous itunes software I could physically see what was on my nano my clicking on "whats on this device" but that is no longer available. It was their on the summary page I believe. How do see what is on this device and then I could edit old podcasts?

    I don't know how you received an upgrade for iTunes.  You make it sound like it was sent to you.  At most your computer will tell you of a new version and you tell it to download it and install it.  However, a computer will not do this for a version which is incompatible.  iTunes 10.7 came out a few weeks ago but your computer would not notify you and even if it did, 10.7 would refuse to install on your computer.  So this part isn't making a lot of sense.
    Two ways to get the 'newer version' message.  One is to open your library on a computer running a newer version, and then try to open it with an older version.  Usually happens when the library is on an external and used with multiple computers.  The second way is if you have multiple versions of itunes installed on your computer.
    The newest (and likely the last) iTunes for OSX 10.5.8 is iTunes 10.6.3 which has been out for quite a while. 
    iTunes 10.6.3.25 - http://support.apple.com/kb/DL1575

  • After upgrading to the newer version of Firefox, a lose all my tabs every time I close. I've done what was suggested in the FAQx, but I still lose them all when I close. I want to fix this. How?

    I want to know how to have my tabs save when I close Firefox. I did what was suggested in the FAQs section, but all my tabs disappear every time I close Firefox, whether using the "exit" command, or the "X" button. This was the very reason I never updated to the new version previously, but had hoped that the problem had been addressed and upgraded, now I'm stuck with having to reopen every tab every time I open Firefox. Please tell me there is a way to correct this. And, I'm not fluent in technospeak, so I need simple, basic instructions. Thank you. Mark

    Hi,
    Pressing '''Alt''' + '''T''' on the keyboard brings up the '''Tools''' menu.
    To see the full menu bar temporarily, press '''Alt''' or '''F10'''.
    To make the menu bar permanently visible, right-click on the '''+''' after the last tab and enable (tick) '''Menu Bar''' or press '''Alt''' + '''V''' > '''Toolbars''' > '''Menu Bar'''.
    [https://support.mozilla.com/en-US/kb/Options%20window All about Tools > Options]
    [https://support.mozilla.com/en-US/kb/Keyboard%20shortcuts Keyboard Shortcuts]
    Useful links:
    [http://kb.mozillazine.org/About:config Going beyond Tools > Options - about:config]
    [http://kb.mozillazine.org/About:config_entries about:config Entries]
    [https://support.mozilla.com/en-US/kb/Page%20Info%20window Page Info] Tools (Alt + T) > Page Info, Right-click > View Page Info
    [https://support.mozilla.com/en-US/kb/Viewing%20video%20in%20Firefox%20without%20a%20plugin Viewing Video without Plugins]
    [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder & Files]
    [https://developer.mozilla.org/en/Command_Line_Options#Browser Firefox Commands]
    [https://support.mozilla.com/en-US/kb/Basic%20Troubleshooting Basic Troubleshooting]
    [https://support.mozilla.com/en-US/kb/common-questions-after-upgrading-firefox-36 After Upgrading]
    [https://support.mozilla.com/en-US/kb/Safe%20Mode Safe Mode]
    [http://kb.mozillazine.org/Problematic_extensions Problematic Extensions]
    [https://support.mozilla.com/en-US/kb/Troubleshooting%20extensions%20and%20themes Troubleshooting Extensions and Themes]
    [https://support.mozilla.com/en-US/kb/Troubleshooting%20plugins Troubleshooting Plugins]
    [http://kb.mozillazine.org/Testing_plugins Testing Plugins]

Maybe you are looking for

  • LR export to Photoshop - won't send as a PSD!

    When I select a CR2 file and choose to "edit in adobe photoshop CS3..." the image opens in CS3 (with no dialogue box to ask if I want to edit a copy of original, etc.). It won't open as a JPEG or PSD file. The filename on the opened PS file ends in .

  • IChat Theater doesn't display properly

    Everytime I try to play a quicktime movie on iChat Theater the display screen of the movie is cut. Sometime's the screen will be only showing half of the movie and other times it shows 3/4 of it. Any suggestions?? It just recently started doing this.

  • Problem On Editing a Smartform in PDF with Chinese

    Hello, we are using SRM and in  a specific transaction we are generating a SAP message wich is editing a form for the PO. When we want to edit it on SRM in chinese we have problem with a lot of  ### ans everything wich doesn't mean anything. To gener

  • Unable to connect forms6i with oracle 10g

    hi: i am facing a problem to connect forms6i with oracle 10.2 g. i already make a entry in TNSNAMES.ora file in forms folder. while i am trying to connect it dispaly "ORA-12203: TNS:unable to conect to destination" error. please help. Thanks in advan

  • Unable to Open Inbox sub folders of other users Using OWA

    I have a mailbox in which I have granted the permission to access another mailbox's items. The exact command I used is: Add-MailboxPermission –identity <Identity of mailbox to be accessed> –User domain\groupname –AccessRights ReadPermission –Inherita