@ Override public void handleRequest ( final Request request ) { if ( ! isDisabled ( ) ) { final SelectToggleModel model = getComponentModel ( ) ; String requestParam = request . getParameter ( getId ( ) ) ; final State newValue ; if ( "all" . equals ( requestParam ) ) { newValue = State . ALL ; } else if ( "none" . equals ( requestParam ) ) { newValue = State . NONE ; } else if ( "some" . equals ( requestParam ) ) { newValue = State . SOME ; } else { newValue = model . state ; } if ( ! newValue . equals ( model . state ) ) { setState ( newValue ) ; } if ( ! model . clientSide && model . target != null && ! State . SOME . equals ( newValue ) ) { // We need to change the selections *after* all components // Have updated themselves from the request, as they may change // their values when their handleRequest methods are called. invokeLater ( new Runnable ( ) { @ Override public void run ( ) { setSelections ( model . target , State . ALL . equals ( newValue ) ) ; } } ) ; } } }
Override handleRequest to handle selection toggling if server - side processing is being used .