Error creating collection ArrayCollection getResourceBundle

Hi I have just the following line of code in a new 0.9.2

var a : ArrayCollection = new ArrayCollection();

which result in a runtime error.

TypeError: Error #1006: getResourceBundle is not a function.

at mx.collections::ListCollectionView$cinit()

Global $init () [C:\dev\GMC\sdk\frameworks\mx\collections\ListCollectionView.as:73]

Global $init () [C:\dev\GMC\sdk\frameworks\mx\collections\ArrayCollection.as:59]

to PlaybookMobileApp() [/ Users/anthonymccormick/Documents/FlashBuilderProjects/PlaybookMobileApp/src/PlaybookMobileApp.as:19]

Should I not use ArrayCollections? and if not, do I need to use?

Thanks in advance

Anthony.

Hi anthony,.

from the looks of it the collection ArrayCollection class is available only if you are coding in Flex (MXML). Since you only use ActionScript, you cannot use this class. Now depending on what you want to achieve with your application, there are different equivelents. on the fly, your best bet will be to use the DataProvider class in the catalog of QNX API:

http://www.BlackBerry.com/developers/docs/airapi/1.0.0/QNX/UI/data/dataProvider.html

hope that helps. Good luck!

Tags: BlackBerry Developers

Similar Questions

  • With regard to error in collection ArrayCollection

    Hi all

    I am getting error (index out of range) when I try to call the arrayCollectionInstance.removeAll () immediately after sorting the arrayCollection collection.

    (RemoveAll() Note: if not independently called no problem)

    Kind regards

    knockaert

    Did you call refresh()?

  • Error adding items in a collection ArrayCollection.

    Hello

    I created an ArrayCollection collection and try to add items using ArrayCollection.addItem ("NewElement");

    In the answer it gives me a compilation showing error
    "Variable"NewElement"is not defined.

    var myArrayCollection:ArrayCollection = new ArrayCollection();
    myArrayCollection.addItem ("NewElement");


    Can someone please let me know how to solve this problem?

    Thanks in advance.

    The lines of code you posted seem to.

    Which line the error tip you?

    It seems that you forgot the quotes somewhere, but probably not to the level of the lines that you have posted.

  • Error loading an ArrayCollection collection

    I have a collection of table I load, but I get an error when there is only a single record returned. How to avoid this error to happen and get the results I expect. The error I get is:

    Error #1034: Type coercion failed: cannot convert mx.utils::ObjectProxy@403fbc1 to mx.collections.ArrayCollection

    Thanks in advance
    Tedd

    If you have a single returned object it's like a no collection ArrayCollection object. You should check this condition.

    If (rpcEvent.result.dbConns.dbConnItem is collection ArrayCollection)
    model.dbConnAC = rpcEvent.result.dbConns.dbConnItem as ArrayCollection collection;
    on the other
    model.dbConnAC.addItem (rpcEvent.result.dbConns.dbConnItem);

  • Collection ArrayCollection

    I have an ArrayCollection collection read MP3s of a mx:ComboBox. I'm creating labels for each mp3 in my table. In mx:combobox, I put the labelfield to display the lable, but when I run the application and select an mp3 file I get an error in the actionscript. I think because its that I set the labelfield for the label, but I have not defined what it is for the "file:"index7ex.mp3", itself.» In fact, in my ComboBox what else I have entries, in order to select the file also. Also, if anyone sees something else wrong with what I have, I thank you in advance if you can let me know. Thank you.

    private var dp:ArrayCollection = new collection ArrayCollection ([{label: "My cool song", file: "index7ex.mp3"}, {label: "Another cool song", file: "index8ex.mp3"}])

    "< mx:ComboBox creationComplete ="cb.dataProvider = dp' id = "cb" change ="loadSound () ' width = '100% ' labelField ="label"/ >

    Maybe it wouldn't be a bad idea if you think Array Bindable.

    regarding the selection of good value, I guess it depends on what you do in your function loadSound

    You must select the selectedItem-(cb.selectedItem.File) - in this way, you can select the mp3 you want


        Import mx.controls.Alert;
    Import mx.collections.ArrayCollection;
    [Bindable]
    private var dp:ArrayCollection = new collection ArrayCollection ([{label: "My cool song", file: "index7ex.mp3"}, {label: "Another cool song", file: "index8ex.mp3"}])
           
    private function loadSound (): void
    {
    Alert.Show (CB. SelectedItem.file);
    }
       
    ]]>

    hope this helps

  • Collection ArrayCollection to question of XML.

    Hi all. I'm new here and to the use of FLEX, after being a CF coder since it first came out. Also, please excuse the length of this post, but I can refer in the future. And... Thanks for all the great posts so far this galvanized really me.

    Currently, most of my code is 'test', learn how to make the FLEX to do what I want. I'm working on a project where I need to put the extracted data to an MS SQL Server in an AdvancedDataGrid (ADG). The data are such that there may be many children (and their children, etc.) for a given query. I want to do is return the data a little at a time, so that during the first call, I get all the parents of first level (PKIDs). This could be from 10 to several hundred records.

    This is done by the user by selecting the two comboBoxes, who launches a RemoteObject call, then hands to return a set of data to the function below. The function converts the table into XML so that I can then have a hierarchy in which insert children later. At the present time, to display the arrow itemOpen, I add a child model for each parent record (I'll find a better way later). When the user clicks the arrow itemOpen, I now go and get that child records, using the PKID, who is currently working.

    My problem is that, in a second similar function, when I get the kids and create a mainTreeChildren, I want to put them in XML format (which I do), then insert them into the mainTree XML to the appropriate parent, then open the datagrid to this location. That's where I break. I get a message in the service to make children who:

    1120: access of undefined property mainTree.

    So, even though I created the XML file in the function below, when I try to open it in another function, I get the above error.

    Frankly, I'm just starting trying to figure how I then inserts XML children, but that can come later. I have also included an example of the XML file that is created in this function. Full code available if necessary.

    / * Now allows to get data for the Advanced main adgHierarchies of data grid. */
    [Bindable]
    private var adgResultsArray:ArrayCollection;

    private void getNodesByRelationHandler(adg:ResultEvent):void {}
    var temp: collection ArrayCollection = adg.result as ArrayCollection collection;
    adgResultsArray = new ArrayCollection (temp.toArray ());

    convert to XML format
    var mainTree:XML = new XML ("< NAME of HIERARCHY = '" + dgHierarchies.selectedItem.NAME + "' PKID = '" + dgHierarchies.selectedItem.PKID + "" DESCRIPTION = ' "+ dgHierarchies.selectedItem.DESCRIPTION +"' > < / HIERARCHY > "");

    for (var i: int = 0; i < adgResultsArray.length; i ++)
    {
    var newnode:XML = new XML();
    newNode =

    < NAME of node = {adgResultsArray .NAME}
    PKID = {adgResultsArray
    .} PKID}
    DESCRIPTION = {adgResultsArray, . DESCRIPTION}
    RANGEID = {adgResultsArray
    .} RANGEID}
    TYPE = {adgResultsArray, . TYPE}
    RELATIONID = {adgResultsArray
    .} RELATIONID}
    MASS = WEIGHT "100" = '150' LENGTH '40' = >

    < Node NAME = '1 - TestMakeChildPlaceHolder' PKID = '0 '.
    DESCRIPTION = "This causes the arrow to the point of opening to show. > < / node >

    < / node >;

    mainTree = mainTree.appendChild (newnode);

    }

    adgHierarchy.dataProvider = new (mainTree) HierarchicalData;
    rawXML.text = mainTree.toXMLString (); See the XML in a textbox control
    adgHierarchy.validateNow ();
    callLater (expandFirstNode);

    / * called by callLater to make sure that the tree is ready to be called TI expandItem * /.
    function expandFirstNode (): void
    {
    adgHierarchy.expandItem (mainTree, true); Expand the node
    }
    }

    XML example

    < NAME of HIERARCHY = "Hierarchy of Gary tests" PKID = "2684" DESCRIPTION = "this is a list of the something lander mission" >
    < NAME of node = "Essence-3.5 in" PKID = "2690" DESCRIPTION = "" "2690" TYPE = RANGEID = '0' RELATIONID = '601' MASS = '100' WEIGHT '150' LENGTH = "40" = > "
    < Node NAME = '1 - TestMakeChildPlaceHolder' PKID = "0" DESCRIPTION = "This causes the arrow to the point of opening to show. / >
    < / node >
    < node NAME = "Speedometer and odometer" PKID = "2708" DESCRIPTION = "" RANGEID = "2708' TYPE = '0' RELATIONID ="601"= MASS WEIGHT"100"= '150' LENGTH '40' = >"
    < Node NAME = '1 - TestMakeChildPlaceHolder' PKID = "0" DESCRIPTION = "This causes the arrow to the point of opening to show. / >
    < / node >
    < / HIERARCHY >

    Gary

    Okay, I understand it. Ridicule me. I had to do the mainTree XML that may be related. So, it looks like this:

    (first piece of code, then)

    [Bindable]
    public var mainTree:XML;

    private function initMakeXML (): void {}
    lets do some parent XML
    mainTree = new XML ("");

    (the rest of the code)

  • In the face of error: expected collection item not found in payload

    Hello

    I use persistence for my MAF Application Accelerator.

    I have generated the DataControl by specifying the details of service rest via the Wizard "business of the CRG of Rest WebService object.

    Using the DataControl I dropped the iterator on my page as an af:listview

    When the page opens the service's get called but I am told error

    "Collection item 'Job' not found in payload expected.

    Please see the attached persistent mapping .xml.

    (I've highlighted the specific classmapping descriptor for which I am faced with the question.)

    I am also attaching the object of service payload remains below.

    I also checked the payloadelementname specified in the classmapping descriptor matches the name of the element in the payload. However, I still get the error.

    Please let me know if I'm missing out on anything.

    Massari

    ===================================================================================================================

    Persistent map file

    <? XML version = "1.0" encoding = "UTF-8"? >

    " < mobileObjectPersistence xmlns =" http://www.Oracle.com/Ateam/mobile/persistenceMapping "> "

    < classMappingDescriptor className = "teamup.mobile.model.ProjectsResponse" persisted = "true" > ""

    < className = "teamup.mobile.model.service.ProjectsResponseService" autoIncrementPrimaryKey = "true" crudServiceClass

    localPersistenceManager = "oracle.ateam.sample.mobile.v2.persistence.manager.DBPersistenceManager"

    remotePersistenceManager = "oracle.ateam.sample.mobile.v2.persistence.manager.RestJSONPersistenceManager"

    remoteReadInBackground = "true" remoteWriteInBackground = "true".

    showWebServiceInvocationErrors = 'false' autoQuery = "true" / >

    < table name = "PROJECTS_RESPONSE" >

    < name primaryKeyColumn = "Project" / >

    < /table >

    < attributeMappings >

    < directMapping attributeName = "projectId" payloadAttributeName = "ProjectId" columnName = "project".

    columnDataType = "NUMERIC" required = "true" persisted = "true" = "java.math.BigDecimal" javaType

    keyAttribute = "true" / >

    < directMapping attributeName = "projectName" payloadAttributeName = "ProjectName" columnName = 'PROJECT_NAME '.

    columnDataType = "VARCHAR" required = "false" persisted = "true" = "java.lang.String" javaType

    keyAttribute = "false" / >

    < directMapping attributeName = "description" payloadAttributeName = "Description" columnName = "DESCRIPTION".

    columnDataType = "VARCHAR" required = "false" persisted = "true" = "java.lang.String" javaType

    keyAttribute = "false" / >

    < directMapping attributeName = "activeFlag' payloadAttributeName = 'ActiveFlag" columnName = "ACTIVE_FLAG."

    columnDataType = "VARCHAR" required = "false" persisted = "true" = "java.lang.String" javaType

    keyAttribute = "false" / >

    < attributeName = "lastUpdatedBy' payloadAttributeName ="LastUpdatedBy"directMapping

    columnName = "LAST_UPDATED_BY" columnDataType = "VARCHAR" required = "false" persisted = 'true '.

    javaType = "java.lang.String" keyAttribute = "false" / > "

    < attributeName = "lastUpdateDate" payloadAttributeName = "LastUpdateDate" directMapping

    columnName = "LAST_UPDATE_DATE" columnDataType = "VARCHAR" required = "false" persisted = 'true '.

    javaType = "java.lang.String" keyAttribute = "false" / > "

    < / attributeMappings >

    <>methods

    < findAllMethod uri connectionName = "/ projects/getprojects/projects / {username}" = "MyTask" requestType = 'GET '.

    warranty = "false" sendDataObjectAsPayload = "false" deleteLocalRows = "true".

    payloadElementName = "ProjectsResponse" >

    < name headerParameter = "Content-Type" value = "application/json" / >

    < name of the parameter = "userId" value = "#{pageFlowScope.userId}" valueProvider = 'ELExpression' "

    dataObjectAttribute = 'projectId' pathParam = "true" / >

    < / findAllMethod >

    < / methods >

    < / classMappingDescriptor >

    < classMappingDescriptor className = "teamup.mobile.model.TeamMember" persisted = "true" > ""

    < className = "teamup.mobile.model.service.TeamMemberService" autoIncrementPrimaryKey = "true" crudServiceClass

    localPersistenceManager = "oracle.ateam.sample.mobile.v2.persistence.manager.DBPersistenceManager"

    remotePersistenceManager = "oracle.ateam.sample.mobile.v2.persistence.manager.RestJSONPersistenceManager"

    remoteReadInBackground = "true" remoteWriteInBackground = "true".

    showWebServiceInvocationErrors = 'false' autoQuery = "true" / >

    < table name = "TEAM_MEMBER" >

    < name primaryKeyColumn = "USER_ID" / >

    < /table >

    < attributeMappings >

    < directMapping attributeName = "userId" payloadAttributeName = "USER_ID" columnName = 'USER_ID '.

    columnDataType = "NUMERIC" required = "true" persisted = "true" = "java.math.BigDecimal" javaType

    keyAttribute = "true" / >

    < directMapping attributeName = "userName" payloadAttributeName = "Username" columnName = 'user_name '.

    columnDataType = "VARCHAR" required = "false" persisted = "true" = "java.lang.String" javaType

    keyAttribute = "false" / >

    < attributeName = "projectTeamMemberId" payloadAttributeName = "PROJECT_TEAM_MEMBER_ID" directMapping

    columnName = "PROJECT_TEAM_MEMBER_ID" columnDataType = "NUMERIC" required = "false".

    has persisted = "true" javaType = "java.math.BigDecimal" keyAttribute = "false" / > "

    < directMapping attributeName = "lastName", payloadAttributeName = "Name" columnName = "name".

    columnDataType = "VARCHAR" required = "false" persisted = "true" = "java.lang.String" javaType

    keyAttribute = "false" / >

    < directMapping attributeName = "firstName" payloadAttributeName = "First name" columnName = "first name".

    columnDataType = "VARCHAR" required = "false" persisted = "true" = "java.lang.String" javaType

    keyAttribute = "false" / >

    < directMapping attributeName = "projectId" payloadAttributeName = "Project" columnName = "project".

    columnDataType = "VARCHAR" required = "false" persisted = "true" = "java.lang.String" javaType

    keyAttribute = "false" / >

    < / attributeMappings >

    <>methods

    < findAllMethod uri connectionName = "/ user/getteammember/members / {projectId}" = "MyTask" requestType = 'GET '.

    warranty = "false" sendDataObjectAsPayload = "false" deleteLocalRows = "true".

    payloadElementName = "TeamMember" >

    < name headerParameter = "Content-Type" value = "application/json" / >

    < name of the parameter = value = "#{pageFlowScope.projectId"projectId"}" valueProvider = 'ELExpression' "

    pathParam = "true" / >

    < / findAllMethod >

    < / methods >

    < / classMappingDescriptor >

    < className = classMappingDescriptor "teamup.mobile.model.Task ' persisted 'true' orderBy = 'START_DATE' = >" "

    < className = "teamup.mobile.model.service.TaskService" autoIncrementPrimaryKey = "true" crudServiceClass

    localPersistenceManager = "oracle.ateam.sample.mobile.v2.persistence.manager.DBPersistenceManager"

    remotePersistenceManager = "oracle.ateam.sample.mobile.v2.persistence.manager.RestJSONPersistenceManager"

    remoteReadInBackground = "true" remoteWriteInBackground = "true".

    showWebServiceInvocationErrors = 'false' autoQuery = "true" / >

    < table name = "TASK" >

    < name primaryKeyColumn = "ACTIVITY_ID" / >

    < /table >

    < attributeMappings >

    < directMapping attributeName = "activityId" payloadAttributeName = "ACTIVITY_ID" columnName = "ACTIVITY_ID.

    columnDataType = "NUMERIC" required = "true" persisted = "true" = "java.math.BigDecimal" javaType

    keyAttribute = "true" / >

    < directMapping attributeName = "projectid" payloadAttributeName = "PROJECTID" columnName = "PROJECTID".

    columnDataType = "NUMERIC" required = "false" persisted = "true" = "java.math.BigDecimal" javaType

    keyAttribute = "false" / >

    < directMapping attributeName = "activityName" payloadAttributeName = "ACTIVITY_NAME" columnName = "ACTIVITY_NAME."

    columnDataType = "VARCHAR" required = "false" persisted = "true" = "java.lang.String" javaType

    keyAttribute = "false" / >

    < directMapping attributeName = "description" payloadAttributeName = "DESCRIPTION" columnName = "DESCRIPTION".

    columnDataType = "VARCHAR" required = "false" persisted = "true" = "java.lang.String" javaType

    keyAttribute = "false" / >

    < attributeName = "parentActivityId" payloadAttributeName = "PARENT_ACTIVITY_ID" directMapping

    columnName = "PARENT_ACTIVITY_ID" columnDataType = "VARCHAR" required = "false" persisted = 'true '.

    javaType = "java.lang.String" keyAttribute = "false" / > "

    < directMapping attributeName = 'status' payloadAttributeName = 'STATUS' columnName = 'STATUS '.

    columnDataType = "VARCHAR" required = "false" persisted = "true" = "java.lang.String" javaType

    keyAttribute = "false" / >

    < directMapping attributeName = "priority" payloadAttributeName = "PRIORITY" columnName = "PRIORITΘ."

    columnDataType = "VARCHAR" required = "false" persisted = "true" = "java.lang.String" javaType

    keyAttribute = "false" / >

    < attributeName = "percentageComplete" payloadAttributeName = "PERCENTAGE_COMPLETE" directMapping

    columnName = "PERCENTAGE_COMPLETE" columnDataType = "NUMERIC" required = "false" persisted = 'true '.

    javaType = "java.math.BigDecimal" keyAttribute = "false" / > "

    < directMapping attributeName = "startDate" payloadAttributeName = "START_DATE" columnName = "START_DATE".

    columnDataType = "VARCHAR" required = "false" persisted = "true" = "java.lang.String" javaType

    keyAttribute = "false" / >

    < directMapping attributeName = "endDate" payloadAttributeName = "End_date" columnName = "end_date".

    columnDataType = "VARCHAR" required = "false" persisted = "true" = "java.lang.String" javaType

    keyAttribute = "false" / >

    < directMapping attributeName = 'eta' payloadAttributeName = 'ETA' columnName = 'ETA' columnDataType = "VARCHAR".

    required = "false" persisted = "true" javaType = "java.lang.String" keyAttribute = "false" / > "

    < attributeName = "estimatedHours" payloadAttributeName directMapping = "ESTIMATED_HOURS".

    columnName = "ESTIMATED_HOURS" columnDataType = "NUMERIC" required = "false" persisted = 'true '.

    javaType = "java.math.BigDecimal" keyAttribute = "false" / > "

    < attributeName = "actualHours" payloadAttributeName = "ACTUAL_HOURS" columnName directMapping = "ACTUAL_HOURS".

    columnDataType = "VARCHAR" required = "false" persisted = "true" = "java.lang.String" javaType

    keyAttribute = "false" / >

    < directMapping attributeName = "ownerUserId" payloadAttributeName = 'OWNER_USER_ID' columnName = 'OWNER_USER_ID '.

    columnDataType = "NUMERIC" required = "false" persisted = "true" = "java.math.BigDecimal" javaType

    keyAttribute = "false" / >

    < directMapping attributeName = "createdBy" payloadAttributeName = 'CREATED_BY' columnName = 'CREATED_BY '.

    columnDataType = "VARCHAR" required = "false" persisted = "true" = "java.lang.String" javaType

    keyAttribute = "false" / >

    < directMapping attributeName = "creationDate" payloadAttributeName = 'CREATION_DATE' columnName = 'CREATION_DATE '.

    columnDataType = "VARCHAR" required = "false" persisted = "true" = "java.lang.String" javaType

    keyAttribute = "false" / >

    < attributeName = "lastUpdatedBy" payloadAttributeName = "LAST_UPDATED_BY" directMapping

    columnName = "LAST_UPDATED_BY" columnDataType = "VARCHAR" required = "false" persisted = 'true '.

    javaType = "java.lang.String" keyAttribute = "false" / > "

    < attributeName = "lastUpdateDate" payloadAttributeName = "LAST_UPDATE_DATE" directMapping

    columnName = "LAST_UPDATE_DATE" columnDataType = "VARCHAR" required = "false" persisted = 'true '.

    javaType = "java.lang.String" keyAttribute = "false" / > "

    < attributeName = 'comments' payloadAttributeName = 'COMMENTS' columnName directMapping = 'COMMENTS '.

    columnDataType = "VARCHAR" required = "false" persisted = "true" = "java.lang.String" javaType

    keyAttribute = "false" / >

    < attributeName = "discussionCount" payloadAttributeName = "DISCUSSION_COUNT" directMapping

    columnName = "DISCUSSION_COUNT" columnDataType = "NUMERIC" required = "false" persisted = 'true '.

    javaType = "java.math.BigDecimal" keyAttribute = "false" / > "

    < directMapping attributeName = "favoriteFlag" payloadAttributeName = "FAVORITE_FLAG" columnName = "FAVORITE_FLAG."

    columnDataType = "VARCHAR" required = "false" persisted = "true" = "java.lang.String" javaType

    keyAttribute = "false" / >

    < attributeName = "taskAssignment" payloadAttributeName = "TaskAssignment" oneToManyMapping

    referenceClassName = "teamup.mobile.model.TaskAssignment" sendAsArrayIfOnlyOneEntry = "true" > "

    < foreignKeyColumnReference sourceTable = sourceColumn "TASK_ASSIGNMENT" = "TASK_ACTIVITY_ID."

    targetTable = "TASK" targetColumn = "ACTIVITY_ID" / >

    < / oneToManyMapping >

    < attributeName = "discussion oneToManyMapping."

    accessorMethod = "/ projects/getdiscussion/activity/discussion / {username} / {projectId} / {TaskId} / {parentDiscId} '"

    referenceClassName = "teamup.mobile.model.Discussion" sendAsArrayIfOnlyOneEntry = "true" > "

    < foreignKeyColumnReference sourceTable = "DISCUSSION" sourceColumn = "ACTIVITY_ID" targetTable = "TASK".

    targetColumn = "ACTIVITY_ID" / >

    < foreignKeyColumnReference sourceTable = "DISCUSSION" sourceColumn = "Project" targetTable = "TASK".

    targetColumn = "PROJECTID" / >

    < / oneToManyMapping >

    < / attributeMappings >

    <>methods

    < findAllMethod uri = "newgettasks/projects / / projects/activities / {username}" connectionName = "MyTask" "

    requestType = 'GET' guaranteed = "false" sendDataObjectAsPayload = "false" deleteLocalRows = "true".

    payloadElementName = "Task" >

    < name headerParameter = "Content-Type" value = "application/json" / >

    < name of the parameter = "userId" value = "#{pageFlowScope.userId}" valueProvider = "ELExpression" pathParam = "true" / > "

    < / findAllMethod >

    < createMethod uri = "/ projects/postTask/activity" connectionName = "MyTask" requestType = 'POST' guaranteed = "false".

    sendDataObjectAsPayload = "true" payloadElementName = "Task" >

    < name headerParameter = "Content-Type" value = "application/json" / >

    < / createMethod >

    < updateMethod uri = "/ projects/putTask/activity" connectionName = "MyTask" requestType = 'PUT' secure = "false".

    sendDataObjectAsPayload = "true" payloadElementName = "Task" >

    < name headerParameter = "Content-Type" value = "application/json" / >

    < / updateMethod >

    < / methods >

    < / classMappingDescriptor >

    < classMappingDescriptor className = "teamup.mobile.model.TaskAssignment" persisted = "true" > ""

    < className = crudServiceClass "teamup.mobile.model.service.TaskService" autoIncrementPrimaryKey = "true" / > "

    < table name = "TASK_ASSIGNMENT" >

    < name primaryKeyColumn = "ASSIGNMENT_ID" / >

    < /table >

    < attributeMappings >

    < directMapping attributeName = "assignmentId" payloadAttributeName = "ASSIGNMENT_ID" columnName = "ASSIGNMENT_ID."

    columnDataType = "INTEGER" required = "true" persisted = "true" = "java.lang.Integer" javaType

    keyAttribute = "true" / >

    < attributeName = "projectTeamMemberId" payloadAttributeName = "PROJECT_TEAM_MEMBER_ID" directMapping

    columnName = "PROJECT_TEAM_MEMBER_ID" columnDataType = "NUMERIC" required = "false".

    has persisted = "true" javaType = "java.math.BigDecimal" keyAttribute = "false" / > "

    < directMapping attributeName = "startDate" payloadAttributeName = "START_DATE" columnName = "START_DATE".

    columnDataType = "VARCHAR" required = "false" persisted = "true" = "java.lang.String" javaType

    keyAttribute = "false" / >

    < directMapping attributeName = "endDate" payloadAttributeName = "End_date" columnName = "end_date".

    columnDataType = "VARCHAR" required = "false" persisted = "true" = "java.lang.String" javaType

    keyAttribute = "false" / >

    < directMapping attributeName = "createdBy" payloadAttributeName = 'CREATED_BY' columnName = 'CREATED_BY '.

    columnDataType = "VARCHAR" required = "false" persisted = "true" = "java.lang.String" javaType

    keyAttribute = "false" / >

    < directMapping attributeName = "creationDate" payloadAttributeName = 'CREATION_DATE' columnName = 'CREATION_DATE '.

    columnDataType = "VARCHAR" required = "false" persisted = "true" = "java.lang.String" javaType

    keyAttribute = "false" / >

    < attributeName = "lastUpdatedBy" payloadAttributeName = "LAST_UPDATED_BY" directMapping

    columnName = "LAST_UPDATED_BY" columnDataType = "VARCHAR" required = "false" persisted = 'true '.

    javaType = "java.lang.String" keyAttribute = "false" / > "

    < attributeName = "lastUpdateDate" payloadAttributeName = "LAST_UPDATE_DATE" directMapping

    columnName = "LAST_UPDATE_DATE" columnDataType = "VARCHAR" required = "false" persisted = 'true '.

    javaType = "java.lang.String" keyAttribute = "false" / > "

    < directMapping attributeName = "favoriteFlag" payloadAttributeName = "FAVORITE_FLAG" columnName = "FAVORITE_FLAG."

    columnDataType = "VARCHAR" required = "false" persisted = "true" = "java.lang.String" javaType

    keyAttribute = "false" / >

    < directMapping attributeName = "taskActivityId" columnName = "TASK_ACTIVITY_ID" columnDataType = "DIGITAL."

    required = "false" persisted = 'true' parentClass = "teamup.mobile.model.Task"

    parentAttributeName = "Activity ID" javaType = "java.math.BigDecimal" keyAttribute = "false" / > "

    < / attributeMappings >

    < methods / >

    < / classMappingDescriptor >

    < classMappingDescriptor className = "teamup.mobile.model.Discussion" persisted = "true" > ""

    < className = "teamup.mobile.model.service.DiscussionService" autoIncrementPrimaryKey = "true" crudServiceClass

    localPersistenceManager = "oracle.ateam.sample.mobile.v2.persistence.manager.DBPersistenceManager"

    remotePersistenceManager = "oracle.ateam.sample.mobile.v2.persistence.manager.RestJSONPersistenceManager"

    remoteReadInBackground = "true" remoteWriteInBackground = "true".

    showWebServiceInvocationErrors = 'false' autoQuery = "true" / >

    < table name 'DISCUSSION' = >

    < name primaryKeyColumn = "DISCUSSION_ID" / >

    < /table >

    < attributeMappings >

    < directMapping attributeName = 'discussionId' payloadAttributeName = "DISCUSSION_ID" columnName = "DISCUSSION_ID."

    columnDataType = "NUMERIC" required = "true" persisted = "true" = "java.math.BigDecimal" javaType

    keyAttribute = "true" / >

    < directMapping attributeName = "activityId" payloadAttributeName = "ACTIVITY_ID" columnName = "ACTIVITY_ID.

    columnDataType = "NUMERIC" required = "false" persisted = "true" = "java.math.BigDecimal" javaType

    keyAttribute = "false" / >

    < attributeName = "discussionDate" payloadAttributeName = "DISCUSSION_DATE" directMapping

    columnName = "DISCUSSION_DATE" columnDataType = "VARCHAR" required = "false" persisted = 'true '.

    javaType = "java.lang.String" keyAttribute = "false" / > "

    < directMapping attributeName = "userId" payloadAttributeName = "USER_ID" columnName = 'USER_ID '.

    columnDataType = "NUMERIC" required = "false" persisted = "true" = "java.math.BigDecimal" javaType

    keyAttribute = "true" / >

    < attributeName = "discussionMessage" payloadAttributeName = "DISCUSSION_MESSAGE" directMapping

    columnName = "DISCUSSION_MESSAGE" columnDataType = "VARCHAR" required = "false" persisted = 'true '.

    javaType = "java.lang.String" keyAttribute = "false" / > "

    < directMapping attributeName = "createdBy" payloadAttributeName = 'CREATED_BY' columnName = 'CREATED_BY '.

    columnDataType = "VARCHAR" required = "false" persisted = "true" = "java.lang.String" javaType

    keyAttribute = "false" / >

    < directMapping attributeName = "creationDate" payloadAttributeName = 'CREATION_DATE' columnName = 'CREATION_DATE '.

    columnDataType = "VARCHAR" required = "false" persisted = "true" = "java.lang.String" javaType

    keyAttribute = "false" / >

    < attributeName = "lastUpdatedBy" payloadAttributeName = "LAST_UPDATED_BY" directMapping

    columnName = "LAST_UPDATED_BY" columnDataType = "VARCHAR" required = "false" persisted = 'true '.

    javaType = "java.lang.String" keyAttribute = "false" / > "

    < attributeName = "lastUpdateDate" payloadAttributeName = "LAST_UPDATE_DATE" directMapping

    columnName = "LAST_UPDATE_DATE" columnDataType = "VARCHAR" required = "false" persisted = 'true '.

    javaType = "java.lang.String" keyAttribute = "false" / > "

    < directMapping attributeName = "projectId" payloadAttributeName = "Project" columnName = "project".

    columnDataType = "VARCHAR" required = "false" persisted = "true" = "java.lang.String" javaType

    keyAttribute = "false" / >

    < attributeName = "parentDiscussionId" payloadAttributeName = "PARENT_DISCUSSION_ID" directMapping

    columnName = "PARENT_DISCUSSION_ID" columnDataType = "NUMERIC" required = "false" persisted = 'true '.

    javaType = "java.math.BigDecimal" keyAttribute = "false" / > "

    < directMapping attributeName = "firstName" payloadAttributeName = "First name" columnName = "first name".

    columnDataType = "VARCHAR" required = "false" persisted = "true" = "java.lang.String" javaType

    keyAttribute = "false" / >

    < directMapping attributeName = "lastName", payloadAttributeName = "Name" columnName = "name".

    columnDataType = "VARCHAR" required = "false" persisted = "true" = "java.lang.String" javaType

    keyAttribute = "false" / >

    < attributeName = "discussionAssignment" payloadAttributeName = "DiscussionAssignment" oneToManyMapping

    referenceClassName = "teamup.mobile.model.DiscussionAssignment"

    sendAsArrayIfOnlyOneEntry = "true" >

    < foreignKeyColumnReference sourceTable = sourceColumn "DISCUSSION_ASSIGNMENT" = "DISCUSSION_ID."

    targetTable = "DISCUSSION" targetColumn = "DISCUSSION_ID" / >

    < foreignKeyColumnReference sourceTable = sourceColumn 'DISCUSSION_ASSIGNMENT' = 'USER_ID '.

    targetTable = "DISCUSSION" targetColumn = 'USER_ID' / >

    < / oneToManyMapping >

    < / attributeMappings >

    <>methods

    < findAllMethod uri = "/ projects/getdiscussion/activity/discussion / {username} / {projectId} / {TaskId} / {parentDiscId} '"

    connectionName = "MyTask" requestType = 'GET' guaranteed = "false" sendDataObjectAsPayload = "false".

    deleteLocalRows = "true" payloadElementName = "Discussion" >

    < name of the parameter = "userId" value = "#{pageFlowScope.userId}" valueProvider = "ELExpression" pathParam = "true" / > "

    < name of the parameter = value = "#{pageFlowScope.projectId"projectId"}" valueProvider = 'ELExpression' "

    pathParam = "true" / >

    < name of the parameter = "TaskId" value = "#{pageFlowScope.activityId}" valueProvider = 'ELExpression' "

    pathParam = "true" / >

    < name of the parameter = value = "#{pageFlowScope.parentDiscId"parentDiscId"}" valueProvider = 'ELExpression' "

    pathParam = "true" / >

    < / findAllMethod >

    < name findAllInParentMethod = 'debate '.

    URI = "projects, getdiscussion, activity, discussion / {username} / {projectId} / {TaskId} / {parentDiscId} '"

    connectionName = "MyTask" requestType = 'GET' guaranteed = "false".

    sendDataObjectAsPayload = "false" payloadElementName = "Discussion" >

    < name of the parameter = "userId" value = "#{pageFlowScope.userId}" valueProvider = "ELExpression" pathParam = "true" / > "

    < name of the parameter = value = "#{pageFlowScope.projectId"projectId"}" valueProvider = 'ELExpression' "

    pathParam = "true" / >

    < name of the parameter = "TaskId" value = "#{pageFlowScope.activityId}" valueProvider = 'ELExpression' "

    pathParam = "true" / >

    < name of the parameter = value = "#{pageFlowScope.parentDiscId"parentDiscId"}" valueProvider = 'ELExpression' "

    pathParam = "true" / >

    < / findAllInParentMethod >

    < createMethod uri = "/ projects/newpostdiscussion/discussion" connectionName = "MyTask" requestType = "POST".

    warranty = "false" sendDataObjectAsPayload = "true" payloadElementName = "Discussion" >

    < name headerParameter = "Content-Type" value = "application/json" / >

    < / createMethod >

    < updateMethod uri = "/ projects/putdiscussion/discussion" connectionName = "MyTask" requestType = "PUT".

    warranty = "false" sendDataObjectAsPayload = "true" payloadElementName = "Discussion" >

    < name headerParameter = "Content-Type" value = "application/json" / >

    < / updateMethod >

    < / methods >

    < / classMappingDescriptor >

    < classMappingDescriptor className = "teamup.mobile.model.DiscussionAssignment" persisted = "true" > ""

    < className = crudServiceClass "teamup.mobile.model.service.DiscussionService" autoIncrementPrimaryKey = "true" / > "

    < table name = "DISCUSSION_ASSIGNMENT" >

    < name primaryKeyColumn = "DISCUSSION_ID" / >

    < name primaryKeyColumn = "USER_ID" / >

    < /table >

    < attributeMappings >

    < directMapping attributeName = 'discussionId' payloadAttributeName = "DISCUSSION_ID" columnName = "DISCUSSION_ID."

    columnDataType = "NUMERIC" required = "true" persisted = "true" = "java.math.BigDecimal" javaType

    keyAttribute = "true" / >

    < directMapping attributeName = "userId" payloadAttributeName = "USER_ID" columnName = 'USER_ID '.

    columnDataType = "NUMERIC" required = "false" persisted = "true" = "java.math.BigDecimal" javaType

    keyAttribute = "true" / >

    < directMapping attributeName = "likedFlag" payloadAttributeName = "LIKED_FLAG" columnName = "LIKED_FLAG."

    columnDataType = "VARCHAR" required = "false" persisted = "true" = "java.lang.String" javaType

    keyAttribute = "false" / >

    < / attributeMappings >

    < methods / >

    < / classMappingDescriptor >

    < classMappingDescriptor className = "teamup.mobile.model.Search" persisted = "true" > ""

    "< crudServiceClass className ="teamup.mobile.model.service.SearchService"autoIncrementPrimaryKey ="true"localPersistenceManager =" oracle.ateam.sample.mobile.v2.persistence.manager.DBPersistenceManager "remotePersistenceManager =" oracle.ateam.sample.mobile.v2.persistence.manager.RestXMLPersistenceManager"remoteReadInBackground ="true"remoteWriteInBackground ="true"showWebServiceInvocationErrors ="true"autoQuery ="true"/ >"

    < table name = "SEARCH" >

    < name primaryKeyColumn = "ACTIVITY_ID" / >

    < /table >

    < attributeMappings >

    < directMapping attributeName = "activityId" payloadAttributeName = "ACTIVITY_ID" columnName = "ACTIVITY_ID" columnDataType = "NUMERIC" required = "true" = "true" javaType = persisted "java.math.BigDecimal" keyAttribute = "true" / > "

    < directMapping attributeName = "projectid" payloadAttributeName = "PROJECTID" columnName = "PROJECTID" columnDataType = "NUMERIC" required = "false" persisted = "true" javaType = "java.math.BigDecimal" keyAttribute = "false" / > "

    < directMapping attributeName = "activityName" payloadAttributeName = "ACTIVITY_NAME" columnName = "ACTIVITY_NAME" columnDataType = "VARCHAR" required = "false" persisted = "true" javaType = "java.lang.String" keyAttribute = "false" / > "

    < directMapping attributeName = "description" payloadAttributeName = "DESCRIPTION" columnName = "DESCRIPTION" columnDataType = "VARCHAR" required = "false" persisted = "true" javaType = "java.lang.String" keyAttribute = "false" / > "

    < directMapping attributeName = "parentActivityId" payloadAttributeName = "PARENT_ACTIVITY_ID" columnName = "PARENT_ACTIVITY_ID" columnDataType = "VARCHAR" required = "false" persisted = "true" javaType = "java.lang.String" keyAttribute = "false" / > "

    < directMapping attributeName = 'status' payloadAttributeName = 'STATUS' columnName = 'STATUS' columnDataType = "VARCHAR" required = "false" persisted = "true" javaType = "java.lang.String" keyAttribute = "false" / > "

    < directMapping attributeName = "priority" payloadAttributeName = "PRIORITY" columnName = "PRIORITY" columnDataType = "VARCHAR" required = "false" persisted = "true" javaType = "java.lang.String" keyAttribute = "false" / > "

    < directMapping attributeName = "percentageComplete" payloadAttributeName = "PERCENTAGE_COMPLETE" columnName = "PERCENTAGE_COMPLETE" columnDataType = "NUMERIC" required = "false" persisted = "true" javaType = "java.math.BigDecimal" keyAttribute = "false" / > "

    < directMapping attributeName = "startDate" payloadAttributeName = "START_DATE" columnName = "START_DATE" columnDataType = "VARCHAR" required = "false" persisted = "true" javaType = "java.lang.String" keyAttribute = "false" / > "

    < directMapping attributeName = "endDate" payloadAttributeName = "End_date" columnName = "End_date" columnDataType = "VARCHAR" required = "false" persisted = "true" javaType = "java.lang.String" keyAttribute = "false" / > "

    < directMapping attributeName = 'eta' payloadAttributeName = 'ETA' columnName = 'ETA' columnDataType = "VARCHAR" required = "false" persisted = "true" javaType = "java.lang.String" keyAttribute = "false" / > "

    < directMapping attributeName = "estimatedHours" payloadAttributeName = "ESTIMATED_HOURS" columnName = "ESTIMATED_HOURS" columnDataType = "VARCHAR" required = "false" persisted = "true" javaType = "java.lang.String" keyAttribute = "false" / > "

    < directMapping attributeName = "actualHours" payloadAttributeName = "ACTUAL_HOURS" columnName = "ACTUAL_HOURS" columnDataType = "VARCHAR" required = "false" persisted = "true" javaType = "java.lang.String" keyAttribute = "false" / > "

    < directMapping attributeName = "ownerUserId" payloadAttributeName = 'OWNER_USER_ID' columnName = 'OWNER_USER_ID' columnDataType = "NUMERIC" required = "false" persisted = "true" javaType = "java.math.BigDecimal" keyAttribute = "false" / > "

    < directMapping attributeName = "createdBy" payloadAttributeName = 'CREATED_BY' columnName = 'CREATED_BY' columnDataType = "VARCHAR" required = "false" persisted = "true" javaType = "java.lang.String" keyAttribute = "false" / > "

    < directMapping attributeName = "creationDate" payloadAttributeName = 'CREATION_DATE' columnName = 'CREATION_DATE' columnDataType = "VARCHAR" required = "false" persisted = "true" javaType = "java.lang.String" keyAttribute = "false" / > "

    < directMapping attributeName = "lastUpdatedBy" payloadAttributeName = "LAST_UPDATED_BY" columnName = "LAST_UPDATED_BY" columnDataType = "VARCHAR" required = "false" persisted = "true" javaType = "java.lang.String" keyAttribute = "false" / > "

    < directMapping attributeName = "lastUpdateDate" payloadAttributeName = "LAST_UPDATE_DATE" columnName = "LAST_UPDATE_DATE" columnDataType = "VARCHAR" required = "false" persisted = "true" javaType = "java.lang.String" keyAttribute = "false" / > "

    < directMapping attributeName = "discussionCount" payloadAttributeName = "DISCUSSION_COUNT" columnName = "DISCUSSION_COUNT" columnDataType = "NUMERIC" required = "false" persisted = "true" javaType = "java.math.BigDecimal" keyAttribute = "false" / > "

    < directMapping attributeName = "comments" payloadAttributeName = "COMMENTS" columnName = "COMMENTS" columnDataType = "VARCHAR" required = "false" persisted = "true" javaType = "java.lang.String" keyAttribute = "false" / > "

    < / attributeMappings >

    <>methods

    < findAllMethod uri = "/ projects/searchtasks/search/spot / {id} / {id1} / {id2} / {id3}" connectionName = "MyTask" requestType = 'GET' guaranteed = "false" sendDataObjectAsPayload = "false" deleteLocalRows = "true" payloadElementName = "Task" > "

    < name headerParameter = "Content-Type" value = "application/json" / >

    < name of the parameter = "id" value = "#{pageFlowScope.searchId1}" valueProvider = "ELExpression" pathParam = "true" / > "

    < name of the parameter = "id1" value = "#{pageFlowScope.searchId2}" valueProvider = "ELExpression" pathParam = "true" / > "

    < name of the parameter = "id2" value = "#{pageFlowScope.searchId3}" valueProvider = "ELExpression" pathParam = "true" / > "

    < name of the parameter = "id3" value = "#{pageFlowScope.searchId4}" valueProvider = "ELExpression" pathParam = "true" / > "

    < / findAllMethod >

    < / methods >

    < / classMappingDescriptor >

    < className = "oracle.ateam.sample.mobile.v2.persistence.service.DataSynchAction" classMappingDescriptor

    dateFormat "dd-MMM-yyyy" = >

    < table name = "DATA_SYNCH_ACTIONS" >

    < name primaryKeyColumn = "SERVICE_CLASS_NAME" / >

    < name primaryKeyColumn = "ID" / >

    < /table >

    < attributeMappings >

    < directMapping attributeName = "id" columnName = "ID" columnDataType = "NUMERIC" required = "true".

    javaType = "java.lang.Integer" keyAttribute = "true" / > "

    < directMapping attributeName = "serviceClass" columnName = "SERVICE_CLASS_NAME" columnDataType = "VARCHAR".

    required = "true" javaType = "java.lang.String" keyAttribute = "true" / > "

    < directMapping attributeName = "entityClassString" columnName = "ENTITY_CLASS_NAME" columnDataType = "VARCHAR".

    javaType="java.lang.String"/ >

    < directMapping attributeName = "entityAsJSONString" columnName = "JSON_PAYLOAD" columnDataType = "VARCHAR".

    javaType="java.lang.String"/ >

    < directMapping attributeName = "action" columnName = "ACTION" columnDataType = "VARCHAR".

    javaType="java.lang.String"/ >

    < directMapping attributeName = "dateCreated" columnName = 'DATE_CREATED' columnDataType = 'DATE '.

    javaType="java.util.Date"/ >

    < directMapping attributeName = "lastSynchAttempt" columnName = "DATE_LAST_SYNCH" columnDataType = "DATE".

    javaType="java.util.Date"/ >

    < directMapping attributeName = "lastSynchError" columnName = "LAST_SYNCH_ERROR" columnDataType = "VARCHAR".

    javaType="java.lang.String"/ >

    < directMapping attributeName = "customMethodName" columnName = "CUSTOM_METHOD_NAME" columnDataType = "VARCHAR".

    javaType="java.lang.String"/ >

    < / attributeMappings >

    < / classMappingDescriptor >

    < / mobileObjectPersistence >

    ===========================================================================================================================

    Rest Service payload

    {

    "Task": [{}

    "ACTIVITY_ID": 426.

    "PROJECTID": 3.

    "ACTIVITY_NAME': 'solve the performance issue."

    "DESCRIPTION': 'solve the performance issue."

    'PARENT_ACTIVITY_ID': null,

    "STATUS': 'IN_PROGRESS."

    'PRIORITY': null,

    'PERCENTAGE_COMPLETE': 50,.

    "START_DATE": null;

    "END_DATE": "2015-04 - 05 T 23: 55:47.000 - 04:00", ".

    'ETA': null,

    'ESTIMATED_HOURS': null,

    'ACTUAL_HOURS': null,

    'OWNER_USER_ID': 8,.

    'CREATED_BY': 'elilani ',.

    'CREATION_DATE': ' 2015-04 - 10 T 19: 13:49.000 - 04:00 ",".

    "LAST_UPDATED_BY": "elilani",

    "LAST_UPDATE_DATE": "2015-04 - 10 T 19: 13:49.000 - 04:00", ".

    'DISCUSSION_COUNT': 1,.

    "OBSERVATIONS": "poor response time during the updating of the homepage and create the task.»

    "TaskAssignment": [{}

    'ASSIGNMENT_ID': 962,.

    "PROJECT_TEAM_MEMBER_ID": 3.

    "START_DATE": null;

    "End_date": null;

    'CREATED_BY': 'elilani ',.

    'CREATION_DATE': ' 2015-04 - 10 T 19: 13:49.000 - 04:00 ",".

    "LAST_UPDATED_BY": "elilani",

    "LAST_UPDATE_DATE": "2015-04 - 10 T 19: 13:49.000 - 04:00", ".

    'FAVORITE_FLAG': null

    }, {

    'ASSIGNMENT_ID': 960,.

    "PROJECT_TEAM_MEMBER_ID": 3.

    "START_DATE": null;

    "End_date": null;

    'CREATED_BY': 'elilani ',.

    'CREATION_DATE': ' 2015-04 - 10 T 19: 13:49.000 - 04:00 ",".

    "LAST_UPDATED_BY": "elilani",

    "LAST_UPDATE_DATE": "2015-04 - 10 T 19: 13:49.000 - 04:00", ".

    'FAVORITE_FLAG': null

    }, {

    'ASSIGNMENT_ID': 961.

    'PROJECT_TEAM_MEMBER_ID': 2.

    "START_DATE": null;

    "End_date": null;

    'CREATED_BY': 'elilani ',.

    'CREATION_DATE': ' 2015-04 - 10 T 19: 13:49.000 - 04:00 ",".

    "LAST_UPDATED_BY": "elilani",

    "LAST_UPDATE_DATE": "2015-04 - 10 T 19: 13:49.000 - 04:00", ".

    'FAVORITE_FLAG': null

    } ]

    } ]

    }

    ----------------------------------------------------------------------------------------------------------------------------

    Massari,

    The data object to "Seek", you have misconfigured persistence distance Manager:

    remotePersistenceManager = "oracle.ateam.sample.mobile.v2.persistence.manager. RestXMLPersistenceManager".

    This should be

    remotePersistenceManager = "oracle.ateam.sample.mobile.v2.persistence.manager. RestJSONPersistenceManager".

    My guess is that when running the wizard, you have forgotten initially set the Content Type application/JSON and when the wizard runs the servce REST to inspect the payload, payload has been returned in XML format. Would this be possible?

    Also note that a new version of AMPA is available, see this blog post.

    Steven Davelaar,

    Oracle Mobile & Cloud A-team.

  • Problems using collection ArrayCollection as a DataProvider for trees and the menu bar, possibly bug?

    Hi guys,.

    I'm having some troble using a collection ArrayCollection as a DataProvider for a tree and a menu bar...

    I read some Adobe documents on this subject, and I read that two components read the dataProvider in the same way.

    but my current works of DataProvider well on the tree, but not on the MenuBar component...

    My dataProvider is an ArrayCollection collection of a custom class (which extends from ArrayCollection collection), and among its assets is a children's collection: ArrayCollection, so the hierarchy can be read correctly.

    When I use the component of the tree it works, but the menu bar do not display the branches...

    Can someone help me?

    Here's the function that create my dataprovider:


    private function fnFillDP (): void {}
    for (var i: int = 0; admResult.length > i; i ++) {}
    If (.nivel JV_MenuAdm (JV_AuxMenuAdm(admResult[i]).menuAdm [0]) == 0) {}
    var novoMenu:CL_ArrayMenu = new CL_ArrayMenu();
    novoMenu.idMenu = .idMenu JV_MenuAdm (JV_AuxMenuAdm(admResult[i]).menuAdm [0]);
    novoMenu.titulo = .titulo JV_MenuAdm (JV_AuxMenuAdm(admResult[i]).menuAdm [0]);
    novoMenu.parent = .parent JV_MenuAdm (JV_AuxMenuAdm(admResult[i]).menuAdm [0]);
    novoMenu.nivel = .nivel JV_MenuAdm (JV_AuxMenuAdm(admResult[i]).menuAdm [0]);
    novoMenu.ordem = .ordem JV_MenuAdm (JV_AuxMenuAdm(admResult[i]).menuAdm [0]);

    dataProvider.addItem (novoMenu);
    } ElseIf (.nivel JV_MenuAdm (JV_AuxMenuAdm(admResult[i]).menuAdm [0]) == 1) {}
    for (var j: int = 0; dataProvider.length > j; j ++) {}
    {If (CL_ArrayMenu(dataProvider[j]).idMenu == {JV_MenuAdm (JV_AuxMenuAdm(admResult[i]).menuAdm [0]) .parent})}
    var novoMenuChildren:CL_ArrayMenu = new CL_ArrayMenu();
    novoMenuChildren.idMenu = .idMenu JV_MenuAdm (JV_AuxMenuAdm(admResult[i]).menuAdm [0]);
    novoMenuChildren.titulo = .titulo JV_MenuAdm (JV_AuxMenuAdm(admResult[i]).menuAdm [0]);
    novoMenuChildren.parent = .parent JV_MenuAdm (JV_AuxMenuAdm(admResult[i]).menuAdm [0]);
    novoMenuChildren.nivel = .nivel JV_MenuAdm (JV_AuxMenuAdm(admResult[i]).menuAdm [0]);
    novoMenuChildren.ordem = .ordem JV_MenuAdm (JV_AuxMenuAdm(admResult[i]).menuAdm [0]);
    If (dp.length > 0) {}
    If (CL_ArrayMenu (dp.getItemAt (0)) .parent == novoMenuChildren.parent) {}
    dp.addItem (novoMenuChildren);
    } else {}
    DP = new ArrayCollection();
    dp.addItem (novoMenuChildren);
    }
    } else {}
    dp.addItem (novoMenuChildren);
    }

    CL_ArrayMenu (DataProvider [j]). Children = dp;
    break;
    }
    }
    }
    }
    tree.dataProvider = dataProvider;
    menu.dataProvider = dataProvider;
    }

    Sorry for the bad English...

    Hello

    You can try using xml as the dataprovider of the Menu bar instead of going for the Arraycollection collection.

    Thank you

    Roman

  • Help needed to convert the ArrayList collection ArrayCollection


    I am converting an ArrayList (Java) to the collection of Flex ArrayCollection.
    Please help me in this, I don't know whether there is a correct approach

    I have a created a class user VO ActionScript Flex with two properties as uname, pass.

    [Bindable]
    var result: ArrayCollection collection

    private void displayDetails(event:ResultEvent):void
    {
    result = event.result as ArrayCollection collection;
    }


    < mx:DataGrid dataProvider = "{result}" >
    < mx:columns >
    < mx:DataGridColumn headerText = "UserName" dataField = "uname" / >
    < mx:DataGridColumn headerText = "Password" dataField = "pass" / >

    < / mx:columns >
    < / mx:DataGrid >

    It's my DAO of Java file:


    ResultSet rs = stmt.executeQuery ("select NAME, PAST by users");
    list = new ArrayList();
    While (RS. Next {}
    User user = new User();
    user.setUname (rs.getString (1));
    user.setPass (rs.getString (2));
    List.Add (User);

    }


    back list;

    With the code below, the DataGrid displays is empty without data, please help me where I am wrong doung

    I have to do something more? The data comes on the lcds Server console.

    Help, please.

    Hi Kiran,

    Try this once...

    private void displayDetails(event:ResultEvent):void
    {
    result = new collection ArrayCollection (event.result as Array);

    }

    Just try to debug by placing the stop point and make sure that you have found event.result as array... If not, then change your code accordingly.

    Thank you

    Jean Claude

  • How to copy an arraycollection variable collection to another collection arraycollection variable but any change in a var

    Hi all

    I want to create a copy of the collection arraycollection from a table of existing collection variable.

    but when I change the collection newly created arraycollection variable that is showing the other oldest.

    How can I protect the changes the new is does not reflect the older one.

    I use the code below

    var aa:ArrayCollection = new ArrayCollection();

    var aa1:ArrayCollection = new ArrayCollection (aa.source.concat ());

    Thanks in advance;

    Hi Niranjan,

    You can make use of ObjectUtill class to clone, or make a copy of a collection arraycollection.

    In the forum, he is also already talked several times...

    var aa:ArrayCollection = new ArrayCollection();

    var aa1:ArrayCollection = ObjectUtil.copy (aa) like collection ArrayCollection;

    If this post answers your question or assistance, please mark it as such.

    Thank you

    Jean Claude Chari

  • changing the collection arrayCollection changes other arrayCollections

    Hello

    I need to create a collection arrayCollection as a copy of another collection arrayCollection. Then I need to change some data within the copy, but when I do that collection as well original arrayCollection changes. Is there a way to prevent changes in the original arrayCollection collection?

    For example, I got: .someVar arrColOrig [0] = 1

    I tried:

    arrColCopy = new arrayCollection (arrColOrig.source) collection

    arrColCopy [0] .someVar = 2

    effect is that .someVar arrColOrig [0] = 2

    I also tried:

    ARR = new Array

    ARR = arrColOrig.source

    arrColCopy = new arrayCollecion (arr);

    arrColCopy [0] .someVar = 2

    effect is that 'someVar' changes to the value '2' in arr and arrColCopy and arrColOrig

    So is it possible to retain the original unchanged arrayCollection collection? I know that I can create the copy by a loop of the original arrayCollection collection, but I'm looking for an easier way.

    Hello

    It's what happens when you do things from the top of your head, I forgot the important bit...

    Arr2 = ObjectUtil.copy (arr1) as ArrayCollection collection;

    David

  • Problem with allocating memory collection arraycollection by AddItem

    I have a strange problem with the AddItem method.

    I made a new item with this code:

    ------

    for (var u: int = 0; u < 41; u ++) {}
    Page = new PageToSave();
    project.addPage (page as PageToSave);
    }

    -----

    the project is a distance of class projectblueprint:

    package marcoDoItBetter.utils
    {
    Import mx.collections.ArrayCollection;
    public class ProjectBlueprint
    {
    private var _pages:ArrayCollection;

    public void addPage(page:PageToSave):void
    {
    This._pages. AddItem (page);
    }

    }

    }

    ----

    PageToSave is a class that extends the object.

    When we create the element using the addPages (so with in the collection _pages arraycollection's addItem) programmatically, we have this result using the term Inspector in debug mode.

    It is on the output of the debugger:

    pageList = mx.collections.ArrayCollection (@105cf341)
    [inherited] =
    [0] = marcoDoItBetter.utils.PageToSave (@113cb461)
    [1] = marcoDoItBetter.utils.PageToSave (@113cb401)
    [2] = marcoDoItBetter.utils.PageToSave (@113cb3a1)
    [3] = marcoDoItBetter.utils.PageToSave (@113cb341)
    [4] = marcoDoItBetter.utils.PageToSave (@113cb2e1)
    [5] = marcoDoItBetter.utils.PageToSave (@113cb281) < -.
    [6] = marcoDoItBetter.utils.PageToSave (@113cb221)
    [7] = marcoDoItBetter.utils.PageToSave (@113cb1c1)
    [8] = marcoDoItBetter.utils.PageToSave (@113cb161)
    [9] = marcoDoItBetter.utils.PageToSave (@113cb101)
    [10] = marcoDoItBetter.utils.PageToSave (@113cb0a1)
    [11] = marcoDoItBetter.utils.PageToSave (@113cb041)
    [12] = marcoDoItBetter.utils.PageToSave (@1140dfa1)
    [13] = marcoDoItBetter.utils.PageToSave (@1140df41)
    [14] = marcoDoItBetter.utils.PageToSave (@1140dee1)
    [15] = marcoDoItBetter.utils.PageToSave (@1140de81)
    [16] = marcoDoItBetter.utils.PageToSave (@1140de21)
    [17] = marcoDoItBetter.utils.PageToSave (@1140ddc1)
    [18] = marcoDoItBetter.utils.PageToSave (@1140dd61)
    [19] = marcoDoItBetter.utils.PageToSave (@1140dd01)
    [20] = marcoDoItBetter.utils.PageToSave (@1140dca1)
    [21] = marcoDoItBetter.utils.PageToSave (@1140dc41)
    [22] = marcoDoItBetter.utils.PageToSave (@113cb281) < -.
    [23] = marcoDoItBetter.utils.PageToSave (@1140db81)
    [24] = marcoDoItBetter.utils.PageToSave (@1140db21)
    [25] = marcoDoItBetter.utils.PageToSave (@1140dac1)
    [26] = marcoDoItBetter.utils.PageToSave (@1140da61)
    [27] = marcoDoItBetter.utils.PageToSave (@1140da01)
    [28] = marcoDoItBetter.utils.PageToSave (@1140d9a1)
    [29] = marcoDoItBetter.utils.PageToSave (@1140 d 941)
    [30] = marcoDoItBetter.utils.PageToSave (@1140d8e1)
    [31] = marcoDoItBetter.utils.PageToSave (@1140 d 881)
    [32] = marcoDoItBetter.utils.PageToSave (@1140 d 821)
    [33] = marcoDoItBetter.utils.PageToSave (@1140d7c1)
    [34] = marcoDoItBetter.utils.PageToSave (@1140 d 761)
    [35] = marcoDoItBetter.utils.PageToSave (@1140 d 701)
    [36] = marcoDoItBetter.utils.PageToSave (@1140d6a1)
    [37] = marcoDoItBetter.utils.PageToSave (@1140 d 641)
    [38] = marcoDoItBetter.utils.PageToSave (@1140 d 221)
    [39] = marcoDoItBetter.utils.PageToSave (@1140d5e1)
    [40] = marcoDoItBetter.utils.PageToSave (@1140 d 461)
    source = Array (@1140c9a9)

    as you can see the [5] and the [22] PageToSave id internal flex (or instances of the class has the same address listing.

    "I don't know the exact name of it). It happens totally randomly.

    sometimes fine, sometimes there's more than a duplicate with random address referencing the game.

    I don't want duplicated instances, but I want independent authorities.

    I tried to change addItem with

    This._pages.addItemAt (page, 0);

    Same result.

    I also tried pagina = null before the statement new but same result

    ------

    for (var u: int = 0; u < 41; u ++) {}
    Page = new PageToSave();
    project.addPage (page as PageToSave);

    Page = null;
    }

    -----

    is a garbage collector from?

    How can we solve this problem?

    Thank you

    Hello

    From the looks of it, looks like a bug.

    Are you defining filters or performs a sort on the ArrayCollection collection? Or it's just a pure naked collection instance ArrayCollection.

    Have you tried addItemAt() and got the same result?

    Mike

  • Display collection ArrayCollection in a list and the ArrayCollection with Drag and Drop collection reorgnize

    I have an ArrayCollection collection created like this

    qaAC = new ArrayCollection();

    for (var i: int = 0; i < 10; ++ i) {}
    var o: Object = {question: ' what is "+ i +"? ", answer:" it's "+ i"};
    qaAC.addItem (o);
    }

    The ArrayCollection collection is an array of object that has properties "question" and "answer to" custimized.

    I want to put 'issues' in the ArrayCollection collection in a list. 'qaAC.question' does not return an array of questions for me.

    I have to extract the ArrayCollection collection to form a new String table, and use the new array as the dataProvider of the list of questions.

    Is there a way better and clean?

    My goal is to use a list to reorgnize an ArrayCollection collection that contains complex objects (not simple string) with Drag & Drop. Is this possible?

    Any suggestions?

    I put two lists in my example to show how the ArrayCollection collection could be displayed in two different ways. You don't have to have two lists if you do not need them.

    When you change the order of the list made with drag and drop, you change the order of the collection ArrayCollection qaAC, so all the controls that display the qaAC will also be updated to reflect the new order. You can test this in the example I posted earlier. Change the order in the list of question and you will see the order change also in the list of responses. This is because they are both bound to the same collection of ArrayCollection. If you want to behave independently, you need two separate ArrayCollections.

    Chris

  • Impression of field collection ArrayCollection object

    Hi all

    I can return the collection of items in area code (POJO/value object) server that can be extracted as a collection table-side client in Flex. On the iteration of the table collection, we can get each item as an object. It is now possible to print/get the individual properties on object/POJO without creating/binding with action script class.

    For example a collection of used class has been removed from the side server, and we have in collection ArrayCollection. We can print the Rible properties such as first name, last name etc without creating a corrosponding action script class.

    Thank you

    Hello

    well, sure you can.

    As you mention all the object will be an object with all the properties type. Then simply to know the names of these properties.

    for each (var obj:Object in _arrayCollection)

    {

    trace (obj ["name"]);

    trace (obj ["name"]); and so on

    }

  • Collection ArrayCollection Pass to ComboBox ItemEditor

    I need to pass the Arraycollection collection to a ComboBox ItemEditor. I thought it would be a simple process, but after all the posts, I read that it is not seeking to be. I want to understand, because I think it's probably the same my box says [Object object] after I click on the check box.

    Thanks in advance.

    ERROR: 1120: access of undefined property borrowers.

    Scenario:

    RemoteObject retransmits the query of the SWC to my manager... I know that because I see this in the debug mode and if I move the ComboBox control to the DataGrid control, it fills.

    MXML file

    < mx:Script >
    <! [CDATA]

    Import mx.controls.Alert;
    Import mx.rpc.events.FaultEvent;
    Import mx.collections.ArrayCollection;
    Import mx.rpc.events.ResultEvent;

    [Bindable]
    private var borrowers: ArrayCollection collection;

    private function initComp (): void
    {transp.getUsers () ;}

    RemoteObject meesage alert
    private void serverFault(event:FaultEvent):void
    {Alert.show(event.fault.faultString,'Server Error') ;}

    private void getUsers_Handler(event:ResultEvent):void
    {Borrowers = event.result as ArrayCollection collection ;}

    []] >
    < / mx:Script >

    < mx:Panel >

    < mx:TabNavigator >

    < mx:Form >

    < mx:DataGrid >

    ...

    < mx:DataGridColumn " headerText =" Borrower "dataField =" " BORROWER "editorDataField =" " selectedItem " id=" grdBorrower " >

    < mx:itemEditor >

    < mx:Component >

    < mx:ComboBox " dataProvider =" {Borrowers} " />

    < / mx:Component >

    < / mx:itemEditor >

    < / mx:DataGridColumn >

    < / mx:DataGrid >

    < / mx:Form >

    < / mx:TabNavigator >

    < / mx:Panel >

    Yes I forgot to mention that you need to make a public property, if you want to access it from an itemEditor.

    I hope you're doing ok.

Maybe you are looking for