Input JSP pages

Information about input JSP pages follows.

Four JavaScript functions required on input JSP pages

A report input page, which is a dialog panel, must have a set of components for input criteria and implement the following four java script functions:

initializeValues()

Called every time the page is loaded.

savePanelData()

Called every time a user exits from this page.


For more information see savePanelData JavaScript function

validatePanelData()

Called before sending criteria to the reporting framework.

visibleList()

Called when the reporting framework requires a change in the visibility settings of components on this page.

File name and location

A report input JSP file should be named ReportNameReportInputView.jsp, and should be located in the following directory: WC_eardir/CommerceAccelerator.war/tools/reporting. The input JSP pages for the default reports that ship with WebSphere Commerce are also in this directory. You can reference these pages as examples.

common.jsp

You must include the file common.jsp in all input and output JSP pages. This JSP page provides functionality that is required by input and output JSP pages, for example, the creation of some objects used in the report generation process.

Tools Framework information

An input JSP file is usually a dialog panel, although it may also be a Wizard. A dialog panel contains two sections; an HTML contents-generating section, and a JavaScript function section. In the HTML section, you may call generateInputComponent for each component you want show on the input screen. In the JavaScript section, initializeValue, savePanelData, and validatePanelData should call the corresponding JavaScript functions defined in each input component. The function initializedValue is called when the page loads. The tools framework calls the savePanelData and validatePanelData functions. SavePanelData should call the following report framework required JavaScript functions:

  1. setReportFrameworkOutputView("DialogView");

  2. setReportFrameworkParameter("XMLFile","reporting.OutputPanelName")

  3. setReportFrameworkReportXML("reporting.ReportDefinitionXML");

  4. setReportFrameworkReportName("SQLName");, which is specified in reportNameReport.xml

You may also call setReportFrameworkParameter("name", value) to set parameters that are required by the report output JSP file. It is a name and value pair. All labels passed into generator and value in setReportFrameworkParameter function calls are keys that will be mapped into correct string based on locale and language preference. The map is defined in the properties file Reports_en_US.properties in the following directory:




WC_eardir/properties/com/ibm/commerce/tools
/reporting/properties

Helper JSP files available

You must include the helper JSP files that you want to use in your input JSP file.

If using helper JSP files, your input JSP file must include ReportFrameworkHelper.jsp.

For more information see Helper JSP files provided for WebSphere Commerce Accelerator reports and Add a helper JSP file to an input page.

Functions common to helper JSP files

All these components provided common interface for JSP page developers:

Related concepts

Related tasks

Related reference