SPT RWT Application API

com.sptci.rwt.webui
Class ExportListener

java.lang.Object
  extended by com.sptci.echo2.Listener<MainController>
      extended by com.sptci.rwt.webui.ExportListener
All Implemented Interfaces:
Serializable, EventListener, ActionListener

public class ExportListener
extends com.sptci.echo2.Listener<MainController>

Action listener for exporting the results of a SQL statement to Excel. This uses the Apache POI HSSF library for creating Excel workbooks.

Version:
$Id: ExportListener.java 4123 2008-05-25 21:49:01Z rakesh $
Author:
Rakesh Vidyadharan 2007-10-05
See Also:

© Copyright 2007 Sans Pareil Technologies, Inc.

, Serialized Form

Field Summary
 
Fields inherited from class com.sptci.echo2.Listener
controller, logger
 
Constructor Summary
ExportListener(MainController controller)
          Create a new instance of the listener using the specified controller.
 
Method Summary
 void actionPerformed(ActionEvent event)
          The action listener implementation.
private  boolean checkView(ExecutorView view)
          Check the QueryExecutorView to ensure that a valid excel workbook can be generated.
 
Methods inherited from class com.sptci.echo2.Listener
getApplication, getController
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExportListener

public ExportListener(MainController controller)
Create a new instance of the listener using the specified controller.

Parameters:
controller - The controller to use to interact with the application.
Method Detail

actionPerformed

public void actionPerformed(ActionEvent event)
The action listener implementation. Executes the query and exports the results.

Parameters:
event - The event that triggers the export process.
See Also:
checkView(com.sptci.rwt.webui.ExecutorView)

checkView

private boolean checkView(ExecutorView view)
Check the QueryExecutorView to ensure that a valid excel workbook can be generated. Ensures that some SQL statement has been entered into ExecutorView.query.

Returns:
Returns true if some text has been entered.

SPT RWT Application API