SPT RWT Application API

com.sptci.rwt.webui
Class ConnectListener

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

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

The dialogue used to initiate a new JDBC Connection. Also used to save/edit pre-configured connections.

© Copyright 2007 Sans Pareil Technologies, Inc.

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

Field Summary
 
Fields inherited from class com.sptci.echo2.Listener
controller, logger
 
Constructor Summary
ConnectListener(MainController controller)
          Create a new instance of the listener using the specified controller.
 
Method Summary
 void actionPerformed(ActionEvent event)
          The action listener implementation.
protected  void checkString(String name, ConnectionDialogue dialogue, Collection<String> messages)
          Check the field represented by the specified name.
protected  Collection<String> checkView(ConnectionDialogue dialogue)
          Check the ConnectionDialogue to ensure that all the required information has been entered to fetch a connection.
protected  void displayMessages(Collection<String> messages)
          Display an ErrorPane with the contents of the specified collection of messages.
 
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

ConnectListener

public ConnectListener(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. Initiates a connection to the database using the specified parameters.

Parameters:
event - The event that was triggered.
See Also:
checkView(com.sptci.rwt.webui.ConnectionDialogue), displayMessages(java.util.Collection), MainController.getParameters(com.sptci.rwt.webui.ConnectionDialogue)

checkView

protected Collection<String> checkView(ConnectionDialogue dialogue)
Check the ConnectionDialogue to ensure that all the required information has been entered to fetch a connection.

Returns:
Collection Return a collection of error messages. Returns an empty collection if no errors were found.
See Also:
checkString(java.lang.String, com.sptci.rwt.webui.ConnectionDialogue, java.util.Collection)

checkString

protected void checkString(String name,
                           ConnectionDialogue dialogue,
                           Collection<String> messages)
Check the field represented by the specified name.

Parameters:
name - The name to use to find the appropriate field to test.
dialogue - The view component that is to be tested.
messages - The collection of messages that is to be updated as appropriate.

displayMessages

protected void displayMessages(Collection<String> messages)
Display an ErrorPane with the contents of the specified collection of messages.

Parameters:
messages - The collection of messages to display.

SPT RWT Application API