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
Highlighted
Trusted Contributor
Posts: 115
Registered: ‎03-24-2011
My Device: 8310 curve
My Carrier: PLAY
Accepted Solution

Automatically Save Prompt

[ Edited ]

Hi all, how to save options in application automativaly?

Without prompting?

 

I have this code:

 

public boolean onSavePrompt() {
  
  if (getMainManager().isDirty()) {
                getMainManager().setDirty(false);
            }
    
    return true; 
}

 But is always when exit application prompt me to save. How to do it automatically without promp but save options too.

 

 Ok, problem solved by my own Smiley Happy It is veeery easy Smiley Happy

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

Re: Automatically Save Prompt

Please can you :

 

a) Document how you did it for the next person

b) Mark this Thread as solved - see Help link near the top of your screen if you need help with this.

 

Thanks

Trusted Contributor
Posts: 115
Registered: ‎03-24-2011
My Device: 8310 curve
My Carrier: PLAY

Re: Automatically Save Prompt

1.In method

onClose()

 

just add the code what you want to save your some optiions from application and add code:

 

public boolean onSavePrompt() {
  
  if (getMainManager().isDirty()) {
                getMainManager().setDirty(true);
            }
    
    return true; 
} 

 Thats all Smiley Happy Working perfectly.