How to stop the ObjectChoiceField prompt you to save the window?

Hi, I have 3 ObjectChoiceFields in my code to let the user select the information, then it passes the value to the next screen again. However when I click on the back button to return to the previous screen and exit the application, he always invites a window of notice asking me if I want to save, delete, or cancel. If I click on save, and then run the code again, the ObjectChoiceFields still shows the original value, if the backup does not really work. I would like to know how to do the backup works, so that the next time I run the code, it will present the values I chose last time. or another solution, how can I stop ObjectChoiceField prompt you to save the window?

Thank you very much!

Hello

There are two ways to do this (assuming that the judgment save prompt will solve the problem)

1.

In the api using onSavePromptMethod();

This method is a member of the screen class (AFAIK). You can override this and simply return true;

Who can't let the application display quick check

2.

First, use this code in the onClose method

If (getMainManager () .isDirty ()) {}
getMainManager () .setDirty (false);
}

I found that 2 still works and uncertain about 1. But I prefer to use 1 and you asking to try that and tell if it worked on the side or not...

Tags: BlackBerry Developers

Similar Questions

Maybe you are looking for