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: 18
Registered: ‎08-20-2014
My Device: Z10
My Carrier: Rogers

Re: Imageview link and creating links to websites

Oh wow thanks, I'll try it out Smiley Happy
Developer
Posts: 18
Registered: ‎08-20-2014
My Device: Z10
My Carrier: Rogers

Re: Imageview link and creating links to websites

 Button {
                    id: buttonID
                    color: Color.create("#fc5400")
                    text: "Website"
                    attachedObjects: [
                        Invocation {
                            id: thelink
                            query: InvokeQuery {
                                mimeType: "text/plain"
                                invokeTargetId: "sys.browser"
                                uri: "http://www.google.com"
                            }
                        }
                    ]
                }

 How can I work from that?

Developer
Posts: 222
Registered: ‎10-19-2012
My Device: Playbook, BB10DevAlphaB/C, Z10
My Carrier: Sonera, Saunalahti

Re: Imageview link and creating links to websites

You need to activate the Invocation from the buttons onClicked event, something like:

onClicked {
thelink.trigger("bb.action.OPEN")
}


Kaj-Michael Lang, Home.
Author of: Onki and RetroPlayer
Developer
Posts: 18
Registered: ‎08-20-2014
My Device: Z10
My Carrier: Rogers

Re: Imageview link and creating links to websites

[ Edited ]
  Button {
                    id: buttonID
                    color: Color.create("#fc5400")
                    text: "Website"
                    onClicked: {
                        website.trigger("bb.action.OPEN")
                    }
                    attachedObjects: [
                        Invocation {
                            id: website
                            query: InvokeQuery {
                                mimeType: "text/plain"
                                invokeTargetId: "sys.browser"
                                uri: "http://www.google.com"
                            }
                        }
                    ]
                  
                    
                }

It worked! Thank you! Here's the code for others who are having the same problem as me.