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
New Contributor
matt710
Posts: 7
Registered: ‎07-24-2012
My Device: Z10
My Carrier: Vodafone

bbui Image List getItems() not returning the items from the list

Hi,

 

I currently have an image list which is currently populated by taking an array of items and adding it to the list through the refresh method.

 

The image list is set up as follows:

 

<div data-bb-type="image-list" data-bb-image-effect="fade"
id="imgList" data-bb-style="arrowlist"
data-bb-image-placeholder="img\\transparentBkgnd.png">

</div>

 

It is empty at the start and populated by the following:

 

var imgList = element.getElementById("imgList");
imgList.refresh(items);

where items is the array of items on the list.

 

Once the list has loaded a user can click on a button to add more elements to the list, however when i call:

var imgListItems = element.getElementById("imgList").getItems(); 

alert(imgListItems.length)

 

I am getting a value of 0 which is wrong as the list has about 20 items in it on screen.

 

I have tried calling the getItems() after imgList.refresh(items); has been called and it still returns a length of 0.

 

I have just taken the latest version of BBUI as of 10/01/2013.

 

Is this behaviour expected or is it an issue?

 

Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: bbui Image List getItems() not returning the items from the list

[ Edited ]

Could you possibly open this up as an issue at github

 

https://github.com/blackberry/bbui.js/issues

 

That way it can be investigated and tracked.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
New Contributor
matt710
Posts: 7
Registered: ‎07-24-2012
My Device: Z10
My Carrier: Vodafone

Re: bbui Image List getItems() not returning the items from the list

Ok. I have created issue #592.

Please use plain text.