The method element is a member of the following categories:
Namespace -- http://xmlns.oracle.com/bibeans
Group -- BI uiXML elements
Type of element -- Definition
The method element defines a declarative binding to a static Java method that customizes a UIX page. Use code insight to insert the method element within a callback element to specify the code that the callback should execute.
class -- (Required) Full path for the Java class that contains the method that you want to execute in the callback.
method -- (Required) Name of the method that the callback is to execute.
The method element is a child of either the biSessionCallback element or the preRenderingCallback element.
Each time that the callback needs to be executed the Java method is called through the Java Reflection API. This static method must have the following signature:
public static methodName (BajaContext context; Page page)
throws Throwable;
This example uses the preRenderingCallback element to hide components of a presentation before the page that contains the presentation is displayed. The following XML fragment defines a preRenderingCallback.
<!-- Sample definition of a preRenderingCallback --> <preRenderingCallback> <method class = "myClass", method = "hidePresComponents"/> </preRenderingCallback>
The following code is an example of the method that the sample callback will execute.
//Retrieve the presentation "pres1" that is in the same page as the callback. //Hide the presentation title, subtitle, and footnote before the page is displayed. public static void hidePresComponents (BajaContext context, Page page) throws Throwable { Hashtable pageObjects = BIHandler.initBIObjects (context, page); ThinDataviewCommon dataview = (ThinDataviewCommon) pageObjects.get ("pres1"); dataview.getDataviewTitle().setVisible(false); dataview.getDataviewSubTitle().setVisible(false); dataview.getDataviewFootnote().setVisible(false); }