Enterprise RTView® 
User Guide


Table Edits - Custom Message Handler

NOTE: This section assumes you have a working knowledge of writing, compiling and deploying Java classes.

The Custom Message Handler is a Java class that allows you to extend the functionality of Enterprise RTView by implementing code to update your system when the table is edited. Once the Custom Message Handler has been created, it can be deployed with your displays so that end users who are editing tables do not need to be familiar with the systems they are updating.

To implement a Custom Message Handler, you must create a Java class named MyMessageHandler.java that extends GmsRtViewCustomMessageHandler. NOTE: If you will be using the Custom Message Handler with the Display Viewer Applet, pack the Java class you create into one of the applet .jar files before deploying.

In MyMessageHandler.java define the following method:

public boolean invokeMessage (String messageString, Object value)
The invokeMessage method will get called while the table is being edited. The messageString argument will contain one of the messages listed below. The value argument will be a 4 element Object array. The first two arguments in the Object array are constant, the rest vary based on the corresponding message.

The invokeMessage method must return true when it receives any of the following messages, otherwise it must return false. NOTE: The MessageHandler will receive other messages, but the method should not return true or implement code when receiving anything other than the messages listed below.

The following lists messages and corresponding value arguments:
Message Description Object Array Values
table_edit_start The invokeMessage method will get called with this message when Edit Table is selected from the popup menu. Argument Definition Type
value[0] Table object being edited. GmsAppObject
value[1] Name of the variable assigned to editDataLocalVarName. String
value[2] Initial table data prior to editing. GmsTabularData
value[3] Null Null
table_edit_save The invokeMessage method will get called with this message when Save Edits is selected from the popup menu or when Yes is selected if prompted to save while exiting. value[0] Table object being edited. GmsAppObject
value[1] Name of variable assigned to editDataLocalVarName. String
value[2] Table data containing table edits. GmsTabularData
value[3] Null Null
table_edit_cancel The invokeMessage method will get called with this message when Cancel Edits is selected from the popup menu or when No is selected if prompted to save while exiting. value[0] Table object being edited. GmsAppObject
value[1] Name of variable assigned to editDataLocalVarName. String
value[2] Table data containing the current value of valueTable. If data for the valueTable attachment was updated during editing, this may not be the same as data sent with the table_edit_start message. This message does not contain table edits. GmsTabularData
value[3] Null Null
table_edit_remove_row This message is sent when Remove Row or Remove Rows is selected from the popup menu. value[0] Table object being edited. GmsAppObject
value[1] Name of variable assigned to editDataLocalVarName. String
value[2] GmsTabularData object with one or more data rows that were deleted. GmsTabularData
value[3] Each entry is the index of a deleted row. int[]
table_edit_insert_row This message is sent when Insert Row is selected from the popup menu. value[0] Table object being edited. GmsAppObject
value[1] Name of variable assigned to editDataLocalVarName. String
value[2] GmsTabularData object with one row that contains the row data that was inserted. GmsTabularData
value[3] Value is the index of the inserted row. Integer
table_edit_update_row This message is sent when a cell from the table is edited. value[0] Table object being edited. GmsAppObject
value[1] Name of variable assigned to editDataLocalVarName. String
value[2] GmsTabularData object with two rows. Row[0] contains row data before the cell was edited, Row[1] contains row data after the cell was edited. GmsTabularData
value[3] Element[0] is the row number of the cell. Element[1] is the column number of the cell or the value -1 for the row label column. int[]
table_edit_remove_column This message is sent when Remove Column or Remove Columns is selected from the popup menu. value[0] Table object being edited. GmsAppObject
value[1] Name of variable assigned to editDataLocalVarName. String
value[2] GmsTabularData object with columns that existed before the column was removed and no rows. GmsTabularData
value[3] Each entry is the index of a deleted column. int[]
table_edit_insert_column This message is sent when Insert Column is selected from the popup menu. value[0] Table object being edited. GmsAppObject
value[1] Name of variable assigned to editDataLocalVarName. String
value[2] GmsTabularData object with columns that existed after the column was inserted and no rows. GmsTabularData
value[3] Value is the index of the inserted column. Integer

   


 
SL, SL-GMS, GMS, Enterprise RTView, SL Corporation, and the SL logo are trademarks or registered trademarks of Sherrill-Lubinski Corporation in the United States and other countries. Copyright © 1998-2008 Sherrill-Lubinski Corporation. All Rights Reserved.

 
JMS, JMX and Java are trademarks and/or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. They are mentioned in this document for identification purposes only.