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
Highlighted
Developer
Posts: 73
Registered: ‎04-08-2014
My Device: Z10
My Carrier: XL
Accepted Solution

about onTriggered in listview

hi

i need to 

i have a listview about the list of all my image

this is my listitemcomponent :


WebView { id :web preferredWidth: 200 preferredHeight: 150 url : ListItemData.imageThumbnailURL }

onTriggered: { clearSelection() select(indexPath) var item = dataModel.data(indexPath) if (item){ //What should i do here? } }

 this is my webview which the bigone

            WebView{
                id : itemimage
                //url : image ? image["imageThumbnailURL"] : "" 
            }

 this is what should show

tolongsaya.png

the small images which is on right side is my : listitemcomponent

the large image which is on left side is WebView 

if i touch one of my list on the right, it will automaticly go to large image

what should i do in "onTriggered"?

thanks

BlackBerry Development Advisor
Posts: 15,245
Registered: ‎07-09-2008
My Device: BlackBerry Passport
My Carrier: Bell

Re: about onTriggered in listview

You can change the URL used by your WebView doing something like this:

 

itemimage.url = item.whateverVariableHoldsTheURL

 

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Posts: 73
Registered: ‎04-08-2014
My Device: Z10
My Carrier: XL

Re: about onTriggered in listview

thanks Smiley Happy

like it Smiley Very Happy