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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Cascades Development

Reply
Developer
bbquincar
Posts: 301
Registered: ‎08-14-2012
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.

Read up on BlackBerry news and QML/C++ tutorials
Check out www.twocasualcoders.com | never casual on quality .....

1 - click to all things Berry & easy share actions. Check out Launch Codes for BlackBerry 10! Find it at Launch Codes for BlackBerry **UPDATED** Get it now.....
Please use plain text.
Developer
bcs925
Posts: 212
Registered: ‎07-13-2012
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
Please use plain text.
Developer
bbquincar
Posts: 301
Registered: ‎08-14-2012
My Carrier: Rogers

Re: WebView Functions

Oh my god your my hero lol thanks great example

Read up on BlackBerry news and QML/C++ tutorials
Check out www.twocasualcoders.com | never casual on quality .....

1 - click to all things Berry & easy share actions. Check out Launch Codes for BlackBerry 10! Find it at Launch Codes for BlackBerry **UPDATED** Get it now.....
Please use plain text.
Developer
bbquincar
Posts: 301
Registered: ‎08-14-2012
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

Read up on BlackBerry news and QML/C++ tutorials
Check out www.twocasualcoders.com | never casual on quality .....

1 - click to all things Berry & easy share actions. Check out Launch Codes for BlackBerry 10! Find it at Launch Codes for BlackBerry **UPDATED** Get it now.....
Please use plain text.
Developer
bcs925
Posts: 212
Registered: ‎07-13-2012
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
Please use plain text.
Developer
bbquincar
Posts: 301
Registered: ‎08-14-2012
My Carrier: Rogers

Re: WebView Functions

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

Read up on BlackBerry news and QML/C++ tutorials
Check out www.twocasualcoders.com | never casual on quality .....

1 - click to all things Berry & easy share actions. Check out Launch Codes for BlackBerry 10! Find it at Launch Codes for BlackBerry **UPDATED** Get it now.....
Please use plain text.
Developer
bcs925
Posts: 212
Registered: ‎07-13-2012
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
Please use plain text.
Developer
bbquincar
Posts: 301
Registered: ‎08-14-2012
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.
Read up on BlackBerry news and QML/C++ tutorials
Check out www.twocasualcoders.com | never casual on quality .....

1 - click to all things Berry & easy share actions. Check out Launch Codes for BlackBerry 10! Find it at Launch Codes for BlackBerry **UPDATED** Get it now.....
Please use plain text.