10-31-2012 09:43 AM
I have an App where i am displaying contents in the screen from an XML.Now my requiremnt is that when onClicking a field it should parse another XML and repaint the same screen with new contents instead of pushing to another Screen.How to achive this?Kindly help
10-31-2012 09:48 AM
10-31-2012 09:57 AM
Ya that is fine,but how to invalidate the screen,i mean the view should load in the same Screen instead of pushing to another screen.I tried
Manager manager= getMainManager();
manager.deleteAll();
in the constructor and than calling the same constructor with new xml,but nothing happens
10-31-2012 09:59 AM
UiApplication.getUiApplication()
.invokeLater(
new Runnable() {
public void run() {
new MyMainScreen(link);
//UiApplication.getUiApplication().pushScreen(new DescriptionScreen(link));
//processXml(link);
}
});Calling this in my OnNavigation of LabelField and my contructor looks like dis
public MyMainScreen(String id) {
super(VERTICAL_SCROLL);
// int directions =
// net.rim.device.api.system.Display.ORIENTATION_PORT RAIT;
// net.rim.device.api.ui.Ui.getUiEngineInstance().set AcceptableDirections(directions);
Manager manager= getMainManager();
manager.deleteAll();
processXml(id);
}
10-31-2012 10:09 AM
10-31-2012 10:12 AM
Ok but what about reloading the screen with new contents,do i have to use deleteAll() on my manager?
10-31-2012 10:20 AM
10-31-2012 10:22 AM
No sir,actually i have a Screen where i am adding images text in Vertical and Horizontal managers and adding those managers into the screen.So i want that i need to delete all those managers and fields and also variable values as i am using static variables at multiple places
10-31-2012 10:47 AM
10-31-2012 12:51 PM
So will it be sufficient if i do
Manager manager= getMainManager(); manager.deleteAll();
in the constructor before parsing the new xml and adding the contents to the screen