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
Posts: 11
Registered: ‎01-22-2013
My Device: Blackberry 9650
My Carrier: SPRINT

Listview Functions

Hello, So I have been trying to import a .json file and finally did it and got it working decent using the following script

http://www.shadowmedia.be/bbdevbe/2013/01/13/listing-json-data-from-a-webservice-using-pure-qml/


My problem is that the script didnt quite work and the function convertDate makes all the listboxes appear blank so after figureing out and getting it working I need some way to use a function to sorta the list boxes.

 

For example my .json file is the following

Currency=USD

Price=100

 

For some of them listed the price is set to Null but on those items I want to remove the list box so you dont see it. Is that possible?

 

Also is it posible to organize the listbox in a currency way. so section1 is USD then section 2 is EURO and so on?

Contributor
Posts: 11
Registered: ‎01-22-2013
My Device: Blackberry 9650
My Carrier: SPRINT

Re: Listview Functions

Doing the following makes nothing become outputed

title: ListItemData.currency // call a function
                        description: convertDate(ListItemData.currency)

                        imageSpaceReserved: false

                        function convertDate(sent) {

                            if(toBeConvertedDate == "NULL" ){
                                var output = "NULL"
                            }else{
                                var output = sent
}
                            return ListItemData.currency;

 

 

Contributor
Posts: 11
Registered: ‎01-22-2013
My Device: Blackberry 9650
My Carrier: SPRINT

Re: Listview Functions

BUMP????