Capture click on element inside List itemRenderer

Hello!
I have a List that opens a window when an element is selected.
However, I also have a "delete" image in the upper-right corner of the itemRenderer componenet that when clicked should do something else.
How can I make it so that when user clicks on the image the click doesn't select the list element, and when the user click anywhere else, it defaults to selecting the element in the list.
Thank you!

Yeah, I did that right after posting and the problem was that the List select event dispatched on MouseDown NOT on click and I was listening for Click on the image which never happened as the MouseDown came first and opened another window.
Is there any easy way to setting the selection of elements in a list to be Click rather than MouseDown?
If not, I will just listen for MouseDown on the image.

Similar Messages

  • Unable to set Labelfield for child element  in List

    Hi All,
    Below is code I am trying to execute
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml" verticalGap="0" xmlns:local="*" height="500" creationComplete="init()" >
    <mx:Script>
    <![CDATA[
    private var arr:Array = [{ firstName: "Alex", children:{lastName: "Abc"}}] 
    private function init():void{list.dataProvider=arr;
    ]]>
    </mx:Script>
    <mx:List variableRowHeight="true" wordWrap="
    true" id="list" labelField="
    chidren.lastName" /></mx:Application>
    I basically want to access the children.lastName on my List. Please let me know how exactly can I do it.

A: Unable to set Labelfield for child element  in List

labelFunction is the best way to do this. The attached code also shows how to do it with an itemRenderer, though that would not be as efficient.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
  xmlns:mx="http://www.adobe.com/2006/mxml"
  layout="horizontal"
  creationComplete="init()" >
  <mx:Script>
    <![CDATA[
      private var arr:Array = [{ firstName: "Alex", children:{lastName: "Abc"}}]
      private function init():void{
        list1.dataProvider=arr;
        list2.dataProvider=arr;
      private function createLabels(item:Object):String{
        return item.children.lastName;
    ]]>
  </mx:Script>
  <mx:List variableRowHeight="true"
    wordWrap="true" id="list1">
    <mx:itemRenderer>
      <mx:Component>
        <mx:Label text="{data.children.lastName}"/>
      </mx:Component>
    </mx:itemRenderer>
  </mx:List>
  <mx:List variableRowHeight="true"
    wordWrap="true" id="list2"
    labelFunction="createLabels"/>
</mx:Application>
If this post answers your question or helps, please mark it as such. Thanks!
http://www.stardustsystems.com
Adobe Flex Development and Support Services

labelFunction is the best way to do this. The attached code also shows how to do it with an itemRenderer, though that would not be as efficient.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
  xmlns:mx="http://www.adobe.com/2006/mxml"
  layout="horizontal"
  creationComplete="init()" >
  <mx:Script>
    <![CDATA[
      private var arr:Array = [{ firstName: "Alex", children:{lastName: "Abc"}}]
      private function init():void{
        list1.dataProvider=arr;
        list2.dataProvider=arr;
      private function createLabels(item:Object):String{
        return item.children.lastName;
    ]]>
  </mx:Script>
  <mx:List variableRowHeight="true"
    wordWrap="true" id="list1">
    <mx:itemRenderer>
      <mx:Component>
        <mx:Label text="{data.children.lastName}"/>
      </mx:Component>
    </mx:itemRenderer>
  </mx:List>
  <mx:List variableRowHeight="true"
    wordWrap="true" id="list2"
    labelFunction="createLabels"/>
</mx:Application>
If this post answers your question or helps, please mark it as such. Thanks!
http://www.stardustsystems.com
Adobe Flex Development and Support Services

  • How to capture an Odata XML inside an ABAP program ?

    Hi Colleagues,
    I have a scenario where I need to capture the Odata XML inside an ABAP program.
    Problem Description:
    1. Log into U3F Client 100 system.
    2. Goto Transaction 'SPRO'.
    3. Click on 'SAP Reference IMG'.
    4. Select SAP Netweaver - Gateway - OData channel - Administration - Maintain Services.
    5. Select any service from the Service catalog.
    6. Click on 'Call Browser' button.
    Now, my requirement is to capture the XML which gets displayed on the web browser into an ABAP program but I am unable to do so. Kindly, provide us the solution.
    Best Regards,
    Naresh

    Hi,
    Check this example
    [http://help.sap.com/saphelp_nwpi71/helpdata/en/1f/93163f9959a808e10000000a114084/content.htm|http://help.sap.com/saphelp_nwpi71/helpdata/en/1f/93163f9959a808e10000000a114084/content.htm]
    Regards,
    Ivan

  • Return data from spark list itemrenderer

    Does anybody no how to return data from the itemrender for a spark list. say i had a checkbx in my itemrenderer how can I get that info back to my main component if its selected or not. I looked at datagrid and itemeditor but I really rather use a spark list. Thanks

    thanks I also found another way to doing it. A click handler on my list when that fires I can check if checkbx has been selected by doing event.target.document.mycheckBx.selected this will not work if using currentTarget cause it take the info from the itemRenderer. Now I understand the difference between currentTarget and target.
    not sure if this is a better way to access the data I think I might still just dispatch a event and do it your way.
    Its weird that mx:list has a editItemRenderer  and s:list does not
    thanks again TK

  • Extending a component which already extends a spark list ItemRenderer

    Hello everyone,
    I have the following situation: Im displaying lists of very similar data objects (they extend the same parent) so in order to avoid a lot of changes to many itemrenderers (if i need to change something in the common properties) when displaying this data, i defined a spark list ItemRenderer (in MXML) which displays the common properties (file called BaseRenderer.mxml):
    <s:ItemRenderer>
         //in the script section i override the set data property
         //some MXML labels, checkboxes, etc
    </s:ItemRenderer>
    Then i created a specific itemrenderer which extended it (file SpecificRenderer.mxml):
    <model:BaseRenderer>
         //again i override the set data property
         //some ADITIONAL MXML labels, checkboxes, etc
    </model:BaseRenderer>
    When i run the app, and when the specific renderer is used, it works (no errors are thrown) , but it only shows the content of specific renderer, nothing from base renderer is visible. Is this the right way to do this, or do i have to override some additional stuff in my specific renderers?
    Thank you.
    One more thing, i just noticed, if i remove all MXML tags from specific renderer, the content from base renderer becomes visible, seems as if specific content overrides base content. Is there a way to add mxml tags into the specificrenderer?

    Yes i suspected them to be merged, and you gave me a great idea. As you say this behavior is true across all mxml defined components, not just itemrenderers. I want to avoid actionscript renderers because i dont (and wont) have any performance issues anyway and i like flexibility in design view, so instead i found another solution which i slightly modified. Some spark components inherit property mxmlContent, which you can override. This is what i came up with in the end: I added the property override into specific renderer and everything is shown as expected (because base elements are merged with the ones from extended component).
    override public function set mxmlContent(value:Array):void {
                                            var adding:Boolean = true;
                                            var index:int = 0;
                                            while (adding) {
        var element:IVisualElement = null;
        try {          element = super.getElementAt(index); } catch(e:Error) {          }
        if ( element != null )  {
           value.push(element);
           index += 1;
        else
          adding = false;
                                            value.reverse();
                                            super.mxmlContent = value;

  • Set a container element inside class to exit a loop

    Hi,
    I want to set a container element inside a class to exit a loop.
    The element is marked as import/export parameter and the binding from the task to the container exists as well.
    The loop has a condition  &finish& = X but I cannot exit the loop. Looks like the value gets never updated in the container.
    When i am using a container operation to set the element its working but i want to do this out of my method in the class.
    Is it not possible to change a container element inside a loop without using a container operation?
    Thanks,
    Christoph

    Hi,
    Using the container operation is a good method to solve the problem. But if you intend to do that in the method coding itself then you will have to have it as the export parameter of the method. You can view all the import and export parameters of a method by going to the Business Object Builder (SWO1) and then choose the method and click on the "Parameters" Button. Once you are done with the interface of the method use that method in the workflow builder as a task and in the binding there are two rows. One for the import that occurs just below the container elements and the export parameters appear below the import in a separate window. Make sure you have the binding set there too as this is where you can transfer the container elements back to the workflow container from the task container and it should work. Maybe you are missing that in the binding.
    Hope it helps,
    Sudhi

  • Sort element inside JComboBox

    Hi,
    i have a JComboBox containing list of Strings
    so lets say:
    String[] test = {"omega", "alpha", "beta", "Arc"}
    JComboBox testing = new JComboBox(test);
    now is there a way to sort the elements inside the JComboBox once they have been inserted ? or anyone know how to sort the elements before putting them in inside JComboBox ?
    the sample code was just for testing and I am dealing with MANY elements (at least 10) inside the JComboBox
    thanks in advance
    if you have any links that helps with this topic, I will also appreciate it

    <hmm>
    1) Check out the [url http://java.sun.com/docs/books/tutorial/collections/index.html]Collections API
    2) Note that using a java.util.Vector, (which combo box accepts in its constructor), allows you to do
    one of two things:
    ............If you are using a custom object, have it implement Comparable
    ............If you are using flat Strings, never mind...
    Then calling java.util.Collections.sort(myVector) would do this for you. NOTE: by not implementing
    Comparable, this may have undesirable results....
    A number of collection objects sort by default when you add an element.....

  • Unable to capture data from drop down list in custom added field in migo tcode at item level

    Hi guys,
    need bit help in resolving query related to custom added field in Tcode migo.
    i have added a field in migo at item level ,in this i have used drop down list
    to get data but unable to capture data from drop down list.gown through
    many blogs in scn but unable to resolve.
    Please help me out in this.
    Thanks,
    Umakant.

    Hi,
    U can use following code to fill the list box
    write this code in PBO
    In layout editor please select listbox in dropdown attribute of input field and put some fctcode attribute
    TYPE-POOLS vrm.
      DATA values TYPE vrm_values WITH HEADER LINE.
      TABLES: <ur custom Database table>.
      clear values, values[].
      SELECT * FROM <ur custom Database table>.
        values-text = <TABLE FIELD TO DISPLAY IN DROPDOWN> .
        values-key = <TABLE KEY FIELD TO DISPLAY IN DROPDOWN>.
        APPEND values.
      ENDSELECT.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = '<SCREEN INPUT FIELD NAME>'
          values          = values[]
        EXCEPTIONS
          id_illegal_name = 1
          OTHERS          = 2.
    Also please define the following before accessing the listbox value
    data: <listbox input field name> type <table field name>,
            <inputfield name where text to display> type string  in top include
    In PAI, select the text from the table into <inputfield name where text to display>  depending on value selected which will be called when enter key is pressed or any vale is selected

  • How to find all query elements inside a Query

    Hi,
    I would like to find out all query elements inside my query.
    Is there any table which stores all query elements inside my query ?
    Thanks
    Pratyush

    Hi,
    Query elements are stored in this  follwing table:
    SE11
    Table name : RSZELTXREF [Directory of query element references]
    other query related tables :
    Tables used in  Queries
    RSZELTDIR      Directory of the reporting component elements
    RSZELTTXT    Texts of reporting component elements 
    RSZELTXREF  Directory of query element references 
    RSRREPDIR     Directory of all reports (Query GENUNIID) 
    RSZCOMPDIR  Directory of reporting components 
    RSZRANGE    Selection specification for an element 
    RSZSELECT    Selection properties of an element
    RSZELTDIR     Directory of the reporting component elements 
    RSZCOMPIC    Assignment reuseable component <-> InfoCube
    RSZELTPRIO   Priorities with element collisions
    RSZELTPROP  Element properties (settings)
    RSZELTATTR  Attribute selection per dimension element 
    RSZCALC        Definition of a formula element 
    RSZCEL           Query Designer: Directory of Cells
    RSZGLOBV     Global Variables in Reporting
    RSZCHANGES  Change history of reporting components 
    Hope it will helps you.
    Thanks
    Hemav

  • Right click on the mail list doesn't open the context menu any more.

    Hi everybody,
    Thunderbird stoped to show the context menu on the mail list recently. Right click just prints the crossing line. What the problem could it be?
    Thanks anyone for any help.
    Win 8.1 64
    Thun 31.3.0

    ''Nick532 [[#question-1037921|said]]''
    <blockquote>
    Hi everybody,
    Thunderbird stoped to show the context menu on the mail list recently. Right click just prints the crossing line. What the problem could it be?
    Thanks anyone for any help.
    Win 8.1 64
    Thun 31.3.0
    </blockquote>
    ''Toad-Hall [[#answer-668503|said]]''
    <blockquote>
    Very odd.
    Right click on email in list should open a drop down selection.
    Usually a crossed line through something denotes that it is marked as deleted in an imap mail account.
    * http://kb.mozillazine.org/Deleting_messages_in_IMAP_accounts
    See if there is a conflict with an addon.
    Restart Thunderbird in safe mode.
    Help > Restart with addons disabled.
    then perform the same test; right click on email in list.
    Do you get the drop down, if yes, then one of your addons is causing the conflict.
    You would have to disbale each in turn to locate which one is the problem.
    Maybe the addon needs updating.
    Report back on results.
    </blockquote>
    I have the same problem too. When i restarted with addons disablem problem dissapeared but when i switch to normal mode and disable all off the plugins and addons the problem still remains.
    Please help.

  • I accidently click on ''Import the list'' but now all the music have  an exclamation point I think they are all in Musique.txt on the desk... How can i take back these music on my library? I tried : Import the list and take Music.txt , but it do not work

    I accidently click on ''Import the list'' but now all the music have  an exclamation point I think they are all in Musique.txt on the desk... How can i take back these music on my library? I tried : Import the list and take Music.txt , but it do not work

    Ok, I had a glitch, forced to restart, and lost my train of thought.
    Reinstalling iTunes should fix the major issue that might have gone wrong, perhaps your explaination points will disappear and everything will be peachy again.
    But if they don't, you can open the XML file in iTunes Folder using a Text edit program to see what the common pathname is to the iTunes Music folder or where your content is located.
    If you moved the itunes folder, it needs to go back.
    I can't  download iTunes to my Vista virtual machine to test it out right now because iTunes is down, so I can't verify the pathname, perhaps your issue and the iTunes being down are related somehow?
    You don't want to import all your music again, but it's a option, but you lose all your playlists, that's what I'm trying to recover.
    If oyu don't have a whole lot of playlists, then simply select all the explaimation point music and delete, select File from the menu and import your itunes folder again.

  • How to get the Dataprovider var of a Datagrid inside an ItemRenderer?

    Hey,
    I have two Datagrids, both of them have a bindable dataprovider. My first Datagrid has an ItemRenderer. I would like to update my dataprovider inside the ItemRenderer. Is it possible? My ItemRenderer is a Combobox. Everytime I change the Combobox I would like to update/refresh the dataprovider for my datagrid. I tried it with but it doesn´t work.(parentDocument
    as filename).dataProvider.source=sth.;
    (parentDocument as filename).dataProvider.refresh();
    Regards
    Kat

    The parent document of an itemRenderer is not always what you expect.
    You're better off using the listOwner property on listData.
    http://livedocs.adobe.com/flex/3/langref/mx/controls/ComboBox.html#listData
    http://livedocs.adobe.com/flex/3/langref/mx/controls/listClasses/BaseListData.html#owner

  • How do I build an expression for a multi-element in-list?

    How do I build an expression for a multi-element in-list? For example:
    SELECT * FROM employees
    WHERE (first_name, last_name, email) IN
    (('Guy', 'Himuro', 'GHIMURO'),('Karen', 'Colmenares', 'KCOLMENA'))
    Passing a Vector to Expression.in(Vector) where each element is a Vector of values itself will result in the appropriate expression for the values clause, but how to I get the columns to be considered together, that is, how do I get the "(first_name, last_name, email)" part?
    Steve

    Steve,
    I do not believe this is currently supported in the TopLink expression framework. Your best bet at this point will be to use custom SQL.
    Doug

  • Since upgrading to Mail 7.0 the menu popup from right clicking an element in an email has changed.

    Since upgrading to Mail 7.0 the menu popup from right clicking an element in an email has changed.  There is now only a short three item menu:
    Previously there was a longer menu (like the one when right clicking an item on a Safari page):
    I've looked in Preferences and at all the Mail dropdown items but can't find any way to get the old menu back (or why it changed).  In particular, I miss the "copy image" item which allowed me to copy an item image into a new email for forwarding.  I've got two email accounts, an IMAP and a POP.  The behavior is the same with both.
    Any ideas?
    Thanks,
    Richard

    Your screen shots are not visible to me.  But I think I understand your question.
    Several thoughts come to mind:
    rbhix wrote:
    In particular, I miss the "copy image" item which allowed me to copy an item image into a new email for forwarding.
    You can still, of course, simply forward the entire email message containing the image.
    You could also use the "Save Attachment ..." feature available when you right click and copy and paste from there once the image is saved.
    Less likely, you could also use the "Share" feature available when you right click, though I suspect it may not offer sharing options that you would like.

  • Delete row in elements in list

    In Elements in list of Item type: list item, for error an empty new line has been inserted(static) ,
    does someone know how do to delete it?
    Thanks in advance

    Yes, you are right, but I thought pits a very simple thing.that knew everybody
    CTRL+K Display list the list of Key that can be used in dialog box
    SHIFT-CTRL +> insert an element
    SHIFT-CTRL +< delete an element
    Regards

  • Maybe you are looking for

    • Difference in Dates

      Hi We have two date fields in the cube..Both are characterists 1. Requested delivery date 2. Actual delivery date. Now how can i calculate the difference of both the dates. Should i do it in query level or in some routine. Regards Rak

    • Can MS Access support UTF8?

      Hi expert, i would like to use java to connection with a small database in MSAccess for some read/write with unicode but some of the code become '?' do any expert have any idea? From Timothy

    • SRM 7.0 , Get company name based on company code

      Hello friends, Is ther any function module or table to read company name based on company code in SRM 7.0 ? Kindly let me know your inputs. Thanks. Preethi.

    • Font Book 2.1 can't be launched on Lion

      I tried to launch Font Book, and I get an error message that says "You can't use this version of the application Font Book with this version of Mac OS X", You have version 2.1. My machine came with Lion pre installed, and I then migrated the content

    • Requeriments for Web Dynpro for ABAP

      Hi, people I've got a little prob: I'm triyng to use Web Dynpro with NW 6.40v, but it shows a pop up saiyng that it is not available for this version. I've read some manuals about WD and it appears to run only for WEB AS 7.0. My question is: is this