@ Override public void handleRequest ( final Request request ) { if ( isDisabled ( ) ) { // Protect against client-side tampering of disabled/read-only fields. return ; } if ( isMenuPresent ( request ) ) { String requestValue = request . getParameter ( getId ( ) ) ; if ( requestValue != null ) { // Only process on a POST if ( ! "POST" . equals ( request . getMethod ( ) ) ) { LOG . warn ( "Menu item on a request that is not a POST. Will be ignored." ) ; return ; } // Execute associated action, if set final Action action = getAction ( ) ; if ( action != null ) { final ActionEvent event = new ActionEvent ( this , this . getActionCommand ( ) , this . getActionObject ( ) ) ; Runnable later = new Runnable ( ) { @ Override public void run ( ) { action . execute ( event ) ; } } ; invokeLater ( later ) ; } } } }
Override handleRequest in order to perform processing for this component . This implementation checks for selection of the menu item and executes the associated action if it has been set .