@ Override public void handleRequest ( final Request request ) { if ( isDisabled ( ) ) { // Protect against client-side tampering of disabled/read-only fields. return ; } if ( isMenuPresent ( request ) ) { // If current ajax trigger, process menu for current selections if ( AjaxHelper . isCurrentAjaxTrigger ( this ) ) { WMenu menu = WebUtilities . getAncestorOfClass ( WMenu . class , this ) ; menu . handleRequest ( request ) ; // 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 ) ; } } boolean openState = "true" . equals ( request . getParameter ( getId ( ) + ".open" ) ) ; setOpen ( openState ) ; } }
Override handleRequest in order to perform processing for this component . This implementation checks for submenu selection and executes the associated action if it has been set .