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: 4
Registered: ‎05-24-2012
My Device: Blackberry Torch 9800
My Carrier: Vodafone

Not Able to load Different urls in BrowserField based on drop menu selection

Hi i just started with blackberry development.i am trying to build a simple app having objectchoicefield.Based on value selected in drop list,i tried to load various url's but iam not been able to.I am attachin my code also.Pls reply

 

String choices[] = {"Option","Sales Dashboard","Enterprise Dashboard","Incident Dashboard"};
int iSetTo = 0;
ObjectChoiceField ConversionChoice = new ObjectChoiceField("Select DashBoard",choices,iSetTo);
add(ConversionChoice);
BrowserFieldConfig myBrowserFieldConfig = new BrowserFieldConfig();
myBrowserFieldConfig.setProperty(BrowserFieldConfig.NAVIGATION_MODE,BrowserFieldConfig.NAVIGATION_MODE_POINTER);
BrowserField browserField = new BrowserField(myBrowserFieldConfig);
add(browserField);

String selectedValue = choices[ConversionChoice.getSelectedIndex()];

if (selectedValue.equals(choices[1])){
browserField.requestContent("http://16.175.89.68:8080/birt-viewer/run?__report=Report/SalesDashboard.rptdesign");
}

else if (selectedValue.equals(choices[2])){
browserField.requestContent("http://16.175.89.68:8080/birt-viewer/run?__report=Report/order_dashboard.rptdesign");
}

else if (selectedValue.equals(choices[3])){
browserField.requestContent("http://16.175.89.68:8080/birt-viewer/run?__report=Report/IncidentDashboard.rptdesign");
}

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Not Able to load Different urls in BrowserField based on drop menu selection