How to store entries of listview?

Hello

I have a listview that contains a label and a text box that represents a question and an answer.

Label watch question and textbox will have room for the user to enter the answer.

My problem is that I'm not able to get the answer that the user entered in the text box. It seems that anything inside the listview is not accessible from the outside.

No idea how to do this?

Thank you

Here is a simple complete example of ListView.

You can put in your Page and play with him

ListView {
    function textChanged(indexPath, text){
        var item = dataModel.data(indexPath)
        if (item){
            console.log(item.title+" | "+text)
        }
    }

    function textChanging(indexPath, text){
        var item = dataModel.data(indexPath)
        if (item){
            console.log(item.title+" | "+text)
        }
    }

    horizontalAlignment: HorizontalAlignment.Fill
    verticalAlignment: VerticalAlignment.Fill
    onCreationCompleted: {
        dataModel.append([{"title": "One"}, {"title": "Two"}])
    }
    dataModel: ArrayDataModel {}
    listItemComponents: [
        ListItemComponent {
            type: ""
            Container {
                id: rootContainer
                leftPadding: 20
                rightPadding: 20
                topPadding: 20
                bottomPadding: 20
                Label {
                    text: ListItemData.title
                }

                TextField {
                    id: textField
                    onTextChanged: {
                        rootContainer.ListItem.view.textChanged(rootContainer.ListItem.indexPath, text)
                    }
                    onTextChanging: {
                        rootContainer.ListItem.view.textChanging(rootContainer.ListItem.indexPath, text)
                    }
                }

                Divider{}
            }
        } // End of item component
    ]
}

It may be useful

Tags: BlackBerry Developers

Similar Questions

  • How to store the original and to remove some duplicate songs in iTunes on a PC Win7, which took place after iTunes to scan for music during a re - install?

    How to store the original and to remove some duplicate songs in iTunes on a PC Win7, which took place after iTunes to scan for music during a re - install?

    I recently had to format my hard drive and reinstall iTunes 12.3.2.35 on my Win7 PC. As part of the re - install iTunes, I clicked on the button scan for music.  This has created duplicates several of my songs.  I deleted then the duplicate songs from iTunes, but when I went to play a few songs a pop-up said "the song would not be because the original could not be found.  You want to locate? "When I tried to locate the song it is not found, but when I pulled the songs out of the trash they could be found.

    How can I keep the original and remove any duplicate songs in iTunes on PC Win7 which took place after iTunes to scan for music during a re - install?

    iTunes can create duplicates if the same content is added several times from outside the media folder when it is about to make copies of everything that is added to the library, or is added from an external drive that hosts the press kit that was disconnected during the launch of iTunes.

    Official notice of Apple on the duplicates is here: find and remove duplicates in your iTunes library. This is a manual process and article fails to explain some of the potential pitfalls such as the lost coast and membership of playlist, or sometimes the same file can be represented by multiple entries in the library as well as a removal and recycling the file will break all the others.

    Use MAJ > display > show items to reproduce exactly to display the duplicates because it is normally a selection more useful. You must manually select all but one of each group to remove. Sort the list by Date added can make easier select appropriate tracks, but it works better when executed immediately after the dupes were created.  If you have several entries in iTunes connected to a same file on the disk hard then don't not send to trash.

    Use my DeDuper script (Windows only) If you are not sure, do not want to do it by hand, or want to maintain ratings, play counts and playlist membership. See this background thread , this post for detailed instructions and Please take note of the warning to back up your library before deduping.

    (If you don't see the menu bar press ALT to temporarily view or CTRL + B to keep displayed.)

    The latest version of the script can put away the dead links as long as there is at least a double live to merge his stats and membership of the playlist and must deal wisely when the same file has been added through multiple paths.

    TT2

  • How Photos stores libraries?

    I would like to understand how Photos stores photos. I come from a background of Picasa. Picasa, only used tags to build libraries but not to reproduce the photo itself (which I understand). However, it looks like iPhotos and Photos really build a coded library which, in a sense, duplicate photos in their own system of coded library.

    Is this correct?

    So, if this is correct, I guess that if I want to use one of the photos of, say, a document, I first need to export in the pictures folder (or somewhere) and it access?

    And, if this is correct, it raises the question of whether copies of photo outside the library can be deleted safely? What a pity that 'information' about the photos of the library do not point to their original location in the pictures folder.

    Post edited by: wizard_chef to add another question

    It looks like iPhotos and Photos really build a coded library which, in a sense, duplicate photos in their own system of coded library.

    Is this correct?

    Photos, iPhoto, Aperture, etc., are essentially applications of databases keep track of your photos and everything that changes and tags have been added to them.

    If you have iPhoto and photo libraries, they both link to the same files on your drive. the files are not duplicated, even if she looks like this in the Finder. If you remove, say, iPhoto library, you re - win very small storage space.

    Because these applications are databases, you should let them consolidate (as opposed to the use of libraries referenced) all your images and never, ever try to reorganize or rename, the files directly in the library file.

  • How to store contacts on my Mac?

    Everything I see is the iCloud account in Contacts. How to store contacts on my Mac?

    If you have the Apple menu > System Preferences > iCloud > power Contacts, the contacts in contacts on your Mac are automatically synchronized with iCloud. A copy is stored on your Mac, as well as in iCloud (and any other device that is synchronized to this account).

    You can reply with more information about what other contacts you want to store on the Mac.

  • How to store passwords on my macbook pro so that they are secure

    How to store passwords on my Macbook Pro so that they are secure?  I like to keep my huge list of passwords in a document on my computer but worry they will not be secure.  I have a Macbook Pro with the retina display OSX 10.9.5

    Thank you

    Martha

    The Finder, choose utilities go to menu and use disk utility to create an encrypted drive or image if you wish, turn on FileVault.

    (136891)

  • How to store files in iCloud drive ONLY (do not use the space on my MACBOOK hard drive?

    How to store files in iCloud drive ONLY (do not use the space on my MACBOOK hard drive?)

    I want to save the file in my iCloud account, but free space in the hard drive of my MACBOOK

    I want to save the file in my iCloud account, but free space in the hard drive of my MACBOOK

    There is no practical way to do it.

    If you do not enable iCloud Drive on your Mac, you can upload files to iCloud by car via the web interface at https://www.icloud.com

    But you can access the files from the web interface and won't icloud drive as drive in the Finder.  You cannot use the Finder to access the files. You need to download it to use.

  • How to store characters in result file and display on front panel

    Hello

    currently I am working on the FPGA project.i want data acquired from FPGA board.i want to know on how to store characters to the file and contineous each character display on the façade in the string format.

    I'm full up to characters on the front display, but display characters only when I want all characters in string format.

    I don't see how this question fits in any digital i/o, but it looks like you just need a change of register with the concantanate string function.

  • How to store pictures and other data on my hisense7 SD pro tablets

    How to store pictures and other data on my hisense7 SD pro tablets

    Hi Mark,

    Please contact hisense support from here: http://hisense-usa.com/support/.  If this isn't the case, in the United States, go to the bottom of the page to choose a more suitable location.

    I could point out that http://hisense-usa.com/support/manuals.asp contains a manual that could well answer that questions without the need more help.

    Good luck and best wishes

    Kosh

  • How to store a string of application properties

    Hi all!

    I just want to know how to store a string of properties of the application, so that I can access this channel of my app (just as we do in j2ME)

    Thank you that solves my query

  • How to store Favorites?

    How to store Favorites?  I used just right click and Add Favorites

    Hello Roberta,.

    I understand that you need to import your Favorites.

    Please help me with the following questions to help you best:

    Where did you saved favorites? (It is on the old computer or external drive)?

    If it's on the computer, what is the operating system installed on your old computer?

    You can import favorites to the new computer.

    Refer to this link below and

    Please refer to: Export Favorites and Import Favorites.

    http://Windows.Microsoft.com/en-us/Internet-Explorer/add-view-Organize-Favorites#IE=IE-10

    This will give you a detailed description about how to export and import.

    Hope this helps and answer please if you still need help.

  • How to store the query string value in the scope of the session in webcenter spaces?

    Hello

    I want to store the query string value (which is given from URL) in the sessionScope variable. According to the value of sessionScope beacause I went some components inside my taskflow. Can someone help me how to store this value in the scope of the session. I use webcenter spaces for my application development.

    Thank you

    Ashok.

    Please see the article below

    How to pass a parameter of argument the query URL to a parameter input workflow? (Doc ID 1545808.1).

  • How to store values of TextField in table

    Hello

    I am trying to write a code to store values of TextField in a table. I know how to convert entire TextField. But after that, we have different integer variables. I can't understand how to store values of these whole different variables in a table by using a loop.

    public class ArrAvg {}

    Public Shared Sub main (String [] args) {}

    int arr [10] = new int [10];

    inputNumbers (arr);

    }

    void int inputNumbers (int arr [10]) {}

    int i;

    TextField field1 = new JTextField();

    TextField Field2 = new JTextField();

    Field3 TextField = new JTextField();

    String value1 = field1.getText ();

    String value2 = field2.getText ();

    String value3 = field3.getText ();

    val1 = Integer.parseInt (value1);

    val2 = Integer.parseInt (value2);

    val3 = Integer.parseInt (value3);

    for (i = 0; i < 10; ++ I) {}

    arr [i] = val1 (this should be replaced by val2 and after that by val3? I don't know how to do this)

    }

    }

    Some body please guide me.

    Zulfi.

    I have stored text field in ArrayList so i should traverse the ArrayList. But when i am converting the contents of Arraylist into integer, i am getting type mismatch despite the fact that my ArrayList is of String type.
    
    
    

    Yes - the ArrayList to string but you create an iterator for object

    Iterator itr = al.iterator (); getting iterator of arraylist to iterate through the items

    This method of "al.iterator" () returns the iterator; for your use case E-online String. See the API

    https://docs.Oracle.com/javase/8/docs/API/Java/util/ArrayList.html

    You set it to 'Iterator' which is NOT a generic, so only objects are returned.

    So get back to string.

    Create your instance of the iterator Iterator.

    Is it possible to avoid "iterator"?

    Why avoid it? Just use the appropriate iterator.

    The class has a 'size' and a method 'get (int index) '. So you can use a loop from zero to the 'size', but simply use the iterator.

  • How to store/Pull date in HFM using rules

    Hi all

    Could you please suggest how to store/pull date into account server using rules HFM? I thought using the VB/excel function now() but not got the correct results.

    It would be really appreciated if you can help me with this.

    Kind regards

    Yes, I was able to get the day of the month using the day and now work (Day (Now ()). Initially I was using only NOW() but day and now all help.

    Thank you

  • How to store images in the oracle database and get back on a jsff page in ADF?

    Mr President.

    How to store images in the oracle database and get back on a jsff page in ADF?

    I have students and employees in my database and want to store their pictures against their ID.

    How to do this?

    Concerning

    Tender,

    You can check the links that explain this below.

    https://tompeez.WordPress.com/2011/11/26/jdev11-1-2-1-0-handling-imagesfiles-in-ADF-part-2/

    Johny tips: ADF: display image files from database as a popup in Application Web ADF

    See you soon

    AJ

  • How to store Photos in creative clouds and they can be read on my iPad?

    I have CC and LR and use an iMac. So far I've only stored pictures on my hard drive via LR. I just bought my first iPad, a mini 4. How to store photos on CC. How can they be viewed on my iPad?

    Hi David,

    Please see the following links for all information related to the area of cloud and synchronization:

    Navigate, sync and manage the assets of the Adobe Creative Cloud

    Quota and file adobe Creative Cloud storage

    Membership plans FAQ: how cloud storage do?

    Kind regards

    Bani

Maybe you are looking for