@ Override public void handleRequest ( final Request request ) { // Protect against client-side tampering of disabled/read-only fields. if ( isDisabled ( ) || isReadOnly ( ) ) { return ; } RadioButtonGroup currentGroup = getGroup ( ) ; // Check if the group is not on the request (do nothing) if ( ! currentGroup . isPresent ( request ) ) { return ; } // Check if the group has a null value (will be handled by the group handle request) if ( request . getParameter ( currentGroup . getId ( ) ) == null ) { return ; } // Get the groups value on the request String requestValue = currentGroup . getRequestValue ( request ) ; // Check if this button's value matches the request boolean onRequest = Util . equals ( requestValue , getValue ( ) ) ; if ( onRequest ) { boolean changed = currentGroup . handleButtonOnRequest ( request ) ; if ( changed && ( UIContextHolder . getCurrent ( ) != null ) && ( UIContextHolder . getCurrent ( ) . getFocussed ( ) == null ) && currentGroup . isCurrentAjaxTrigger ( ) ) { setFocussed ( ) ; } } }
This method will only process the request if the value for the group matches the button s value .