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
somnathbanik
Posts: 19
Registered: ‎05-21-2012
My Device: Bold
My Carrier: Vodafone
Accepted Solution

DataSource doesn't refresh a runtime

Hi,

when I load a page for the first time it loads all the data perfect. But the DataSource doesn't refresh data at runtime, how do I refresh listview when I load a page, other then restarting the app everytime.

 

I used the below code, but not working during runtime.

 

  onCreationCompleted: {
        dataSource.load();
}

 

Please use plain text.
New Contributor
Kamil_ek
Posts: 8
Registered: ‎01-08-2013
My Device: 9790
My Carrier: P4

Re: DataSource doesn't refresh a runtime

Still no solution how to refresh the data? Or maybe there is an option to 'destroy' and create a page, forcing DataSource into it, to be refreshed?

Please use plain text.
Developer
Developer
lew
Posts: 174
Registered: ‎03-05-2009
My Device: Dev Alpha
My Carrier: -

Re: DataSource doesn't refresh a runtime

you decide when it is refreshed...onCreationCompleted is only called when the page is created, which may not be the case everytime (for example when suing tabbedpanne).

 

so call thjis method in the appropriate signals like:

onTriggered

onTopChanged

onClick

 

Please use plain text.