protected void runQuery ( ) { String pool = m_pool . getValue ( ) ; String stmt = m_script . getValue ( ) ; if ( stmt . trim ( ) . isEmpty ( ) ) { return ; } CmsStringBufferReport report = new CmsStringBufferReport ( Locale . ENGLISH ) ; List < Throwable > errors = new ArrayList <> ( ) ; CmsSqlConsoleResults result = m_console . execute ( stmt , pool , report , errors ) ; if ( errors . size ( ) > 0 ) { CmsErrorDialog . showErrorDialog ( report . toString ( ) + errors . get ( 0 ) . getMessage ( ) , errors . get ( 0 ) ) ; } else { Window window = CmsBasicDialog . prepareWindow ( DialogWidth . max ) ; window . setCaption ( CmsVaadinUtils . getMessageText ( Messages . GUI_SQLCONSOLE_QUERY_RESULTS_0 ) ) ; window . setContent ( new CmsSqlConsoleResultsForm ( result , report . toString ( ) ) ) ; A_CmsUI . get ( ) . addWindow ( window ) ; window . center ( ) ; } }
Runs the currently entered query and displays the results .