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

Java Development

Reply
New Contributor
Posts: 2
Registered: ‎05-16-2012
My Device: 9300
My Carrier: XL

BrowserField Reload error

Hi all,

I've got problem because of my reload page..

here's my code

 

public void fieldChanged(Field field, int context) {

if (field == btnXXX) {
                setTitle("XXX");
                
                vfmContent.deleteAll();
                delete(vfmContent);
                vfm.deleteAll();
                
                browserScreen(url);
                
                VerticalFieldManager vfm1 = new VerticalFieldManager(Manager.VERTICAL_SCROLL | Manager.HORIZONTAL_SCROLL | Manager.USE_ALL_WIDTH | Manager.USE_ALL_HEIGHT);
                BrowserFieldConfig myBrowserFieldConfig = new BrowserFieldConfig();
                myBrowserFieldConfig.setProperty(BrowserFieldConfig.NAVIGATION_MODE, BrowserFieldConfig.NAVIGATION_MODE_POINTER);
                myBrowserFieldConfig.setProperty(BrowserFieldConfig.JAVASCRIPT_ENABLED, Boolean.TRUE);
                browserField = new BrowserField(myBrowserFieldConfig);
                vfm1.add(browserField);
                vfm.add(vfm1);
                vfmContent.add(vfm);
                add(vfmContent);
}

}

 

 

private void browserScreen(final String url) {
          UiApplication.getUiApplication().invokeLater(new Runnable() {         
            public void run() {      
                browserField.setFocus();
                browserField.requestContent(url+userid);
            }
        });
    }

 

 

It worked just fine if my url doesnt reaload.

But the problem is, i've got some URl that can reload to another URL automaticly bcoz of some condition..

Can someone help me please?

Thanks b4.