List Component Select

I've created a custom inline component to fit inside mx:List
in my mxml. I'm using skinned button controls in the component, and
therefore, want to turn off the selection color effects of the
surrounding list control. Can anyone tell me how to do this please?
I've stopped the rollovers but not the selection.
Cheers,
b

Hi
"selectedItems" will give you the items selected.
var data_array:Array = new Array({data:1, label:"yaho"},
{data:2, label:"proper"}, {data:3, label:"myname"}, {data:4,
label:"thatfigure"}, {data:5, label:"fulltight"}, {data:6,
label:"mythigsare"}, {data:7, label:"thatis"}, {data:8,
label:"thisda"});
lst.dataProvider = data_array;
lst.addEventListener("change", mx.utils.Delegate.create(this,
mySelection));
function mySelection(evt) {
var _items = evt.target.selectedItems;
for (var i = 0; i<_items.length; i++) {
trace(_items
.label);
trace("----------------");

Similar Messages

  • General task list: component selection from BOM - possible in batch input?

    Hi experts,
    for the assignment of non-stock material to general task lists I have followed the advice from message[6115684|Re: General Task List Components;.
    So what I have done is:
    - Include non-stock material in BOM
    - Assign BOM to general task list header
    When clicking on the "Component selection" button in the task list components, I can select a component.
    When entering the material number of the component directly though, I get an error: "Material type X and line item type L not compatible" (CO135).
    I would like to upload the general task lists with a batch input recording, but I can't figure out how to select components.
    Any thoughts?
    Kind regards,
    Andreas

    Hello,
    We have the same requirement to load tasklists (change & create).  We are using the function modules EAM_TASKLIST_CREATE and EAM_TASKLIST_CHANGE.  However, i cannot get a non-stock BOM item to process.  Has anyone got this working?
    Thanks,
    Clay.
    EDIT: Found the answer - simply fill in the fields for BOM on the component (STLTY, STLNR, STLKN, and STLAL). 
    Message was edited by: Clayton Mergen

  • How can I select an item from a list component with a seperate button

    This is a repost, I decided it'd probably be better here than
    in the general discussion board. I will try to delete the other
    one.
    Hello Everyone,
    This is my first post here. I am trying to figure out how to
    select an item within a list component with a button. This button
    is calling a function. I have searched for the past 3 hours online
    and I can't find anything about it. I thought perhaps I could set
    the selectedItem parameter, but that is read only, and I believe it
    returns an object reference rather than something like a number so
    even if i could set it, it would be pointless. I also found a get
    focus button, thought that may lead me somewhere, but I think that
    is for setting which component has focus currently as far as typing
    in and things like that. I am lost.
    Basically I am looking for a way to type this
    myList.setSelected(5); where 5 is the 5th item in the list.
    Any help would be much appreciated.

    Never mind found it. It is the property called selectedIndex
    and it is writable

  • List Component - Multi-select retrieve data

    Hey there,
    I'm having trouble retrieving the value of a multi-select
    list component. It always traces the last value selected, but I
    need to trace all values to parse the data.
    I've been using trace(myList.value);
    thanks!
    Billy

    Hi
    "selectedItems" will give you the items selected.
    var data_array:Array = new Array({data:1, label:"yaho"},
    {data:2, label:"proper"}, {data:3, label:"myname"}, {data:4,
    label:"thatfigure"}, {data:5, label:"fulltight"}, {data:6,
    label:"mythigsare"}, {data:7, label:"thatis"}, {data:8,
    label:"thisda"});
    lst.dataProvider = data_array;
    lst.addEventListener("change", mx.utils.Delegate.create(this,
    mySelection));
    function mySelection(evt) {
    var _items = evt.target.selectedItems;
    for (var i = 0; i<_items.length; i++) {
    trace(_items
    .label);
    trace("----------------");

  • Selecting multiple rows from List-component

    Hi
    Could someone give me an example how to programmatically select multiple rows from List-component?
    I know that this selects one row: lst_example.selectedIndex = 1;
    But how about selectin indexes 1,2 and 4 for example?

    selectedIndices
    A Vector of ints representing the indices of the currently selected item or
    items...
    var si:Vector.<int> = new Vector.<int>;
    si.push(1);
    si.push(2);
    si.push(4);
    list.selectedIndices = si;

  • How to populate list component via xml file?

    There is a TextArea component that should show the name and
    the description of the item selected in the list component. But I
    dont know how to populate list with external XML and what should be
    the coding in flash as well as what should be written in the XML.
    Please help.

    Here's an xml file listing a couple of brother comedy teams:
    <?xml version="1.0" encoding="UTF-8"?>
    <team>
    <brothers>
    <Marx>
    <name>Groucho</name>
    <name>Chico</name>
    <name>Harpo</name>
    <name>Zeppo</name>
    <name>Gummo</name>
    </Marx>
    <Howard>
    <name>Moe</name>
    <name>Curly</name>
    <name>Shemp</name>
    </Howard>
    </brothers>
    </team>
    Open a new .fla and save it in the same folder as the .xml
    file. Place a List Component on the Stage and name it (in this
    case, "comicTeams_list"). In the first frame write the following
    ActionScript:
    //create XML object and load external xml file
    var broList:XML = new XML();
    broList.ignoreWhite = true;
    broList.onLoad = processList; // this is a function that will
    be written below
    broList.load("populateList.xml");
    function processList(success:Boolean):Void{
    if(success){
    loadList();
    }else{
    trace("Load failure");
    function loadList():Void{
    var broName:String;
    var listEntries =
    broList.firstChild.childNodes[0].childNodes[0].childNodes.length;
    for(var i:Number = 0;i<listEntries;i++){
    broName =
    broList.firstChild.childNodes[0].childNodes[0].childNodes
    .childNodes[0].nodeValue;
    trace(broName);
    comicTeams_list.addItem(broName);
    //to make something happen when you click on a name in the
    List, create a Listener and function
    var broListListener:Object = new Object();
    broListListener.change = someAction; //"someAction" is a
    function to be written shortly
    //add the Listener to the List
    comicTeams_list.addEventListener("change", broListListener);
    function someAction(evtObj:Object):Void{
    var pickedBrother:String = evtObj.target.selectedItem.label;
    //write actions here, referencing pickedBrother variable
    The names of the Marx Brothers will appear in the box.
    This is written in AS2. When you post a question, it's a good
    idea include which version of ActionScript you're using.

  • List component row manipulation

    I have two questions regarding as3 list component:
    - I'd like to highlight and keep selected the item a user last selected from my list component. I've combed the live reference as well as google and must be typing the wrong search words. I can tell what label and index an item was that was selected but am not finding a way to highlight and keep highlighted the user's choice in the list component.
    - Also, I'm exploring the notion of inline buttons within a list's rows. If a user hovers their mouse over a row, a set of small buttons come up the user can click on for further functionality. This may be more of a make your own component answer but I'm exploring it nonetheless. Any thoughts or comments on this?
    Thanks!

    no something else is going on. Or perhaps you didn't explain your problem clearly.
    After servlet b calls getList() you have two servlets each having a reference to the same list
    A------\
    List
    B------/

  • Problem in JSF addRemoveList component selection

    Hi,
    We are using JSF creator studio 2.0. In our project we are using addRemoveList component to display available and selected items.
    We are able to display the selected value from available list to Selected list.
    uisng Add and remove buttons of the AddremoveList component.
    But we are facing the problem is, we are unable to get particular selected or highlighted value from the SelectedList .
    However we are able to get all selected items in bakingBean.
    This is very very important for us to move further in our development. I really appreciate for any sort of help.
    Thanks,
    Ramesh

    Hey Andy,
    I did it that way (JSC 2):
    assuming the add remove component's id is arl and that the components' item-property is bound to a datatable (mysql). The value field is of type Long, the display field is of type String.
    Get selected:
    get an array of selected objects directly from the component, and then do what ever you like to with that array.
    Object[] objSel = (Object[]) arl.getSelected();
    int i;
    int l = objSel.length;
    String str;
    for (i = 0; i < l ; i++) {
    str = objSel.toString();
    Set selected:
    Just create an array of objects holding the selected values and pass it to the component. But, attention, you'll need to make sure you're feeding the object array with the correct types of values. In my sample the value is a Long as described above, so I also need to pass in a Long, else the component just does nothing at all.
    Object[] selObj = new Object[] {new Long(5), new Long(8)};
    arl.setSelected(selObj);
    I found this the most easy option to get and set the add remove list selection.
    An other quite easy option is to bind the selected-property of the component to any session-bean property of type object-array and then set this sessionbean-property to the approrpiate values. But here you need also to make sure the datatype is correct.

  • Using a List Component to create a photo gallery.

    This feels like a lot to be asking but i'm gonna go ahead and
    ask to see what happens.
    I'm trying to figure out how to use a list component to
    select 6 items from a large list, display the words to the 6
    selected items (in a text field), then finally (by pressing a
    button) I would like to load the 6 corresponding pictures for the
    selected items into a seperate frame. If there is anyone that could
    point me in the right direction it would be greatly appreciated. I
    have been trying to find information online about programming the
    List Component but haven't had any luck. Is there a book that
    anyone recommends that could help me? I've been doing simple
    animations and websites in flash but i'm now looking to learn some
    actionscripting as well. Thanks.

    Hi PinkPowerRanger,
    Per my understanding that you have two fields in the table "Date and Time picker" which is Date/time type and another is "Item ID", you need to get the Month from the Date field to display in the X-axis and count(Item ID) related to each
    month to display in the Y-Axis, right?
    I have tested on my local environment and can do this by create two calculated fields to get the month and year values from the Date/Time field.
    Details information below for your reference:
    Right click the main dataset to select the "Add Calculated field", specify an name of the new calculated field and add the expression in the field source as below:
    Year:    =Year(Fields!Date.Value)
    Month:  =MonthName(Month(Fields!Date.Value))
    Add the three field in the Chart as below and remember in the Value area you have got the Count(ItemID) but not SUM(ItemID):
    Preview you will got the chart like below:
    If you still have any problem, please feel free to ask.
    Regards
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • Video, XML and List Component

    Hello all,
    I have this code that is suposed to take my simple little XML
    file and populate it into a List component which in turn when an
    item is click it will play the video assigned to it. I have a
    custom player built and it works perfectly when I just load in one
    movie by hard coding its path into my AS, however when I load the
    XML in it only will play the first movie in the list, and will not
    load in any other movie when selected.
    My code is below. anyone that can help it would be greatly
    appreciated. The XML code is at the bottom.

    funkysoul,
    First thanks for taking a look at what I have. To answer your
    question yes I have changed the start up movie in the Array (i.e.
    from 0 to 1 or 2 or 3) and it does play that movie first, but again
    when I click to load in another movie it does not play anything
    else.

  • Data Grid in a List Component???

    Hi there!
    I have a populated List Component set to Multiple Selection.
    This list contains titles of a magazine issues.
    I wish to allow the user to select one or more items in the
    list and enter the quantity of the selected issue(s) he/she wants
    to receive.
    Is it possible to achieve this with a Data GRid integrated in
    the List Component or which simplier solution must I contemplate?
    I thank you in advance for indicating the best way to
    explore.
    Best regards,
    Gerry

    Hi GWD and thanks for responding.
    I fully understood your explanations and the example you
    provided.
    I'll give it a try, for sure.
    But I want to know:
    - How do I populate a DataGrid Component? Like a List
    Component? (you said they are quite the same, I assume methods to
    apply are identical...)
    -In the same way, I can pull out the data from a DataGrid as
    I do for the List, right?
    Thanks again!
    Best,
    gerry

  • List Component multipleSelection and wmode

    I'm trying to use the list component with multipleSelection
    set to true; however when I set wmode to transparent in FireFox the
    multiple selection breaks. It appears to function properly in IE.
    Does anyone know of a workaround for this?
    Thanks in advance!

    "however, we need wmode set to false"
    So what exactly is the problem then... if you need wmode set
    to false, then don't add the param and you won't have it.

  • List Component - Query

    Hi all,
    I have a list component and I have set up initial query in advance search, which generates the listing of the articles.
    Now I am planning to add a search box and upon providing the new search text I would like to search again and utilizing same list component I would like to display new result list.
    I looked a the init.jsp and found the place where I think it executes the initial query?
    I tried to override source and query string but it is not taking an effect.  Also I am not able to find the jar for "com.day.cq.wcm.foundation.List", I wanted to decompile and wanted to see how querys are executed.
    List list = new List(slingRequest, new PageFilter());
    list.setQuery("Test");
    list.setSource("search");
    Any pointers would be helpful!
    Thanks in advance.

    I am workiing on a similiar workflow for an upcoming artilce that dicusses how to query the AEM CQ JCR: http://scottsdigitalcommunity.blogspot.ca/2013/02/querying-adobe-experience-manager-data.h tml .
    This sample app queries the JCR for customer data, supports filtering, and displays the result set in a grid contol located in the client:
    Although this article will not be posted until Feb 23 --I can provide a few pointers. Like most workflows in computer science -- you can  perform a task in more than 1 way. I find that you get more power when you wrap the JCR Query Manager API within an OSGi component and develop the service to expose an operation that queries the JCR and returns the result set.
    You can return the result set to the client and display the data in a web page - similiar to the pic above. Of course -- you can do the same workflow using sling -- its a matter of preferece IMHO. I prefer to develop OSGi services to do the heavy lifting and let the client call the service and display the data.
    For example - to call the OSGI service from a client:
    com.adobe.aem.CustomerService cs = sling.getService(com.adobe.aem.CustomerService .class);
    String XML = cs.getCustomerData(filter) ;
    In this workflow -- the query results are stored in an XML DOM and returned to the client -- where the data is parsed and displayed. The complete artilce will be posted next Fri.
    Here is a snippet of the backend Java logic that is wrapped in the OSGi and queries the JCR that is called from the client:
    public Document getCustomerData(String filter) {
                        Customer cust = null;
                         List<Customer> custList = new ArrayList<Customer>();
                        try {
                           Session session = this.repository.loginAdministrative(null);
                           // Obtain the query manager for the session ...
                     javax.jcr.query.QueryManager queryManager = session.getWorkspace().getQueryManager();
                     //Setup the query based on user input -- 3 options are   All Customers,
                     //Active Customer or Past Customer
                     String sqlStatement="";
                               //Setup the query to get all corresponding customer nodes -- which are of node type nt:unstructured
                     if (filter.equals("All Customers"))
                               sqlStatement = "SELECT * FROM [nt:unstructured] WHERE CONTAINS(desc, 'Customer')";
                     else if(filter.equals("Active Customer"))
                                         sqlStatement = "SELECT * FROM [nt:unstructured] WHERE CONTAINS(desc, 'Active')";
                     else if(filter.equals("Past Customer"))
                                        sqlStatement = "SELECT * FROM [nt:unstructured] WHERE CONTAINS(desc, 'Past')";
             //Execute the query and get the results ...
                     javax.jcr.query.Query query = queryManager.createQuery(sqlStatement,"JCR-SQL2");
                     javax.jcr.query.QueryResult result = query.execute();
                     //Iterate over the nodes in the results ...
                     javax.jcr.NodeIterator nodeIter = result.getNodes();
                     while ( nodeIter.hasNext() ) {
                                              //For each node-- create a customer instance
                                              cust = new Customer();
                                              javax.jcr.Node node = nodeIter.nextNode();
                                              //Set all Customer object fields
                                              cust.setCustFirst(node.getProperty("firstName").getString());
                                              cust.setCustLast(node.getProperty("lastName").getString());
                                              cust.setCustAddress(node.getProperty("address").getString());
                                              cust.setCustDescription(node.getProperty("desc").getString());
                                              //Push Customer to the list
                                              custList.add(cust);
                     // Save the session changes and log out
                           session.save();
                           session.logout();
         //Return the customer data within an XML DOM
                           return toXml(custList);
                  catch(Exception e)
                             e.printStackTrace();
                  return null;
    Hope this helps..

  • Question for the new List component

    hello
    I work with Oracle BI Publisher 11.1.1.5 anf firefox 3.6.17
    I have a problem with the new component LIST.
    i open the report SFO Passenger Count Report in the samples/11G overview/
    I choose the tab named insight tab
    i select Air china in the Air lines List
    i select 2006 in the time list, ok for the report
    if i select 2007, all the companies are deselected, i need to reselect air china.
    How to avoid this behaviour ?
    best regards
    jean marc

    hello
    I work with Oracle BI Publisher 11.1.1.5 anf firefox 3.6.17
    I have a problem with the new component LIST.
    i open the report SFO Passenger Count Report in the samples/11G overview/
    I choose the tab named insight tab
    i select Air china in the Air lines List
    i select 2006 in the time list, ok for the report
    if i select 2007, all the companies are deselected, i need to reselect air china.
    How to avoid this behaviour ?
    best regards
    jean marc

  • Creating search field for a list component

    i have created a glossary of terms using the list component and populating it via an XML file.
    what i would like to do is create a search field that as the user types in the search bar if there are any matching entries in the list, the focus/selection jumps to that particular item in list. i don't want to clear the list just go to the item that matches.
    i would like it to be predictive so if i have these entries:
    samson
    seek
    seether
    south
    and the user types "s" in the search box to the first "s" entry in the list (samson) is selected, if they type "se" the selection jumps to the first entry with "se" in it (seek) if they type "seet" the selection jumps to "seether" and so on.
    i have absolutely no idea how to do it, but more importantly...is this possible?
    i have attached the sample files that i have been working on.
    thanks in advance

    You need the lowercase. the keyCode of the keybpardevent returns the key's uppercase charcode. So the A-key allways returns 65. Therefore convert keycode to char and to lowercase before appending after what's allready there in the field.
    To have the user not have to type the words with proper casing, convert the label to lowercase before doing the indexOf search.
    import fl.data.DataProvider;
    //-------declare vars----------------
    var firstClick:Boolean=true;
    var loader:URLLoader = new URLLoader();
    var dp:DataProvider = new DataProvider();
    var xml:XML;
    //-------add listeners---------------
    loader.addEventListener(Event.COMPLETE,onLoaded);
    glossary.lb.addEventListener(Event.CHANGE, itemChange);
    glossary.search_bar.addEventListener( FocusEvent.FOCUS_IN, clearbox );
    glossary.search_bar.addEventListener( KeyboardEvent.KEY_DOWN, onSearch );
    //-------functions--------------------
    //clears the input field when the user clicks into it for the first time
    //eliminates the need for them to highlight and delete the "type search here" text
    function clearbox( e:FocusEvent ):void {
        if (firstClick==true) {
            glossary.search_bar.text="";
            firstClick=false;
    //populate description box with definition when item is selected
    function itemChange(e:Event):void {
        glossary.ta.text=glossary.lb.selectedItem.data;
    //creates the data provider for the list based off external XML file
    //arranges the items in alphabetical order
    //populates the list
    function onLoaded(e:Event):void {
        xml=new XML(e.target.data);
        var il:XMLList=xml.channel.item;
        for (var i:uint=0; i<il.length(); i++) {
            dp.addItem({data:il.description.text()[i],label:il.title.text()[i]});
        dp.sortOn("label");
        glossary.lb.dataProvider=dp;
        glossary.ta.text="Please make a selection below";
    //dynamic search engine to locate items in the list
    function onSearch( e:KeyboardEvent ):void {
        trace( e.keyCode );
        var input:String = ( glossary.search_bar.text + String.fromCharCode( e.keyCode ).toLowerCase() );
        trace( input )
        for (var i:uint = 0; i < dp.length; i++) {
            if (dp.getItemAt(i).label.toLowerCase().indexOf(input)==0) {
                glossary.lb.selectedIndex=i;
                glossary.ta.text=glossary.lb.selectedItem.data;
                break;
            } else {
                glossary.ta.text="no matching searches";
    //-------load the xml--------------
    loader.load(new URLRequest("xml/movie1.xml"));

Maybe you are looking for

  • SCVMM losing connection to cluster nodes

    Hey guys'n girls, I hope this is the right forum for this question. I already opened a ticket at MS support as well because it's impacting our production environment indirectly, but even after a week there's been no contact. Losing faith in MS suppor

  • ICal crashes during launch

    Hello, I am playing around with an iBook G4 which has been not in use for some time. It has OS X 10.4.11 and iCal 2.0.6 installed. After launching iCal there are counting up figures in the dock on the iCal.icon. I heard these are events sent by other

  • Fail to lookup the local EJB by JNDI in Managed Server

    Hi all, I currently in a deep problem, and can't figure out the cause of it. It just annoying me for week. In my app, I have binded to the local ejb to JNDI (let's say "ejb/CustomerLocal"), then the client lookup the Local EJB by the following code.

  • P45 Platinum - RAM problems after BIOS update

    i had no problems with starting up my computer before updating the BIOS but now it gets to the Windows logo and then reboots if i take out the RAM memory's on DIMM1 & DIMM4 it starts up just fine and i have switched between memory's so i know that al

  • Retrieving browser info

    Does anyone know how to retrieve information about a client's browser (i.e. what browser, what version, etc), possibly from the HTTP request or some other way, via JSP? Thanks. --Amanda