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
Regular Contributor
Posts: 51
Registered: ‎08-07-2013
My Device: blackberry z10

Re: List view group data model

hello sir
i can access button in a listview
for example
ListView {
translationY: 00
dataModel: dataModelList
listItemComponents: [
ListItemComponent {
type: "item"
Container {
Label {
text: "Category:"
}
Label {
text: ListItemData.cat_name
}
ImageButton {
id: view_details_btn
defaultImageSource: "asset:///coupon%20list/viewdetail_button.png"
pressedImageSource: "asset:///coupon%20list/viewdetailhover_button.png"
onClicked: {
}
}
}
]
onTriggered: {
var showDetail = productDetailPageID.createObject();
showDetail.myProfileData=dataModel.data(indexPath);
navigationPane.push(showDetail);
}
}
i can access this button.....

Developer
Posts: 6,145
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30

Re: List view group data model

As in your other posting for better clarity, please use the 'insert code button' for code, it's the clipboard icon with a c.

 

Please use more words when describing your problem.

 

'I can access button in  a listview' isn't a problem it's a statement.

 

Also FYI I won't and can't answer problems posted to me in PM, you are better off posting here then any one of the volunteers reading these forums can pick it up and you'll get an answer.

 


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 1,626
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: List view group data model


BBSJdev wrote:
....

 

Also FYI I won't and can't answer problems posted to me in PM, you are better off posting here then any one of the volunteers reading these forums can pick it up and you'll get an answer.

 


same for me !

I also got this as a PM

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
BlackBerry Platinum Enterprise Partner
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner http://vimeo.com/ekkescorner/videos
bb10-development: http://appbus.org Twitter: @ekkescorner
Developer
Posts: 6,145
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30

Re: List view group data model

LOL, Perhaps he is just gloating to everyone. :smileyhappy:


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Regular Contributor
Posts: 51
Registered: ‎08-07-2013
My Device: blackberry z10

Re: List view group data model

I can access this button in a listview but i can't.

in a button click event i m performing a navigation to the other page 

i found error variable navigationpane is not found....

Developer
Posts: 6,145
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30

Re: List view group data model

[ Edited ]

And have you defined the NavigationPane with that Id?

 

Is the navPane defined in the page you have posted or a previous one?


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Regular Contributor
Posts: 51
Registered: ‎08-07-2013
My Device: blackberry z10

Re: List view group data model

i can deceler navigationpane on a main page and use ID on other pages

Developer
Posts: 16,510
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: List view group data model

items in a listview are in a different context.
There are different ways to get access to items in the normal context.
usually myItem.ListItem.view is used to access the ListView object, by using functions or properties there you can build a bridge.
Another option would be to set a global context property (in c++) which is accessible in both contexts.

For details read the API
https://developer.blackberry.com/native/reference/cascades/bb__cascades__listview.html
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 6,145
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30

Re: List view group data model

[ Edited ]

Yes you can the NavigationPane's id should be in scope for the pages you push.

 

However you need to qualify the id if it's within a ListView.


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 6,145
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30

Re: List view group data model

Try this...

 

ListView {
  id: lv

  [ ... ]

  onTriggered: {
      var showDetail = productDetailPageID.createObject();
      showDetail.myProfileData=dataModel.data(indexPath);
      ListItem.view.navigationPane.push(showDetail);
  }
}

 


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.