Setting Event Targets for Thin Beans

An event target is a BI Beans device for transferring information from one thin bean to another in an HTML-client application. You use event targets to:

The Thin-Bean Event List identifies the thin-bean events that support event targets.

To set an event target:

  1. Construct a new EventTargetImpl.

  2. Set the target. (Note that you can set the target in the constructor, combining these two steps.)

  3. Call the setEventTarget method on the thin bean that will generate the event that you want to route. For example, to route the Print event to a thin presentation bean, set the event target on the PrintOptions object.

Example: Setting an event target on an Export Options dialog

The following code sets an event target on an Export Options dialog, to route the Export event to the thin Crosstab to export. This code assumes that session is the current HTTPSession, and that the thin crosstab has been stored on the session.


ThinDataviewCommon dataView = (ThinDataviewCommon)session.getAttribute(viewName); // instantiate the ExportOptions and set the view if ( dataView != null ) {  exportOptions = new ExportOptions ( );  exportOptions.setView ( dataView.getThinBeanName( ) );  exportOptions.setThinBeanName ("myExportOptions" );  eventTarget = new EventTargetImpl();  eventTarget.setThinBeanTarget(dataView);  exportOptions.setEventTarget ( BIConstants.EXPORT_EVENT, eventTarget ); }