Event Tips

The MultidimensionalTableInterface sends PropertyChange events when the value of a property changes. The following is a list of the property changed events that can be trapped:
application
cellTypes
columnAxis
commandsMask	
computedvalues	
coordinatorEnabled
database	
dimensions
measures	
metabase	
ranges	
rowAxis	
selectedMeasures	
selectedStatistics	
statistics	
subsets	
totals	
verifyEnabled 

Adding PropertyChange Events

The following steps illustrate how to set up an event handler for any of these events:
  1. Create a project in webAF that contains a MultidimensionalTableView hooked up to a MultidimensionalTableV3Interface object as its model.
  2. In the customizer for the MultidimensionalTableV3Interface, specify a metabase, database, columnAxis and rowAxis.
  3. Select Handle Events... from its popup menu.
  4. In the dialog that displays, select "write your own code" for event handler.
  5. Add an Event handler for propertyChange event. In the event handler method, paste the following code:
    if ((event.getPropertyName() != null) && (event.getPropertyName().equals("totals")))
    System.out.println("Totals event received");
  6. Build and execute the project.
  7. Turn totals on. You will see "Totals event received" printed in the log.
  8. Add other event handlers for subsets, computed values, ranges, etc.
  9. Build and execute the project.
  10. Set subsets, add computed values, add a range, etc., and you will see "event received" printed in the log for each event.