Table 40. Predefined Context Variables
|
|
|
|
form |
Action Form |
No |
This is the struts ActionForm object currently being processed. |
gifDir |
String |
Yes |
The directory where the image files used by report are saved, for example, the paging arrow images. It is default to "_assets/images. |
link |
String |
No |
This is the URL link base of this page and it is equivalent to the html <base> tag. The default value is: HttpServletRequest.getContextPath() + HttpServletRequest.getServletPath() The URL is similar to the following: http://host:port/<web-root>/report.do |
user |
IUser of UMF |
Yes |
The current user logged in. IUser is passed in as a session variable, USER_PROFILE. If it is not in the session, Oracle Self-Service E-Billling does not put it in the context. User is just used for query purposes and its absence does not affect the functionality of the reporting. For example, for some reason, you might not use UMF IUser and you can use your own user object. NOTE: Some templates, like report_header.vm, might expect IUser to get user name and if you do not supply IUser , the template might not display user name properly.
|
contact Profile |
IContactProfile of UMF |
Yes |
The contactProfile is a profile of IUser named as contact_profile. Oracle Self-Service E-Billling uses it to retrieve the user's first name and last name and is currently only used in report_header.vm. The absence of this information does not affect the function of Reporting Engine. |
locale |
String |
Yes |
The default value set by ReportActionHelper is the from http session: session.getAttribute("org.apache.struts.action.LOCALE") . NOTE: This locale is put into session by the Struts framework.
|
reportId |
String |
No |
The report ID of current report. |
transformer |
ITransformer |
No |
You can use transformer object to do work such as formatting data. Never call ITransformer.writeTemplate() in the template. |
reportConfig |
IReportConfig |
No |
Represents the report configuration. |
dataSourceConfig |
IDataSourceConfig |
No |
Represents the data source configuration. |
dataSource ColumnConfigs |
A list of IDataSource ColumnConfig |
No |
Represents the list of data source column configurations. |
transformerConfigs |
ITransformerConfig |
No |
Represents the transformer configuration. |
transformer ColumnConfigs |
A list of ITransformer ColumnConfig |
No |
Represents the list of transformer column configurations. |
operationGroup Configs |
A list of IOperation GourpConfig |
No |
Represents the list of operation groups defined inside calculator for the transformer. |
chartConfigs |
A list of IChartConfig |
No |
Represents the list of chart configurations for the transformer. |
templateConfigs |
A list of ITemplateConfig |
No |
Represents the list of template configurations for the transformer. |
rowlist |
IReportList |
No |
Represents the original data retrieved from the data source. The data could be sorted and so the order could be changed. Though you cannot overwrite this variable, you can certainly change the content of the list. |
groupSet |
Set |
No |
To support grouping, the transformer maintains a Map of List objects. In the case of no grouping, there is only one entry in the map, the key is the report name, and the value is the List returned from data source; In the case of grouping, the original list from the data source is regrouped into multiple lists. Each list has the same group value, and the group value becomes the map key. This variable is looped through in report_body.vm to build the HTML table. |
dataMap |
Map |
No |
This is the map of group keys to the List as described previously. |
reportContext |
ReportContext |
No |
The ReportContext object used to generate reports. NOTE: Note: You cannot overwrite reportContext, but you can change the content.
|
URLEncoder |
URLEncoder |
No |
This is a wrapper class around java.net.URLEncoder, because Velocity cannot invoke a static method directly through class name, and java.net.URLEncoder does not have a constructor. Use this class to encode the parameter values you passed through the URL. |