Referencing values in Array Collection?

I'm using a Remote Object to pass an argument to a CFC. I
then query a table according to the value of the argument passed in
('where' clause). I return a single record result as a query in
Flex (event.result) and set it as an Array Collection, example:
myAC = new ArrayCollection;
myAC.source = event.result as Array;
I can take this AC and set it as a dataprovider for a data
grid or list without problem. What I'd like to do is pull specific
data from the AC and use it in my Flex app. For example, the
results of my query will return 1 record only, but contains many
columns from my table. It might contain an ID, a username, a first
and last name, maybe a phone number, etc. All this info for that
single record will be stored in the array collection. What I want
to do is be able to reference this data in Flex.
For instance, if I need to display the phone number (stored
as phoneNumber from my query) in the array collection, how can I do
this? myAC.phoneNumber? myAC.getItemAt(0).phoneNumber?
Any guidance is appreciated

I'm not sure about dealing with a Remote Object / CFC
configuration, but if your collection essentially ends up like:
var myAC:ArrayCollection = new ArrayCollection([{name:
'First', phoneNumber: '555'}]);
Then yes you should be able to access it with:
myAC.getItemAt(0).phoneNumber
I take this has not worked?

Similar Messages

  • Getting a single value from an array collection

    I have an array collection that was created from an XML file
    through the HTTP Service. One of the nodes in the XML file was
    product_number and I can display all of the items in this node in a
    datagrid so I know the array has the name of the node in it.
    I would like to be able to retrieve a single item from the
    array collection (e.g. a product_number = to xxx) and assign it to
    a variable.
    I would also like to be able to assign all the items in a
    particlur column (e.g. all product_numbers) to separate variables
    at the same time.
    Any help would be greatly appreciated.

    You can apply a filterFunction.
    Or you can do it the brute force way: loop over the elements,
    and test for the value you want.
    As far as putting values into variables, I am not sure what
    you want.
    And this is not a Flex Builder question and should go in the
    General Discussion forum.
    Tracy

  • Multiple Comboboxes with single instance of Array Collection

    First off - thanks to everyone for their contributions.  This forum provides a lot of good information.
    I'm stuck on a particular problem and I suspect I'm not thinking about the issue correctly.
    I'm developing a dynamic module that instantiates components at runtime based on an XML scheme.  Many of these components are drop-downs that are chained togther (a selection in one drives the population of the next)
    I loop through the initial XML document to create and layout the components.  I have been using a single Array Collection to populate the drop-down.  This worked fine with the chained comboboxes since I only load one combox initially.  However, when I add a couple of static combo boxes, the arraycollection seemed to be binding to the orginal combobox.  For example, if I create 3 combo boxes they have drop-down values that display all 3 lists appended together.  I was a bit surprised because I didn't think that I could bind an Array Collection.  I certainly haven't defined a Binable ArrayCollection.
    I thought I could solve the issue by simply creating a unique Array Collection at runtime - one for each element.  However, I don't think this is possible or I can't figure out how to create a new Array Collection with a dynamic name - something like this:
    I was hoping this would work -
    var newDropDown_[numOfElement]:ArrayCollection = new ArrayCollection(); 
    I've tried to use a Dictionary object to store each ArrayCollection.  I couldn't get that to work properly.
    Essentially - my code loops on the number of components to add:
    for (var i:int = 0; i < numFormElements; i++)
              for (var j:int = 0; j < numvalues; j++)
                                    var valuefield:String = 'value_' + [j+1];
                                    var obj:Object=new Object();
                                    obj.label=instFields[i][valuefield].@label;
                                    obj.data=instFields[i][valuefield].@data;
                                    newDropDown.addItemAt(obj,j);
    Then I add the components:
              var c:ComboBox = new ComboBox ();
                c.labelField='label';
                c.name=numberOfElement.toString();                                  
                c.dataProvider=    newDropDown;
                _h1.addChild(c);
                numComboDropDwns.push(c);
    I need a way of looping, getting data and populating each component independently??
    Any ideas?
    Thanks,
    John

    I went a different route and solved the issue.  For someone looking at a similar problem - this what I ended up doing:
    I just loaded one array collection with data for all of the drop-downs on the form.  I then populated each dataprovider with individual elements from the array.
    for (var i:int = 0; i < numFormElements; i++)
    for (var j:int = 0; j < numvalues; j++)
                                    var valuefield:String = 'value_' + [j+1];
                                    var obj:Object=new Object();
                                    obj.label=instFields[i][valuefield].@label;
                                    obj.data=instFields[i][valuefield].@data;
                                    newDropDown.addItemAt(obj,elementCounter);
                                    elementCounter = elementCounter + 1;
    I keep track of the element #, number of values for each element and the overall index for the array.
    Each data provider is then loaded with the subset from the array:
    for (var z:int = (_counter - _numvalues) ; z < _counter; z++)
                                var _label:String=    newDropDown.getItemAt(z).label.toString();
                                var _data:String = newDropDown.getItemAt(z).data.toString();
                                c.dataProvider.addItem({label:[_label],data:[_data]});
    This seems to work nicely - each component is created and loaded with only their data.  I spent 3 days searching for a way to create a dynamic arraycollection at runtime.  I don't think it's possible - but I'm not sure it was the best method anyway.

  • How to convert an array collection instance to a complex object for interaction with webservice

    Hi there,
    I have a stubborn problem that I am trying to work out the best way to solve the problem.  I am interacting with a WebService via HTTPService calling a method called find(String name) and this returns me a List of ComplexObjects that contain general string and int params and also lists of other Complex Objects.  Now using the code:
    ArrayCollection newOriginalResultsArray = new ArrayCollection(event.result as Array)
    flex converts my complex objects results to an arraycollection so that I can use it in datagrids etc.  Now up until this part is all good.  My problem is when getting a single instance from the results list, updating it by moving data around in a new datagrid for example - I want to interact with the webservice again to do an create/update.  This is where I am having problems - because these webservice methods require the complex object as a parameter - I am struggling to understand how I can convert the array collection instance back to my complex object without iterating over it and casting it back (maybe this is the only way - but I am hoping not).
    I am hoping that there is a simple solution that I am missing and that there is some smart cookie out there that could provide me with an answer - or at least somewhere to start looking. I guess if I have no other alternative - maybe I need to get the people who built the service to change it to accept an array - and let them do the conversion.
    Any help would be greatly appreciated.
    Bert

    Hi Bert,
    According to my knowledge you can use describeType(Object) method which will return an XML... That XML will contain Properties and values just iterate through the XML and create a new Object..   Probably u can use this method...
    public function getObject(reqObj:Object,obj:Object,instanceName:String,name:String=null,index:int=-1):Obj ect
                if(!reqObj)
                    reqObj = new Object();
                var classInfo:XML = describeType(obj);
                var className:String = instanceName;
                if(name!=null)
                    className=name+"."+className;
                if(index!=-1)
                    className=className+"["+index+"]";
                for each (var v:XML in classInfo..accessor)
                    var attributeName:String=v.@name;
                    var value:* = obj[attributeName]
                    var type:String = v.@type;
                    if(!value)
                        reqObj[className+"."+attributeName] = value; 
                    else if(type == "mx.collections::ArrayCollection")
                        for(var i:int=0;i<value.length;i++)
                            var temp:Object=value.getItemAt(i);
                            getReqObject(reqObj,temp,attributeName,className,i);
                    else if(type == "String" || type == "Number" || type == "int" || type == "Boolean")
                        reqObj[ className+"."+attributeName] = value; 
                    else if (type == "Object")
                        for (var p:String in value)
                            reqObj[ className+"."+attributeName+"."+p] = value[p];
                    else
                        getReqObject(reqObj,value,attributeName,className);
                return reqObj;
    Thanks,
    Pradeep

  • Adding property/field to an item inside array collection

    Hi
    I'm newbie. But I'm spending a huge amout of time trying to figure out something that should be simple.
    in short:
    I wanted to add a new field/property to an item inside an arraycollection(ac).
    I thought something like:
    ac.souce[i].push(object:value)
    would do (its inside a loop, since I have ac.length) but it didnt.
    ITS IMPORTANT TO SAY THAT:
    i think addItem, or addItemAt IS NOT THE CASE.
    I want to add an new item INSIDE the array that is wrapped in ac.
    in long:
    I have a ORDERS table that comes with a client_id (int).
    I need to retrieve the client's name from a CLIENTS table.
    Ok i have to put everything on the same datagrid. So, first i've tried to ivoke a function like this that would use the getClientsByID and return a string with its name.
    It didn't worked, maybe due to the syntax.
    SO, i thought i had to put all those 2 tables into 1 array collection to use this as a 'formated' data provider for the datagrid.
    What should I do? this is a simples example.
    Thanks a lot
    Btp~

    Just borrow code from ListBase.as, don't actually use an instance of ListBase.  That pattern should work for non-display classes as well.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Removing Items From Array Collection

    Hi. I have an array collection which is made up of items
    defined in class PlayListEntry. I want to remove all the items that
    have the value of property select set to false. This is what i have
    come up with, it works fine, but only removes half the items at a
    time. I think this is because when you remove and item with
    removeitemat() it shifts the index of the items. How can i get
    around this?
    Code
    private function removeitems():void{
    for each (var ple:PlayListEntry in songCollection){
    if (ple["select"] != true){
    songCollection.removeItemAt(songCollection.getItemIndex(ple));
    }

    Here's a sample application I wrote that achieves what you're
    looking for.
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    [Bindable] private var medalsAC:ArrayCollection = new
    ArrayCollection([
    {Country:"USA", Gold:35, Silver:39, Bronze:29, select:true},
    {Country:"China", Gold:32, Silver:17, Bronze:14,
    select:true},
    {Country:"Russia", Gold:27, Silver:27, Bronze:38,
    select:true},
    {Country:"USA2", Gold:35, Silver:39, Bronze:29,
    select:false},
    {Country:"China2", Gold:32, Silver:17, Bronze:14,
    select:false},
    {Country:"Russia2", Gold:27, Silver:27, Bronze:38,
    select:false},
    {Country:"USA3", Gold:35, Silver:39, Bronze:29,
    select:true},
    {Country:"China3", Gold:32, Silver:17, Bronze:14,
    select:true},
    {Country:"Russia3", Gold:27, Silver:27, Bronze:38,
    select:true}
    private function filterItems():void {
    for(var i:Number = 0; i < medalsAC.length; i++){
    if(medalsAC
    .select == false){
    // => Remove item
    medalsAC.removeItemAt(i);
    // => Refresh collection so it see's new change.
    medalsAC.refresh();
    // => Start at beginning and keep looking
    i = 0;
    ]]>
    </mx:Script>
    <mx:Button x="10" y="10" label="Remove False Items"
    click="filterItems()"/>
    <mx:DataGrid left="10" right="10" top="35" bottom="10"
    dataProvider="{medalsAC}">
    <mx:columns>
    <mx:DataGridColumn headerText="Country"
    dataField="Country"/>
    <mx:DataGridColumn headerText="Gold"
    dataField="Gold"/>
    <mx:DataGridColumn headerText="Silver"
    dataField="Silver"/>
    <mx:DataGridColumn headerText="Bronze"
    dataField="Bronze"/>
    <mx:DataGridColumn headerText="Select"
    dataField="select"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:Application>

  • Filtering array collections

    I am trying to filter an array collection.
    It is a list of rooms. The rooms have a type, "Boardroom",
    "Classroom" etc.
    Also they have equipment properties which are set with a
    boolean value.
    ex. Screen = true, Whiteboard = false etc.
    What I want to do is filter the array collection using
    multiple conditions.
    Scenario:
    Choose room type from combo. --- this works great :)
    Screen(Check if needed) ---- Here is where my problem lies,
    When I check the box, the false results are filtered out great! But
    if I uncheck the box, only the false results are shown. However,I
    would like to show both true and false results for the screen
    property. If it is unchecked it means the user is not interested in
    screens thus the data doesn't need to be filtered for that
    property.
    I have tried various ways.
    This is where I'm at so far
    private function filterByRoomType():void{
    allRooms.filterFunction = roomTypeFilter;
    allRooms.refresh();
    private function roomTypeFilter(item:Object):Boolean{
    seatingText.text = "+"+seatingSlider.value;
    if(roomTypeCombo.selectedItem=="All"){
    return item.SeatingCap >= seatingSlider.value&&
    item.Desks >= deskSlider.value&&
    item.Beds >= bedSlider.value&&
    item.Screen == screenCB.selected;
    }else{
    return item.RoomType ==
    roomTypeCombo.selectedLabel&&
    item.SeatingCap >= seatingSlider.value&&
    item.Desks >= deskSlider.value&&
    item.Beds >= bedSlider.value&&
    item.Screen == screenCB.selected;
    I have tried changing "item.Screen == screenCB.selected" to
    "item.Screen == screenCB.selected||false;" but with no joy.
    Once I get the screen checkbox working I would like to
    increase the amount of checkBoxes(properties) the user can search
    on.
    This one has got me ripping my hair out, any help would be
    muchly appreciated
    thanks
    bazjapan
    Oh yes, This is a room object.
    package dto
    [Bindable]
    public class Room
    public var RoomID:int;
    public var RoomName:String="";
    public var RoomType:String="";
    public var SeatingCap:int;
    public var Desks:int;
    public var Beds:int;
    public var Screen:Boolean;
    public var OHP:Boolean;
    public var Sink:Boolean;
    public var FlipChart:Boolean;
    public var Hoist:Boolean;
    public function Room(obj:Object = null)
    if (obj != null)
    this.RoomID = obj.RoomID;
    this.RoomName = obj.RoomName;
    this.RoomType = obj.RoomType;
    this.SeatingCap = obj.SeatingCap;
    this.Desks = obj.Desks;
    this.Beds = obj.Beds;
    this.Screen = obj.Screen;
    this.OHP = obj.OHP;
    this.Sink = obj.Sink;
    this.FlipChart = obj.FlipChart;
    this.Hoist = obj.Hoist;

    That change won't make an iota of difference logically if
    screenCB.selected = false. You're doing:
    if (item.Screen == false || false)
    What it looks like you want to say is
    (screenCB.selected ? item.Screen == screenCB.selected : true)
    HTH =)

  • How to delete values from extension collection field through importer?

    Hi Experts,
    We have created one extension collection field in Master Agreement.
    We are able to add values to that collection field using Extension collection template CSV file through importer.
    Now we have a requirement to delete values from the Extension collection field through importer using CSV file.
    If anyone have template or idea please share with us.
    Thanks in advance!!
    Regards,
    Lava.

    Hi Agrawal,
    Thanks for you helpful information.
    Regards,
    Lava.

  • Assigning values to array in soa 10.1.3

    Dear team,
    I am working on soa10.1.3 server. we have a complex element of string array.we created a varaible of that element. In while loop we need to pass values to array elements.How can we do that..we tried with indexvaraible..but getting error.
    Regards,
    Radha

    schema is
    <schema attributeFormDefault="unqualified"
         elementFormDefault="qualified"
         targetNamespace="http://xmlns.oracle.com/BPELProcess4"
         xmlns="http://www.w3.org/2001/XMLSchema">
         <element name="BPELProcess4ProcessRequest">
              <complexType>
                   <sequence>
                        <element name="input" type="string"/>
                   </sequence>
              </complexType>
         </element>
         <element name="BPELProcess4ProcessResponse">
              <complexType>
                   <sequence>
                        <element name="result" type="string"/>
                   </sequence>
              </complexType>
         </element>
    <element name="element5">
    <complexType>
    <sequence>
    <element name="result" minOccurs="0" maxOccurs="unbounded"
    type="string"/>
    </sequence>
    </complexType>
    </element>
    </schema>
    wdsl is
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions name="BPELProcess4"
    targetNamespace="http://xmlns.oracle.com/BPELProcess4"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:client="http://xmlns.oracle.com/BPELProcess4"
    xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         TYPE DEFINITION - List of services participating in this BPEL process
         The default output of the BPEL designer uses strings as input and
         output to the BPEL Process. But you can define or import any XML
         Schema type and use them as part of the message types.
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <types>
              <schema xmlns="http://www.w3.org/2001/XMLSchema">
                   <import namespace="http://xmlns.oracle.com/BPELProcess4" schemaLocation="BPELProcess4.xsd" />
              </schema>
         </types>
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         MESSAGE TYPE DEFINITION - Definition of the message types used as
         part of the port type defintions
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <message name="BPELProcess4RequestMessage">
              <part name="payload" element="client:BPELProcess4ProcessRequest"/>
         </message>
         <message name="BPELProcess4ResponseMessage">
              <part name="payload" element="client:BPELProcess4ProcessResponse"/>
         </message>
    <message name="BPELProcessMessage">
              <part name="payload" element="client:element5"/>
         </message>
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         PORT TYPE DEFINITION - A port type groups a set of operations into
         a logical service unit.
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <!-- portType implemented by the BPELProcess4 BPEL process -->
         <portType name="BPELProcess4">
              <operation name="initiate">
                   <input message="client:BPELProcess4RequestMessage"/>
              </operation>
         </portType>
         <!-- portType implemented by the requester of BPELProcess4 BPEL process
         for asynchronous callback purposes
         -->
         <portType name="BPELProcess4Callback">
              <operation name="onResult">
                   <input message="client:BPELProcess4ResponseMessage"/>
              </operation>
         </portType>
         <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         PARTNER LINK TYPE DEFINITION
         the BPELProcess4 partnerLinkType binds the provider and
         requester portType into an asynchronous conversation.
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <plnk:partnerLinkType name="BPELProcess4">
              <plnk:role name="BPELProcess4Provider">
                   <plnk:portType name="client:BPELProcess4"/>
              </plnk:role>
              <plnk:role name="BPELProcess4Requester">
                   <plnk:portType name="client:BPELProcess4Callback"/>
              </plnk:role>
         </plnk:partnerLinkType>
    </definitions>
    bpel file is
    <?xml version = "1.0" encoding = "UTF-8" ?>
    <!--
    Oracle JDeveloper BPEL Designer
    Created: Fri Aug 27 10:01:38 IST 2010
    Author: ruck
    Purpose: Asynchronous BPEL Process
    -->
    <process name="BPELProcess4"
    targetNamespace="http://xmlns.oracle.com/BPELProcess4"
    xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:ns4="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
    xmlns:ns1="http://xmlns.oracle.com/bpel/workflow/xpath"
    xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:ns3="http://www.oracle.com/XSL/Transform/java/oracle.tip.esb.server.headers.ESBHeaderFunctions"
    xmlns:ns2="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
    xmlns:client="http://xmlns.oracle.com/BPELProcess4"
    xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc">
    <!--
    PARTNERLINKS
    List of services participating in this BPEL process
    -->
    <partnerLinks>
    <!--
    The 'client' role represents the requester of this service. It is
    used for callback. The location and correlation information associated
    with the client role are automatically set using WS-Addressing.
    -->
    <partnerLink name="client" partnerLinkType="client:BPELProcess4"
    myRole="BPELProcess4Provider"
    partnerRole="BPELProcess4Requester"/>
    </partnerLinks>
    <!--
    VARIABLES
    List of messages and XML documents used within this BPEL process
    -->
    <variables>
    <!-- Reference to the message passed as input during initiation -->
    <variable name="inputVariable"
    messageType="client:BPELProcess4RequestMessage"/>
    <!-- Reference to the message that will be sent back to the requester during callback -->
    <variable name="outputVariable"
    messageType="client:BPELProcess4ResponseMessage"/>
    <variable name="elementMessage"
    messageType="client:BPELProcessMessage"/>
    <variable name="count" type="xsd:int"/>
    </variables>
    <!--
    ORCHESTRATION LOGIC
    Set of activities coordinating the flow of messages across the
    services integrated within this business process
    -->
    <sequence name="main">
    <!-- Receive input from requestor. (Note: This maps to operation defined in BPELProcess4.wsdl) -->
    <receive name="receiveInput" partnerLink="client"
    portType="client:BPELProcess4" operation="initiate"
    variable="inputVariable" createInstance="yes"/>
    <!--
    Asynchronous callback to the requester. (Note: the callback location and correlation id is transparently handled using WS-addressing.)
    -->
    <assign name="Assign_1">
    <copy>
    <from expression="number(1)"/>
    <to variable="count"/>
    </copy>
    </assign>
    <while name="While_1"
    condition="bpws:getVariableData('count') &lt;= number(5)">
    <assign name="Assign_2">
    <copy>
    <from expression="'value'"/>
    <to variable="elementMessage" part="payload"
    query="/client:element5/client:result[bpws:getVariableData('count')]"/>
    </copy>
    <copy>
    <from expression="bpws:getVariableData('count')+number(1)"/>
    <to variable="count"/>
    </copy>
    </assign>
    </while>
    <invoke name="callbackClient" partnerLink="client"
    portType="client:BPELProcess4Callback" operation="onResult"
    inputVariable="outputVariable"/>
    </sequence>
    </process>
    For the count 1 code is working fine.. for count=2 thrwoing exception
    <while>
    Assign_2
    [2010/08/27 10:23:20] Updated variable "elementMessage" less
    -<elementMessage>
    -<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload">
    -<element5 xmlns="http://xmlns.oracle.com/BPELProcess4">
    <result>value
    </result>
    </element5>
    </part>
    </elementMessage>
    [2010/08/27 10:23:20] Updated variable "count" More...
    <count>2
    </count>
    Assign_2
    [2010/08/27 10:23:20] Error in <assign> expression: <to> value is empty at line "86". The XPath expression : "" returns zero node, when applied to document shown below: More...
    [2010/08/27 10:23:20] "{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure" has been thrown. More...
    </while>
    </sequence>
    [2010/08/27 10:23:20] "BPELFault" has not been caught by a catch block.
    [2010/08/27 10:23:20] There is a system exception while performing the BPEL instance, the reason is "faultName: {{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure} messageType: {} parts: {{summary=XPath query string returns zero node. According to BPEL4WS spec 1.1 section 14.3, The assign activity &lt;to&gt; part query should not return zero node. Please check the BPEL source at line number "86" and verify the &lt;to&gt; part xpath query. Possible reasons behind this problems are: some xml elements/attributes are optional or the xml data is invalid according to XML Schema. To verify whether XML data received by a process is valid, user can turn on validateXML switch at the domain administration page. }} ". Please check the error log file for more infromation. Please try to use bpel fault handlers to catch the faults in your bpel process. If this is a system exception, please report this to your system administrator. Administrator could perform manual recovery of the instance from last non-idempotent activity or dehydration point. More...
    [2010/08/27 10:23:20] BPEL process instance #"60002" cancelled

  • How to pass value in array to another procedure?

    Hello.
    I have created application by Developer form9i.
    And I have some problem about passing value in array to another procedure.
    My code is :
    PROCEDURE p_add_array (col_no in number,
    col_val in varchar2) IS     
    type xrecord is record(col number,vcol varchar2(1000));
    xrec xrecord;
    type varraytype is varying array(42) of xrecord;     
    xvartab varraytype := varraytype();
    alert number;
    BEGIN
    set_application_property(cursor_style,'busy');
    xrec.col := col_no;
    xrec.vcol := col_val;
    xvartab.extend(1);
    xvartab(col) := xrec;
    EXCEPTION
    when others then
    set_application_property(cursor_style,'default');
    alert := f_show_alert('!Error ORA-'||
    to_char(DBMS_ERROR_CODE)||' '||
    substr(DBMS_ERROR_TEXT,1,240),
    'al_stop');          
    END;
    And I want to have
    PROCEDURE p_print_arrey is
    BEGIN
    END;
    So how to bring value of xvartab( ) in p_add_array to use in p_print_array?
    Anybody please help me solve this ploblem.

    Hi,
    Instead of declaring the array locally within the procedure (i.e. p_add_array), define it in the package specification (i.e. Under Program Units).
    -- Shailender Mehta --

  • How to show property bag values of site collection in web part on landing page in sharepoint online?

    How to show property bag values of site collection in web part on landing page in sharepoint online - office 365?

    You can use JavaScript Client object model to read the property bag values. Example:
    function getWebProperty() {
    var ctx = new SP.ClientContext.get_current();
    var web = ctx.get_site().get_rootWeb();
    this.props =  web.get_allProperties();
    ctx.load(web);
    ctx.load(this.props); //need to load the properties explicitly
    ctx.executeQueryAsync(Function.createDelegate(this, gotProperty), Function.createDelegate(this, failedGettingProperty));
    function gotProperty() {
        var myPropBag = this.props;
        alert(myPropBag.get_fieldValues()["allowdesigner"]); //returns the value of the key allowdesigner
    function failedGettingProperty(args, sender)
         //handle errors here
    Source:
    http://sharepoint.stackexchange.com/questions/37198/grab-a-specific-property-bag-using-ecma-script
    Blog | SharePoint Learnings CodePlex Tools |
    Export Version History To Excel |
    Autocomplete Lookup Field

  • How to find and modify  item in a nested array collection?

    Hi,
    would anybody know how to find and modify item in a nested
    array collection:
    private var ac:ArrayCollection = new ArrayCollection([
    {id:1,name:"A",children:[{id:4,name:"AA",children:[{id:8,name:"AAA"}]},{id:5,name:"AB"}]} ,
    {id:2,name:"B",children:[{id:6,name:"BA"},{id:7,name:"BB"}]},
    {id:3,name:"C"}
    Let's say I've got object {id:8, name:"X"} , how could I find
    item in a collection with the correspoding id property, get handle
    on it and update the name property of that object?
    I'm trying to use this as a dataprovider for a tree populated
    via CF and remoting....
    Thanks a lot for help!

    Thanks a lot for your help!
    In the meantime I've come up with a recursive version of the
    code.
    This works and replaces the item on any level deep:
    private function findInAC(ac:ArrayCollection):void{
    var iMatchValue:uint=8;
    for(var i:uint=0; i<ac.length; i++){
    if(ac
    .id == iMatchValue){
    ac.name = "NEW NAME";
    break;
    if(ac
    .children !=undefined){
    findInAC( new ArrayCollection(ac.children));
    However, if I use the array collection as a dataprovider for
    a tree and change it, the tree doesn't update, unless I collapse
    and reopen it.
    Any ideas how to fix it ?

  • Change this to an XML array collection with an HTTP service in flex 3.0

    I need to change this to an XML array collection with an HTTP
    service in flex 3.0
    private var flatData:ArrayCollection = new ArrayCollection([
    { Country:"India", State:"Karnataka", Region:"South-West",
    Company:"Horizon", Product:"flexo",
    Year:"2000", Quarter:"Q1", Month:"Jan", Sales:-10, Cost:5,
    Production: 20 },
    { Country:"India", State:"Tamil Nadu",
    Region:"South-East",Company:"Horizon", Product:"flexo",
    Year:"2000", Quarter:"Q1", Month:"Mar", Sales:10, Cost:5,
    Production: 20 },
    { Country:"India", State:"Kerala", Region:"South-West",
    Company:"Horizon", Product:"flexo",
    Year:"2000", Quarter:"Q4", Month:"Nov", Sales:10, Cost:5,
    Production: 20},
    { Country:"India", State:"Assam", Region:"North-East",
    Company:"Horizon", Product:"Trinetra",
    Year:"2000", Quarter:"Q1", Month:"Feb", Sales:40, Cost:20,
    Production: 20 },
    { Country:"India", State:"Kerala", Region:"South-West",
    Company:"Horizon", Product:"Trinetra",
    Year:"2000", Quarter:"Q4", Month:"Dec", Sales:55, Cost:27.5,
    Production: 20 },
    { Country:"India", State:"Karnataka", Region:"South-West",
    Company:"Horizon", Product:"Trinetra",
    Year:"2000", Quarter:"Q2", Month:"Apr", Sales:20, Cost:10,
    Production: 20 },
    // confusion
    { Country:"India", State:"Delhi", Region:"North-East",
    Company:"Confusion", Product:"Besto",
    Year:"2000", Quarter:"Q1", Month:"Jan", Sales:20, Cost:10,
    Production: 20 },
    { Country:"India", State:"Orissa", Region:"South-East",
    Company:"Confusion", Product:"Besto",
    Year:"2000", Quarter:"Q1", Month:"Feb", Sales:10, Cost:5,
    Production: 20 },
    { Country:"India", State:"Gujrat", Region:"North-West",
    Company:"Confusion", Product:"Besto",
    Year:"2001", Quarter:"Q4", Month:"Oct", Sales:50, Cost:25,
    Production: 20 },
    { Country:"India", State:"Delhi", Region:"North-East",
    Company:"Confusion", Product:"Besto",
    Year:"2001", Quarter:"Q4", Month:"Nov", Sales:60, Cost:30,
    Production: 20 },
    { Country:"India", State:"Tamil Nadu",Region:"South-East",
    Company:"Confusion", Product:"Besto",
    Year:"2001", Quarter:"Q4", Month:"Dec", Sales:70, Cost:35,
    Production: 20},
    { Country:"India", State:"Gujrat", Region:"North-West",
    Company:"Confusion", Product:"Best",
    Year:"2000", Quarter:"Q1", Month:"Mar", Sales:30, Cost:15,
    Production: 20 }
    can u pls tell me

    Create a uriTemplate like this
    /auth?uname={uname}&pass={pass}
    use GET method only.
    generate the personalization keys.

  • Load image data into array collection without ever displaying it

    Hi all,
    I am starting with a String that is a path to a local file. I
    need to add that image (png) to an array collection without ever
    displaying it on screen. What would be the most direct process to
    get it into the type BitmapData.
    No matter what i try, i cant seem to get the image to
    actually load into memory so it is available without displaying it
    on the screen. Thanks in advance,

    Hi Jed,
    In AIR, you can simply use FileStream's readBytes() call to
    read the contents of the image file into a bytearray. Now when you
    want to display the image, simply use Loader.loadBytes().
    Once the loadBytes() call completes, you will be able to get
    bitmap data. Till then it would be in JPG/PNG/GIF format.

  • Array Collection

    Hi,
    I'm using the following code in conjunction with amfPHP to pull information from a database, this info is then (as far as I know) returned to flex as an array collection.
    What I'm looking to do is populate the list with the data within the array collection,
    Heres my code
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
        <mx:Script>
            <![CDATA[
                import flash.net.*;
                import mx.collections.ArrayCollection;
                import mx.rpc.events.ResultEvent;
                public function connect():Object
                    var gw:NetConnection = new NetConnection();
                    gw.connect("http://localhost/amfphp/gateway.php");
                    var res:Responder = new Responder(onResult, onFault);
                    function onResult(responds:Object):void
                      trace(responds.serverInfo.initialData[0][1]);
                    function onFault(responds:Object):void
                        for(var i in responds)
                            trace(responds[i]);
                    gw.call("Test.getRecordset", res);
                    return res;
                public function init()
                    connect();
            ]]>
        </mx:Script>
        <mx:List x="75" y="113"></mx:List>
    </mx:Application>

    I've modified my code as follows,
    the idea being that when the user selects a category from the list, the tile list is populated with the icons, I can get this to poulate with the icon reference but can't actually get the icons to appear. Also for some reason when i select business, the communications results come up and vice versa
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="800" layout="absolute" creationComplete="init()">
        <mx:Script>
            <![CDATA[
                import flash.net.*;
                import mx.collections.ArrayCollection;
                import mx.rpc.events.ResultEvent;
    [Bindable]
                private var categoryResult:ArrayCollection;
    [Bindable]
                private var iconResult:ArrayCollection;
                public function getDistinct():Object
                var gw:NetConnection = new NetConnection();
                    gw.connect("http://localhost/amfphp/gateway.php");
                    var res:Responder = new Responder(onResult, onFault);
                    function onResult(responds:Object):void
                      categoryResult = new ArrayCollection(responds.serverInfo.initialData);  
                      //trace(arrResult); 
                    function onFault(responds:Object):void
                        for(var i in responds)
                            trace(responds[i]);
                   gw.call("Test.getDistinct", res);
                    return res;
                public function getIcons(cats:String):Object
                var gw2:NetConnection = new NetConnection();
                    gw2.connect("http://localhost/amfphp/gateway.php");
                    var res2:Responder = new Responder(onResult, onFault);
                    function onResult(responds2:Object):void
                      iconResult = new ArrayCollection(responds2.serverInfo.initialData);  
                      trace(iconResult); 
                    function onFault(responds2:Object):void
                        for(var i in responds2)
                            trace(responds2[i]);
                   trace(cats);
                   gw2.call("Test.getCategoryIcons", res2, cats);
                   return res2;
                public function init()
                    getDistinct();
                    getIcons("business");
               public function changeIcons(cat)
               trace(cat);
               getIcons(cat);
               iconTiles.dataProvider = iconResult;
               iconTiles.labelField = iconResult[0];
               iconTiles.iconField = iconResult[0];
            ]]>
        </mx:Script>
    <mx:List id="categoryList"
    width="150" x="75" y="113"
    dataProvider = "{categoryResult}" labelField="1"
    change="changeIcons(categoryList.selectedItem)" >
    </mx:List>
    <mx:TileList id="iconTiles"
    x="223" y="113" height="156"
    width="500"
    labelField=""
    ></mx:TileList>
    </mx:Application>

Maybe you are looking for

  • Itunes 10.4 Windows 7 x64 Ipod touch does not restore

    Itunes 10.4 erased all data on my Ipod touch on my brand new Gateway Windows 7 laptop. But, it does not want to restore. It stops at the the final restore step. Error code 6 from Itunes. Brand new machine, fresh install of Itunes 10.4 from Apple site

  • Statement of Last Billing Cycle's Calling/Texting Details?

    How can I just get a report of last month's (last billing cycle's) usage details for calls and text messages ~ just looking for basics like phone numbers, dates, times for texting and calling.  I can't seem to access that online now? Thank you.

  • Can we modify an approved document?

    Dear all, when we activate approval procedure, is there any option to modify the approved doc? E.g. There is PO no. 100 which is created by ABC who is originator in approval proc & then is approved by XYZ, who is approving authority. After this appro

  • Ampersand in XML causes error. Is there a workaround?

    I've discovered that an ampersand (&) anywhere in XML data (any content between the opening and closing tags) causes an error when the XML is imported. Does anyone know of a workaround for this? Some of my text needs to include ampersands.

  • Project library - audio

    What does the little icon (next to all of my projects) in the project library window mean? It has what looks like an audio symbol and an exclamation mark in a small triangle.