com.groiss.dms
Interface FormEventHandler

All Known Subinterfaces:
FormEventHandler2
All Known Implementing Classes:
FormEventAdapter

public interface FormEventHandler

This interface is used for writing callback classes enhancing the functionality of forms. The methods onInsert, onUpdate, and onDelete are called before the database operation is performed.
Additional information can be taken from the ThreadContext. If the database operation is done in the context of a HTTP interaction, the ThreadContext contains the HTTP-request with the following parameters:


Method Summary
 java.lang.String getName(DMSForm f)
          Returns the name of this form.
 void onDelete(DMSForm f)
          This method is called before the form is deleted.
 void onInsert(DMSForm f)
          This method is called before the form is inserted in the store.
 void onShow(DMSForm f, ActivityInstance ai, HTMLPage p, javax.servlet.http.HttpServletRequest req)
          This method is called before the form is sent to the browser.
 void onUpdate(DMSForm f)
          This method is called before the form is updated to the store (the existing form in the store will be overwritten with the values of this form).
 

Method Detail

onInsert

void onInsert(DMSForm f)
              throws java.lang.Exception
This method is called before the form is inserted in the store.

Parameters:
f - the form to insert
Throws:
java.lang.Exception

onUpdate

void onUpdate(DMSForm f)
              throws java.lang.Exception
This method is called before the form is updated to the store (the existing form in the store will be overwritten with the values of this form).

Parameters:
f - the form to update
Throws:
java.lang.Exception

onDelete

void onDelete(DMSForm f)
              throws java.lang.Exception
This method is called before the form is deleted.

Parameters:
f - the form to delete
Throws:
java.lang.Exception

onShow

void onShow(DMSForm f,
            ActivityInstance ai,
            HTMLPage p,
            javax.servlet.http.HttpServletRequest req)
            throws java.lang.Exception
This method is called before the form is sent to the browser.

Parameters:
f - the form to show
ai - the actual activity instance (in case of process forms)
p - the html page which will be sent to the browser
req - the http request requesting the form's page
Throws:
java.lang.Exception

getName

java.lang.String getName(DMSForm f)
                         throws java.lang.Exception
Returns the name of this form. If null is returned the default naming mechanism will be used.

Parameters:
f - the form which name is wanted
Returns:
the name of the form
Throws:
java.lang.Exception


@enterprise 8.0.22989 Copyright © 2001-2017 Groiss Informatics GmbH. All Rights Reserved.