public boolean processServletCommand ( ) throws DBException { String strCommand = this . getProperty ( DBParams . COMMAND ) ; // Display record if ( strCommand == null ) strCommand = Constants . BLANK ; boolean bSuccess = false ; if ( this . getScreenField ( ) instanceof BasePanel ) { // Always if ( strCommand . equalsIgnoreCase ( ThinMenuConstants . FIRST ) ) bSuccess = ( ( BasePanel ) this . getScreenField ( ) ) . onMove ( DBConstants . FIRST_RECORD ) ; else if ( strCommand . equalsIgnoreCase ( ThinMenuConstants . PREVIOUS ) ) bSuccess = ( ( BasePanel ) this . getScreenField ( ) ) . onMove ( DBConstants . PREVIOUS_RECORD ) ; else if ( strCommand . equalsIgnoreCase ( ThinMenuConstants . NEXT ) ) bSuccess = ( ( BasePanel ) this . getScreenField ( ) ) . onMove ( DBConstants . NEXT_RECORD ) ; else if ( strCommand . equalsIgnoreCase ( ThinMenuConstants . LAST ) ) bSuccess = ( ( BasePanel ) this . getScreenField ( ) ) . onMove ( DBConstants . LAST_RECORD ) ; else if ( strCommand . equalsIgnoreCase ( ThinMenuConstants . SUBMIT ) ) bSuccess = ( ( BasePanel ) this . getScreenField ( ) ) . onAdd ( ) ; else if ( strCommand . equalsIgnoreCase ( ThinMenuConstants . DELETE ) ) bSuccess = ( ( BasePanel ) this . getScreenField ( ) ) . onDelete ( ) ; else { // Must have sent a user-defined command (send command to this screen) bSuccess = false ; // Too dangerous ((BasePanel)this.getScreenField()).handleCommand(strCommand, this.getScreenField(), false); } } return bSuccess ; }
Move the HTML input format to the fields and do the action requested .