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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 304
Registered: ‎08-14-2012
My Device: PlayBook, Z10, Dev C
My Carrier: Rogers
Accepted Solution

WebView Functions

Is there any documentation on Webview fuctions allowing control back, foward refresh. if someone could point me in the right direction that would be great thanks in advance.

BlackBerry 10 game reviews for the unknown, small and indie developers. Little games with big dreams. VeryBerryGames.com | Follow @VeryBerryGames | TwoCasualCoders.com | never casual on quality
Developer
Posts: 262
Registered: ‎07-13-2012
My Device: PlayBook, DA B, DA C, LE Z10 #102, Q10, Z30
My Carrier: T-Mobile

Re: WebView Functions

Quick example I threw together... its pretty self explanatory.  I will do a full write up on my blog soon:

 

import bb.cascades 1.0

Page {
    content: Container {
        background: Color.create(0.25, 0.25, 0.25)
        TextArea {
            text: "Text up here"
            editable: false
            textStyle {
                //   size: 30
                fontWeight: FontWeight.Bold
                color: Color.White
            }
        }
        Container {
            layout: StackLayout {
                orientation: LayoutOrientation.LeftToRight
            }
            Button {
                id: button1
                text: "Back"
                onClicked: {
                    myWebView.goBack();
                }
            }
            Button {
                id: button2
                text: "Forward"
                onClicked: {
                    myWebView.goForward();
                }
            }
            Button {
                id: button3
                text: "Refresh"
                onClicked: {
                    myWebView.reload();
                }
            }
        }
        Container {
            ScrollView {
                scrollViewProperties.pinchToZoomEnabled: true
                scrollViewProperties.scrollMode: ScrollMode.Both
                WebView {
                    id: myWebView
                    url: "https://www.google.com/"
                }
            }
        }
    }
}

 

 

Reference from documentation (https://developer.blackberry.com/cascades/reference/bb__cascades__webview.html):

 

void goBack ()

Navigates to the previous page in the navigation history.

If there's no previous page, this method does nothing.

void goForward ()

Navigates to the next page in the navigation history.

If there's no next page, this method does nothing.

void stop ()

Stops any loading in progress.

If no loading is in progress, this method does nothing.

void reload ()

Reloads the current page.

---
Check out my BB10 Cascades Coding site: BBcascades.com & Cascades Blog: bbcascadescode.tumblr.com

My Built for BlackBerry app: The Dive Plan
Developer
Posts: 304
Registered: ‎08-14-2012
My Device: PlayBook, Z10, Dev C
My Carrier: Rogers

Re: WebView Functions

Oh my god your my hero lol thanks great example

BlackBerry 10 game reviews for the unknown, small and indie developers. Little games with big dreams. VeryBerryGames.com | Follow @VeryBerryGames | TwoCasualCoders.com | never casual on quality
Developer
Posts: 304
Registered: ‎08-14-2012
My Device: PlayBook, Z10, Dev C
My Carrier: Rogers

Re: WebView Functions

[ Edited ]

I was looking for these other WebView functions are the avaible yet 

  • add to homescreen
  • reader
  • Share page
  • find on page
  • Site Info

Thanks

BlackBerry 10 game reviews for the unknown, small and indie developers. Little games with big dreams. VeryBerryGames.com | Follow @VeryBerryGames | TwoCasualCoders.com | never casual on quality
Developer
Posts: 262
Registered: ‎07-13-2012
My Device: PlayBook, DA B, DA C, LE Z10 #102, Q10, Z30
My Carrier: T-Mobile

Re: WebView Functions

I know you can use reader (my friend has it in one of his apps already) so I wouldn't see why not for the others.
---
Check out my BB10 Cascades Coding site: BBcascades.com & Cascades Blog: bbcascadescode.tumblr.com

My Built for BlackBerry app: The Dive Plan
Developer
Posts: 304
Registered: ‎08-14-2012
My Device: PlayBook, Z10, Dev C
My Carrier: Rogers

Re: WebView Functions

ok besides the normal dev cascades site is there other doc i can find them.

BlackBerry 10 game reviews for the unknown, small and indie developers. Little games with big dreams. VeryBerryGames.com | Follow @VeryBerryGames | TwoCasualCoders.com | never casual on quality
Highlighted
Developer
Posts: 262
Registered: ‎07-13-2012
My Device: PlayBook, DA B, DA C, LE Z10 #102, Q10, Z30
My Carrier: T-Mobile

Re: WebView Functions

I haven't seen any other docs on this subject. Why are you looking for an example? If so I'll be sure to make one soon.
---
Check out my BB10 Cascades Coding site: BBcascades.com & Cascades Blog: bbcascadescode.tumblr.com

My Built for BlackBerry app: The Dive Plan
Developer
Posts: 304
Registered: ‎08-14-2012
My Device: PlayBook, Z10, Dev C
My Carrier: Rogers

Re: WebView Functions

Yes I'd very interest in seeing all the browser funtions. My app is fully based around it thanks.
BlackBerry 10 game reviews for the unknown, small and indie developers. Little games with big dreams. VeryBerryGames.com | Follow @VeryBerryGames | TwoCasualCoders.com | never casual on quality