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
Developer
Posts: 161
Registered: ‎01-03-2013
My Device: n/a
My Carrier: n/a

Re: How to refresh a qml using button?

No, the dataSource points at your .json file. (In your function businessdetailreviewrefresh it would be the "response" variable).

Regards.

If my answer has been useful to you, please, click the button
Highlighted
Developer
Posts: 73
Registered: ‎04-08-2014
My Device: Z10
My Carrier: XL

Re: How to refresh a qml using button?

oke i already type response on datamodel

when i run on function businessdetailreviewrefresh, the response is run well

but when i text it on DataSource it doesnt work, its empty

is it correct?

attachedObjects : [
   DataSource {
      id : datasource
      remote : true
      source : response
      onDataLoaded : {
         model1.clear()
         model1.append(data.review_result)
      }
   }
]

 thanks

Developer
Posts: 161
Registered: ‎01-03-2013
My Device: n/a
My Carrier: n/a

Re: How to refresh a qml using button?

attachedObjects : [
   DataSource {
      id : datasource
      remote : true
      source : yourjson.json //put here your json file, the file you have updated on your businessdetailreviewrefresh
      onDataLoaded : {
         model1.clear()
         //append all the loaded data
         model1.append(data)
      }
   }
]

 Try that.

Regards.

If my answer has been useful to you, please, click the button