private void createButtonBar ( ) { // Update and reset controls for the repeater. WPanel buttonPanel = new WPanel ( WPanel . Type . FEATURE ) ; buttonPanel . setMargin ( new Margin ( Size . MEDIUM , null , Size . LARGE , null ) ) ; buttonPanel . setLayout ( new BorderLayout ( ) ) ; WButton updateButton = new WButton ( "Update" ) ; updateButton . setImage ( "/image/document-save-5.png" ) ; updateButton . setImagePosition ( WButton . ImagePosition . EAST ) ; buttonPanel . add ( updateButton , BorderLayout . EAST ) ; WButton resetButton = new WButton ( "Reset" ) ; resetButton . setImage ( "/image/edit-undo-8.png" ) ; resetButton . setImagePosition ( WButton . ImagePosition . WEST ) ; resetButton . setAction ( new Action ( ) { @ Override public void execute ( final ActionEvent event ) { repeater . setData ( fetchDataList ( ) ) ; } } ) ; buttonPanel . add ( resetButton , BorderLayout . WEST ) ; add ( buttonPanel ) ; add ( new WAjaxControl ( updateButton , repeater ) ) ; add ( new WAjaxControl ( resetButton , repeater ) ) ; }
Create the UI artefacts for the update and reset buttons .