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
Developer
arunbiet
Posts: 376
Registered: ‎06-22-2010
My Device: na
My Carrier: blackberry developer

Browserfield capturing event not working in actual device

I am using the MyBrowserFieldListener class as i found in a sample example to capture browserfiedl navigation.There is one method 

public void documentCreated(BrowserField browserField, ScriptEngine scriptEngine, Document document) throws Exception
	{
		if ((browserField != null) && (document != null))
		{
			String title = browserField.getDocumentTitle();
			String url = document.getBaseURI();
			System.out.println("[" + this.getClass().getName() + "] Document '" + title + "' created for URL " + url);
		}
		super.documentCreated(browserField, scriptEngine, document);
	}

 When i execute from simulator "

document.getBaseURI();

gives me the correct redirected name URI,but when debugging from actual device,it gives me the URI of the earlier page.Can anyone sugegst what is the prob?

Please use plain text.