Handling Drill-Out Events in HTML-Client Applications

Your application must handle Drill-out events that a thin crosstab or a thin table generates. The thin GridView objects do not generate Drill-out events unless you place drill-out images in the thin GridView. The Drill-out event for a header is the BIConstants.HEADERDRILL_EVENT, and the Drill-out event for the databody is the BIConstants.DATADRILL_EVENT.

To place drill-out images in a thin GridView:

  1. In the GridView, call setGraphicImagePath to specify the image to display in a cell from which the user can drill out.

  2. Create a ViewStyle, and call its setGraphicImageIndex method to specify the index in which you stored the graphic image path.

  3. Use rules to specify the cells in which the drill-out image should appear.

Responding to a Drill-out event

You can respond to a Drill-out event in one of two ways:

Example: Drilling out to a page inside of your applicaton

The following code shows a simple GridViewDataListener implementation. This example assumes that the application page to which you send the Drill-out event uses the location information to determine how to respond.


public class GridViewListener implements GridViewDataListener{  public void viewHeaderDrillOut(HeaderDrillOutEvent e){    // call application method that gets the location and    // displays the appropriate page    goToHeaderDrillOutPage(e.getEdge(), e.getDepth(), e.getIndex());  }  public void viewDatabodyDrillOut(DatabodyDrillOutEvent e){    // call application method that gets the location and  // displays the appropriate page  goToDataDrillOutPage(e.GetColumn(), e.getRow());   }

The following code shows how to register the GridViewDataListener with your ThinGridView. This code assumes that gridview is an existing ThinGridView.

gridview.addGridViewDataListener(GridViewListener);

Example: Drilling out to a page outside of your application

The following example shows a simple DrillOutCallback implementation. This example assumes that the application to which you send the Drill-out event uses the location information to determine how to respond.


public class DrillCallback implements DrillOutCallback{  public String getHeaderDrillOutURI(ThinGridView gridView, int edge, int layer, int slice){    return "http://www.mycompany.com?" + "edge=" + edge + "&layer=" + layer + "&slice=" + slice; } public String getDataDrillOutURI(ThinGridView gridView, int row, int column){ return "http://www.mycompany.com?" + "row=" + row + "&column=" + column;   } }

The following code shows how to register the callback with a ThinGridView. This code assumes that gridview is an existing ThinGridView.

gridview.setDrillOutCallback(DrillCallback);