Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Contributor
matteob
Posts: 12
Registered: ‎06-11-2012
My Device: 9900
My Carrier: Telus
Accepted Solution

ListView Sample App - In C++

Hi,

 

Does anyone know how to make this work in C++? My trouble is coming on the Item's description and status. Is there any way that I can customize it such as:

 

GroupDataModel temp = new GroupDataModel(QStringList << employeeid)

temp.setItemDescription(QStringList << employeeDescription);

temp.setItemStatus(QStringList << employeeSalary);

 

I've scoured the docs to no avail.

 

import bb.cascades 1.0
 
Page {
    content: Container {
        // Create a ListView that uses an XML data model
        ListView {
            dataModel: XmlDataModel {
                source: "models/items.xml"
            }
 
            listItemComponents: [
                ListItemComponent {
                    type: "header"
 
                    // Use a predefined Header to represent "header"
                    // items
                    Header {
                        title: ListItemData.title
                        subtitle: ListItemData.subtitle
                    }
                },
                ListItemComponent {
                    type: "listItem"
 
                    // Use a predefined StandardListItem to represent "listItem"
                    // items
                    StandardListItem {
                        title: ListItemData.title
                        description: ListItemData.subtitle
                        status: ListItemData.status
                    }
                } // end of second ListItemComponent
            ] // end of listItemComponents list
        } // end of ListView
    } // end of Container
} // end of Page

Please use plain text.
Contributor
matteob
Posts: 12
Registered: ‎06-11-2012
My Device: 9900
My Carrier: Telus

Re: ListView Sample App - In C++

I have solved my own problem. See the sample app (Cascades cookbook)!

Please use plain text.