void onButtonFired ( final ActionEvent event ) { final Optional < Button > b = getTarget ( event , Button . class ) ; final Optional < UniqueKey < ? extends Model > > data = getUserData ( b , StackWaves . PAGE_MODEL_KEY ) ; if ( data . isPresent ( ) ) { model ( ) . sendWave ( StackWaves . SHOW_PAGE_MODEL , WBuilder . waveData ( StackWaves . PAGE_MODEL_KEY , data . get ( ) ) , WBuilder . waveData ( StackWaves . STACK_NAME , "DemoStack" ) ) ; } }
When a button is fired display the related ModuleModel .