Arraycollections Problem

Hi i'm having some problems with Arraycollections. here is what my intention is and what i'm doing
What i want:  I want to send some information from the flex ui to a java class . and save this info in a data base.
What i'm doing:
I'm packing the info into a Arraycollection(it consists of an 2-D integer array and a String array).
Sending  it to a java class using remote object. I'm using  flex.messaging.io.ArrayCollection package to use Arraycolelction to  recieve that data in java class
Problem:  I want o extract the  integer array and String array from that ArrayCollection so that i can  use it to store them in DB.
Am i doing anything wrong?? Is there any alternate way like storing the whole Arraycollection as it is in DB

Hi Bhasker,
thanks for u r reply. Here i attached screen shot of my server "data.result".
My proxy varaible contains
My object varaible "obj" contains
After parsing the result my arraycollection contains, (i mean after converting Object to Array to ArrayCollection) the below information. For information Pl find the attached arraycollection.png image. In the attached image my arraycollection name is "users".
Here i pasted the code that i used  to convert  "ObjectProxy" to "ArrayCollection"
var proxy:ObjectProxy = ObjectProxy(data.result);
            var obj:Object = proxy.object_proxy::object;
            var arrycoll:Array = ArrayUtil.toArray(obj); 
            model.users = new ArrayCollection(arrycoll);
Regards
sss

Similar Messages

  • Binding To a Propery - Inside an ArrayCollection Problem

    I'm trying to make an editor where users can select an editable item from a list (each item in the list might be a different type of editable object). When the user selects an item from the list its editable properties show up in a panel with a suitable item editor.
    The problem I'm having is I don't want all item properties to be editable and I need to be able to specify what type of editor should be used e.g. TextInput, ColorPicker or custom editor.
    I thought about creating an EditableItem objects which could have an ArrayCollection called editableItems which holds what can be edited and what type of editor to use in a EditConf object:
    package
        [Bindable]
        public class EditConf
            public var value:*;
            public var editor:String = "DefaultEditor";
            public function EditConf(value:*, editor:String) 
                this.value = value; 
                this.editor = editor; 
    Inside the EditableItem would look something like this with an ArrayCollection holding the EditConf objects. 
    package 
        import mx.collections.ArrayCollection; 
        [Bindable] 
        public class EditableItem 
            public var label:String; 
            public var colour:uint; 
            public var nonEditableVar:String; 
            public var nonEditableVar2:Boolean; 
            public var editableItems:ArrayCollection; 
            public function EditableItem() 
                editableItems.addItem(EditConf(label, "TextInput")); 
                editableItems.addItem(EditConf(colour, "ColorPicker")); 
    The problem with this is when you assign the editor - say a TextInput to edit the value "label" from the editableItems ArrayCollection it updates the editableItem ArrayCollection but not the variable "label". I thought the ArrayCollection would just hold a pointer to "label" so it would update the variable but no such luck. 
    Does anyone know of a better way to create the application above or why the binding does function as I expected? 
    Many Thanks

    It sounds more like an architecture problem.  If I had a problem like this, I would have a model class hold my selectedItem.  This "selectedItem" property would be injected into a presenter model through a setter function.  In the setter function, the presenter would look at the selectedItem and decide which properties on the view class ( viewstack or states ) should be editable.
    I have some misgivings about the value objects holding the type of editor they should use, that sounds like something that should be delegated to a UI/Presenter class.

  • Eventhandler association with Arraycollection problem using DataGroup

    I am using the DataGroup (similar to Repeater) and get the data from an XML file that fills an Arraycollection. The DataGroup requires an ItemRenderer that consists of labels and Image components surrounded by Canvas. The text, images x and y parameters from individual items from the XML file are all correctly accepted by the ItemRenderer. However, I have some mouse eventhandlers incorporated in the ItemRenderer but only the last item from the Arraycollection receives the eventhandlers. I want of course all items to receive mouse events.
    So what am I doing wrong? I know all very well in Flash, which is my background but this type of problem not in Flash builder. Here is the code for the ItemRenderer:
    <?xml version="1.0" encoding="utf-8"?>
    <s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:s="library://ns.adobe.com/flex/spark"
                    xmlns:mx="library://ns.adobe.com/flex/mx"
                    autoDrawBackground="false">
        <mx:Canvas width="275"  height="90" backgroundColor="#cccccc"
                   y="{data.y}" x="{data.x}" mouseDown="mouseDownHandler(event)"
                   mouseUp="mouseUpHandler(event)" click="canvas1_clickHandler(event)"
                   borderStyle="outset" borderThickness="5">
            <mx:Canvas id="innerCanvas" width="100%" height="100%">
            <fx:Script>
                <![CDATA[
                    protected function mouseDownHandler(event:MouseEvent):void
                        innerCanvas.setStyle("backgroundColor", "#444444");
                    protected function mouseUpHandler(event:MouseEvent):void
                        innerCanvas.setStyle("backgroundColor", "#cccccc");
                    protected function canvas1_clickHandler(event:MouseEvent):void
                        trace(data.handler);
                ]]>
            </fx:Script>
            <s:Label text="{data.ptName}" x="70" y="5" fontSize="16"/>
            <s:Label text="{data.chiefComplaint}" x="73" y="38" fontSize="14" color="#1343F5"/>
            <s:Image source="{data.faceSource}" x="5" y="5" width="60" height="60" />
            </mx:Canvas>
        </mx:Canvas>
    </s:ItemRenderer>

    You would need two columns(at least) in your load rule. The first column with the member name(s) of the base members you want to associate attributes to and in the second column the attribute member name.
    If the dimension build properties for the first column you would set the dimension name and type of build level or generation(I suggest level) and set the level number. (Don't forget to set the dimension build properties to level build or you will get an error)
    The second column, select the dimension then go down and select the attribute dimension that is associated to this base dimension
    As an example for Sample basic you might have a row that looks like
    100-10 Can
    For the first column you would select Dimension = Product, Type Level value = 0
    The second column would have Dimension = Product Type = Attribute dimension Pkg Type
    In the dimension settings, make sure Product is set to level build and can associate attributes and allows association changes.

  • New ListCollectionView(ArrayCollection) problem

    Hey everyone,
    I have a component that performs filtering on the dataprovider, but I don't want that dataprovider to be filtered elsewhere.  The component I am using is an opensource auto complete textbox, which operates by text changing the dataprovider filter.
    I want the data provider to be wrapped in a ListCollectionView so that the original dataprovider is never touched, but mimicked.
    The problem though, is that the dataprovider always comes up empty this way...  Any ideas?
    <components:AutoComplete
                        id="individualName"
                        dataProvider="{new ListCollectionView(individualsPM.individualsCollection)}"
                        labelField="name"
                        prompt="Please select"
                        selectedItemStyleName="underline"
                        backspaceAction="remove"
                        change="individualName.selectedItem != null ?
                            individualsPM.getIndividual(individualName.selectedItem as Individual):
                            trace('nothing')"
                        searchChange="individualsPM.createIndividual(); individualsPM.selectedIndividual.name = individualName.searchText"/>

    Try binding to a variable that is bound to that expression.

  • ArrayCollection/Single XML Node problem

    I've encountered a very frustrating situation that I would
    LOVE some help with. I am getting xml back from an HTTPService that
    I'm casting as an ArrayCollection. Very simple code:
    [Bindable]
    private var queueCol:ArrayCollection;
    queueCol = event.result.Response.CallQueue.QueueItem;
    This works great as long as there are multiple "QueueItem"
    nodes. once the sml gets down to ONE QueueItem Flex throws an ugly
    error. I have found this in other areas as well. It seems Flex
    cannot reconcile xml of only single child nodes.
    Has anyone else encountered this? Is there a
    workaround/different approach to get around this?

    You might try something like:
    queueCol = new
    ArrayCollection(event.result.Response.CallQueue.QueueItem is
    Array?event.result.Response.CallQueue.QueueItem:[event.result.Response.CallQueue.QueueIte m]);
    The SimpleXMLDecoder starts of converting a child node to a
    property, but if there's already something there, it converts it to
    an array. So flex doesn't have any problem reconciling xml with
    single child node - it is making a best guess in the absence of an
    xml schema. You can write your own decoder if you like (this is
    what I have done), and hand it to the HTTPService to use in place
    of the default. Then you can make it read a schema (if you have
    one).

  • Problem filling DataGrid with XML - Object or ArrayCollection?

    Hi,
    I am trying to fill a datagrid with an XML file, rendered
    from a PHP
    script.
    The problem is that - first time there is only one entry in
    the XML
    file, so when I receive the data using
    event.result.root.child, I get
    an Object. But second time, when there are two entries in the
    XML
    file, the return type becomes an ArrayCollection of "child"
    type
    objects.
    This causes a problem when setting dataprovider of a
    DataGrid....
    So is there a way I can know what is the return type from the
    XML
    file, i.e., whether it is an Object or an ArrayCollection, so
    that I
    can set the dataprovider accordingly?

    In E4x
    If you have an xml structure like so:
    <parent prop1='someValue' >
    <child prop1='someValue' />
    </parent>
    to reference the parent use event.result
    to get the child use: event.result.child; to get the child
    attr: event.result.child.@prop1;

  • Problem in arraycollection?

    Hi,
    I given an arraycollection as a dataprovider to a datagrid which was with some itemrenderers.
    while retrieving the saved data from the grid i am copying some columns like
    arraycoll[3]['name'] = 'saome name';
    when i am assigning some value to a particular row item in the dataprovider arraycollection,
    all the rows are updating with the same name.
    for example: if an arraycollection has 3 items like
    arrcoll:ArrayCollection = new Arraycollection([
    {name:'sample1' id:1},
    {name:'sample2' id:1},
    {name:'sample3' id:1}
    when i want to update the second name i.e.sample2 with sample4 and i assigned that value like
    arrcoll[1]['name']='sample4';
    all the items are effecting like
    {name:'sample4' id:1},
    {name:'sample4' id:1},
    {name:'sample4' id:1}
    So how can i update a single item in an arraycollection.
    please provide me the solution
    Regards
    D.Mahesh Babu

    Here i am populating an arraycollection with the data which is coming from the database.
    In this arraycollection i want to copy some items into the other arraycollection which is a dataprovider
    to a datagrid.(I dont want to copy the complete row, but some items in a row)
    so when i am copying like
    for(var i:int=0;i<arrcoll2.length;i++)
         arrcoll[i]['name']=arrcoll2[i]['name'];
    So the problem is after the above loop was completed, all the rows in the arrcoll is filled with
    the last row items of arrcoll2.
    Another problem is in the datagrid i used an itemrenderer of richtexteditor to edit that cell.
    so when i edit that cell and save the edited data to the dataprovider like
    data[listData.dataField] = 'editedCellData';
    all the cells of that column are updated with the same data.
    So please provide me the solution. If u want anymore details please reply me soon.
    Thanks

  • Problem updating a SOAP Web Service with ArrayCollection

    Hello,
    I am having issues POST'ing an ArrayCollection to a C# Web
    Method. Here's how I have my application set up:
    I have a DataGrid in my application and set the dataProvider
    to be the result object of a Web Service operation. I set the
    DataGrid's editable property to "true" and would like to be able to
    edit the data and send off the DataGrid's dataProvider as the
    parameter for the Web Method. If I edit the first row of the
    DataGrid and trigger the operation, it gets saved just fine. If I
    try to edit any other row this way, it keeps sending the same
    packet (as verified by a packet sniffer) not allowing me to update
    any other row. It seems the Web Service is sending the first 255
    characters of the serialized ArrayCollection.
    My questions are: why is this happening?
    and
    How can I fix this?
    Here is the request of my Web Service operation:
    <mx:request xmlns="">
    <GlossaryTerms>
    {GlossaryArrayCollection}
    </GlossaryTerms>
    </mx:request>
    This is the definition of GlossaryArrayCollection:
    [Bindable]
    public var GlossaryArrayCollection:ArrayCollection = new
    ArrayCollection();
    Here is the SOAP packet that the C# Web Method is expecting:
    <?xml version="1.0" encoding="utf-8"?>
    <soap12:Envelope xmlns:xsi="
    http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="
    http://www.w3.org/2001/XMLSchema"
    xmlns:soap12="
    http://www.w3.org/2003/05/soap-envelope">
    <soap12:Body>
    <GlossaryUpdate xmlns="">
    <GlossaryTerms>
    <Glossary cID="int" cDeleted="boolean" cTerm="string"
    cDefinition="string" cURL="string" cPublic="boolean"
    cRowVersion="string"/>
    <Glossary cID="int" cDeleted="boolean" cTerm="string"
    cDefinition="string" cURL="string" cPublic="boolean"
    cRowVersion="string" />
    </GlossaryTerms>
    </GlossaryUpdate>
    </soap12:Body>
    </soap12:Envelope>
    Thanks to anyone for their help.
    Brian Cary

    Where exactly you are seeing this error? possible for you share the screenshot?
    Execution failed: These policy alternatives can not be satisfied:
    {http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}SupportingTokens

  • Can anyone solve this simple MVC problem with ArrayCollection

    I have very simple application trying to understand how to apply MVC without any framework. There are quite a few exemples on the net but most do not deal with complex data.
    here is my application with 4 files: MVCtest.mxml, MyController.as, MyModel.as and MyComponent.as
    first the Model MyModel.as
    package model
    import flash.events.Event;
    import flash.events.EventDispatcher;
    import flash.events.IEventDispatcher;
    import mx.collections.ArrayCollection;
    [Event(name="ArrayColChanged", type="flash.events.Event")]
    [Bindable]
    public class MyModel extends EventDispatcher
      private static var instance:MyModel;
      public static const ARRAYCOL_CHANGED:String = "ArrayColChanged";
      private var _myArrayCol:ArrayCollection;
      public function MyModel(target:IEventDispatcher=null)
       super(target);
       instance = this;
      public static function getInstance():MyModel
       if(instance == null)
        instance = new MyModel();
       return instance;
      public function get myArrayCol():ArrayCollection
       return _myArrayCol;
      public function set myArrayCol(value:ArrayCollection):void
       _myArrayCol = new ArrayCollection(value.source);
       dispatchEvent(new Event(ARRAYCOL_CHANGED));
    then the controller: MyController.as
    package controller
    import components.MyComponent;
    import flash.events.Event;
    import flash.events.EventDispatcher;
    import flash.events.IEventDispatcher;
    import model.MyModel;
    import mx.collections.ArrayCollection;
    import mx.controls.Alert;
    import mx.rpc.events.FaultEvent;
    import mx.rpc.events.ResultEvent;
    import mx.rpc.remoting.RemoteObject;
    public class MyController extends EventDispatcher
      [Bindable]
      public var view:MVCtest;
      [Bindable]
      public var componentView:MyComponent;
      private var _model:MyModel = MyModel.getInstance();
      public function MyController(target:IEventDispatcher=null)
       super(target);
       _model.addEventListener("ArrayColChanged", onArrayColChange);
      public function initialise(event:Event):void
       getData();
      public function getData():void
       var dataRO:RemoteObject = new RemoteObject;
       dataRO.endpoint = "gateway.php";
       dataRO.source = "MytestdbService";
       dataRO.destination = "MytestdbService";
       dataRO.addEventListener(ResultEvent.RESULT, dataROResultHandler);
       dataRO.addEventListener(FaultEvent.FAULT, dataROFaultHandler);
       dataRO.getAllMytestdb();   
      public function dataROResultHandler(event:ResultEvent):void
       _model.myArrayCol = new ArrayCollection((event.result).source);
      public function dataROFaultHandler(event:FaultEvent):void
       Alert.show(event.fault.toString());
      public function onArrayColChange(event:Event):void
       componentView.myDataGrid.dataProvider = _model.myArrayCol;
    This is the main application: MVCtest.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
          xmlns:s="library://ns.adobe.com/flex/spark"
          xmlns:mx="library://ns.adobe.com/flex/mx"
          xmlns:controller="controller.*"
          xmlns:components="components.*"
          width="600" height="600"
          creationComplete="control.initialise(event)">
    <fx:Declarations>
      <controller:MyController id="control" view = "{this}"/>
    </fx:Declarations>
    <fx:Script>
      <![CDATA[
       import model.MyModel;
       import valueObjects.MyVOorDTO;
       [Bindable]
       private var _model:MyModel = MyModel.getInstance();
      ]]>
    </fx:Script>
    <s:VGroup paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
      <s:Label fontSize="20" fontWeight="bold" text="MVC Test with components"
         verticalAlign="middle"/>
      <components:MyComponent/>
    </s:VGroup>
    </s:Application>
    And this is the component: MyComponent.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <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" width="400" height="300">
    <s:layout>
      <s:VerticalLayout paddingBottom="10" paddingLeft="10" paddingRight="10" paddingTop="10"/>
    </s:layout>
    <fx:Declarations>
      <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <s:Label fontSize="16" fontWeight="bold" text="My Component " verticalAlign="bottom"/>
    <s:DataGrid id="myDataGrid" width="100%" height="100%" requestedRowCount="4">
      <s:columns>
       <s:ArrayList>
        <s:GridColumn dataField="mystring" headerText="String"></s:GridColumn>
        <s:GridColumn dataField="myinteger" headerText="Integer"></s:GridColumn>
        <s:GridColumn dataField="myreal" headerText="Real"></s:GridColumn>
        <s:GridColumn dataField="mydate" headerText="Date"></s:GridColumn>
       </s:ArrayList>
      </s:columns>
    </s:DataGrid>
    </s:Group>
    Here is the code to generate the database:
    CREATE DATABASE mytest;
    CREATE TABLE myTestDB
          myid INT UNSIGNED NOT NULL AUTO_INCREMENT,
          mystring CHAR(15) NOT NULL,
          myinteger INT NOT NULL,
          myreal DECIMAL(6,2) NOT NULL,
          mydate DATE NOT NULL,
          PRIMARY KEY(myid)
    ) ENGINE = InnoDB;
    INSERT INTO myTestDB (mystring, myinteger, myreal, mydate) VALUES ('Test', 123, 45.67, '2012-01-01'), ('Practice', 890, 12.34, '2012-02-01'), ('Assay', 567, 78.90, '2011-10-01'), ('Trial', 111, 22.22, '2009-09-09'), ('Experiment', 333, 44.44, '1999-04-15'), ('Challenge', 555, 66.66, '2012-12-21');
    And finally here is the PHP script.
    <?php
    class myVOorDTO
      var $_explicitType = "valueObjects.myVOorDTO";
      public $myid;
      public $mystring;
      public $myinteger;
      public $myreal;
      public $mydate;
      public function __construct()
        $this->myid = 0;
        $this->mystring = "";
        $this->myinteger = 0;
        $this->myreal = 0.0;
        $this->mydate = date("c");
    class MytestdbService
      var $username = "yourusername";
      var $password = "yourpassword";
      var $server = "yourserver";
      var $port = "yourport";
      var $databasename = "mytest";
      var $tablename = "mytestdb";
      var $connection;
      public function __construct()
        $this->connection = mysqli_connect(
        $this->server, $this->username, $this->password, $this->databasename, $this->port);
    * Returns all the rows from the table.
    * @return myVOorDTO
      public function getAllMytestdb()
        $query = "SELECT * from $this->tablename";
        $result = mysqli_query($this->connection, $query);
        $results = array();
        while ($obj = mysqli_fetch_assoc($result))
          $row = new myVOorDTO();
          $row->myid = $obj['myid'] + 0;
          $row->mystring = $obj['mystring'];
          $row->myinteger = $obj['myinteger'] + 0;
          $row->myreal = $obj['myreal'] + 0.0;
          $row->mydate = new Datetime($obj['mydate']);
          array_push($results, $row);
        return $results;
    ?>
    My understanding as to what is going on is: (1) on creation complete the application launch the initialise() function of the controller (2) this function starts the remoteObject which get the data (3) once the results arrive the resultHandler store the data into the ArrayCollection of the model ***this does not work*** (4) even if part 3 did not work, the setter of the ArrayCollection in the model send an event that it has been changed (5) the controller receive this event and assigns the ArrayCollection of the model as the dataprovider for the datagrid in the compoent.
    Of course, since the ArrayCollection is null, the application gives an error as the dataProvider for the datagrid is null.
    What is missing in this application to make it work properly? I believe this is an example that could help a lot of people.
    Even if I change the setter in the model to _myArrayCol = ObjectUtil.copy(value) as ArrayCollection; it still does not work.
    Also, it seems that the remoteObject does not return a typed object (i.e. myVOorDTO) but rather generic objects. I am usually able to make this works but in this particular application I have not managed to do it. Again what's missing?
    Thanks for any help with this!

    Calendar c = GregorianCalendar.getInstance();
    c.set(Calendar.YEAR,2000);
    System.out.println(c.getActualMaximum(Calendar.WEEK_OF_YEAR));
    c.set(Calendar.YEAR,2001);
    System.out.println(c.getActualMaximum(Calendar.WEEK_OF_YEAR));But it says that 2000 has 53 weeks and 2001 has 52.

  • Arraycollection changing problem

    hi,
    i have the following variable defenition:
    [Bindable] private var rangeData:ArrayCollection = new
    ArrayCollection();
    and i wish to silce it, and then update only the sliced data,
    which i do like that:
    var SyncRangeData:ArrayCollection = new ArrayCollection();
    SyncRangeData.source = rangeData.source.slice( x1, x2 );
    some changes to SyncRangeData
    but, as i noticed, when changing the SyncRangeData, it also
    changes the rangeData.
    how can i copy from rangeData to another variable
    [SyncRangeData], and then change it without affecting the original
    variable [rangeData ].
    thanks in advance!
    micha

    i just found out how to do this:
    import flash.utils.ByteArray;
    function clone(source:Object):*{
    var myBA:ByteArray = new ByteArray();
    myBA.writeObject(source);
    myBA.position = 0;
    return(myBA.readObject());
    from
    http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDo cs_Parts&file=00001882.html

  • Problem with FTE in DataTips of PlotChart (missing texts)

    Hi @all,
    we have decided to use the Flex 4.1 and Flash text engine in our projects.
    Now I have the following problem with the dataTips: the texts are appearing only partly if datatips of more than one point are showing. The behavior is not regularly.
    Here is my code for testing (compiler options: hook at "Use Flash Text engine in MX components":
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark"
      xmlns:mx="library://ns.adobe.com/flex/mx"
      minWidth="955"
      minHeight="600"
      creationComplete="init()">
      <fx:Declarations>
        <mx:SolidColor id="sc1" color="#EC6605" alpha=".3"/>
        <mx:SolidColorStroke id="s1" color="#EC6605" weight="1"/>
      </fx:Declarations>
      <fx:Script>
        <![CDATA[
          import mx.charts.HitData;
          import mx.collections.ArrayCollection;
          [Bindable]
          private var seriesAverageScores:ArrayCollection = new ArrayCollection(new Array());
          private static const tipDataString:String = "zeile 1 zeile 1 zeile 1\nzeile 2 zeile 2 zeile 2\nzeile 3 zeile 3 zeile 3\nzeile 4 zeile 4 zeile 4\n -\n -\n -";
          private function init():void {
            seriesAverageScores.addItem({x: 1, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 2, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 3, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 1.1, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 2, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 3, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 1.05, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 2, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 3, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 0.95, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 2, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 3, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 1.2, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 2, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 3, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 1.15, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 2, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 3, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 1.12, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 2, y: 2, dataTip: tipDataString});
          private function dataTipFunction_average(hd:HitData):String {
            var val:String;
            var d:Object = hd.item as Object;
            return d.dataTip;
        ]]>
      </fx:Script>
      <s:VGroup width="100%"
        height="100%">
        <mx:PlotChart id="myChart1" width="100%" height="100%"
          dataTipFunction="dataTipFunction_average" showDataTips="true">
          <mx:verticalAxis>
            <mx:LinearAxis title="TurnOvers" padding="0.1" minimum="0" maximum="50"/>
          </mx:verticalAxis>
          <mx:horizontalAxis>
          <mx:LinearAxis title="Scores" padding="0.1" minimum="0" maximum="10"/>
          </mx:horizontalAxis>
          <mx:series>
            <mx:PlotSeries dataProvider="{seriesAverageScores}"
              name="series 1" fill="{sc1}" stroke="{s1}"
              displayName="Average Scores per customer"
              xField="x"
              yField="y">
            </mx:PlotSeries>
          </mx:series>
        </mx:PlotChart>
      </s:VGroup>
    </s:Application>
    Has anyone an idea how to solve this ?
    Thanks, Lutz

    Has noone an idea?
    The same problem exists with Legends. For this there was a help from Adobe with a style.
    Isn't there a comparable solution for this malfunction?

  • Problem with checkbox item renderer in datagrid

    I have a data grid having check box as an item renderer. I have viewed many posts in this forum but nothing useful in my case. I am failed to bind my datagrid itemrenderer checkbox with the field of dataprovider i.e. listUnitMovement.CHECK_PATH. Then I have to traverse data provider to check which checkboxes are checked.
    [Bindable]
    var listUnitMovement:XMLList=null;                      
    In a function call
    public function init(event:ResultEvent):void
        listUnitMovement=event.result.unitmovement;
         <mx:DataGrid id="dg_country"
                               dataProvider="{listUnitMovement}"
                                  enabled="true">
                                <mx:columns>
                                   <mx:DataGridColumn>
                                        <mx:itemRenderer>
                                            <mx:Component>
                                                <mx:CheckBox selectedField="CHECK_PATH"  />
                                            </mx:Component>                                       
                                        </mx:itemRenderer>
                                    </mx:DataGridColumn>
                                    <mx:DataGridColumn headerText="Latitude" dataField="NEW_LAT" visible="false"/>
                                    <mx:DataGridColumn headerText="Longitude" dataField="NEW_LONG" visible="false"/>
                                   <mx:DataGridColumn>
                                        <mx:itemRenderer>
                                            <mx:Component>
                                                <mx:Button label="Details"/>
                                            </mx:Component>                                       
                                        </mx:itemRenderer>
                                    </mx:DataGridColumn>
                                </mx:columns>
                            </mx:DataGrid>

    Hi,
    Do you want to just check/uncheck the checkboxes based on the CHECK_PATH field.
    Do you want something like this...
    <?xml version="1.0" encoding="utf-8"?><mx:Application  xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
     <mx:Script>
    <![CDATA[
     import mx.collections.ArrayCollection;[
    Bindable] 
    private var listUnitMovement:ArrayCollection = new ArrayCollection([{CHECK_PATH:true,NEW_LAT:109.233,NEW_LONG:232.22},{CHECK_PATH:true,NEW_LAT:109.233,NEW_LONG:232.22},{CHECK_PATH:false,NEW_LAT:133.233,NEW_LONG:702.22}]);]]>
    </mx:Script>
     <mx:DataGrid dataProvider="{listUnitMovement}">
     <mx:columns>
     <mx:DataGridColumn>
     <mx:itemRenderer>
     <mx:Component>
     <mx:CheckBox selectedField="CHECK_PATH" change="data.CHECK_PATH=selected" />
     </mx:Component>  
    </mx:itemRenderer>
     </mx:DataGridColumn>
     <mx:DataGridColumn dataField="NEW_LAT"/>
     <mx:DataGridColumn dataField="NEW_LONG"/>
     </mx:columns>
     </mx:DataGrid>
    </mx:Application>
    Please let me know clearly what's your problem...Do you want to just bind the check box based on XmlList or something else..?
    Thanks,
    Bhasker Chari.S

  • Help needed in  converting ArrayList to ArrayCollection

    I am converting an ArrayList (Java) to ArrayCollection of Flex .
    Please help me in this , i dont know whether this is correct approach or not
    I have a Created a User VO ActionScript class  on flex with two properties as uname , pass .
    [Bindable]       
            var result:ArrayCollection
    private function displayDetails(event:ResultEvent):void
    result = event.result as ArrayCollection;
    <mx:DataGrid  dataProvider="{result}">
                    <mx:columns>
                        <mx:DataGridColumn headerText="UserName" dataField="uname"/>
                        <mx:DataGridColumn headerText="Password" dataField="pass"/>
                    </mx:columns>
                </mx:DataGrid>
    This is from my Java DAO File :
                ResultSet rs = stmt.executeQuery("select NAME , PASS from Users");
                list = new ArrayList();
                while (rs.next()) {
                    User user = new User();
                    user.setUname(rs.getString(1));
                    user.setPass(rs.getString(2));
                    list.add(user);
            return list;
    With the below code ,the displayed DataGrid is empty with no data , please help me where i am doung wrong
    Do i need to do anything more ?? The data is coming well on to the lcds server console .
    Please help .

    Hi Kiran,
    Debugging solves most of the problems that you encounter ......you need to use a lot of debuggung so that you will come to know exactly what's
    happening indeed...
    So just put a break point at your displayDetails(event:ResultEvent):void  function and try to watch the event variable and check the event.result
    What is the datatype of the event.result ...Are you getting any data or is it null..???
    Please make these observations and let me know...
    Thanks,
    Bhasker

  • How to update ArrayCollection at runtime?

    Am facing some problem with arraycollection..
    am having an arraycolelction like this...
    var dpHierarchy:ArrayCollection = new ArrayCollection([
    {Region:"Demand1"},
    {Region:"Demand2"},
    {Region:"Demand3"},
    {Region:"Demand4"}]
    now what am looking for is.. how to update this
    arraycollection at runtime using actions script?
    i need to update this array colelction something like this...
    var dpHierarchy:ArrayCollection = new ArrayCollection([
    {Region:"Demand1", Year:"2008"},
    {Region:"Demand2", Year:"2008"},
    {Region:"Demand3", Year:"2008"},
    {Region:"Demand4", Year:"2008"}]
    How to add Year field in to existing arraycollection like
    shown in about example..
    thanks in advance
    Pratap

    There are two ways you can do this. One would be setting it
    straight like this.
    private function updateDP():void {
    dpHierarchy[0].Year = "2008";
    This will also make it so that every other item in your
    ArrayCollection has the Year identifier however nothing will be
    filled in for the values. The other way you could do this would be
    to user setItemAt which would look like this.
    dpHierarchy.setItemAt({Region:"Demand1", Year:"2008"}, 0);
    which essentially does the exact same thing except your
    setting all the properties of that item instead of just adding the
    identifier Year.

  • Display results of MySQL query from AMFPHP by ArrayCollection in AS3 (Flash CS4)

    Hi, i am using Flash CS4 (AS3) + AMFPHP + MySQL to do own flash frontend for Wordpress CMS.  Everything is going fine but i`ve got one problem. Problem with properly display of result of query in AS3 by using ArrayCollection.
    When i check my service in "amfphp/browser/" in web browser i`ve got this (with all needed data):
    (mx.collections::ArrayCollection)#0
    filterFunction = (null)
    length = 2
    list = (mx.collections::ArrayList)#1  
    length = 2     source = (Array)#2
    That is the reason that i suppose that service work fine.  Problem is when i try to display result in AS3. In actionscript i have got this:
    function getNewsListHandler(result:Object):void{
    trace(result);
    This function displays: [object Object].
    I know that "result" is an ArrayCollection type but i don`t know how to get rows and columns from this. I know that my data is there but i have no idea how to get it.
    Clarify: I don`t know how to get to Arrays and simple data variables which are in ArrayCollection.
    Could anyone help me with that problem. I would be gratefull
    P.S. I tried also change query type in service.PHP for mysql_fetch_query but in that case i`ve got only one row (not all data).

    Thanks for fast reply,
    arr_coll:ArrayCollection = new ArrayCollection ({col1:"data1",col2:"data2"}, {col1:"data3",col2:"data4"});
    you would get the data like
    var resultstr:String = arr_coll[1][1].col2;
    trace(resultstr);
    //results in data4
    could you explain me how it was happen (arr_coll[1][1].col2)? It`s not clear to me. I thought in this case rather something like this :
    var resultstr:String = arr_coll[1]['col2'];
    It should give me "data4". I know it wasn`t but i don`t understand ArrayCollection in level which is needed to use your advice in my case. Could you clarify "arr_coll[1][1].col2" a bit?
    What would it look like when you would have something like this:
    arr_coll:ArrayCollection = new ArrayCollection ({col1:"data1",col2:"data2"}, {col1:"data3",col2:"data4"},{col1:"data5",col2:"data6"},{col1:"data7",col2:"data8"});
    and you would want know f.e. position in ArrayCollection of  "data6". How would you code this? arr_coll[1][2].col2?

Maybe you are looking for

  • OC4J JSP Debugging not working for all the jsps

    Hi, Initially I was not able to debug jsps using Eclipse and OC4J. The jsp debugging started working once I made the below changes: 1) global-web-application.xml is modified Changed the attribute development="true" in orion-web-app Added the below in

  • IMac G5 won't regonize internal hard drives !!!

    Hi Trying to solve this problem on a friends iMac G5 (1.8MHz). The problem started when one of his children experienced some sort of "freeze up" while using the computer and, so he says, couldn't reset it so pulled the plug. To be fair, there was als

  • HT202157 can i have appletv connecting to a TV HD through wireless connexion ?

    what is airplay ?

  • Lockbox MICR Code issue

    Hello experts, We use IDOC for processing lockbox payments. Customer master is having bank information Routing number as "071923226" and Bank Account number as "0940536". Lockbox IDOC has Routing number as "071923226" and Bank Account number as "0000

  • SMS - iMac and Yosemite Requirements Question

    A question about requirements for SMS.... iPhone running on 8.1.2 2010 iMac running on 10.10.1 2007 iMac running on 10.10.1 2012 Macbook Air also running on 10.10.1 SMS works fine on the Macbook Air (check) SMS does NOT work on the 2010 iMac SMS DOES