public boolean doAction ( String strAction , int iOptions ) { if ( Constants . BACK . equalsIgnoreCase ( strAction ) ) { String strPrevAction = this . popHistory ( 1 , false ) ; // Current screen strAction = this . popHistory ( 1 , false ) ; // Last screen if ( strAction != null ) // I don't back up into the browser history if the user hit the java back button. { // If that wasn't the first screen, redo pop and update the browser this time this . pushHistory ( strAction , false ) ; strAction = this . popHistory ( 1 , true ) ; } if ( strAction != null ) { iOptions = iOptions | Constants . DONT_PUSH_TO_BROWSER ; // Don't push the back command if ( ! Constants . BACK . equalsIgnoreCase ( strAction ) ) // Never (prevent endless recursion) return this . doAction ( strAction , iOptions ) ; } else if ( strPrevAction != null ) this . pushHistory ( strPrevAction , false ) ; // If top of stack, leave it alone. } if ( Constants . HELP . equalsIgnoreCase ( strAction ) ) { String strPrevAction = this . popHistory ( 1 , true ) ; // Current screen this . pushHistory ( strPrevAction , ( ( iOptions & Constants . DONT_PUSH_TO_BROWSER ) == Constants . PUSH_TO_BROWSER ) ) ; // If top of stack, leave it alone. if ( ( strPrevAction != null ) && ( strPrevAction . length ( ) > 0 ) && ( strPrevAction . charAt ( 0 ) != ' ' ) ) strPrevAction = "?" + strPrevAction ; String strURL = Util . addURLParam ( strPrevAction , Params . HELP , Constants . BLANK ) ; iOptions = this . getHelpPageOptions ( iOptions ) ; return this . getApplication ( ) . showTheDocument ( strURL , this , iOptions ) ; } if ( strAction != null ) if ( strAction . indexOf ( ' ' ) != - 1 ) { Map < String , Object > properties = new Hashtable < String , Object > ( ) ; Util . parseArgs ( properties , strAction ) ; String strApplet = ( String ) properties . get ( Params . APPLET ) ; if ( strApplet != null ) { this . setProperties ( properties ) ; if ( ! this . addSubPanels ( null , iOptions ) ) return false ; // If error, return false this . popHistory ( 1 , false ) ; // Pop the default command, the action command is better. this . pushHistory ( UrlUtil . propertiesToUrl ( properties ) , false ) ; // Since it was pushed to the browser on addSubPanels return true ; // Command handled } } if ( Util . isURL ( strAction ) ) this . getApplication ( ) . showTheDocument ( strAction , this , ThinMenuConstants . EXTERNAL_LINK ) ; return false ; }
Do some applet - wide action . For example submit or reset . Pass this action down to all the JBaseScreens . Remember to override this method to send the actual data!