@ Override public void draw ( ) { if ( displayerSettings == null ) { getView ( ) . errorMissingSettings ( ) ; } else if ( dataSetHandler == null ) { getView ( ) . errorMissingHandler ( ) ; } else if ( ! isDrawn ( ) ) { try { drawn = true ; getView ( ) . showLoading ( ) ; beforeLoad ( ) ; beforeDataSetLookup ( ) ; dataSetHandler . lookupDataSet ( new DataSetReadyCallback ( ) { public void callback ( DataSet result ) { try { dataSet = result ; afterLoad ( ) ; afterDataSetLookup ( result ) ; createVisualization ( ) ; getView ( ) . showVisualization ( ) ; // Set the id of the container panel so that the displayer can be easily located // by testing tools for instance. String id = getDisplayerId ( ) ; if ( ! StringUtils . isBlank ( id ) ) { getView ( ) . setId ( id ) ; } // Draw done afterDraw ( ) ; } catch ( Exception e ) { // Give feedback on any initialization error showError ( new ClientRuntimeError ( e ) ) ; } } public void notFound ( ) { getView ( ) . errorDataSetNotFound ( displayerSettings . getDataSetLookup ( ) . getDataSetUUID ( ) ) ; } @ Override public boolean onError ( final ClientRuntimeError error ) { showError ( error ) ; return false ; } } ) ; } catch ( Exception e ) { showError ( new ClientRuntimeError ( e ) ) ; } } }
Draw the displayer by executing first the lookup call to retrieve the target data set