Wednesday, May 30, 2012


Disable back command selectively in form

protected void beforeLandingPage(Form f) {
        // If the resource file changes the names of components this call will break notifying you that you should fix the code
        super.beforeLandingPage(f);
   
        /*
         * Disable back command in Landing Page - we don't want to go to login
         * screen
         */
        Command backCommand = f.getBackCommand();
        f.removeCommand(backCommand);
    }
prevent auto insertion of back command, put following in StateMachine.java --setBackCommandEnabled(false);