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

Web and WebWorks Development

Reply
Highlighted
Regular Contributor
Posts: 92
Registered: ‎01-31-2012
My Device: curve 8520
My Carrier: vodafone

listview doesn't show data

I'm developing a phonegap application for Android, Blackberry and iOS, and the Android version is already done. However, when I try to build for Blackberry I'm trying to load data in a listview but the data is not showing.

here's a code snippet I'm using

 

  $("#bankResultsList").empty().html(branchaty);
        $("#bankResultsList").listview("refresh");
        $.mobile.changePage( "resultsBanks.html");
        $("#bankResultsList").listview("refresh");
alert('af');
$("#bankResultsList").on('click', ' > li', function () {
    selectedIndex = $(this).index()-1;
});
alert('af');

if I try to output branchaty in an alert, I can see all the search results in the alert.

This code works on Android and iOS by the way, but the results page is empty on BlackBerry

BlackBerry Development Advisor
Posts: 762
Registered: ‎10-01-2009
My Device: All
My Carrier: N/A

Re: listview doesn't show data

Hi there,

 

I'm not sure why it's acting differently for you on BlackBerry but I would recommend using Remote Web Inspector to help troubleshoot, rather than placing alert()'s in your code. Much more powerful. Smiley Happy

 

https://developer.blackberry.com/html5/documentation/web_inspector_overview_1553586_11.html