01-29-2013 02:10 PM
Hi,
I am writing a URL in Active RichText Field. After clicking that, it is hitting the server and coming back to my app. But after coming back also it is displaying the open link menu item. I have implemented the navigation click. How can i remove the menu items or popups while clicking.
Here is my code::
mCrtHyperlink = new ActiveRichTextField("url")
{
int color = Color.BLUE;
protected void onFocus(int direction) {
color = Color.GREEN;
invalidate();
}
protected void onUnfocus() {
color = Color.BLUE;
invalidate();
}
protected void paint(net.rim.device.api.ui.Graphics g) {
g.setColor(color);
super.paint(g);
}
protected boolean navigationClick(int status, int time) {
// TODO Auto-generated method stub
Browser.getDefaultSession().displayPage("http://otp.arcot.com");
UiApplication.getUiApplication().invokeLater(new Runnable() {
public void run() {
// TODO Auto-generated method stub
Logger.out("ProvisionForm", "Before Perform Action");
performOkAction();
}
});
return super.navigationClick(status, time);
}
};
Help me in this matter..
Solved! Go to Solution.
01-29-2013 05:21 PM
Not tested, but as per the documentation, you should return true from a navigationClick if you handle the method. You do, so instead of
return super.navigationClick(status, time);
I suggest you just code
return true;
I think that will resolve your problem.