How to get items of the multi ArrayDataModel element

Hello

When I add items to an ArrayDataModel like that

// Main.qmlvar data = {"name": filename, "path": filepath}theDataModel.append(data);

How can I get items once again? When I fill out a single item of the data model I can use the value() method

theDataModel.value(i)

This gives the value added to the i - th position. But now I have items at each position in the data model. How can I get each item? When I use again theDataModel.value (i) I get '[object Object]' as output.

Your output [object Object] is ok as is JSON object. To access name or path you need this

theDataModel.value(i).name //print name value
theDataModel.value(i).path //print path value

Use the method of data instead of the value of your

https://developer.BlackBerry.com/native/reference/Cascades/bb__cascades__arraydatamodel.html#functio...

Tags: BlackBerry Developers

Similar Questions

  • How to get items of the skin class?

    Hi all

    I'm completely stacked to getting the items are defined directly in the skin class. To illustrate:

    I have a component of type SkinnableComponent having in turn, specific skinClass:

    MainApplication.mxml:

    " < = xmlns:fx s:Application ' http://ns.Adobe.com/MXML/2009 " ...   >

    < header: ApplicationHeader width = "100%" height = "30" / >

    < / s:Application >

    ApplicationHeader:

    < s:SkinnableComponent... skinClass = "components.header.ApplicationHeaderSkin" >

    < / s:SkinnableComponent >

    And the ApplicationHeaderSkin defines certain elements inside:

    < s:Skin... >

    ...

    < s:HGroup >

    < s:Label id = "label1" color = "white" / >

    < s:Button id = "button" width = "36" height = "100%" / >

    < / s:HGroup >

    < / s:Skin >

    The initial task is to instrument the skinnableComponent of ApplicationHeader to make it accessible for automation tools. For this I need to create a class of delegate with the method getAutomationChildren and getAutomationChildAt. The delegate is built with the obj SkinnableCompoment (ApplicationHeader in my case).

    So the question is: how to get children (or elements in the context of flex 4) defined in a class of skin only reference to the host of this skin component?

    I'd appreciate any hint, any reference to a description of the similar problem.

    Big thanks in advance

    Tim

    Referring to the hostComponent.contentGroup is the same as referring to the

    skin.contentGroup directly. The "contentGroup" is actually created by and there are

    in the skin, but it is accessible to the public through the hostComponent

    has declared a part of skin "contentGroup.

  • How to get TableId in the Document by FDK?

    My Code getting Table, but it does not work.

    He can only get a cell contained = "Source of FrameMaker Item.

    This content does not exist in my table.


    tableId = F_ApiGetId (0, DocId, FP_FirstTblInDoc);

    While (tableId) {}

    firstrowId = F_ApiGetId (DocId, tableId, FP_FirstRowInTbl);

    so that {(firstrowId)

    Rad_error_nocontent = F_ApiGetId (DocId, firstrowId, FP_FirstCellInRow);

    so that {(Rad_error_nocontent)

    Rad_error_nocontent = F_ApiGetId (DocId, firstrowId, FP_NextCellInRow);

    }

    firstrowId = F_ApiGetId (DocId, tableId, FP_NextRowInTbl);

    }

    tableId = F_ApiGetId (FV_SessionId, DocId, FP_NextTblInDoc);

    }

    }


    How to get TableId in the Document by FDK?

    diatranthanhoa,

    I do not understand your question. But if you try to browse all the cells of each table, you have errors in your code. These are common mistakes. The errors are:

    -FP_NextTblInDoc is a property of a table object, not the document

    -FP_NextRowInTbl is a property of a line object, not the table

    -FP_NextCellInRow is a property of a cell, not the line object

    So, I have maturities adjust your code as follows, noting that I didn't test this:

    tableId = F_ApiGetId (0, DocId, FP_FirstTblInDoc);

    While (tableId) {}

    firstrowId = F_ApiGetId (DocId, tableId, FP_FirstRowInTbl);

    so that {(firstrowId)

    Rad_error_nocontent = F_ApiGetId (DocId, firstrowId, FP_FirstCellInRow);

    so that {(Rad_error_nocontent)

    Rad_error_nocontent = F_ApiGetId (DocId, Rad_error_nocontent, FP_NextCellInRow);

    }

    firstrowId = F_ApiGetId (DocId, firstrowId, FP_NextRowInTbl);

    }

    tableId = F_ApiGetId (DocId, tableId, FP_NextTblInDoc);

    }

    }

    Hope this helps,

    Russ

  • How to get rid of the stupid list dropdown in the search box

    How to get rid of the stupid list dropdown in the search box

    If you want to restore the window previously used independently to manage search engines, you can enable or disable this pref to false with a middle-click on the topic: config page.

    • topic: config page: browser.search.showOneOffButtons = false

    Close and restart Firefox to force change.

  • How to get rid of the new menu button on the right side of the toolbar

    Honestly, I don't know why the developers cannot offer new features that we can use or not, by choice. Instead, things are forced upon us.

    Could someone tell me please how to get rid of the new menu button on the right side of the toolbar?

    It doesn't seem to be an option to remove via the Customize Toolbars window.

    Thank you very much.

    CTR extension makes Firefox customizable menu button 3 bar, so you can drag this button in the palette to customize to remove it from the Navigation toolbar.

    Reload and stop probably combine only if you set the two buttons in the correct order (reload - Stop and non-Stop - Reload)

  • How to get rid of the superdrive in menu bar?

    How to get rid of the superdrive in menu bar?

    Hold down the command key and drag it off the menu.

  • I can't use Roboform with 4.0 beta 10, so I can't use Firefox. How to get back to the beta version 9?

    I can't use Roboform with 4.0 beta 10, so I can't use Firefox. How to get back to the beta version 9?

    I think that there is a little more for it, but here's a solution that seems to work. After the installation of Roboform 7.1.7, go to: http://www.roboform.com/platforms/browsers/firefox and scroll down to a table listing the three browsers identifying the XPI file to load if it was not loaded automatically. Click the http://www.roboform.com/dist/roboform-firefox-3-4-frozen.xpilink. Firefox will ask you if you want to allow this should be installed. Let him. Finish installation, restart Firefox 4.0b10, and you'll see a Roboform 7.1.7 toolbar works. I did it on two computers, and everything seems to work.

  • How to get rid of the photo of the sunset on the webcam?

    HI -.

    It's probaby a stupid question, but please can someone tell me how to get rid of the image of the sunset on the webcam and allow me to use the photo and video on my netbook?

    I tried to contact Toshiba online but it does not connect.

    Thank you
    Stocks

    Sorry mate but I put t understand the question
    What cell phone do you have?
    Do you mean the internal s laptop webcam?

    If this can be useful?
    http://forums.computers.Toshiba-Europe.com/forums/thread.jspa?MessageID=189664

    -Drag your mouse on your pop out where you choose to use your webcam, instead click the option at the bottom of the "Effect" in their 'net', click and click 'OFF' Tada! The now disappeared from your cam Image, +.

    Please send feedback!

  • configeration Silverlight - how to get rid of the protected mode

    How to get rid of the protected mode

    Hello Gloria,.

    Try the following site devoted to Silverlight: http://www.silverlight.net/community.

    I hope this helps.

    Good luck!

  • How to get rid of the virus of the moneyak of the fbi?

    How to get rid of the virus of the moneyak of the fbi?

    How to get rid of the virus of the moneyak of the fbi?

    http://www.bleepingcomputer.com/virus-removal/remove-FBI-monkeypak-Ransomware

  • Does anyone know how to get rid of the calendar in the window Live on XP? I do not use it, and whenever I check my e-mail, it checks the calendar, slows things down to the top.

    Does anyone know how to get rid of the calendar in the window Live on XP? I do not use it, and whenever I check my e-mail, it checks the calendar, slows things down to the top.

    Thank you!
    Debnfurkids
    original title: get rid of the calendar in live mail

    Hi Debnfurkids,

    I recommend you post your query in Live Mail Forums for assistance on this issue.

  • How to get and install the file txtsetup.oem for xp

    need to know how to get and install the txtsetup.oem file to install xp

    Hello

    The easiest way would be to visit the website of the manufacturer of the motherboard. This would normally have downloads for any RAID drivers required for the loading of Windows XP. The download can be an "executable" who writes a disk for you. It can be also something like a zip file with all files inside that must be extracted and copied to a floppy disk.

    If your PC is not a floppy drive, life becomes quite complicated.

    Please mark this as useful or response if applicable.

    Tricky

  • Any ideas how to get rid of the rose?

    I just signed up for the first time today and everything on my screen that should be white is pink. I know that the monitor support always white because when I first connect there is a small screen which lights up and that switches from analog to digital and it is bright white. Any ideas how to get rid of the rose? Tried to DISPLAY on the control panel and could not fix. Thanks, people.

    Hi rutherford nbr 1.
     
    -Did you of recent changes made to your computer before this problem?
     
    Make sure that the monitor cable is correctly connected. In addition, if you have another computer, the same connect to your computer to confirm that the issue is not because of the screen.
     
    Make sure that there is no electric devices with magnets next to your screen.
     
    Follow these steps and check if it helps fix the problem.
     
    a. Click START and select control PANEL.
    b. Select and click VIEW.
    c. Select SETTINGS on the Interface of the screen and then ADVANCED.
    d. on the advance Interface, choose COLOR MANAGEMENT tab.
    e. on Interface, click on add color management. You will see a list of color profiles.
    f. choose the most appropriate to the brand of the screen / graphics card. You can choose several color profile and a default setting.
     
    For more information, see:
  • How to get rid of the 1935 error in windows 7

    How to get rid of the 1935 error in windows 7

    See:

    FIX: An installation may fail with Error 1935 when an .msi file

  • Windows Live Movie Maker 2011 - how to remove items from the recent projects list

    Windows Live Movie Maker 2011

    I have duplicates on my list of recent projects.

    How to remove items from the numbered list of recent projects?  What are the (thumb)

    bugs used for?  Thank you.

    Hello

    The question you have posted is related to Windows Live Movie Maker and would be better suited in the Windows Live Solution Center. Please visit the link below to find a community that will provide the best support.

    http://www.windowslivehelp.com/product.aspx?ProductID=5

    Amrita M

    Microsoft Answers Support Engineer

Maybe you are looking for

  • Lenovo multi-mode F800 WiFi storage - formatting options?

    Basically, it's a 1 TB hard with Wifi capabilities allowing up to 5 devices to connect.My plan when I bought was connected to my NAS Linkstation of Buffalo as attaché USB storage as a backup device - then I could bring him on holidays for films of ch

  • On iPhone4

    Hi, I just bought a used iPhone4 that I can not connect my Apple ID because "the maximum number of free accounts have been activated on this iPhone." I'm new user of Apple please help me.

  • Very loud beep when plug/unplug my laptop

    What is that noise and I can change it? More frequently lately, and it's very embarrassing. The slightest movement or jiggle the plug causes this BEEEEEP very hard! Recently, I replaced the power supply because it didn't work anymore. I was wondering

  • Error in the application using emulator ripple of packaging

    Hello everyone, I'm on emulator running continuous for the packaging of the app for blackberry help SDK Blackberry Webworks 2.3.1.5 7os. When I click the package button I get error as follows: Build request failed with the message: error: ENOENT, rem

  • What is the best way in grayscale, an image that has a lot of dark colors?

    I try to calm black and darker colors so that they are all shades of gray for a book coloring grayscale. Some pictures when I use various means of grayscaling, the darker colors are still too dark. Especially in the lower left Tulip. If I try the dod