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

Posts: 386
Registered: ‎07-20-2012
My Device: Blackberry Z10 (White), BlackBerry Dev Alpha C
My Carrier: O2 UK

onActiveTabChanged Query



I am currently using a WebView on two tabs within my application. The second WebView has this URL:


url: eBayUK.url + "/deals"


eBayUK is the ID of the first WebView and so the second tab loads /deals of whatever the current URL is of the first Webview but this causes an issue as when the user is on a different page on the first tab the second tab loads /deals whenever the first tab loads a page which leads to the same page then being displayed on the second tab. All I want to be displayed on the second tab is, for example, ebay.co.uk/deals 


Is there a way, with onActiveTabChanged, to load that WebView only when the user goes onto the second tab? 


Thanks Smiley Happy

Posts: 543
Registered: ‎08-31-2013
My Device: Q10, Z10LE, Nokia N950, DAB....
My Carrier: Telekom Slovakia

Re: onActiveTabChanged Query

Load the second tab as dynamic object. You can use the Delegate component.

for example:

Tab {
      id: secondTab
      delegate: Delegate {
          id: tabDelegate
          source: "secondTab.qml"
      delegateActivationPolicy: TabDelegateActivationPolicy.ActivateWhenSelected


  • ActivateWhenSelected:The tab content is loaded (active set to true) when the tab is selected and never deleted during the lifetime of the object. Since the content is never deleted, performance is impacted only the first time the tab is selected.

for more info



Then just load the url inside the onCreationCompleted signal


This is just one workaround. Is many others 

Hope it helps


If helped give a like. If your problem was solved mark the post as "Solution"
Portfolio: BlackBerry Nokia
Social: Twitter | Facebook
About Me / Blog DevPDA | Blog