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
Trusted Contributor
kris0725pl
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 :smileyhappy: It is veeery easy :smileyhappy:

 
 
Please use plain text.
Developer
peter_strange
Posts: 19,598
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

Please use plain text.
Trusted Contributor
kris0725pl
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 :smileyhappy: Working perfectly.



 
Please use plain text.