adapforms.runtime.events
Class AbstractInstanceCallback

java.lang.Object
  extended by adapforms.runtime.events.AbstractInstanceCallback
All Implemented Interfaces:
InstanceCallback

public class AbstractInstanceCallback
extends java.lang.Object
implements InstanceCallback

Abstract class that can be extended for domain applications that do not wish to implement all the event types specified in InstanceCallback.

Author:
Henrik Gammelmark, geemark@cs.au.dk

Constructor Summary
AbstractInstanceCallback()
           
 
Method Summary
 void onStatusChange(FormInstance instance)
          The overall status of the form instance has just changed.
 void onSubmit(FormInstance instance)
          The user has submitted the form, and the domain application may choose to ignore it, or accept the submit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractInstanceCallback

public AbstractInstanceCallback()
Method Detail

onStatusChange

public void onStatusChange(FormInstance instance)
Description copied from interface: InstanceCallback
The overall status of the form instance has just changed. Use the FormInstance.getStatusComplete() method to get the new status.

Specified by:
onStatusChange in interface InstanceCallback

onSubmit

public void onSubmit(FormInstance instance)
Description copied from interface: InstanceCallback
The user has submitted the form, and the domain application may choose to ignore it, or accept the submit.

Important: The form may still contain validation errors or may be incomplete. Use the FormInstance.getStatusComplete() method to determine this.

Most applications would most likely only accept forms if the status indicates that it has been completed entirely, but some applications may wish to store partially completed forms or similar.

Important: It is up to the domain application to decide if and how to give the user feedback on both ignored and accepted submissions.
You may wish to notify the user by calling FormInstance.displayMessageToUser(String), or possibly use a modality-specific adaptation or event.

Specified by:
onSubmit in interface InstanceCallback