Understanding Thin-Bean Events

The BI Beans thin beans build on UIX Components technology to render a thin bean as HTML. UIX Components define query parameters that help identify the UIX component and the item within the component in which a user clicked. The thin beans use the UIX query parameters to define events, which can transfer information to or from a thin bean.

Thin-bean events and UIX query parameters

The thin beans use the event query parameter to identify a particular event, such as a Drill event, which is generated when a user clicks a drill icon in a thin table or a thin crosstab. The thin-bean events are defined in the oracle.dss.thin.beans.BIConstants interface.

The thin beans also use the source query parameter to identify the thin bean that should handle the event. For example, a thin presentation bean handles the Drill event by editing the query that it displays. In this case, the same bean that renders the Drill event handles the event, so the source query parameter makes sense.

In other cases, a thin bean other than the bean that generated the event handles the event. For example, the Save Options dialog generates a Save event. By UIX convention, this dialog would be the source of the event. By default, the name of the Save Options dialog is placed in the HTTP request as the value of the source parameter. But the event really needs to be handled by the thin presentation bean, which saves itself into the BI Beans Catalog. To route the event to the thin presentation bean, you set an event target on the Save Options dialog. Then, when it generates the parameters that go on the HTTP request, the Save Options dialog specifies the name of the thin presentation to be saved as the value of the source query parameter.

Event parameters

Many thin-bean events also include more information than simply what the user clicked and what object should handle the event. For example, the Save event also needs to specify where to save the thin presentation bean, a name under which to save it, and any search keywords to assign to the saved presentation bean. The thin beans define parameters for this kind of information. As are the thin-bean events, these event parameters are defined in the oracle.dss.thin.beans.BIConstants interface.

In most cases, event parameters are specified by the thin bean that generates the event, and they are retrieved by the thin bean that handles the event. In some cases, however, you might want to retrieve parameter values. You can do this by calling the getQueryParameter method of the QueryParameterProvider.

You can also add event parameters, to pass application information in the request. You can either add parameters to a single event, or you can add parameters to all of the events that are generated in a single UIX FormBean.