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: 540
Registered: ‎08-31-2013
My Device: Q10, Z10LE, Nokia N950, DAB....
My Carrier: Telekom Slovakia

Re: Help me, I am not push a page QML from my ListView

[ Edited ]

Check if you are in the condition when click on the item

if (indexPath.length > 1) {
    console.log("CLICKED")
}

 



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
New Developer
Posts: 67
Registered: ‎07-12-2014
My Device: Z10
My Carrier: AT & T

Re: Help me, I am not push a page QML from my ListView

onTriggered: {
var stations = channel.data(indexPath);
if (stations){
var stationsDetails = itemPageDefinition.createObject();
stationsDetails.stations = stations
activePane.push(stationsDetails);
}

}
I tried again but it did not work.
Developer
Posts: 540
Registered: ‎08-31-2013
My Device: Q10, Z10LE, Nokia N950, DAB....
My Carrier: Telekom Slovakia

Re: Help me, I am not push a page QML from my ListView

[ Edited ]

Why are you assign stations to non-existent property?

stationsDetails.stations = stations

 In your channeldetails.qml you have a channel property

stationsDetails.channel = stations

 Also, if you call activePane.push is printed output in the console view of Momentics IDE? It may look like this

NavigationPane: NavigationPaneOnFwdTransitionDone: emitting push transition ended for page....



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
New Developer
Posts: 67
Registered: ‎07-12-2014
My Device: Z10
My Carrier: AT & T

Re: Help me, I am not push a page QML from my ListView

Check if you are in the condition when click on the item, but not open channeldetails.qml
:Helpsmilie:

if (indexPath.length > 1) {
    console.log("CLICKED")
Developer
Posts: 540
Registered: ‎08-31-2013
My Device: Q10, Z10LE, Nokia N950, DAB....
My Carrier: Telekom Slovakia

Re: Help me, I am not push a page QML from my ListView

[ Edited ]

Try to change you onTriggered signal like this

onTriggered: {
    var stations = channel.data(indexPath);
    if (stations){
        console.log("pushing page")
        var stationsDetails = itemPageDefinition.createObject();
        stationsDetails.channel = stations
        activePane.push(stationsDetails);
    }else{
        console.log("error")
    }
}

 This must work :smileywink:

 

You had two errors in your code:

1. XmlDataModel does not have header items, so, this condition will not be true

if (indexPath.length > 1)

 2. You assing stations to non-existent property, because in your channeldetails.qml you have a channel property

stationsDetails.stations = stations

 



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
New Developer
Posts: 67
Registered: ‎07-12-2014
My Device: Z10
My Carrier: AT & T

Re: Help me, I am not push a page QML from my ListView

Thank very Benecore. I have done. However page channeldetails no show image.

a7.png

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

Re: Help me, I am not push a page QML from my ListView

Change this:

imageSource: "asset:///image_channel/"+channel.pic

 to

imageSource: channel ? "asset:///image_channel/"+channel.pic : "

 



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
New Developer
Posts: 67
Registered: ‎07-12-2014
My Device: Z10
My Carrier: AT & T

Re: Help me, I am not push a page QML from my ListView

Hi Benecore. I want to create a search tab, the tab will search in the search database from channel.xml, give me the code my search. thanks. The image that I want.

a9.pnga10.png

Looking forward to your early reply. Thank you very much.

 

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

Re: Help me, I am not push a page QML from my ListView

I will look at it ASAP :smileywink:

 

BTW: It would be better create another topic with new problem. New users will find solution faster.

And don't forget to mark post which help you as solution



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
Developer
Posts: 540
Registered: ‎08-31-2013
My Device: Q10, Z10LE, Nokia N950, DAB....
My Carrier: Telekom Slovakia

Re: Help me, I am not push a page QML from my ListView

Here you have an example :smileywink:

https://www.dropbox.com/s/y77yjlmsydww35i/SearchTab.zip



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