Issue in List Control

I am facing a strange issue on the implementation of List Control on webdynpro ABAP UI screen . I have created a List Control where I have some buttons on the toolbar to perform some action. I am providing the data to the list .
My issue now is when I select a line item on the first row of the List and click any of the buttons , no actions is getting triggered but works fine for the second row onwards. Can you please help in providing some suggestions?
Thanks
Ram

Hi,
For the First time, the lead selection is already set in the list control, hence the buttons are not getting triggered.
You might have written the code inside the buttons only when there is a change in the slection of list.
Regards,
Lekha.

Similar Messages

  • Issue : drag and drop from list control to tree control

    Hi,
    I was trying a drag and drop from list control to tree control. I have used some sample data to populate list and tree controls .
    It is working fine . except one problem ..
    Prob : when i drag an item to tree control .. it gets added .. now tree contains (X+1) data in list .. say X is the inital number of nodes in a tree node.
              now if i drag another item from list to last item in the tree node  .. i.e at X+1 index. .. it throws null pointer exception.
    I am considerably new in flex programming . looking for help from experts ..
    Below is my code :
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                    layout="horizontal"
                    creationComplete="init()">
        <mx:Script>
            <![CDATA[
                import mx.controls.listClasses.IListItemRenderer;
                import mx.rpc.events.FaultEvent;
                import mx.rpc.events.ResultEvent;
                import mx.utils.ObjectUtil;
                import mx.collections.ICollectionView;
                import mx.core.UIComponent;
                import mx.managers.DragManager;
                import mx.events.DragEvent;
                import mx.controls.Alert;
                import mx.controls.Label;
                import mx.events.CloseEvent;
                private var homePath:String="/home/e311394/dndTest/";
                private var destPath:String="/home/e311394/dndDest/";
                private var eid:String="e311394";
                private var actn:String;
                [Bindable]
                private var cm:ContextMenu;
                private var cmi:ContextMenuItem;
                [Bindable]
                private var dp:ArrayCollection;
                private function init():void
                    cmi=new ContextMenuItem("Remove");
                    cmi.enabled=true;
                    cmi.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, contextMenuItem_menuItemSelect);
                    cm=new ContextMenu();
                    cm.hideBuiltInItems();
                    cm.customItems=[cmi];
                    cm.addEventListener(ContextMenuEvent.MENU_SELECT, contextMenuItem_menuSelect);
                    list.contextMenu=cm;
                private function contextMenuItem_menuSelect(evt:ContextMenuEvent):void
                    list.selectedIndex=lastRollOverIndex;
                private function contextMenuItem_menuItemSelect(evt:ContextMenuEvent):void
                    var loclSelectedRow:Object=list.selectedItem;
                    var lostrSelectedMenuItem:String;
                    lostrSelectedMenuItem=evt.target.caption;
                    if (loclSelectedRow != null)
                        var obj:Object=new Object()
                        obj.label=loclSelectedRow.label as String;
                            //Alert.show(obj.label);
                    if (lostrSelectedMenuItem == "Remove")
                        if(loclSelectedRow!=null)
                        var pth:String=homePath.concat(loclSelectedRow.label);
                        //Alert.show(pth);
                        //FlexDnDRemoteService.process(eid,"delete",pth,"-"); 
                        var coll:ArrayCollection=list.dataProvider as ArrayCollection;
                        if (coll.contains(loclSelectedRow))
                            coll.removeItemAt(coll.getItemIndex(loclSelectedRow));
                public function onTreeDragEnter(event:DragEvent):void
                    event.preventDefault();
                    DragManager.acceptDragDrop(event.target as UIComponent);
                    tree.showDropFeedback(event);
                protected function onTreeDragOver(event:DragEvent):void
                    event.preventDefault();
                    event.currentTarget.hideDropFeedback(event);
                    try
                        var index:int=tree.calculateDropIndex(event);
                    catch (e:Error)
                        DragManager.showFeedback(DragManager.NONE);
                        return;
                    tree.selectedIndex=index;
                    var draggedOverItem:Object=tree.selectedItem;
                public function onTreeDragExit(event:DragEvent):void
                    event.preventDefault();
                    tree.hideDropFeedback(event);
                private function showAlert():void
                    Alert.yesLabel="Move";
                    Alert.noLabel="Copy";
                    Alert.buttonWidth=70;
                    Alert.show("Copy / Move ?", "Confirm", Alert.YES | Alert.NO | Alert.CANCEL, this, alertListener, null, Alert.OK);
                private function alertListener(eventObj:CloseEvent):void
                    var result:Boolean=false;
                    if (eventObj.detail == Alert.CANCEL)
                        //Alert.show("CANCEL");
                        return;
                    if (eventObj.detail == Alert.YES)
                        //Alert.show("YES");
                        result=true;
                    else if (eventObj.detail == Alert.NO)
                        //Alert.show("NO");
                        result=false;
                    var index:int=tree.calculateDropIndex(treedropevt);
                    //Alert.show("Drop Pos" + index.toString());
                    /* var treeList:ArrayCollection=tree.dataProvider as ArrayCollection;
                       Alert.show(" index"+index+"Length "+treeList.length);
                       if(index > treeList.length)
                       Alert.show("Returning");
                       return;
                    var items:Array=new Array();
                    if (treedropevt.dragSource.hasFormat("items"))
                        items=items.concat(treedropevt.dragSource.dataForFormat("items") as Array);
                    var parentItem:Object;
                    parentItem=getObjectTarget();
                    /* if (tree.dataDescriptor.isBranch(tree.indexToItemRenderer(index).data))
                       parentItem=tree.indexToItemRenderer(index).data;
                       else
                       var dropParentPackage:Object = tree.mx_internal::_dropData.parent as Object;
                       Alert.show("HAck"+dropParentPackage.toString());
                       parentItem=tree.getParentItem(tree.indexToItemRenderer(index).data);
                       //Alert.show("Lenght "+ObjectUtil.getClassInfo(parentItem).properties.length);
                    //Alert.show("Lenght "+ObjectUtil.getClassInfo(parentItem).properties.length);
                    var position:int=0;
                    /* if(ObjectUtil.getClassInfo(parentItem).properties.length==0)
                       Alert.show("Returning");
                       return;
                    if (parentItem != null)
                        try
                            while (tree.indexToItemRenderer(index).data != parentItem)
                                //Alert.show(tree.indexToItemRenderer(index).data.toString());
                                if (index > 0)
                                    index--;
                                //Alert.show("Insiade");
                                position++;
                        catch (e:Error)
                            Alert.show("Catch" + index.toString());
                            return;
                    for each (var item:Object in items)
                        var obj:Object=new Object()
                        obj.label=item.label as String;
                        if (parentItem != null)
                            //Alert.show("ADDED");                       
                            tree.dataDescriptor.addChildAt(parentItem, obj, position++);                       
                        else
                            //Alert.show("PARENT NULL");
                            tree.dataDescriptor.addChildAt(tree.selectedItem, obj, position++);                       
                        var spth:String=homePath.concat(item.label);
                        //Alert.show(spth);   
                        var dpth:String=destPath.concat(item.label);
                        //Alert.show(dpth);
                        if (result == true)
                            removeItems();
                                //FlexDnDRemoteService.process(eid,"move",spth,dpth);
                        else
                            //FlexDnDRemoteService.process(eid,"copy",spth,dpth);
                        tree.validateNow();
                public function getObjectTarget():Object
                    var dropData:Object=tree.mx_internal::_dropData as Object;
                    if (dropData.parent != null)
                        return dropData.parent;
                    else
                        // if there is not parent (root of the tree), I take the root directly
                        var renderer:IListItemRenderer=tree.indexToItemRenderer(0);
                        return renderer.data;
                public function removeItems():void
                    //remove moved elements
                    var items:Array=treedropevt.dragSource.dataForFormat("items") as Array;
                    var coll:ArrayCollection=list.dataProvider as ArrayCollection;
                    for each (var item:Object in items)
                        if (coll.contains(item))
                            coll.removeItemAt(coll.getItemIndex(item));
                private var treedropevt:DragEvent;
                public function onTreeDragDrop(event:DragEvent):void
                    treedropevt=event;
                    showAlert();
                    event.preventDefault();
                    tree.hideDropFeedback(event);
                public function resultHandler(event:ResultEvent):void
                    Alert.show("Success", "Status");
                public function faultHandler(event:FaultEvent):void
                    Alert.show(event.fault.faultString, "Failure");
            ]]>
        </mx:Script>
        <mx:ArrayCollection id="listDP">
            <mx:Object label="File1.dnd"/>
            <mx:Object label="File2.dnd"/>
            <mx:Object label="File3.dnd"/>
            <mx:Object label="File4.dnd"/>
            <mx:Object label="File5.dnd"/>
        </mx:ArrayCollection>
        <mx:Number id="lastRollOverIndex"/>
        <!--
             <mx:ArrayCollection id="treeDP">
             <mx:Object label="/home">
             <mx:children>
             <mx:Object label="dummy1.ks"/>
             <mx:Object label="dummy2.ks"/>
             <mx:Object label="e493126">
             <mx:children>
             <mx:ArrayCollection>
             <mx:Object label="/home/e493126/sample1.ks"/>
             </mx:ArrayCollection>
             </mx:children>
             </mx:Object>
             </mx:children>
             </mx:Object>
             </mx:ArrayCollection>
        -->
        <mx:ArrayCollection id="treeDP">
            <mx:Object label="/dndDest">
                <mx:children>
                    <mx:ArrayCollection>
                        <mx:Object label="sample1.ks"/>
                        <mx:Object label="sample2.ks"/>
                        <mx:Object label="sample3.ks"/>
                        <mx:Object label="sample4.ks"/>
                        <mx:Object label="sample5.ks"/>
                        <mx:Object label="sample6.ks"/>
                    </mx:ArrayCollection>
                </mx:children>
            </mx:Object>
        </mx:ArrayCollection>
        <mx:List id="list"
                 itemRollOver="lastRollOverIndex = event.rowIndex"
                 width="50%"
                 dragEnabled="true"
                 dataProvider="{listDP}"
                 labelField="label"
                 allowMultipleSelection="true"
                 dragMoveEnabled="false">
        </mx:List>
        <mx:Tree id="tree"
                 width="50%"            
                 dragEnabled="true"            
                 dataProvider="{treeDP}"            
                 dragEnter="onTreeDragEnter(event)"
                 dragOver="onTreeDragOver(event)"
                 dragExit="onTreeDragExit(event)"
                 dragDrop="onTreeDragDrop(event)"
                 labelField="label"
                 liveScrolling="true">
        </mx:Tree>
        <mx:RemoteObject id="FlexDnDRemoteService"
                         showBusyCursor="true"
                         destination="FlexDnD">
            <mx:method name="process"
                       result="resultHandler(event)"
                       fault="faultHandler(event)"/>
        </mx:RemoteObject>
    </mx:Application>
    Thanks,
    Rajiv

    Ya , i have searched and have used the same code.
    But needed to customize few things like:
    stop dnd in same tree
    drop some item into a folder ..( onto it ) etc
    have achieved the same .. but this issue ..
    i think the tree dataprovider (contents internally is not being updated .. only the UI)
    any suggestions ?
    - Rajiv

  • List control issue in Projector mode after Printomatic

    I'm working on an application in MX. I'm using a multi-select list control and mostly it's working fine. However, in Projector mode, under certain circumstances, my list is shown considerably reduced in size and, when I click on it, I get a Director player error: Property not found #selectedIndex.
    I've narrowed the problem down to the use of Printomatic. Unfortunately I'm stuck with Printomatic for the time being.
    I've tried changing the list to a single-select with no change. I've put an alert when I click on the list to determine whether the list object is receiving messages and it is. I've tried returning from the Printomatic calls to a frame where the list doesn't already exist and then recreating the list - no change.
    It seems as though Printomatic is corrupting something related to the list. And, once it's been corrupted, it stays corrupted until I restart the executable.
    Anyone have any suggestions? I don't have time right now to implement a printing class which is the only other idea I have.

    Perhaps is better to continue here because I have the same symptom but due a different problem:
    Creating procedure sp_sqlagent_get_perf_counters...
    Error: 468, Severity: 16, State: 9.
    Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the equal to operation.
    Error: 912, Severity: 21, State: 2.
    Script level upgrade for database 'master' failed because upgrade step 'sqlagent100_msdb_upgrade.sql' encountered error 200, state 7, severity 25. This is a serious error condition which might interfere with regular operation and the database will be taken
    offline. If the error happened during upgrade of the 'master' database, it will prevent the entire SQL Server instance from starting. Examine the previous errorlog entries for errors, take the appropriate corrective actions and re-start the database so that
    the script upgrade steps run to completion.
    Error: 3417, Severity: 21, State: 3.
    Cannot recover the master database. SQL Server is unable to run. Restore master from a full backup, repair it, or rebuild it. For more information about how to rebuild the master database, see SQL Server Books Online.
    SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.
    This is System Center dedicated instance so the defualt collation, as from SC requirements, is SQL_Latin1_General_CP1_CI_AS, but MSDB uses Latin1_General_CI_AS.
    It seems that sqlagent100_msdb_upgrade.sql fails in creating the sp sp_sqlagent_get_perf_counters in the MSDB (in fact it doesn't exist).
    Now I was thinking about changing sqlagent100_msdb_upgrade.sql introducing the collate parameter, but I have don't know where to find it.
    My instance actually is UP due the -T902 parameter usage 
    Please try to write better code ;-)
    Ruggiero Lauria
    MCT-MCITP-MCSA-MCSE-MS SQL DBA

  • ItemRenderer in List control

    Well guys, I seem stuck with a wall trying to make List
    control working with programmable dataProvider and itemRenderer
    defined as a component. The naive example from flex2 dev guide (p.
    723 "Using an item renderer with a List control") is working fine,
    but in real word we are hardly coding dataProvider inline, so I
    tried to change this example and got absolutely nothing in my
    browser window:
    main application:
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    height="700" width="700" creationComplete="initApp()">
    <mx:Script>
    <![CDATA[
    import flash.events.Event;
    import flash.net.URLRequest;
    import mx.utils.ArrayUtil;
    import mx.collections.ArrayCollection;
    [Bindable]
    private var u:URLRequest;
    private var jobArray: Array = new Array();
    private var myAC: ArrayCollection = null;
    private function initApp():void {
    var myObj1:Object = {label:"Alaska", data:"Juneau",
    webPage:"
    http://www.state.ak.us/"};
    var myObj2:Object = {label:"Alabama", data:"Montgomery",
    webPage:"
    http://www.alabama.gov/"};
    jobArray.push(myObj1);
    jobArray.push(myObj2);
    myAC = new ArrayCollection(jobArray);
    ]]>
    </mx:Script>
    <mx:List id="myList"
    height="180" width="250" variableRowHeight="true"
    itemRenderer="RendererState" backgroundColor="white"
    dataProvider="myAC">
    </mx:List>
    </mx:Application>
    itemRenderer component:
    <?xml version="1.0"?>
    <mx:VBox xmlns:mx="
    http://www.adobe.com/2006/mxml"
    >
    <mx:Script>
    <![CDATA[
    import flash.events.Event;
    import flash.net.URLRequest;
    private var u:URLRequest;
    private function handleClick(eventObj:Event):void {
    u = new URLRequest(data.webPage);
    navigateToURL(u);
    ]]>
    </mx:Script>
    <mx:HBox >
    <mx:Label id="State" text="State: {data.label}"/>
    <mx:Label id="Statecapital" text="Capital: {data.data}"
    />
    </mx:HBox>
    <mx:LinkButton id="webPage" label="Official {data.label}
    web page"
    click="handleClick(event);" color="blue" />
    </mx:VBox>
    Anyone?

    Ug, why won't adobe let us use tabs in our messages? Just to
    make everyone's code harder to read? Anyway...
    the very first thing I notice is that your list's
    dataProvider has no brackets "{}" to link it to the object. Seems
    that should throw an error though... however, there is a way to
    mess up your browser by installing the new Flash 9 player without
    installing the new SDK so that you don't actually get to see the
    errors that are thrown. So be careful there.
    First see if the brackets is an issue. Even if it doesn't
    throw an error, since you aren't binding the dataProvider property
    it may only load the ArrayCollection once when it is still empty
    and not after you have pushed the new data. You might also try
    setting the dataProvider directly in AS code: list.dataProvider =
    [obj1, obj2]
    I recommend adjusting your code in various ways first before
    finally giving up and posting here. Often that will narrow down the
    problem and make it easier to address.
    Finally, if you are thinking of having multiple focusable
    controls in your itemRenderer/Editor (this goes for either List or
    DataGrid) you should abandon the idea right away. Last I checked,
    tab focus will not pass correctly between individual renderers (at
    least not on IE). My solution is to simply use a Repeater. It has
    more overhead and you have to fiddle with scroll bars a bit, but it
    is a much more stable and robust solution.
    Anyway good luck.

  • BackgroundColor on ItemRenderers in mx:List control

    We have some mx:List controls in our application and the backgroundColor on the itemRenderers has stopped working when we moved from Flex 3 to Flex 4. Is this a known issue? I have been searching high and low for any mention of this and I haven't been able to come up with anything. It seems that if I create another container inside the root container, I can set the color on that but I was wondering if there was any way to get it to work without such a large change.
    I built a basic sample and it is showing the same problem:
    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                           xmlns:s="library://ns.adobe.com/flex/spark"
                           xmlns:mx="library://ns.adobe.com/flex/mx"
                           width="200" height="250">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
            <s:ArrayCollection id="testData">
                <fx:Object name="Line 1" description="Description One" color="#347FE7"/>
                <fx:Object name="Line 2" description="Description Two" color="#387fe8"/>
                <fx:Object name="Line 3" description="Description Three" color="#a437bd"/>
            </s:ArrayCollection>
        </fx:Declarations>
        <mx:List dataProvider="{testData}" width="100%" height="100%">
            <mx:itemRenderer>
                <fx:Component>
                    <mx:HBox
                        backgroundColor="{data.color}"
                        backgroundAlpha="0.5"
                        mouseOver="{setStyle('backgroundAlpha', 1.0)}"
                        mouseOut="{setStyle('backgroundAlpha', 0.5)}">
                        <mx:Canvas width="16" height="16" backgroundColor="{data.color}" />
                        <mx:Text text="{data.name}"/>
                        <mx:Text text="{data.description}"/>
                    </mx:HBox>
                </fx:Component>
            </mx:itemRenderer>
        </mx:List>
    </s:WindowedApplication>

    Sometimes when I need a background color or image, I just wrap my component in a BorderContainer and set the <s:Fill/> there.
    It may not be as elegant as Darrell's solution, but it works for me.

  • How Do You Populate A Spark List Control With An Array?

    Hello, all,
    Sorry to come accross so frustrated, but how in the name of God do you populate a Spark list control with the data in an array?  You used to be able to do this with the mx:List control, but the guys developing Flex just had to make things more difficult than they need to be!  I am more of a code purist and prefer doing things the way they have been done for decades, but apparently nothing can ever stay simple!
    I simply want to populate a list control with an array and this shouldn't be rocket science!  I found out that I must use a "collection" element, so I decided that an arrayCollection would be best.  However, after searching Adobe's documentation about arrayCollections, I am lost in a black hole of data binding, extra lines of code just to add a new element, the need to sort it, etc...!
    Here is my code:
    var pendingArray:ArrayCollection = new ArrayCollection();
    for ( var i:int = 0 ; i < queue.length ; i++ )
         var item:UserQueueItem = queue[i] as UserQueueItem ;
         if ( item.status == UserQueueItem.STATUS_PENDING )
         pendingArray.addItem({label:item.descriptor.displayName,descriptor:item.descriptor});
    Here is the relevant MXML:
    <s:VGroup>
         <s:List id="knockingList" width="110" height="100"/>              
    </s:VGroup>
    I'm not getting any errors, but the list is not populating.
    I have seen several examples where the arrayCollection is declared and populated in MXML:
            <mx:ArrayCollection id="myAC">
                <!-- Use an fx:Array tag to associate an id with the array. -->
                <fx:Array id="myArray">
                    <fx:Object label="MI" data="Lansing"/>
                    <fx:Object label="MO" data="Jefferson City"/>
                    <fx:Object label="MA" data="Boston"/>
                    etc...
               </fx:Array>
            </mx:ArrayCollection>
    That may be fine for an example, but I think this is a rare situation.  Most of the time I would image that the arrayCollection would be created and populated on the fly in ActionScript!  How can I do this?
    Thanks in advance for any help or advice anyone can give!
    Matt

    In your post it seemed like you were trying to take care of many considerations at once: optimization, design, architecture.  I would suggest you get something up and running and then worry about everything else.
    If I use data binding, then I will probably have to declare the  arrayCollection as a global variable and then I'll have to write 100 or  so extra lines of code to addItem(), removeItem(), sort(), etc...  It  just seems like too much overhead.
    I believe you may have some misconceptions about databinding in general.  You won't have to make it a global variable and you certainly won't need an extra 100 lines of code.  If you did this forum would be a very , very quiet place.
    I don't want to use data binding because the original array is refreshed  often and there is one function called by an event that re-declares the  arrayCollection each time, populates it with the array, and then sets  it as the list's dataprovider.
    That is the beauty of the ArrayCollection, it can handle the updates to its source Array. I don't know if you need to redeclare the ArrayCollection, resetting the source to the new Array allows everyone involved to keep their references so you don't have to worry about any "spooky" stuff going on.

  • Issue with list saving data after sites upgrade from sharepoint 2010 to sharepoint 2013

    Issue with list saving data after sites upgrade from sharepoint 2010 to sharepoint 2013 
    Newform.aspx of list:-
    Custom List is not saving data sometimes in the new form after 15 minutes and only blank entry record got created without saving data, even though some columns are mandatory fields?

    Hello dcakumar,
    Sounds like a strang issue. If you can reproduce this can you see some errors in the ULS logs?
    - Dennis | Netherlands | Blog |
    Twitter

  • How to limit the number of items that a list control can hold?

    Hi,
    I am using a Flex3 List control for one of my projects.
    I add drag & drop functionality to it, so that i can drag & drop elements from one control to another.
    How to limit the number of items that a list control can hold / can be dropped in a list control ?
    - Sen.

    1. Listen for the dragdrop event on the control you are dragging onto.
    2. check the length of the items in the dataprovider - if it exceeds your maximum override the default drop action with e.preventDefault(); (assuming you used e for the event on the handler).
    Regards,
    Mark.

  • A Cursor List Control for the HomeBoyz

    I wanted a Cursor List Control for use with a Waveform Graph, but I couldn't find one anywhere in the Controls Palette. So during a busy morning of data gathering, I took about an hour to write one by hand. [Since I'm getting to be pretty good at LabVIEW, I reckon I can bill about $250/hr for this stuff, so y'all appreciate your free software.]
    Anyway, a Cursor List is an array of Cursor Property Clusters. The attached "Cursor List.vi" contains both a singleton Cursor Property Cluster and an Array of Cursor Property Clusters; the block diagram shows how to wire this array to the Waveform Graph's Cursor List property node.
    Attachments:
    Cursor_List.vi ‏40 KB

    Dennis,
    I followed your instructions..
    It works..!!!

  • Issue with copy control of Delivery document to Billing document

    Hi All,
    I am having some issue with copy control of Delivery document to Billing document.
    I am having two line items in Delivery documetn, one is for item to be delivered to customer and other which is created due to batch determination.
    Now , when I create billing document (VF01) with reference to this delivery document , I want only one line item (for the one which needs to be delivered to customer).
    I have used following things in  copy contro from ZLF to ZF2:
    Copying requirements: 004 ( Deliv-related item)
    Data VBRK/VBRP: 007 "(Inv.Split (Rec/Div))
    Is it correct or shall I use something else, so I have only one line item in Billing document.
    Regards
    Nidhi

    Pls. search the forum.
    Pls. refer the below link -
    Line with 0 quantity for main item with batch split
    Thanks

  • How to handle multiple selection in the Spark List control with checkbox as itemrenderer?

    Hi All,
    I am using checkbox as an ItemRenderer in spark list.
    I have a query.
    how to handle multiple selection in the Spark List control with checkbox as itemrenderer?
    how to retrieve the selected item label?
    Thank you in advance.

    Hi there, I'll tweak your code a little bit to something like this:
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                    layout="vertical">
        <mx:Script>
            <![CDATA[
                 import mx.events.ListEvent;
                 import mx.controls.CheckBox;
               [Bindable]
               private var mySelectedIndexes:ArrayCollection=new ArrayCollection();
                private function onChange(e:ListEvent):void
                   if(CheckBox(e.itemRenderer).selected){
                             mySelectedIndexes.addItem(e.rowIndex);
                   }else{
                                  mySelectedIndexes.removeItemAt(mySelectedIndexes.getItemIndex(e.rowIndex));     
                   chkList.selectedIndices=mySelectedIndexes.toArray();
            ]]>
        </mx:Script>
    <mx:ArrayCollection id="collection">
            <mx:Object label="Test A"/>
            <mx:Object label="Test B"/>
            <mx:Object label="Test C"/>
            <mx:Object label="Test D"/>
            <mx:Object label="Test E"/>
            <mx:Object label="Test F"/>
            <mx:Object label="Test G"/>
        </mx:ArrayCollection>
    <mx:List id="chkList" dataProvider="{collection}" itemRenderer="mx.controls.CheckBox"  itemClick="onChange(event);" allowMultipleSelection="true"/>
    </mx:Application>

  • Embed Font in a List Control

    I have no problem embeding fonts to be used in dynamic text
    but I cannot get my style to apply to a list control using AS3.
    My style code is:
    import fl.managers.StyleManager;
    var menuStyle:TextFormat = new TextFormat();
    menuStyle.color = 0xFFFFFF;
    menuStyle.size = 20;
    menuStyle.font = new CKTerzini().fontName;
    menuStyle.letterSpacing = 1;
    menuStyle.align = "center";
    StyleManager.setComponentStyle(List, "textFormat",
    menuStyle);
    My list control code is:
    my_list.setStyle("embedFonts", true);
    //my_list.setStyle("textFormat", menuStyle); DOES NOT WORK
    my_list.setRendererStyle("textFormat", menuStyle);
    I also have the font added to the library and properly
    linked. (Class name set to CKTerzini).
    This code works fine with the font on the system but not on a
    computer without the font.
    I have tested that the font is embed in the SWF by using the
    style on dynamic text and it works fine.
    Any suggestions would be greatly welcomed...
    Robert Pritchard
    Nerds Software

    Can you post the code for your list, renderer and custom control?

  • Multiple selection in List control using CheckBox as itemrenderer

    Hey all,
                I am trying to get multiple selection working in a list control using the CheckBox as itemrederer but I am unable to get a list of selected indices even though I have multiple check boxes selected
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                    layout="vertical">
        <mx:Script>
            <![CDATA[
                private function onChange():void
                    trace(chkList.selectedIndices);
            ]]>
        </mx:Script>
    <mx:ArrayCollection id="collection">
            <mx:Object label="Test A"/>
            <mx:Object label="Test B"/>
            <mx:Object label="Test C"/>
            <mx:Object label="Test D"/>
            <mx:Object label="Test E"/>
            <mx:Object label="Test F"/>
            <mx:Object label="Test G"/>
        </mx:ArrayCollection>
    <mx:List id="chkList" dataProvider="{collection}" itemRenderer="mx.controls.CheckBox" change="onChange();" allowMultipleSelection="true"/>
    </mx:Application>
    I always get the last item I clicked
    Thanks,
    Firdosh

    Hi there, I'll tweak your code a little bit to something like this:
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                    layout="vertical">
        <mx:Script>
            <![CDATA[
                 import mx.events.ListEvent;
                 import mx.controls.CheckBox;
               [Bindable]
               private var mySelectedIndexes:ArrayCollection=new ArrayCollection();
                private function onChange(e:ListEvent):void
                   if(CheckBox(e.itemRenderer).selected){
                             mySelectedIndexes.addItem(e.rowIndex);
                   }else{
                                  mySelectedIndexes.removeItemAt(mySelectedIndexes.getItemIndex(e.rowIndex));     
                   chkList.selectedIndices=mySelectedIndexes.toArray();
            ]]>
        </mx:Script>
    <mx:ArrayCollection id="collection">
            <mx:Object label="Test A"/>
            <mx:Object label="Test B"/>
            <mx:Object label="Test C"/>
            <mx:Object label="Test D"/>
            <mx:Object label="Test E"/>
            <mx:Object label="Test F"/>
            <mx:Object label="Test G"/>
        </mx:ArrayCollection>
    <mx:List id="chkList" dataProvider="{collection}" itemRenderer="mx.controls.CheckBox"  itemClick="onChange(event);" allowMultipleSelection="true"/>
    </mx:Application>

  • Issue on availabilty control

    Hello Experts,
    Requesting your suggestions/solutuon to the below issue on availabiltiy control.
    Few days back we faced a issue that , the AVAC status set for the projects automatically gets deactivated and we were not able to set the AVAC status back through CjBN or any other direct methods.
    After investigation we could find that , since Availabilty control activation type is set as'1' which means the AVAC status should get set whenever a budget is assigned to the project. We could find that by just editing already existing budget in CJ30, automatically actiavted the AVAC status.
    Now the problem we are facing is that , this status is getting decativaed again. What could be the possible reasons ? anyone has faced such issue, please share your experinece/suggestions.
    Thanks in adavnce
    Sandeep

    Hi sudhir,
    Thanks for your reply.
    Is there anyway , we could check whether CJBW is run for that project or not ?
    I have checked for the project structure , but no chnages to the structure is made after the AVAC status is set for that project. so i assume this( problem)  is not due to any chnages to the project structure.
    Similarly can i see somewhere, if any transcation like CJBW or some postings have been done against the project, which could possibly deactivate the AVAC status ( just a guess).
    Is there any such reports ?
    Please let me know.
    thanks and regards
    Sandeep

  • Value drop down list control in ADOBE Form

    We are on SP16 currently. We are developing an ADOBE interactive online
    form using ABAP WebDynpro.
    To display search help of a few fields like Vendor Number, G/L Account
    Number, Cost Center, we are using 'Value Help Drop Down List' control
    availalbe in WebDynpro Native group.
    After the form gets loaded on the broswer, first time the search help
    control works absolutely fine for any of the field. But only once. Once
    one search help gets displayed, none of the other search value drop
    down control gets clicked. But please note that normal drop down (with
    fixed values) gets clicked and allows to choose any entry from it. It
    also allows to enter values into other text box controls. Only Search
    Value Drop Down list stops working.
    For Example: We have 2 search help drop down list controls (one for
    LIFNR and another for WERKS) and 1 drop down list control (Fixed Values
    to be displayed for selection).
    After form gets displayed on ABAP WebDynpro, if we click on LIFNR, the
    search help for LIFNR will come and it will allow to select vendor
    number from it. But after that, it doesn't allow to select WERKS nor
    even to LIFNR. If we click on WERKS first, it will work perfactly fine
    but then, it will not allow LIFNR or WERKS after that. In any of the
    case, it will always allow to select the values from Fixed Value Drop
    down list.
    Please note that we dont have SAP Portal into the landscape.
    Is there any bug in the control?
    Please provide the solution ASAP.

    Hi Reema,
    We are using ZCI type of form. So, I dont think there is any need to run the report for ZCI_Update.
    And the display type of Interactive Form in ABAP WebDynpro is 'NATIVE' which is the same we dragged the control from (WebDynpro Native).
    Is there any work around to display search helps on ADOBE Interactive forms apart of this control?
    Appreciate your quick answer.
    Thanks & Regardss,
    Sandip Kamdar

Maybe you are looking for

  • Cant hear audio , text tone, keyboard tone without headphone but ringer is fine in iphone 4

    Cant hear audio , text tone, keyboard tone without headphone but ringer is fine in iphone 4

  • SPDIF IN VISTA

    Hi can anyone help here?I have an Audigy 2 ZS that worked fine in XP with powerdvd etc, for spdif output. In vista 64 I couldn't get any sound if i selected spdiff. I installed a codec pack and a windows update kb936225. My sound then worked fine. I

  • Lgical table from two physical table

    Hi, I am trying to design a logical fact table from two physical table. One table has transaction data and another has accounting data. The requirement is, I need to merge the rows between these two tables, where were it matches. If the keys are not

  • Aperture license disappeared during system rebuild

    I recently had to reinstall the operating system on my MacBook Pro (osX 10.5.6) and was very surprised to see Aperture asking for the license code again. I had thrown away my original packaging (stupid!) so, I was stuck. Called apple and they do not

  • 1000-2000 Redirects in Obj.conf - Performance Issues?

    I'm potentially going to have upwards of 1000 redirects in obj.conf. I assume there is no maximum number of redirects, but I'm worried about performance. Will there be a significant impact on server start up time? Also, I imagine that Sun One caches