com.wrq.vhi.script.api
Class FieldEventHandler

java.lang.Object
  extended by com.wrq.vhi.script.api.FieldEventHandler
All Implemented Interfaces:
EventHandler

public abstract class FieldEventHandler
extends java.lang.Object
implements EventHandler

Abstract base class for a field event listener. All classes that extend this class appear as field event handlers in the VHI design tool.


Field Summary
 
Fields inherited from interface com.wrq.vhi.script.api.EventHandler
DEFAULT_TIMEOUT
 
Constructor Summary
FieldEventHandler()
           
 
Method Summary
 java.lang.String readField(ReadFieldEvent event)
          Called to read the field.
 void writeField(WriteFieldEvent event)
          Called to write the field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldEventHandler

public FieldEventHandler()
Method Detail

readField

public java.lang.String readField(ReadFieldEvent event)
                           throws ApptrieveException
Called to read the field. The value returned from this method will be considered the value of the field.

Any exception thrown from this event will cause the field read to fail.

See RecordSetEventHandler for details about when this event is fired in relation to recordset events.

NOTE: ScriptHostSession methods that change the terminal screen cannot be called within this event.

Parameters:
event - the event instance
Returns:
the field value
Throws:
ApptrieveException

writeField

public void writeField(WriteFieldEvent event)
                throws ApptrieveException
Called to write the field. The write will be considered successful unless an exception is thrown.

Any exception thrown from this event will cause the field write to fail.

Parameters:
event - the event instance
Throws:
ApptrieveException