001 package com.sptci.rwt.webui;
002
003 import nextapp.echo2.app.event.ActionEvent;
004
005 import com.sptci.echo2.Listener;
006
007 /**
008 * Action listener for executing a batch of SQL statements entered into
009 * {@link BatchQueryExecutorView}.
010 *
011 * <p>© Copyright 2007 <a href='http://sptci.com/' target='_new'>Sans Pareil Technologies, Inc.</a></p>
012 * @author Rakesh Vidyadharan 2007-10-05
013 * @version $Id: BatchQueryExecutorListener.java 4123 2008-05-25 21:49:01Z rakesh $
014 */
015 public class BatchQueryExecutorListener extends ExecutorListener
016 {
017 /**
018 * Create a new instance of the listener using the specified controller.
019 *
020 * @param controller The controller to use to interact with the
021 * application.
022 */
023 public BatchQueryExecutorListener( final MainController controller )
024 {
025 super( controller );
026 }
027
028 /**
029 * The action listener implementation. Executes the query and exports
030 * the results.
031 *
032 * @param event The event that triggers the export process.
033 */
034 public void actionPerformed( ActionEvent event )
035 {
036 if ( checkConnection() )
037 {
038 controller.addPane( new BatchQueryExecutorView( controller ) );
039 }
040 }
041 }