HYPERION® SYSTEM™ 9 BI+™ APPLICATION BUILDER J2EE™ RELEASE 9.2
WEB APPLICATION ARCHITECTURE DEVELOPER’S GUIDE Copyright 1998–2006 Hyperion Solutions Corporation. All rights reserved.
“Hyperion,” the Hyperion “H” logo, and Hyperion’s product names are trademarks of Hyperion. References to other companies and their products use trademarks owned by the respective companies and are for reference purpose only.
No portion hereof may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or information storage and retrieval systems, for any purpose other than the recipient’s personal use, without the express written permission of Hyperion.
The information contained herein is subject to change without notice. Hyperion shall not be liable for errors contained herein or consequential damages in connection with the furnishing, performance, or use hereof.
Any Hyperion software described herein is licensed exclusively subject to the conditions set forth in the Hyperion license agreement.
Use, duplication or disclosure by the U.S. Government is subject to restrictions set forth in the applicable Hyperion license agreement and as provided in DFARS 227.7202-1(a) and 227.7202-3(a) (1995), DFARS 252.227-7013(c)(1)(ii) (Oct 1988), FAR 12.212(a) (1995), FAR 52.227-19, or FAR 52.227-14, as applicable.
Hyperion Solutions Corporation 5450 Great America Parkway Santa Clara, California 95054
Printed in the U.S.A. Contents
The WAA Applications ...... 9 Third Party Applications and Integrated Hyperion Products ...... 10 J2EE Usage ...... 11 Design and Processing Overview ...... 13 Model-View-Controller (MVC) Model ...... 13 Processing Events with Beans ...... 14 Architecture Overview ...... 14 Processing Overview ...... 16 JSP and Bean Architecture ...... 17 Page JSP ...... 18 Form JSP ...... 18 Component JSP ...... 18 Page Beans ...... 18 Form Beans ...... 19 Component Beans ...... 19 Processing a Request ...... 19 Tag Library Overview ...... 21 The Relationship Between JSPs, Tags, and Java Beans ...... 22 Tag Librar y Descriptors ...... 23 Tag Libraries Included in Application Builder ...... 24 Tag Usage and Guidelines ...... 24 Specifying the TLD Files in the Web.xml File ...... 24 Specifying the TLD Files in JSP Pages ...... 25 Tag Categories ...... 25 Standard Tags ...... 26 Tag Sequence ...... 27 Rendering Tags ...... 28 Tag Dependencies and Nesting ...... 28 Scope ...... 29 Tag Attributes ...... 30 Scripting Variables ...... 30 Connecting Tags ...... 33
Contents iii Using the connectBeans Tag ...... 34 Using the repositoryDataSourceConnectBeans Tag ...... 35 Using the onBeanEvent Tag ...... 37 Passing Events to a Custom Class Using the onBeanEvent Tag ...... 41 Anonymous Listener Classes ...... 41 Using the ATF Repository and Annotations Repository ...... 42 Initializing the Annotations Repository ...... 42 Initializing the ATF Repository ...... 43 Using Repository Objects ...... 43 Object Security ...... 46 Using Single Sign-On ...... 46 Using Single Sign-on Between Applications ...... 47 Using Formatting ...... 48 Using a Cascading Style Sheet ...... 48 Creating a New Style ...... 51 Distributing Your Application ...... 52 Scripting Element Types ...... 53 Expressions ...... 53 Declarations ...... 53 Scriptlets ...... 54 Sample JSP Script ...... 55 Passing Request Parameters to Another JSP ...... 56 Using Scripting Elements with Application Builder ...... 56 Converting Data Types ...... 57 Creating an HTML table to Display Cube View Results ...... 58 Obtaining Properties of a Cube View ...... 61 Useful Request Expressions ...... 62 Using OLAP Tags ...... 63 Using Relational Tags ...... 68 Building and Prompting for a SQL Query ...... 70 Relational Tag Examples ...... 71 Sample Pages ...... 77 Examples ...... 78 Drill-through ...... 83 Setting up Drill-Throughs ...... 83 Using Data Source Drill-Throughs ...... 84 Using WAA Drill-Throughs ...... 84 Annotations ...... 86 Setting Up Annotations ...... 87 Using Data Source Annotations ...... 87 Using WAA Annotations ...... 88 Examples ...... 90
iv Contents Guided Analysis ...... 91 Setting Up Guided Analysis ...... 91 Accessing Hyperion Products ...... 92 Adding Guided Analysis Links ...... 92 Displaying Guided Analysis Links ...... 93 Examples ...... 94 Using Iterator and Property Tags ...... 97 Using OLAP Iterator and Property Tags ...... 98 Obtaining Metadata Properties ...... 102 Obtaining Data Cell Values ...... 104 Using Relational Iterator Tags ...... 108 Using Cell Formatting ...... 111 Using Formatting Tags ...... 112 Using a Formatting XML File ...... 113 Processing Formatting Tags ...... 114 Formatting Examples ...... 115 Global Objects ...... 120 JSP Framework ...... 120 Task Framework ...... 121 Joining Grids ...... 126 Exporting to PDF, RTF, HTML, Excel, and PowerPoint ...... 129 Processing Overview ...... 131 Using the XSLT Style Sheets ...... 132 Generating a Universal Chart ...... 133 Examples ...... 134 Using Transformation Tags ...... 135 Using Breaks or Subtotals ...... 137 Using Transformation Functions ...... 139 Function Syntax ...... 141 Using the Cell Object ...... 142 Cell and Range References ...... 142 Using Tags to Create a Definition Builder ...... 145 Initializing the Default Tasks ...... 146 Creating a Task Definition Builder Page ...... 146 Creating a Scheduled Task Definition Builder Page ...... 149 Using Tags With Application Builder ...... 151 Before You Begin ...... 152 Using Tags With Analyzer ...... 154 Using Analyzer with Dreamweaver Integration ...... 154 Using Tags in an Analyzer JSP ...... 156 Before You Begin ...... 159 Work in Stages ...... 163
Contents v Utilize Debugging Messages ...... 163 Monitor Application Information ...... 163 Invalidate Unneeded Objects ...... 164 Garbage Collection ...... 164 Utilize Nesting ...... 164 Utilize Object Scopes ...... 165 Connecting to OLAP ...... 166 ADM Pooling and Licensing ...... 166 Modifying Components ...... 172 Modifying Quick Builder Menus ...... 173 Modifying Quick Builder Wizards ...... 174 Using the Resource Files ...... 174 Creating Quick Builder Integration Files ...... 175 Changing the JSP ...... 177 Changing the Behavior of a Bean ...... 177 Adding or Removing Functionality of a Bean ...... 178
Glossary ...... 181
Index...... 191
vi Contents Chapter What is the Web Application 1 Architecture?
Hyperion® System™ 9 BI+ Application Builder J2EE™ consists of the Analytic Data Model (ADM), the Web Application Architecture (WAA), the Sample Application, the Administrative tool, a launch page, sample pages, tutorials, and documentation. The WAA is a set of Java beans, Java Server Pages (JSPs), servlets, tag libraries, applets, and miscellaneous supporting elements that can be combined in a variety of ways to quickly create Web-based analytic applications. The architecture is designed with reuse and rapid development in mind. It contains components in a succession of layers so the developer can leverage the architecture at the level of abstraction desired, from very coarse-grained macro components such as member query editing, to very specific functionality, such as support for localizing JSPs. Application Builder provides complete source code for the WAA and the Sample Application. You can use the WAA in the following ways:
● As tag libraries to build Web applications without programming in Java. WAA wraps its Java beans with tags libraries. To simplify the use of these tags, Quick Builder packages the most commonly used tags for use in Macromedia® Dreamweaver®. However, you can use the tag libraries with any Web authoring tool.
● As a reference architecture. WAA contains many concepts that are applicable to alternative architectures.
● As source code to develop a Web application
● As source code to develop a Web application that accesses an OLAP data source or relational data source. You can also perform a SQL drill-through from OLAP data to a relational database.
The following figure shows the WAA architecture:
What is the Web Application Architecture? 7 Figure 1 Web Application Architecture
Applications (Servlets, JSPs)
Web Application Architecture Web Packages Tags Tags Reports Analyzer Tags
Core RDBMS OLAP Relational
Utility Packages Reports Analyzer
Core RDBMS OLAP Relational
Analytic Data RDBMS RDBMS Model RDBMS RDBMS1 2 OLAP 1 OLAP2
Following are descriptions of the WAA components:
● Applications are created by assembling Web components, tags from the tag libraries, and JSPs.
● Tags are used to create specific components or subcomponents such as a grid or chart. Tags are assembled into tag libraries and added to a JSP page in much the same way as XML tags and attributes, thus freeing the Web designer from needing to know Java.
● Web packages contain components that handle Web application-specific functions. For example, Web components handle user flow between the various JSPs.
● Utility packages contain components that handle low-level functions. For example, utility components perform processing for events, the repository, and exceptions.
● The utility packages, Web packages, and tag libraries are placed in one of the following domains:
❍ The Core domain contains components or tags for the basic framework for the architecture, as well as general purpose, reusable functions. The relational and OLAP Domain extend the core objects.
❍ The OLAP domain contains components or tags designed to facilitate typical analysis tasks, such as building and saving views, displaying members and data, drill-down, and so on.
❍ The Relational domain contains components or tags designed to create SQL queries against relational data sources. Functionality to edit and run an SQL query is also provided.
8 What is the Web Application Architecture? ❍ The Hyperion Analyzer™ domain contains components or tags designed to view and run Analyzer reports in a custom Application Builder application.
❍ The Hyperion Reports™ domain contains components or tags designed to view and run Reports reports in a custom Application Builder application.
● The Analytic Data Model is accessed by the OLAP domain of WAA. The ADM provides access and connection pooling to OLAP data sources.
● The RDBMS is accessed by the relational domain of the WAA. JDBC provides access to relational data sources.
The WAA Applications A WAA application is implemented with either a controlling servlet or user-defined JSPs. The difference is that a controlling servlet performs processing only, and the user-defined JSPs perform both processing and rendering. Applications implementing the controlling servlet follow the MVC standards described in “Model-View-Controller (MVC) Model” on page 13. Applications implementing user-defined JSPs are built with Quick Builder or WAA tag libraries. The following diagram shows the components for the Sample Application and an application developed with Quick Builder or tag libraries:
Figure 2 WAA Applications
H y p e r i o n
Client
W eb Server
Application Server
Controling JSP User Defined Servlet JSP
Hyperion Beans
JDBC Model ADM
The WAA application components are described as follows:
● You can use either a controlling servlet in accordance with the MVC model or a user-defined JSP to perform application processing:
The WAA Applications 9 ❍ Controlling Servlet - Performs application processing only. WAAApplicationServlet is the controller servlet class.The Sample Application implements the controlling servlet.
❍ User-Defined JSP - performs application processing and rendering. An application can have one or more user-defined JSPs. Applications built with Quick Builder or tag libraries implement user-defined JSPs.
● JSP - Performs rendering.
● Beans - Perform processing.
● Model - Manages the state and low-level behavior of the application.
● ADM - Accesses OLAP data sources and implements connection pooling.
● JDBC - Accesses relational data sources.
Third Party Applications and Integrated Hyperion Products A WAA application can use third-party applications and integrated Hyperion products. The following figure shows the third-party software installed with Application Builder and the type of integration you can achieve with Hyperion products:
Figure 3 Third Party Software and Integrated Hyperion Products
10 What is the Web Application Architecture? The following diagram shows the WAA and the Hyperion and third party applications it can use. For example, if you want to build a chart, you can use a component from Visual Mining NetCharts and WAA beans.
● Visual Mining NetCharts provides components for charts.
● XALAN, JFor, and FOP export options to export a view or query to PDF, HTML, RTF, EXCEL, or Power Point format.
● Jakarta Tomcat application server, MySQL database and ANT tools.
● Free EcmaScript Interpreter (FESI) is a JavaScript interpreter written in Java.
● ATF repository provides an object repository that leverages Jakarta's ObJectRelationalBridge (OJB), object/relational mapping, tool and an internal security framework to transparently provide secure access to its stored objects. ATF repository is used to store repository users, groups, folders, views , queries, and permissions for a Application Builder application.
● Hyperion System 9 Shared Services™ provides the ability of multiple applications to share and work on information within a common framework. You use Shared Services to register Application Builder and to access other Hyperion products using guided analysis.
● Single sign-on enables a user to access multiple Hyperion applications after logging on only once.
● Integration with Reports and Analyzer.
J2EE Usage The Web Application Architecture is designed to work with Java 2 Enterprise Edition (J2EE) compatible application servers. The key enabling technologies that WAA relies on include Java, servlets, Java Server Pages, and JavaBeans. The following diagram illustrates the multi-tier environment typical of J2EE.
Note: The specifications used directly by Application Builder include applets, JSPs, servlets, JavaBeans, JNDI, and JDBC.
J2EE Usage 11 Figure 4 J2EE Model
J2E E at a Glance C lie n t T ie r J 2 S E
A pplet Container (W eb B rowser) JN D I JM S R M I-IIO P A pplet
A pplication
B usiness Logic Tier / J2S E M iddle Tier
E JB C ontainer JNDI
JM S JS P R M I-IIO P JDBC Servlet JT A JA F Ja va B e a n JavaM ail
D a ta T ie r J 2 S E
E JB C ontainer JN D I JM S R M I-IIO P EJB JD B C JT A JA F Ja va M ail
RDBM S
The following table illustrates the key J2EE features that WAA utilizes: Table 1 J2EE Features Utilized by WAA
Technology Description
JDBC Provides access to relational databases. The WAA can use any of several leading database servers, and can be customized to support others.
JDBC Standard Extensions Enables the hosting J2EE-compliant application server to perform connection pooling, authentication, and transaction coordination on WAA's behalf.
12 What is the Web Application Architecture? Technology Description
JavaBeans Most of the WAA's functionality is implemented in Java classes that follow many of the standard JavaBean patterns.
JavaServer Pages (JSPs) Most of the WAA's display activities are delegated to JSPs.
Servlets In limited cases, servlets are used instead of JSPs, specifically for the WAA controller servlet and as the back end for the Grid-Chart applet.
Java Naming and Directory Interface (JNDI) Used to access JDBC Standard Extension-compliant connection factories.
Applet Optionally, provides greater user interactivity using client- side Java code.
J2EE Security Used to secure access to the application, and also used to determine which OLAP connection pool to use for each client.
Design and Processing Overview The Sample Application demonstrates basic WAA functionality and is used to describe WAA throughout this guide. All Sample Application objects and classes, which are prefixed with SMP, comprise the Sample Application and are extended from WAA objects and classes. When you install Application Builder, the WAA source code components and tag libraries are installed to the following location by default: C:\Program Files\Hyperion Solutions\Application Builder
The Javadoc, Application Builder Web Application Architecture v2.5 API Specification, is installed to the following location: C:\Program Files\Hyperion Solutions\Application Builder\waa\docs\index.html
You may change the installation directory when you install the product.
Model-View-Controller (MVC) Model The WAA implements the Model-View-Controller (MVC) model. For more information on the MVC model, see the following URL: http://jakarta.apache.org/struts/index.html The WAA components fit into one of the following categories: Model
Model-View-Controller (MVC) Model 13 The model represents the state and low-level behavior of the component. It manages the state and conducts all transformations on that state. The model has no specific knowledge of either its controllers or its views. The system itself maintains links between model and views and notifies the views when the model changes state. The model is implemented by Java classes. View The view manages the visual display of the state represented by the model. It actually renders the page in the client’s Web browser. The view is implemented by the page beans and the Java Server Pages (JSPs). Controller The controller manages user interaction with the model. It provides the mechanism by which changes are made to the state of the model. The controller is implemented by the controller servlet which handles all user requests. The controller servlet keeps track of the client's state and session data, passes data to Application Builder JavaBeans for processing, and manages client navigation through the application. WAAApplicationServlet is the controller servlet class.
Note: The controller servlet is not used when you create an application using Quick Builder.
Processing Events with Beans An event is a notification that occurs in response to an action, such as a change in state, or as a result of the user clicking the mouse or pressing a key while viewing the document. The following information describes how events are handled:
● Beans communicate using an event model.
● Beans communicate without needing to know where events are generated or consumed.
● Events make it much easier to reuse beans.
● The standard publish/subscribe pattern is followed. For example, when saving member selections, the group bean needs to know when to refresh its content to show the newly saved member list.
Architecture Overview The following diagram is an overview of application and client session data storage for the WAA Application.
14 What is the Web Application Architecture? Figure 5 Application and Client Session Data Storage
WAAApplication User Defined Servlet JSP
WAAApplication ServletContext Context Attributes
HTTPSession
Attributes WAAApplication Session
HTTPServlet Request Attributes
WAA J2EE
WAAApplicationServlet WAAApplicationServlet is the class implementing the servlet. It is created once, the first time the application is invoked. It is responsible for creating and destroying the WAAApplicationContext objects when needed.
WAAApplicationContext WAAApplicationContext is the class implementing global data for all users and creating and destroying application sessions. This class contains the following application data:
● A reference to the ServletContext
● A reference to all active application sessions
● Global application variables
● All string managers
● Supported locales
Architecture Overview 15 WAAApplicationSession WAAApplicationSession implements data for a single user and contains the following application data:
● A reference to the parent WAAApplicationContext
● A reference to the HTTP session
● Global application variables
● The current page
● The message log
● The selected locale
ServletContext ServletContext contains a reference to each active WAAApplicationContext.
HTTPSession
● Standard servlet v2.2 object.
● Contains a reference to each active WAAApplicationSession.
HTTPServletRequest
● Standard servlet v2.2 object.
● The controller servlet extracts the request parameters.
Processing Overview The following diagram is an overview of WAAApplicationServlet processing that is implemented by the Sample Application:
16 What is the Web Application Architecture? Figure 6 Processing Overview
2: GetCurrentPageBean
Hy perion 1. Request Controller Servlet 3: Request or User Defined Page Bean
7: Response JSP
5: Include Display 4: Do Stuff
JSP Model Bean 6: Get State
1 A client performs an action that requires processing. 2 The controller servlet or user-defined JSP gets the current page bean. 3 The controller servlet or user-defined JSP sends the request parameters to the current page bean. 4 The page bean performs processing such as setting and changing the model beans state. 5 The controller servlet processes any resulting events from the current page bean. It also includes the current page URI, passing it to the HTTP response. 6 The JSP gets state information from the model bean and renders. 7 The response is sent to the client’s Web browser.
JSP and Bean Architecture You create an application by extending and reusing WAA components. All JSPs are nested, as shown in the following figure, to create a page. Each JSP is associated with a bean to handle its processing. The naming convention matches the name of the JSP with the name of the bean, such that xxx.jsp is associated with the bean xxxBean.java.
JSP and Bean Architecture 17 Figure 7 JSP and Bean Architecture
Page JSP Page Bean
Form JSP Form BeanComponent Component JSP Bean
If you are using Quick Builder to build an application, your page JSP is a user-defined JSP. You cannot see the nested form and component JSP from the Quick Builder view, but they are present behind the scenes.
Page JSP The page JSP includes everything common to the page. It defines the URIs for style sheets, sets up surrounding HTML tags for the component JSPs, performs page encoding, and sets the title. The page JSP should be the top JSP in your design, before any HTML. You can create one or more pages for your application.
Form JSP The form JSP handles form processing. You can have one or more forms on a page. For example, submit count is a form JSP. The form JSP performs the following tasks:
● Tracks the submit count.
● Provides hidden fields used by JavaScript.
● Directs form submissions to the correct form.
Component JSP The component JSP implements the functionality of the page. It is reusable and typically included on the page JSP. For example, the View Builder JSP and Grid/Chart JSP contain functionality that is typically used on more than one page in an application.
Page Beans All Page beans extend WAAPageBean (which extends WAABean). They aggregate multiple beans that may exist on the page, and inherit WAAPageBean’s methods for handling base functionality, such as directing requests to the appropriate form beans, storing the page title, encoding, and managing generated messages and files to download.
18 What is the Web Application Architecture? Form Beans The form bean handles form processing.
Component Beans The component bean handles form processing.
Processing a Request When a request is received by the controller servlet, application servlet, or Quick Builder JSP, it is either an HTTP GET or an HTTP POST request.
● If a GET request is received, the doGet method of the controller servlet or _jsp_service method of the JSP determines the current page URI, and include it so that it is rendered to the client.
● If a POST request is received, the doPost method of the controller servlet or _jsp_service method of the JSP determines the current page bean that should receive the POST data for processing. The doForm method of this bean is invoked. The page bean uses the given information to pass to its subsidiary beans, which can generate events. These events are processed by the controller servlet or JSP. If it is necessary to redirect to another page, the current page is updated. The controller servlet or JSP then returns either the same page refreshed or the new page.
The following figure shows a sample request that results in a redirection to the client. Each step is outlined.
Figure 8 Sample Request
1 2 Hy perion Controller Servlet or User Defined CurrentPageBean 5 6 JSP
Sub-Bean #1 4 3
Sub-Bean #2
8 A request comes in from the client. 9 The controller servlet or user-defined JSP calls doForm of the current page bean.
Processing a Request 19 10 The CurrentPageBean processes each of its subbeans. 11 Sub-Bean #2 indicates that the client should be redirected and posts a change page event with a new URL. 12 The controller servlet or user-defined JSP processes the event, and then does a .jsp include of the new page. 13 The new page is sent to the client and displayed.
20 What is the Web Application Architecture? Chapter Using Tags 2
Application Builder wraps its Java beans with tags that are contained in tag libraries. You can use these tags to build Web applications without having to program in Java. Quick Builder packages the most commonly used tags for a graphical integrated development environment (IDE) that further simplifies application building. Currently, Quick Builder is integrated with Macromedia® Dreamweaver®. For more information regarding Quick Builder, see the Hyperion System 9 BI+ Application Builder Getting Started Guide. If you prefer to code pages manually or use a Web authoring tool other than Dreamweaver, you can use the tag libraries to create Java Server Pages (JSPs) by employing standard tag library syntax. This chapter explains how to create JSPs using standard tag library syntax.
Note: This guide uses the nomenclature XXX, where X indicates one or more characters. For example, getXXX tags refer to all tags that start with the word get and are followed by one or more characters.
This chapter contains the following topics that describe JSP tag usage:
● “Tag Library Overview” on page 21
● “Tag Usage and Guidelines” on page 24
● “Connecting Tags” on page 33
● “Using the ATF Repository and Annotations Repository” on page 42
● “Using Single Sign-On” on page 46
● “Using Formatting” on page 48
● “Distributing Your Application” on page 52
Tag Library Overview A tag library is a collection of tags. A tag is a Java class (tag handler class) that serves as an interface between one or more Java beans and a Tag Library Descriptor (TLD) file. The TLD file uses XML syntax to describe the name of the tag and the attributes it accepts. The attributes are passed as parameters to the tag handler, which then calls the methods in the bean using the parameters.
Using Tags 21 Using tags enables you to create and display objects and use simple scriptlets from your JSPs to access specific elements of objects. For information on the syntax of all tags, see the Hyperion System 9 BI+ Application Builder J2EE JSP Technical Reference Guide.
The Relationship Between JSPs, Tags, and Java Beans To enable a tag to be used, the tag library developer must prepare several files:
● The Java bean - The Java class that implements the functionality
● The tag handler - A Java class that does the processing; it is the interface between the tag library descriptor and the Java bean
● The TLD file - The interface between the JSP and the tag handler
● The web.xml file - The file that tells the server where to find the TLD.
● The JSP - The file that uses the tag (optionally created by the Web designer). The following figure illustrates the relationships among JSPs, tags, and Java beans. It shows that the JSP can be created using the Quick Builder integration with Dreamweaver, or using any other HTML authoring tool (including text editors). When the Web application server compiles the JSP, it resolves references from the JSP code to the tag library descriptor, then to the tag handler, and finally to the Java bean itself.
22 Using Tags Figure 9 Tag Overview
Java Bean Tag Handler Class Tag Library (.tld file) public class public class <%@ taglib uri="/ WAADataSource WAAUseDataSourceTree WAACoreDesign.tld" TreeBean BeanDesignTag prefix="waacoredesign" %> extends extends
Browser
H yperion
Tag Library Descriptors TLD files use XML syntax to define the tags, the classes they refer to, and the attributes they accept. A TLD file acts as an index telling the JSP container where to find each tag’s handler. A tag definition in a tag library includes information in the following format:
Tag Library Overview 23 Tag Libraries Included in Application Builder Application Builder packages its tags into the following tag library descriptor files: Table 2 Tag Libraries Available with Application Builder
Tag Library Description
WAACore_7_0.tld Tags for getting and setting beans and iterating over them
WAACoreDesign_7_0.tld Tags for general purpose functions and the Universal Result Set tags
WAAApplicationDesign_7_0.tld Tags for application-level functions such as available locales and message formats
WAAOlapDesign_7_0.tld Tags for accessing an OLAP data source
WAARelationalDesign_7_0.tld Tags for accessing a relational data source
WAAAnalyzerDesign_7_0.tld Tags for Analyzer integration
WAAReportsDesign_7_0.tld Tags for Reports integration
For a complete list of tags and their descriptions, see the Hyperion System 9 BI+ Application Builder J2EE JSP Technical Reference Guide.
Tag Usage and Guidelines When you use a tag, you are creating or using a Java object, and the Java object is available in your JSP. You can optionally use these Java objects in a scriptlet to perform specific functions or display information. This section describes the basic guidelines, rules, and interdependencies for using Application Builder tags.
Specifying the TLD Files in the Web.xml File The web.xml file installed with Application Builder defines an alias that points to the location for each TLD file. For example:
WAAApplicationDesign.tld is the alias that you use when you specify the WAAApplicationDesign TLD file in your JSP. Therefore, if you want to change the location or name of the TLD file, you can update the web.xml file and the alias remains the same. You do not need to change each TLD reference in your JSPs.
24 Using Tags Specifying the TLD Files in JSP Pages When coding a page using tags, you must have access to the Tag Library Descriptor file to see the exact name of the tag and the required attributes. Using tags in a JSP is a two-step process.
➤ To specify the TLD file in a JSP page: 1 Import the tag library into the JSP using the taglib directive. This directive has two parameters:
● URI - A unique name identifying the library, in the form of a URL. This is generally the path to the tag library based on the root of the application deployment directory.
● Prefix - A name used to refer to this tag library. This name may be any value. For example: <%@ taglib uri="/WAAApplicationDesig.tld" prefix="waaapplicationdesign" %>
Note: WAAApplicationDesig.tld is an alias defined in the web.xml file.
2 Call the tag from the JSP, using the prefix to refer to the tag library, the tag name, and assigning values to any attributes. The syntax is as follows:
Example:
Tag Categories Not all tags generate HTML code in an application. Action tags, such as useCube and useSchema, create an object but do not display when the page is viewed in a Web browser. Tags that generate HTML code, such as useMemberTreeBean and useMdObjectTabBean, include attributes that define how the data is displayed. They depend on the action tags for the objects. The object or iterator tags use objects or properties to access information. Tags are divided into the following categories:
● Object tags and properties tags, which access, iterate, or create objects or properties:
❍ getXXX - Accesses an object or property. For example, getCubeViewCellProperty accesses a cube view’s cell properties.
❍ iterateXXX - Iterates over objects or properties.
❍ useXXX - Creates an object.
❍ ifXXX - Tests a property.
❍ removeXXX - Removes an object.
❍ setXXX - Sets an object.
Tag Usage and Guidelines 25 ● Action Tags, which perform an action such as adding formatting options, or connecting two objects together:
❍ addXXX - Adds options such as formatting or exporting to an object created by another tag.
❍ closeXXX - Closes an object.
❍ connectXXX - Connects two objects.
❍ destroyXXX - Destroys an object.
❍ insertXXX - Inserts a row, column or cell in a transformation grid.
❍ removeXXX - Removes an object.
❍ onBeanEvent - Passes an event between two objects.
❍ renderXXX - Displays HTML output for a previously defined object.
● Tags that create Java objects and generate HTML code - Tags that generate HTML code are rendered in the browser; for example, the useSqlResultListBean tag, which displays the results of a SQL query. Any tag that has the word Bean in it generates HTML code.
● Manager tags, which load XML files and optionally verify them with a .dtd file. The manager tag useXXXManager loads an XML file.
Standard Tags This section describes the five standard tags typically used in an application. Only the pages that launch the application require the useApplicationContext and useApplicationSession tags. The settings defined by these tags are used for the entire user session within the application.
● useApplicationContext - Required in the JSP that launches your application. If you have more than one launch page, each one requires this tag. All sessions in an application must have the same application context; global settings such as available locales, available message log formats, and so on are defined for the application by the useApplicationContext tag. You can also set the level for viewing debugging messages.
● useApplicationSession - Required in the JSP that launches the application. If you have more than one launch page, each one requires this tag. Session parameters are defined by the tag useApplicationSession. Within this application context, a session is initiated for each individual user, defining the user’s unique settings, such as locale. The session begins when the user logs on and ends when the user logs off. You can also set the level for viewing debugging messages.
You use tags that generate HTML code within the following three tags:
● usePageBean - Required on every page. Each page has its own bean, usePageBean, which sets up page-level parameters, such as character encoding, and manages the overall page.
26 Using Tags ● useHeadBean - Required on every page. Each particular JSP needs a means of running Javascript or handling styles. Within the session, the useHeadBean tag performs the following functions:
❍ Links to CSS files.
❍ Links to Javascript.
❍ Accesses extraneous Javascript code, such as handling the UI to download a file or display an error message.
❍ Sets several HTTP response headers.
● useFormBean - Required on pages that submit requests. The framework requires several hidden fields to function, which the form bean sets. Within each page that processes requests, there must be a form to handle requests. The form processing is handled by the tag useFormBean, and is nested within an HTML form tag. Tags that generate HTML code or render components are placed inside the useFormBean.
When defining a page, it is typical to use the following tags: useApplicationContext useApplicationSession usePageBean
useHeadBeanTag Sequence Just as the placement of tags in an HTML page is important, the section of the page in whch you place JSP tags is also important. The general rules are as follows:
● Importing Java code and defining the locations and prefixes of tag libraries are typically done at the top of the page.
● The usePageBean tag should be placed at the top of the page before any HTML code is generated because the bean may forward to another page.
● Action, iterator, and object tags for the page should be placed within the
tags.● Tags that handle rendering of beans or generate HTML code should be placed within an HTML
Using the onBeanEvent Tag You use the onBeanEvent tag to send a WAAObject or event from a tag’s implementing class to your own custom class or anonymous listener. When an event is generated, it is received by one or more custom classes or anonymous listeners, which may act on that event. If a custom class is not defined, the tag body is evaluated; this is called an anonymous listener class.
Note: Using the onBeanEvent tag requires Java programming for the custom class or anonymous listener.To link existing Application Builder tags, use the connectBean tag.
When a component has been rendered, the onBeanEvent tag body is no longer evaluated. This prevents the same listener from being used more than once. Application Builder supplies event interfaces and classes to use with event handling. These classes are available in the following subdirectories:
The following table shows the source classes or beans and the event types and event categories they generate. Table 4 Sources and Events
Bean Implementing Tag Event Type Event Category
WAASurrogatePageBean OkAction Action CancelAction Action
WAAReportBean Analyzer Analyzer Reports Reports
WAABean Component Component
WaaGridChartBean Chart Chart WaaQueryInfoChartBean WaaCubeViewChartBean
WAAFolderInfoBean Change Change useFolderInfoBean SaveAction Action
Connecting Tags 37 Table 4 Sources and Events (Continued)
Bean Implementing Tag Event Type Event Category
WAAGridExportBean Action Action
WAAGridPageSelectorBean Change Change
WAAItemListBean ListSelection ListSelection ListCells ListCells
WAAPromptResolverBean PromptResolved PromptResolved
WAACubeViewCellValueBean Change Change
WAACubeViewMemberActionsBean Action Action
WAACubeViewPageSelectorBean Change Change
WAAFormatBuilderBean Change Change SaveAction Action
WAAFunctionListBean Change Change
WAAGridChartServletConnector GridChartServletConnectorListener GridChartServletConnector
WAAGroupListBean Change Change
WAAMdObjectTabBean Change Change
WAAMemberSelectionClauseListBean Change Change Group Group
WAAMemberTreeBean Change Change
WAAPovBean Change Change
WAASdObjectTabBean Change Change
38 Using Tags Table 4 Sources and Events (Continued)
Bean Implementing Tag Event Type Event Category
WAAViewBuilderBean Change Change Action SaveAction
WAASqlBuilderBean Change Change Action SaveAction
WAAReportSelectorBean Reports Reports
WAAReportTreeBean Analyzer Analyzer
In the following table, Event Category is the value of the attribute sourceBeanEventCategory, Event Name is the value of the attribute sourceBeanEventName for the onBeanEvent tag. The interface is the listener class that receives the event. The interface classes are located in com.hyperion.waa Table 5 Events and Interfaces
Event Category Event Names Interface Description
Action actionPerformed web.core.IWAAAction Invoked after action events, such Listener as clicking the Submit button.
Analyzer urlExecuted web.analyzer.IWAAA Invoked when an Analyzer URL nalyzerListener action is successfully completed.
Change stateChanged web.core.IWAAChang Invoked after change events, such eListener as saving a query.
Chart mapClicked web.core.IWAAChartL Invoked when you click a universal istener chart image map.
Connecting Tags 39 Table 5 Events and Interfaces (Continued)
Event Category Event Names Interface Description
Component ● componentInitialized web.core.IWAACompo ● componentInitialized - Invoked nentListener after the component has been ● componentTerminated initialized. ● componentActivated ● componentTerminated - ● componentDeactivated Invoked after the component ● componentUpdated has been terminated. ● componentActivated - Invoked after the component has been activated for the first time or is on a page which is being activated because of a change on the current page.
● componentDeactivated- Invoked after the component has been deactivated for the first time or is on a page which is being deactivated because of a change on the current page.
● componentUpdated - Invoked after a component has updated its state information because it is about to be rendered.
(continued) componentFormed web.core.IWAACompo ● componentFormed- Invoked Component nentListener after a component has processed a form post.
Group groupAdded web.olap.IWAAGroup ● groupAdded - Invoked when a groupChanged Listener group is added. groupRemoved ● groupChanged - Invoked when a group is changed.
● groupRemoved - Invoked when a group is removed.
ListSelection selectionChanged web.core.IWAAListSe Invoked after list selection events, lectionListener such as selecting a view from a view list.
ListCells valuesChanged web.core.IWAAListCe Invoked after an edit events, such llsListener as editing a member.
PromptResolvedListen promptResolved web.relational.IWAA Invoked after a prompt response is er PromptResolvedListen read, such as reading a prompt er file.
Reports ● urlExecuted web.reports.IWAARe ● Invoked when a Reports URL action is successfully ● reportLoaded portsListener completed.
● Invoked when a Reports report is loaded
40 Using Tags Passing Events to a Custom Class Using the onBeanEvent Tag You can invoke your own predefined Java code from a Application Builder component with the onBeanEvent tag. This tag is used to pass the event to the custom bean. The following example gives a general overview of the steps required to pass an event to a custom class: 3 Create the custom class with public methods. In this example, the class is named myCustomClass, and the method is named myMethod. It accepts no parameters. 4 Add the code required to use your bean in the JSP, as in the following example:
5 Invoke the method using the onBeanEvent tag, as in the following example:
Connecting Tags 41 public void componentDeactivated(WAAComponentEvent rComponentEvent) throws Exception { } public void componentUpdated(WAAComponentEvent rComponentEvent) throws Exception { } public void componentFormed(WAAComponentEvent rComponentEvent) throws Exception { } }); %>
Using the ATF Repository and Annotations Repository Analysis Tool Framework (ATF) provides an object repository that leverages Jakarta's ObjectRelationalBridge (OJB), an object/relational mapping tool, and an internal security framework to provide secure access to the stored objects. The ATF Repository stores object information for repository users, groups, folders, views , queries, and permissions in a Application Builder application. It is based on a file system model. The logical model used to expose this repository to the user is a virtual file system, modeled after Java's own file interface. The ATF repository stores information for repository users, groups, permissions, data sources, tasks, folders, and views; however it does not store annotations. Therefore if you are using annotations you need to create an annotation repository also. The following code snippet shows how to create both annotation and ATF repositories. Define an annotation repository
Note: You must define the dataSourceName attribute to create an annotation repository. You must omit the dataSourceName attribute to create an ATF Repository.
Initializing the Annotations Repository After you create the annotations repository, you can start using it. You use the following tags to store annotations in the annotations repository:
● useCubeAnnotationManager - This tag loads an annotations XML file and retrieves the OLAP annotations from the annotations repository.
42 Using Tags ● useDatabaseAnnotationManager - This tag loads an annotations XML file and retrieves the relational annotations from the annotations repository.
Initializing the ATF Repository The Hyperion System 9 BI+ Application Builder J2EE System Administrator’s Guide describes how to set up the requisite XML files for the ATF repository. You must set up the ATF repository before you use it.
Tip: The Administration Tools provide a conversion utility to convert the Application Builder Release 3.0 ATF repository to the HAB Release 7.0 ATF repository.
The first time the ATF repository is used, it is automatically initialized and the following tasks are performed:
● The following default folders are added: /hyperion/task definitions /hyperion/olap /hyperion/relational /system (internal use only - not visible to any users) /system/datasource(internal use only - not visible to any users) /system/datasource/olap (internal use only - not visible to any users) /system/datasource/relational (internal use only - not visible to any users) /hyperion /hyperion/olap /hyperion/relational /system directory. This directory contains objects which are used by the system and should not be modified.
● A group called HAB_USER is added, and the following permissions are assigned:
❍ The special permissions create, read, list and write on the folders: /hyperion, /hyperion/olap, and /hyperion/relational.
❍ The special permissions create, delete, read, list, write, change owner and change permission on object types olap view and relational view.
● The data source XML file, (WAADataSources.xml) is read in and data source objects are created to access the OLAP and relational data sources. If you update the data source XML file and you want to implement the changes, you need to reload it using the Synchronize button in the XML Setup module of the Administration Tools.
Using Repository Objects The following ATF repository objects, stored in the ATF repository, are created and edited using the Administration Tools.
● HAB OLAP DataSource - Defines and specifies OLAP data source information. This object is created and updated by the Administration Tools.
Using the ATF Repository and Annotations Repository 43 ● HAB Relational DataSource - Defines and specifies relational data source information. This object is created and updated by the Administration Tools.
● Users - An ATF repository user.
● Groups - An ATF repository group. user for the ATF repository.
The following ATF repository objects, stored in the ATF repository, are created and edited using the Administration Tools or using JSP tags:
● Executable Task - A scheduled task definition that contains a task definition and information and specifying when to execute it. The useScheduledTaskDefinitionBuilderBean tag creates this object.
● Task Definition - A task definition that performs a function, such as sending e-mail, generating a report, or generating an alert based on a condition. The useTaskDefinitionBuilderBean tag creates this object
● HAB OLAP View - Defines and specifies an OLAP view. The useOlapView tag creates this object; it is also referred to as an OlapView object.
● HAB Relational View - Defines and specifies a relational view. The HAB useRelationalView tag creates this object; it is also referred to as a RelationalView object.
● Folders - Used to organize and hold relational views, OLAP views, task definitions and executable tasks (scheduled task definitions).
Creating Data Source Objects The HAB OLAP DataSource object and the HAB Relational DataSource objects are created in one of the following ways:
● The first time the ATF repository is used, the data source XML file, (WAADataSources.xml) is read in and the data source objects are created to access the OLAP and relational data sources.
● If you update the data source XML file and you want to implement the changes, you need to reload it using the Synchronize button in the XML Setup module of the Administration Tools.
Creating Users and Groups Users and Groups are registered in the ATF repository. You can create ATF repository users in one of the following ways:
● Use the Security tab in the Administration Tools.
● Log on to the Sample Application, Administration Tools, or a custom application. If a J2EE user or SSO user is an authenticated user, the following tasks are automatically implemented:
❍ The authenticated user is added as an ATF user
❍ The authenticated user is assigned to the HAB_USER group
❍ A folder with the authenticated user name is created.
44 Using Tags ❍ If the authenticated user’s role or group is not in the ATF repository, it is automatically added as an ATF repository group; however permissions are not assigned to it.
For example, if a user Jane Doe in the Analyst group signs onto the Administration Tools, and she is not an ATF user the following tasks are implemented:
❍ The user Jane Doe is created and assigned to the HAB_USER group.
❍ The group Analyst is created without permissions.
❍ A folder named Jane Doe is created.
Creating Objects Using Tags You can create and store folders, task definitions, executable tasks (scheduled task definitions), relational views and OLAP views in the ATF repository using JSP tags. For a complete description of the tags, see the Hyperion System 9 BI+ Application Builder J2EE JSP Technical Reference Guide. Use the following tags to create or store folders:
● useFolderInfoBean - This tag generates an HTML control that enables a user to create or edit a folder which is stored in the ATF repository.
● useQueryFolderInfoBean - This tag generates an HTML control to create or edit a folder which is stored in the ATF repository. You use this tag if you want to connect the folders to a useQueryTreeBean for tag display.
● useViewFolderInfoBean - This tag generates an HTML control to create or edit a folder which is stored in the ATF repository. You use this tag if you want to connect the folders to a useViewTreeBean tag for display.
Use the following tags to store or retrieve task definitions and executable tasks (scheduled task definitions):
● useTask- This tag creates a task definition which is stored in the ATF repository.
● useTaskDefinitionBuilderBean - This tag generates an HTML control to create or edit a task definition. All the task definitions contained in the ATF repository are displayed.
● useScheduledTaskDefinitionBuilderBean - This tag generates an HTML control to create or edit a scheduled task definition. All of the executable tasks (scheduled task definitions) stored in the ATF repository are displayed.
Use the following tags to store or retrieve relational views:
● useSqlBuilderBean - This tag generates an HTML control to graphically create and edit a relational view object which is stored in the ATF repository.
● useQueryTreeBean - This tag generates an HTML control that displays relational view objects which are organized within folders. The relational views are retrieved from the ATF repository.
● useRelationalView - This tag creates a relational view object that is stored in the ATF repository.
Using the ATF Repository and Annotations Repository 45 Use the following tags to store or retrieve OLAP views:
● useViewBuilderBean - This tag generates an HTML control to graphically create and edit an OLAPView object, which is stored in the ATF repository.
● useViewTreeBean - This tag generates an HTML control to graphically create and edit an an OLAPView object.
● useOlapView - This tag creates an OlapView object that is stored in the ATF repository.
Object Security When a user creates an object, such as a relational view or OLAP view, it automatically inherits the user’s permissions. You can assign permissions or access rights to uses and repository objects using the Administration Tools. For more information, see the Hyperion System 9 BI+ Application Builder J2EE Administrator’s Guide.
Using Single Sign-On Single sign-on enables a user to access multiple Hyperion applications after logging on only once. When an externally authenticated user logs on to a Hyperion application, an encrypted token is generated which contains the user credentials in the form of:
● The user name
● In some cases, the user’s password. The presence of a password in the token depends on the configuration. If you are using a trusted authentication directory, no password is present or required in the token.
The token is passed among other Hyperion applications and is used as needed to automatically re-authenticate the user when the user moves to another application. Single sign-on is effective in cases where one Hyperion application launches another.
Note: Note that if a user launches a second application independently, for example, from the Start Menu, a token cannot be passed between the applications, and the user must re-authenticate.
You can use single sign-on between Application Builder applications and other Hyperion products. For information on how to set up your application and XML files to use single sign- on, see the Hyperion System 9 BI+ Application Builder J2EE System Administrator’s Guide.
46 Using Tags Using Single Sign-on Between Applications You can use single sign-on to seamlessly logon between Application Builder applications and other Hyperion products. For example, you can sign on to hab-admin application and then connect to hab-samples application without explicitly signing on a second time. You can also sign on to a custom application and then connect to Hyperion System 9 Financial Management™ without explicitly signing on a second time.
Samples: TstSingleSignOnPage.jsp retrieves a single sign-on token, encodes and appends it to a URL, and then launches the URL. Test programs are part of the hab-test application.
➤ To implement single sign-on between Hyperion applications or products: 1 Setup both applications for single sign-on authentication. For more information, see the Application Builder Administrator’s Guide. 2 Use the target URL. For example, the following target URL connects to hab-samples: http://hostname:port/hab-samples/SMPApplicationServlet
where hostname:port is the computer name or IP address and port of the Sample Application. If you deployed Application Builder on your machine, the hostname is localhost. If you are using Tomcat, the port is 8080. 3 Extract the single sign-on (SSO) token to be passed into that URL as a known request parameter. The following snippets demonstrate different ways to extract the single sign-on (SSO) token and launch the Sample Application: a. Extract the CSSUserIF object from the ApplicationSession object in a JSP and create a hyperlink:
b. Extract the CSSUserIF object from the HttpServletRequest object or the HttpSession object in a JSP and create a hyperlink: Sample Application
where request | session is the HttpServletRequest object or the HttpSession object, respectively. You can also use a method that encodes the URI: ”
Using Single Sign-on Between Applications 47 c. Extract the CSSUserIF object from the HttpServletRequest object in a Servlet and redirect : response.sendRedirect(response.encodeRedirectURL("http://localhost :8080/hab-samples/SMPApplicationServlet”)+”?SSO_TOKEN=" + java.net.URLEncoder.encode(com.hyperion.waa.web.core.WAACssAuthenticatio nServletFilter.getCssPrincipal(session).getCssUser().getToken()));
d. Extract the CSSUserIF object from the HttpServletRequest object in a Servlet and forward : request.getRequestDispatcher(response.encodeURL("http://localhost: 8080/hab-samples/SMPApplicationServlet”) + ?SSO_TOKEN=" + java.net.URLEncoder.encode(com.hyperion.waa.web.core.WAACssAuthenticatio nServletFilter.getCssPrincipal(session).getCssUser().getToken())).forwar d(request, response);
Using Formatting You can apply formatting using one of the following methods:
● Use a cascading style sheet to modify the look and feel of a page. For more information, see “Using a Cascading Style Sheet” on page 48.
● Use iterator tags to access data and then use one of the following methods:
❍ Use formatting tags to apply numeric or date/time formatting to specific cells. For more information, see “Using Cell Formatting” on page 111.
❍ Use HTML tags to change the cell’s appearance such as font size and color. For more information, see “Using Iterator and Property Tags” on page 97.
Using a Cascading Style Sheet You may want to change the fonts, colors, backgrounds, and so on of components used in the pages created with Application Builder. Do this by modifying the cascading style sheet used in the application. The default style sheet, WAAApplication.css, is located in the \html\waa\web subdirectory of your Application Builder application deployment directory. It is automatically loaded by the Java bean WAAApplicationContext, which is invoked by the useApplicationContext tag. The default style sheet supplied by Application Builder has the following styles: Table 6 Default Styles in Application Builder
Style Class Description
font.defaultFieldLabel Style for field labels
font.defaultFieldText Style for field static text, option button text, or checkbox text
.defaultEditbox Style for text in edit boxes
input.defaultCheckbox Style for displaying a check box
48 Using Tags Table 6 Default Styles in Application Builder (Continued)
Style Class Description
input.defaultRadioButton Style for displaying a option button
input.defaultButton Style for displaying a button
select.defaultSelectbox Style for displaying a selection list
table.defaultList Style for displaying a list
tr.defaultListHeaderRow Style for displaying a list heading
td.defaultListHeaderCell Style for displaying list heading cells
tr.defaultListSubHeaderRow Style for displaying a list subheading
td.defaultListSubHeaderCell Style for displaying a list subheading cell
tr.defaultListToolbarRow Style for displaying a list toolbar
td.defaultListToolbarCell Style for displaying a list toolbar cell
tr.defaultListRow Default style for displaying a row in a list; used when the attribute bandingRowCount is set to zero
tr.defaultListEvenRow Style for displaying the first set of banded rows; set by the attribute bandingRowCount:
● If bandingRowCount is set to zero, tr.defaulListRow is used.
● If bandingRowCount is set to 2, the first two rows use this style, the next two rows use tr.defaultListOddRow style, and so on.
tr.defaultListOddRow Style for displaying the alternate set of banded rows; set by the attribute bandingRowCount:
● If bandingRowCount is set to zero, tr.defaulListRow is used.
● If bandingRowCount is set to 2, the first two rows use the tr.defaultListOddEven style, the next two rows use this style, and so on.
tr.defaultListExpandableHeaderRow Style for displaying a row of list headers for columns that enable expansion
td.defaultListExpandableHeaderCell Style for displaying the list header cells for columns that enable expansion
td.defaultListExpandableHeaderCellL Style for displaying the list header cell labels for columns that enable abel expansion
tr.defaultListSearchRow Style for displaying the current row matching the search criteria
tr.defaultListClipboardRow Style for displaying the list rows that are copied or cut to the clipboard
td.defaultListCell Style for displaying list cells
td.defaultListTreeCell Style for list cells when column uses a tree format
td.defaultListSelectionCell Style for list cells that contain the option button or check box; used when the style is table and the selection style is not hyperlink
table.defaultGrid Default style used when displaying the grid component
table.defaultGridHeaderCell Style for displaying the header cells in the grid component
Using Formatting 49 Table 6 Default Styles in Application Builder (Continued)
Style Class Description
table.defaultGridSubHeaderCell Style for displaying the subheader cells in the grid component
table.defaultGridCornerCell Style for displaying the upper left corner cell in the grid component
table.defaultGridDataCell Style for displaying the data cells in the grid component
.defaultHyperlinkButtonEnabled Style for a hyperlink button when it is enabled
.defaultHyperlinkButtonDisabled Style for a hyperlink button when it is disabled
.defaultHyperlinkButtonFocused Style for a hyperlink button when it receives the focus
.defaultHyperlinkEnabled Style for hyperlink text when it is enabled
.defaultHyperlinkDisabled Style for hyperlink text when it is disabled
.defaultHyperlinkFocused Style for hyperlink text when it receives focus
.defaultTabActive Style for the active tab in a tab component
.defaultTabInactive Style for the inactive tabs in a tab component
.defaultTabActiveBody Style for the body of an active tab in a tab component
.defaultPov Style for the Point Of View component
Tip: For alternative style examples, see the style sheet supplied with the Application Builder Sample Application.
The following figure shows the main sections of a list component to which the styles refer:
FieldLabel ListToolBarCell Checkbox Selectbox ListHeaderCell FieldText
HyperlinkButton ListHeaderRow
ListToolbarRow ListSubHeaderCell
ListSubHeaderRow
ListRow ListEvenRow
ListOddRow
RadioButton ListCell
The style sheet is designed such that each style name contains the prefix default. You can add your own styles for automatic use by copying an existing style definition and changing the prefix from default to your own prefix, then specifying that prefix in the attribute cssClassPrefix of the tag that is to use it. This attribute is specific for each XXXBean tag that generates HTML code.
50 Using Tags When a JSP is run, the default style sheet is loaded by the useApplicationContext tag. If no value is entered in the cssClassPrefix attribute, it uses the default prefix when loading styles. If a value is entered, it looks in the loaded style sheet for style classes prefixed by that value.
Tip: To change the default style sheet used by your application, set the attribute cssUri in the useApplicationContext tag to the path and name of the style sheet.
Creating a New Style The following example creates a style that overrides the one used to represent alternating rows in a list (tr.defaultListOddRow) by using the prefix myStyles rather than default: 4 Open the WAAApplication.css file (located in the /html/waa/web directory of the application deployment area) with any text editor, and locate the style tr.defaultListOddRow. This style is used to determine the properties of alternating rows (rows that are banded using the bandingRowCount attribute of any of the list tags). 5 Copy the tag and paste it at the bottom of the style sheet. Change the prefix by changing the name from tr.defaultListOddRow totr.myStyleListOddRow. The new style thus uses the prefix myStyle. 6 Change the background color of the new style from #DDDDDD to #FF0000 (red). The style should look like this: tr.myStyleListOddRow { COLOR: black; BACKGROUND-COLOR: #FF0000; }
7 Save the file. 8 Open the Data Source Tree Page that was created in Example 1, and edit the useDataSourceTreePageBean tag, assigning the attribute cssClassPrefix the value “myStyle”:
<% } %>
The for loop is implemented using scriptlet syntax; the result is displayed using expression syntax. The display is made bold using HTML syntax. The following scriptlet implements conditional logic in a page: <% if (x < 0) { %>
You must supply a positive value
<% } else { %><%= x %>! = <%= fact(x) %>
<% } %>In this snippet, if x is less than 0, a message is displayed on the page; otherwise, the factorial of x is displayed on the page. Notice how the %> and <% characters appear in the middle of the for loop and the if expression, enabling you drop into HTML and then return to the scriptlet. Any control expressions, such as a while, for, or if, can be made to control the HTML in this way. If the HTML is inside a loop, it is emitted once for each iteration of the loop. Conditional logic may also be implemented using an expression that takes advantage of Java’s tertiary operator. The following expression evaluates the hours variable and returns the string AM if it is less than 12; otherwise, it returns the string PM, and displays this result in the page output: <%= (hours < 12) ? “AM” : “PM” %>
As you can see from these code snippets, reading and debugging JSPs can be difficult because of the visual confusion that results from interspersing Java scripting element tags and HTML tags. It is not uncommon for pages of this type to be developed by a combination of Web page designers and Java developers. Good commenting, combined with good indentation, can be important in creating and debugging a JSP page. The indentation style is a matter of personal preference but should be consistent. Liberal use of comments is encouraged. You can use three styles of comments in JSPs:
● Content comments are the typical HTML comments, enclosed between tags. These comments are returned to the browser with the results, and they can be viewed when viewing the page source. Content comments can include Java expressions, as in the following example:
54 Using Java Scriptlets ● JSP comments can only be viewed in the original JSP files. They are enclosed between <%- - and --%> tags. The body of these comments is ignored by the JSP containers, making them useful for commenting out scriptlet code that you do not want to be compiled; for example: <%-- do not compile this scriptlet <% for (long x = 01; x <= 10; ++x) { %> <%= x %>! = <%= fact(x) %>
<% } %> --%>
● Scripting language comments use the native comment syntax of the scripting language.
Note: Although this document uses Java, the scripting language does not have to be Java.
Scripting language comments do not appear in the page output, nor are they ignored by the JSP container; they appear in the source code that is generated by the compiler. Java supports two comment syntaxes:
❍ Comments enclosed between /* and */ tags; for example: <% /* this is a comment */ /* this is part of a comment this is more commentary */ %>
❍ Comments preceded by // and ending in a line feed; for example: <% // this is a comment // this is more commentary java.util.Date date = new java.util.Date(); // this is a comment %>
Sample JSP Script The following is a simple example showing a complete JSP page with an embedded expression:
Date Example |
The Current Date and Time is: <%= new java.util.Date() %> |
Sample JSP Script 55 Passing Request Parameters to Another JSP Request parameters may be passed from one JSP to another. The parameter is defined in one JSP using a form tag. It is retrieved in another JSP using a <%=request.paramter(parametername)%> tag. The following example asks a user for a name, defines a parameter called username, assigns the user’s name to the parameter, and posts it to showname.jsp:
The following page, showname.jsp, retrieves the name and displays it: <%@page contentType=”text/html” %>
Welcome <%=request.getParameter(“username”)%>
Using Scripting Elements with Application Builder Application Builder provides JSP tags that enable a Web page developer to create powerful JSPs using simple JSP tag syntax. The typical syntax for using a JSP tag is as follows:
The following example shows the syntax for a useCube tag:
The attribute definition id=”Cube” identifies this tag as Cube and posts this identification to the session, where it may be referred to in scripting references. A common example of using the id attribute value as a scripting reference is to create a display condition based on the value of a tag attribute. The following snippet defines the id as CellValue and gets the Value property of the getCubeViewCellProperty tag (which contains information about cell data). If the value is greater than 3000.00, it is displayed with a red font; otherwise, it is displayed with a blue font.
56 Using Java Scriptlets { %> <% } else { %> <% } %>
According to the Javadocs for the getCubeViewCellProperty tag (implemented by waa.web.olap.WAAGetCubeViewCellPropertyDesignTag), the propertyName Value is returned as a java.lang.Double object. To retrieve it for comparison purposes, use the .doubleValue() method: CellValue.doubleValue()
The preceding tag definition works as follows:
● The tag is opened using
● CellValue is the id attribute value that is used to refer to the tag in the scriptlet.
● The display attribute is set to false so that the value is not displayed.
● The propertyName attribute Value is retrieved.
● The tag is closed using the tag ending.
The tag definition is interspersed with scriptlet references (denoted by opening <% and closing %> tags) and HTML directives to define the font’s color attribute based on the value of the data in the cell.
Converting Data Types The data type of the results of scripting elements that are returned depend on the return type of the Java function. Any value that is displayed in a Web page using an expression must first be converted to a character string. The following table describes methods that are used to convert expression values into strings:
Value Type Conversion to String
Boolean java.lang.Boolean.toString(boolean)
byte java.lang.Byte.toString(byte)
char new java.lang.Character(char).toString()
double double java.lang.Double.toString(double)
int java.lang.Integer.toString(int)
float java.lang.Float.toString(float)
Using Scripting Elements with Application Builder 57 Value Type Conversion to String
long java.lang.Long.toString(long)
object toString() method of object’s class
To determine the return type of a tag attribute, see the Javadocs for the tag (WAA Application Javadocs).
Creating an HTML table to Display Cube View Results You can also use scripting elements to define the dimensions of rows and columns when creating a table to display the results of a cube view. A table is made up of a main header row, a corner cell, a header row for each column header layer, a row column for each row header layer, and a table cell for each data value, as the following figure illustrates:
The getCubeViewProperty tag returns the values of slicer, page, row, and column layer counts, as well as their result counts, as java.lang.Integer values. These values can be manipulated or plugged directly into HTML as expression tag attributes for table, row, and column definitions. The values are used to determine row and column spans for row header and column header cells. For a complete description of tags used to define a table, see HAB_WAA_Application_Architecture.pdf. The first row spans the entire width of the table and contains the slicer and page dimension names. To determine the number of columns this row should span, add the number of row layers (RowLayerCount) to the number of columns in the result set (ColumnResultCount). To obtain these values, use the getCubeViewProperty tag to get the RowLayerCount and ColumnResultCount from the propertyName attribute of the getCubeViewProperty tag. These values are returned as java.lang.Integer objects. To retrieve them for addition, use the .intValue method. To use them in the
58 Using Java Scriptlets
You retrieve the slicer and page members by iterating the slicer members (iterateCubeViewSlicerMembers) and page members (iterateCubeViewPageMembers) and getting the propertyName Name, which is returned as java.lang.String and may be displayed directly on the page: Slicer:
Page:
The second row of the table contains a blank corner cell and a column header for each column in the result set. To get the dimensions for the corner cell, determine the number of row layers and column layers for the colspan and rowspan attributes using the RowLayerCount and ColumnLayerCount values, respectively, of the getCubeViewProperty tag’s propertyName attribute. Because these are returned as java.lang.Integer, they may be used directly as expressions in the
To create the column headers, iterate across the columns and column member properties, and create a data cell for each column. Display the column name using the Name value of the getCubeViewColumnMemberProperty tag’s propertyName attribute, which is returned as a java.lang.String and may be displayed directly on the page. For example:
Using Scripting Elements with Application Builder 59
To create the row headers, iterate across the rows using the iterateCubeViewRows and iterateCubeViewRowMembers tags, and get the row name using the Name value from the getCubeViewRowMemberProperty tag’s propertyName attribute, which is returned as a java.lang.String and may be displayed directly on the page. For example:
You display the data cells by iterating across the rows (iterateCubeViewRows) and columns (iterateCubeViewColumns) and getting the Text value of the getCubeViewCellProperties tag’s propertyName attribute, which is returned as java.lang.String and can be displayed directly on the page. To perform any testing on the cell data before displaying it, get the Value of the propertyName attribute, which is returned as java.lang.Double. The following snippet iterates across the rows and columns, gets the propertyName Value, tests it for certain criteria, then displays it with an appropriate font: 60 Using Java Scriptlets <% } else { %> <% } %>
For a complete working example of using scripting elements to build a table, see the examples in the Sample Pages section of the Launch Page.
Obtaining Properties of a Cube View The following snippet obtains all the properties of a cube view. It uses the iterateCubeViewXXX tags to iterate over the dimension edges (where XXX can be Pages, Rows or Columns), and get the cell’s index (returned as java.lang.Integer). It then iterates over the cells using iterateCubeViewCellProperties to get the PropertyName. It uses the scripting reference PropertyName (returned as java.lang.String) to display the cell’s property, preceding each cell with its page, row and column index:
Cell: page <%=PageIndex%> row <%=RowIndex%> column <%=ColumnIndex%>
Property: <%=PropertyName%>
Obtaining Properties of a Cube View 61 Useful Request Expressions The following table lists request expressions that may be useful in creating JSP pages. These examples assume that example.jsp is located in the /jsp directory of the hab-samples application, running on localhost:8080, and that the user is analyst:
Request Information Expression Result
Request URI <%=request.getURI()%> /hab-samples/jsp/example.jsp
Context Path <%=request.getContextPath()%> /hab-samples
Servlet Path <%=request.getServletPath()%> /jsp/example.jsp
Request Method <%=request.getMethod()%> GET
Request Protocol <%=request.getProtocol%> HTTP/1/1
Server Name <%=request.getServerName()%> localhost
Server Port <%=request.getServerPort()%> 8080
Remote User <%=request.getRemoteUser()%> analyst
Remote Address <%=request.getRemoteAddress()%> 127.0.0.1
Remote Host <%=request.getRemoteHost()%> 127.0.0.1
Authorization <%=request.getAuthType()%> FORM Scheme
62 Using Java Scriptlets Chapter Using Relational and OLAP Tags 4
This chapter provides an overview of the tags that you use to create, run, and display OLAP views and relational views. For example, to create and display OLAP views, you use tags to create an OLAP schema, a cube, a useViewBuilderBean to edit and run views, and a useGridChartBean tag to display views.
Note: These tags are available within Quick Builder and the Application Builder tag libraries. They are described in the Hyperion System 9 BI+ Application Builder J2EE JSP Technical Reference Guide.
After you create an OLAP view or relational view, you can display it using two different methods:
● Use component tags to display an object created by the useRelationalView tag or useOlapView tag. The advantage of using component tags is that you can use one tag to display your results; therefore, it is simple to implement. However, you do not have control over the formatting of the data on the cell level, and you cannot display data source drill- through information.
Tip: Use the component tags useSqlResultListBean tag or useGridChartBean tag and useGridBean tag to display relational or OLAP views, respectively.
● Use iterator tags to iterate through an object created by the useCubeView or useQueryInfo tag. Nested within the iterator tags, use tags to access data, access properties, specify formatting, display annotations, display drill-through, and perform miscellaneous actions. The advantage to iterating is that you have cell- or row-level control and can format cell data based on its value. For more information, see “Using Iterator, Property, and Format Tags” on page 97.
Using OLAP Tags The following figure shows the OLAP tags. The solid lines represent dependent relationships, and the dashed lines represent optional relationships. For example, a solid line from the useCube tag to the useSchema tag means that the useCube tag is dependent on the useSchema
Using Relational and OLAP Tags 63 tag. The dashed lines coming out of the useSchema tag indicates three options for connection: the useDataSourcePoolManager tag that implements ADM pooling, direct connection, or direct connection using a URI.
Figure 12 OLAP Tags
X M L F ile
useD ataSourcePool Manager Direct Direct URI
JN D I useD ataSourceTree Bean
useReposit ory useSchem a Query (.txt file) useRepositoryObject TreeBean
useCube useDimension useView Tre eBean
M anual Query useM em ber Filter (.tx t file) S e le c tio n
useView BuilderBean useCubeView
useM em berTree Bean u s e O la p V ie w
usePOVBean
useGridChart Bean useSdO bjectTab Bean
To W AA Display the useM dObject Drill cubeV iew TabBean Through results using Ite ra to r T a g s Key Generates Required HTML No HTML Optional
The OLAP tags enable you to create a view, run it, and display it. The following steps provide an overview of the OLAP tags’ functionality:
➤ To create, store, and run OLAP views: 1 Optional: Define ADM pooling. The useDataSourcePoolManager tag defines OLAP data sources and ADM pooling. The useDataSourceTreeBean tag displays a list of data sources defined in the data source XML file (WAADataSource.xml). 2 Create an ATF repository. The useRepository tag creates an ATF repository that stores and maintains security for views. 3 Connect to an OLAP data source.
64 Using Relational and OLAP Tags The useSchema tag creates a connection to the OLAP schema or application. Pooling is optional, the useSchema tag defines whether to use pooling or a direct connection. The useCube tag connects to the cube or database. 4 Create an OLAP query. The useCubeView tag specifies the query, contains the query results, and optionally runs the query. 5 Create a view. The useOlapView tag creates a view cubeView object that contains a query and has access to the query results. 6 Run the view. The useViewBuilderBean tag displays an HTML component enabling the user to build or run a view. 7 Display the view results using one of the following methods:
❍ Display the view results in a grid and chart. The useGridBean tag displays the results of a view in a grid. The connectBeans tag is needed to connect the useViewBuilderBean to the useGridBean.
Tip: The useGridChartBean tag and the useGridBean tag do not support asymmetric queries.
❍ Display the view results using iterator tags. The iterator tags iterate through a cubeView and the property tags access the data. For more information, see “Using Iterator, Property, and Format Tags” on page 97.
Tip: You can use the XXXExport tags to export the output to PDF, RTF, HTML, text, Excel, or Power Point format. For more information, see “Using the Universal Result Set” on page 123.
The following examples shows code snippets using the sample code that is installed with the hab-samples and hab-test applications.
Using OLAP Tags 65 Sample Code Table 7 Sample Code for OLAP Tags
JSP Description
Application: hab-samples The OLAP JSPs in this section demonstrate the use of OLAP Link: Sample Pages > Component Connectors tags, such as displaying views and running them. JSP: All the OLAP JSPs in this section
Application: hab-test The JSPs in this section demonstrate the use of OLAP tags. Link: All links in the OLAP section JSP: All the JSPs in this section
This example, Sample Pages > Component Connectors > View Builder to View List to Grid Chart, enables the user to create a view, save it to the view list, then run it by selecting it from the view list. The events are passed between the components using the useConnectBean tag.
66 Using Relational and OLAP Tags expressionType="ale" execute="Always" modify="Always" >
| Using OLAP Tags 67 allowAdvancedOptions="false" repositoryId="repository" repositoryScope="Application" filterWithSchemaUserId="false" filterWithAuthenticatedUserId="false" > |
(4 )itera teC V C o lum n s Write | colum n member (5)getCVColum nM em bersProperty nam es zoom in, (6 )useM em berActionsBean zoom out, re m o v e O n ly, | keepO nly |
Write (9 )g e tC V R o w M e m b e rP ro p e rty ro w member (10)useM em berActionsBean nam es | (11)UseTransactionBean W r it e C e ll g e t C V C e llP r o p e r t y data useCVCellValueBean (12)useCVCellRelatedContentBean d r ill- t h r o u g h | annotation
The following figure shows the results of Figure 25. Each label in the HTML table corresponds to a tag that iterates data or displays data.
100 Using Iterator, Property, and Format Tags Figure 26 Displaying a CubeView in an HTML Table
1---> | | V 4
3 <----5-6----> 2
<---> 9 | <-- 12 - 13 - 14 --> 7 | 10
8 11
The following list describes the labels and their corresponding tags: 5 IterateCubeViewPages and useCubeViewPageSelectorBean - Iterates through all of the page members, so all of the pages are displayed. 6 iterateCubeViewColumnMembers - Iterates through the column layers. 7 getCubeViewProperty - Determines the size of the corner cell, so you can draw it in the HTML table. The height is equal to the column layer count, and the width is equal to the row layer count. 8 iterateCubeViewColumns - Iterates through all of the columns. 9 getCubeViewColumnMembersProperty - Displays the column member names shown in the column headers. The column member names and several other properties are returned by this tag. 10 useMemberActionsBean - This tag is optional. It executes an Essbase Analytic Services ADM actions used for navigation. You can use the following ADM actions:
❍ zoomIn and zoomOut implement the drill-down and drill-up functionality that navigates down and up on a metadata hierarchy.
❍ keepOnly and removeOnly - Implement the remove metadata and keep metadata functionality that provides the ability to remove or keep members on a metadata hierarchy.
Note: This functionality is also referred to as integration analysis
11 iterateCubeViewRows - Iterates all of the rows. 12 iterateCubeViewRowMembers - Iterates the row layers. 13 getCubeViewRowMemberProperty -Displays the row member names shown in the row headers. The row member names and several other properties are returned by this tag.
Using Iterator and Property Tags 101 14 useMemberActionsBean - This tag is optional. It executes an ADM action. For more information, see the item 6 in this list. 15 iterateCubeViewColumns - Iterates all of the columns. 16 useTransactionBean, getCubeViewCellProperty, and useCubeViewCellValueBean - Display the cell data and write the cell data. 17 useCubeViewCellRelatedContentBean - This tag is optional. You can use it for the following functionality:
❍ Use the drill-through functionality to access a data source drill-through or WAA drill- through. For example, if you are using Essbase Analytic Services, you can drill to EIS, which is a data source drill-through. For more information, see “Drill-through” on page 83.
❍ Use the annotation functionality to display a data source annotation or a WAA annotation. For more information, see “Annotations” on page 86.
Obtaining Metadata Properties OLAP metadata properties can be accessed using the metadata iterateXXX tags and getXXXProperty tags where XXX is part of the tag name, such as getCubeViewProperty. The getXXXProperty tags have attributes for the property name and attributes specifying whether or not to display the property. The property name must be the string value (not the constant) used by ADM for the metadata property, and it is case-sensitive. For a complete list of the properties available for each data source and their string values, refer to the Hyperion System 9 BI+ Application Builder J2EE Analytic Data Model Developer’s Guide. The output should resemble the following figure:
102 Using Iterator, Property, and Format Tags Figure 27 Iterate OLAP Metadata Output
Sample JSP The following table shows a sample JSP that is installed with the hab-samples and hab-test applications. Table 12 Sample JSPs for OLAP Tags
JSP Description
Application: hab-samples This JSP displays the results of iterating across a cube, its Link: Sample Pages > Common Functions > Iterate dimensions, hierarchies, and hierarchy relations in a simple OLAP Metadata indented list. JSP: iterateMetaData.jsp
Using Iterator and Property Tags 103 Obtaining Data Cell Values There are tags to iterate and get the properties of a cubeView slicer, page, row, and columns as well as data cell values. The properties values are stored as doubles but passed to the tags as text; you therefore must convert them to doubles if you want to evaluate them. When the data cell values are retrieved, you can specify the property as Text or Value. Retrieving the property as Text returns it as a string, enabling it to be placed directly on a page; retrieving it as a Value returns it as a double formatted as string, which enables you to cast it to a double and manipulate it as a number. To convert a property to a double, use the following casting operation: Double.parseDouble(Value)
When the property is retrieved, you can display it by setting the display attribute to True. If you set the display attribute to False, the property is not displayed. The following example uses the iteration tags and getXXXProperty tags to access a data cell value where XXX is part of the tag name, such as getCubeViewProperty.
Traffic Lighting Example The following table shows a sample JSP that is installed with the hab-samples and hab-test applications: Table 13 Sample JSP for Traffic Lighting
JSP Description
Application: hab-samples This JSP shows a page that iterates through an OLAP cube Link: Sample Pages > Common Functions > Display view, obtains row- and column counts, and uses that Cube View with Traffic Lighting and Annotations information to build an HTML table. JSP: IterateWithTrafficLightingAndAnn otation.jsp
The results are shown in the following figure. If the value is greater than 3000, it is red; otherwise, it is blue.
104 Using Iterator, Property, and Format Tags Figure 28 Traffic Lighting on a Cell Value
Accessing Cube View Properties Example Using iterator and property tags exposes the full range of properties of a cubeView object or queryInfo object, which enables the JSP developer to control the logic and display of the result set. The properties are obtained by iterating over the cubeView or queryInfo objects and its members, edges, and cells. This following example lists all of the cube view properties and describes how to use iterator tags to access them. Use the following sections to walk through accessing cube view properties:
● “Obtaining Cube View Properties” on page 105
● “Obtaining the Cube View Cell's Properties” on page 106
● “Testing the State of a Cube View Cell” on page 108
Sample JSP The following table shows a sample JSP installed with the hab-samples and hab-test applications. Table 14 Sample JSPs for OLAP Tags
JSP Description
Application: hab-samples This JSP shows how to iterate through a cube view and Link: Sample Pages> Common Functions > Iterate display all of its properties. Properties of a Cube View JSP: cubeViewProperties.jsp
Obtaining Cube View Properties The properties of a cube view may be obtained by iterating over the cube view. These properties are useful when constructing HTML tables or other display parameters.
Tags
● iterateCubeViewProperties
Using Iterator and Property Tags 105 ● getCubeViewProperty
Properties
● Name provides the name as a String.
● Description provides the description as a String.
● ALEExpression provides the ALE expression as a String.
● XMLExpression provides the XML expression as a String.
● DescriptiveExpression provides the descriptive expression as a String.
● SlicerLayerCount provides the number of layers on the slicer edge as an Integer.
● PageLayerCount provides the number of layers on the page edge as an Integer.
● RowLayerCount provides the number of layers on the row edge as an Integer.
● ColumnLayerCount provides the number of layers on the column edge as an Integer.
● SlicerResultCount provides the number of resulting slicers on the slicer edge as an Integer.
● PageResultCount provides the number of resulting pages on the page edge as an Integer.
● Cube provides the cube as an IAPMdCube.
Code Snippet - Get the Cube View Properties The following code snippet iterates through the cube view and gets all available properties:
Obtaining the Cube View Cell's Properties The properties of a cube view cell may be obtained by iterating over them.
Tags
● iterateCubeViewCellProperties
● getCubeViewCellProperty
Properties:
● Value provides the double value as a Double, which may be one of the special constants in EAPDataCell.
● Text provides the double value as a formatted String, either formatted using the Java Double class or the provided cube view cell value format.
❍ Missing signifies that the cell has no value.
❍ NoAccess signifies that the security settings of the cell prevent any access.
106 Using Iterator, Property, and Format Tags ❍ ReadOnly signifies that the security settings of the cell limit read-only access.
❍ ReadWrite signifies that the security settings of the cell enable both read and write access.
❍ Zero signifies that the cell has a value of 0.
● MemberNames provides the member names for the cell as a hash table from dimension name to member name.
Code Snippet - Get the Cube View Cell Properties The following code snippet iterates through the cube view cells and gets all available properties, and displays them:
Code Snippet - Test the Value of a Cube View Cell The following code snippet tests the value of the data cell, changes the font accordingly, and displays the data cell:
Using Iterator and Property Tags 107 Testing the State of a Cube View Cell The state of a cell's data may be tested, enabling the JSP coder to employ if-then-else logic to handle the display of the data.
Tag IfCubeViewCellProperty It can test for the following states:
● Is tests that the property is true.
● IsNot tests that the property is false
Properties The available properties are as follows:
● Missing signifies that the cell has no value.
● NoAccess signifies that the security settings of the cell prevent any access.
● ReadOnly signifies that the security settings of the cell limit read-only access.
● ReadWrite signifies that the security settings of the cell enable both read and write access.
● Zero signifies that the cell has a value of 0.
Code Snippet - Test the State of a Cube View Cell The following code snippet tests the state of the data cell and changes the font accordingly:
Using Relational Iterator Tags This section describes how to use relational queryInfo iterator and property tags together.
108 Using Iterator, Property, and Format Tags Scripting Variables You use scripting variables in your JSP to access specific cell values or properties. To use the scripting variable, you need to know its data type. The scripting variable’s data type is the same as the tag’s property attribute data type. For each tag, the Hyperion System 9 BI+ Application Builder J2EE JSP Technical Reference Guide includes the property names and their data types. The following figure shows the properties that are returned using the getXXX tags where XXX is part of the tag name, such as getCubeViewProperty.
Figure 29 Relational Properties Returned Using the getXXX tags
useQueryInfo Properties
JDBC Datasource Properties
Relational Datasource Properties
The following figure shows the sequence and tags used to iterate a queryInfo object and print an HTML table containing column headers and data:
Figure 30 Iterating a QueryInfo Object
(1) iterateQueryInfoColumns Display (2) getQueryInfoColumnProperties Column Member Names
(3) iterate QueryInfoRows (4) iterate QueryInfoColunms Display Cell (5) get QueryInfoCellProperties Data (6) openQueryInfoTransaction useQueryInfoCellValueBean Persist Cell Data useQueryInfoCellAnnotationsBean Display Annotations
Using Iterator and Property Tags 109 The following figure shows the results of Figure 30. Each label in the HTML table corresponds to a tag that iterates data or displays data.
Figure 31 Displaying useQueryInfo Results in a Table
1 and 4
<------2------>
3 <-- 5 and 6-->
The following list describes the labels and their corresponding tags: 18 iterateQueryInfoColumns - Iterates through all of the columns. 19 getQueryInfoColumnProperties - Displays the column headers. 20 iterateQueryInfoRows - Iterates through all of the rows. 21 iterateQueryInfoColumns - Iterates through all of the columns. 22 getQueryInfoCellProperty - Displays the cells. 23 The following tag are optional:
❍ openQueryInfoTransaction,useQueryInfoCellValueBean - Persists data cells. You can also use the useQueryInfoTransaction and closeQueryInfoTransaction tags. See the Hyperion System 9 BI+ Application Builder J2EE JSP Technical Reference Guide for tag information.
❍ useQueryInfoCellAnnotationsBean - Displays the annotation icons so that a user can select them and edit annotation information. For more information, see “Annotations” on page 86.
110 Using Iterator, Property, and Format Tags Sample JSP The following table shows sample JSPs installed with the hab-samples and hab-test applications: Table 15 Sample JSPs for OLAP Tags
JSP Description
Application: hab-samples This JSP shows how to iterate through a cube view and Link: Sample Pages > Common Functions > Iterate display all of its properties. Properties of a Cube View JSP: cubeViewProperties.jsp
Application: hab-samples This JSP Shows how to iterate through the results of a Link: Sample Pages > Common Functions > Iterate relational query and display all of its properties. Properties of a SQL Query JSP: iterateQueryInfoProperties.jsp
Using Cell Formatting You can apply formatting using the following methods:
● Use a cascading style sheet to modify the look and feel of a page. For more information, see the Hyperion System 9 BI+ Application Builder J2EE Getting Started Guide.
● Use iterator tags to access data and then use one of the following methods:
❍ Use formatting tags to apply numeric or date/time formatting to specific cells.
❍ Use HTML tags to change the cell’s appearance and attributes, such as its font size and color.
You use iterator tags to iterate through a data source or query result from the top metadata, such as a cube or database, down to the cell level. After you iterate to the cell level, you use formatting tags to apply a format to an OLAP or relational cell’s data. For example, if you have a cubeView object or queryInfo object where column 1 contains dates and column 2 contains currency, you can apply formatting objects MM-DD-YYYY and $00.00, respectively, to columns 1 and 2. Figure 32 shows how formatting tags are created and used with OLAP and relational tags and XML files.
Tip: The notation (CV|QI) represents CubeView or QueryInfo objects.
Typically you use the formatting XML file to define default or global formats for your application. You can then modify the formatting options or add new formatting options, using tags. For example, you can define global formatting for an application, then add or override formatting options for a particular user or view.
Using Cell Formatting 111 Figure 32 Formatting Overview
Create the Formatting Tag use(CV|QI)CellValueFormat
Formatting XML File Tags
Formatting Objects Formatting Objects useNumericFormat use(CV|QICellValueFormat useDateTimeFormat Manager
Update the Formatting Tag: Update the Formatting Tag: add(CV|QI)CellValueFormatX addQueryInfoCellValueFormat XXFormat, where XXX is: DatabaseFormat addCubeVIewCellValueFormatCube cell Format row column page(OLAP) members(OLAP) columns(Relational)
➤ To set up formatting: 1 Create the formatting tag (use (CV|QI)CellValueFormat). You must use the (CV|QI)CellValueFormat tag, which performs the following functions:
❍ Sets values for Zero Text, Missing Text, No Access Text, and a default format object.
❍ Contains a hash table that holds one or more specifications to a data area, such as cell, column, row, and so on, and an associated format object.
❍ Optionally, points to a parent (CV|QI)CellValueFormat. You can chain (CV|QI)CellValueFormat objects together. For processing information, see “Processing Formatting Tags” on page 114. 2 Follow the instructions in one of the following topics to create formatting objects and update the formatting tag:
❍ “Using Formatting Tags” on page 112
❍ “Using a Formatting XML File” on page 113
Using Formatting Tags
➤ To use formatting tags: 1 Define the formatting objects. You can define one or more formatting objects to format cells, columns, rows, and so on. The formatting objects are as follows:
❍ Numeric Format - The useNumericFormat tag defines a format for numbers or currency.
112 Using Iterator, Property, and Format Tags ❍ Date / Time Format - The useDateTimeFormat tag defines a format for dates or times or both. 2 Use the use(CV|QI)CellValueFormat tag to hold the following formatting information:
❍ Values for Zero Text, Missing Text, No Access Text, and a default format object
❍ A hash table that holds one or more specifications to a data area, such as cell, column, row, table and column name expressions and an associated format object. Use the add(CV|QI)CellValueFormatYYYFormat tag to add information to the hash table, where YYY is a cell, row, column, page, column name or member selection.
❍ An optional pointer to a parent object. The parent object can also point to its own parent object, and so on creating a chain of objects. This enables you to inherit definitions and then extend or alter them. 3 Update the formatting tag. You use the add(CV|QI)CellValueFormatYYYFormat tag, where YYY is a cell, row, column, page, column name, or member selection, to add the following information to the hash table in the use(CV|QI)CellValueFormat tag:
❍ A cell, row, or other specification to define the area to format
❍ An associated formatting object For example, you can associate a cell, column, and row with three different formatting objects, using the add(CV|QI)CellValueFormatYYYFormat tag three times.
Using a Formatting XML File You use an XML file to hold formatting objects for a specific JDBC data source or OLAP cube.
➤ To use a formatting XML file: 1 Define the formatting XML file. Within each XML file, you must specify a server, database, and JDBC or OLAP data source, and one or more formats for the cell, row, columns, and so on. The formatting objects are described in the OLAP or relational .dtd files as follows:
❍ WAACubeViewCellValueFormatManager_7_0.dtd defines formatting objects for an OLAP database.
❍ WAAQueryInfoCellValueFormatManager_7_0.dtd defines formatting objects for a relational database To set up the XML files use the Hyperion Administration tools, which is available from the Launch page. 2 Load the XML file. The tag use(CV|QI)CellValueFormatManager loads the XML file into memory and creates a format for each format name defined in the XML file. 3 Use the use(CV|QI)CellValueFormat tag to hold the following formatting information:
Using Cell Formatting 113 ❍ Values for Zero Text, Missing Text, No Access Text, and a default format object
❍ A hash table that holds one or more specifications to a data area, such as cell, column, row, table and column name expressions and an associated format object. Use the add(CV|QI)CellValueFormatYYYFormat tag to add information to the hash table, where YYY is a cell, row, column, page, column name or member selection.
❍ An optional pointer to a parent object. The parent object can also point to its own parent object, and so on creating a chain of objects. This enables you to inherit definitions and then extend or alter them. 4 Update the formatting tag: The following tags add the formatting XML file from use(CV|QI)CellValueFormatManager to the use(CV|QI)CellValueFormat hash table:
❍ addQueryInfoCellValueFormatDatabaseFormat adds the formatting XML file for a database into the use(CV|QI)CellValueFormat hash table. It also checks to see that its attributes for the JDBC connection, server name, and database name match the corresponding attributes in the XML file.
❍ addCubeViewCellValueFormatCubeFormat adds the OLAP formatting XML file for a cube into the use(CV|QI)CellValueFormat hash table.
Processing Formatting Tags The (CV|QI)CellValueFormat hash table is searched for a matching formatting object. The following order of precedence is used: Table 16 Processing Order of Precedence
Relational OLAP
cell cell
row row
column column
column name page
Parent (CV|QI)CellValueFormat member selection
Default Format id specified in the Parent (CV|QI)CellValueFormat (CV|QI)CellValueFormat
Default Format id specified in the (CV|QI)CellValueFormat
For example, if the cell value matches the cell, the cell format is used; if it matches the row, the row format is used; if it matches the column, the column format is used, and so on. After a match is found for a cell value, the format is applied and the search stops.
114 Using Iterator, Property, and Format Tags Formatting Examples
Example 1 Suppose you have the following formatting set up for a relational query result:
● Precede all data values in column 1 with the $ character.
● Precede all data values in row 2 with the # character
● Precede the data values in cell [2,1] with the @ character and enclose it with parenthesis(), for example @()
● For all data values under the column heading Budget, precede them with the letter B and enclose them in parentheses; for example, B().
The following code produces Table 17: iterate(CV|QI)row iterate(CV|QI)Column iterate(CV|QI)Cell get(CV|QI)CellProperty or use(CV|QI)CellValueBean Each cell value is checked for a match from “Example 1” on page 115 in the following order: cell(2,1); row(2); Column (1); Column Name (Budget)
Table 17 Relational Report
Column/ Row 0 1 2 3(Budget) 4
0 244 $566 898 B(546) 356
1 98 $353 35 B(35) 98
2 #99 @(99) #22 #78 #99
3 90 $09 67 B(87) 67
4 21 $43 98 B(84) 68
Example 2 This example shows the processing for three (CV|QI)CellValueFormat objects named View, User, and Global. They are linked together with a reference to a parent CVCellValueFormat object. When data is encountered, it searches through the objects and tries to find a match. When a match is found, the formatting is applied and the search stops. The order of precedence defined in Table 16 on page 114 applies to each (CV|QI)CellValueFormat object.
Using Cell Formatting 115 Figure 33 Formatting Example
Get(CV|QI)CellProperty Use(CV|QI)CellValueBean
View y Row Specification and Format y Column Specification and Format
User User y Member Selection and Format
Global Default Formats (Defined in the use(CVQI)CellValueFormat tag)
When a JSP executes the Get(CV|QI)CellProperty or Use(CV|QI)CellValueBean tags with the formatting objects in Figure 33, the following processing occurs:
Note: When a matching cell, row, column, page, or member selection is found, its format is applied and the search through the linked list stops.
5 The View object is scanned. If the cell is contained in the member selection, its format is applied. 6 The User object is scanned. If the cell matches the row specification, its format is applied. If the cell matches the column specification, its format is applied. 7 The Global object is scanned. If the cell matches the cell specification, its format is applied. If the cell matches the page specification, its format is applied. 8 If the cell does not find a match, it is not formatted.
The following table shows sample JSPs installed with the hab-samples application.
116 Using Iterator, Property, and Format Tags Sample JSPs Table 18 Sample JSPs for OLAP Tags
JSP Description
Application: hab-samples Shows how to use a configuration XML file to define Link: Sample Pages > Common Functions > Format formatting to be used when displaying the results of a cube Cube View Results using XML File view. JSP: TestCubeViewCellCubesFormattingT ags.jsp
Application: hab-samples Shows how to define formatting when displaying results of a Link: Sample Pages > Common Functions > Format specific cube view without using a configuration XML file. Cube View Results without XML File JSP: FormattingCubeViewCellsWithoutXm l.jsp
Application: hab-samples Shows how to format and export the results of a relational Link: Sample Pages > Common Functions > Export query to a PDF file. SQL Query Results JSP: ExampleSqlExport.jsp
Using Cell Formatting 117 118 Using Iterator, Property, and Format Tags Chapter Using a Scripting Frame Work 8
A scripting framework enables the usage of ECMA script in JSPs and in tasks. The scripting framework is used by the transformation tags and join tags to perform calculations and joins respectively. It can also be used by the task tags. and in the task framework. The task framework is the functionality that enables a user to define and run tasks. This functionality is implemented in the Administration Tools, for more information see the Application Builder Administrator’s Guide. Using a scripting framework in a JSP offers these advantages:
● You can execute calculations using the transformation tags.
● You can specify logic to execute joins using the join tags.
● You can access Java objects using a standard expression language rather than using a Java scriplet.
● You can utilize dynamic user-defined logic. For example, you can create a task that sends an alert based on a threshold value input by a user, so one user can specify “Give me an alert when stereo sales exceed 1000,” and another user can specify “Give me an alert when stereo sales exceed 500.” Two alerts are created for different threshold values using the same report.
Using a scripting framework in with tasks enables the following functionality:
● You can execute scripts, evaluate scripts, and pass members between the scripting framework and the task framework.
● You can specify tasks to run based on a conditional script
The Free EcmaScript Interpreter (FESI) is used to implement ECMA script. FESI is a full implementation of the first version of the EcmaScript language (defined in the standard ECMA 262 available at http://www.lugrin.ch/fesi/index.html.EcmaScript is largely equivalent to the JavaScript language version 1.1 or to the core part of JavaScript, but without the navigator- specific extensions. A few extensions can be loaded to provide basic input/output, file input/output, access to Java objects, database access and regular expression based search from an EcmaScript program, including dynamic loading of classes and beans. FESI consists of a set of Java packages, enabling you to use EcmaScript as a macro language for Java applications, and of an interactive interpreter (usable from the command line to test EcmaScript programs). The integration with Java is very strong, making FESI a useful tool to test Java libraries.
Using a Scripting Frame Work 119 The following diagram shows the objects available when you enable a scripting framework in a JSP or task framework. The objects enclosed in quotes are created by WAA, the objects without quotes are standard Java objects. Both the JSP framework and the Task Framework can utilize the global objects.
Figure 34 Scripting Frame Work Objects
GLOBAL Objects - Scripting useScripting WAAMath Framework Framework tag WAAStatistics parent task parentObject
Task JSP Framework Framework Objects Objects - task - custom - custom member member
Global Objects The global objects are available to both the JSP Framework and the Task Framework. The useScriptingFramework tag and the Scripting Framework task make the following members available for the lifetime of the scripting framework:
● WAAMath - The math supplemental as type com.hyperion.waa.utility.core.WAAMath which provides math functions.
● WAAStatistics - The statistics supplemental as type com.hyperion.waa.utility.core.WAAStatistics which provides statistical functions.
● parent - A parent scripting framework of the type WAAScriptingFramework which provides the ability to chain scripting frameworks together. You use this option to utilize custom members defined in different scripting frameworks.
● parentObject - The parent scripting framework's top-level object of the type JSGlobalObject for the language LANGUAGE_ECMASCRIPT.
JSP Framework You must use the useScriptingFramework tag to enable a scripting framework for the transformation tags, scripting tags, join tags, and conditional tags. After a scripting framework is enabled, you can use it with the following objects:
● “Global Objects” on page 129
● The tags executeScriptingFrameworkScript, and evaluateScriptingFrameworkScript make 9 implicit Java objects available to the scripting framework, which are as follows:
❍ request as type javax.servlet.ServletRequest
120 Using a Scripting Frame Work ❍ response as typejavax.servlet.ServletResponse
❍ pageContext as type javax.servlet.jsp.PageContext
❍ session as type javax.servlet.http.HttpSession
❍ application as type javax.servlet.ServletContext
❍ out as type javax.servlet.jsp.JspWriter
❍ config as type javax.servlet.ServletConfig.
❍ page as type java.lang.Object
❍ exception as type java.lang.Throwable
● “custom member” - The tags addScriptingFrameworkMember, useScriptingFrameworkMember pass a custom member between the scripting framework and the JSP framework. The tag removeScriptingFrameworkMember removes the custom member from the scripting framework.
● The tags ifScriptingFrameworkScript, evaluateScriptingFrameworkScript, and executeScriptingFrameworkScript tags all utilize a script. In the latter two tags, the script can be defined in the tag body or by using an attribute.
Task Framework The WAAScriptingFramework task enables a scripting framework for tasks. Once a scripting framework is enabled you can use it with the following objects and tasks:
● “Global Objects” on page 129
● “custom member” - The tasks WAASetScriptingFrameworkMember and WAAGetScriptingFrameworkMember pass a custom member between the scripting framework and the JSP framework, making it globally available within the scripting framework. The task WAARemoveScriptingFrameworkMember removes a custom member.
● “task” - The task object is available in the scripting world and it refers to the current task being executed. For example, task.getAncestor searches the ancestor tasks for the current task.
● The tasks WAAExecuteScriptingFrameworkScript, WAAEvaluateScriptingFrameworkScript, and WAAIfScriptingFrameworkScript use a script.
Task Framework 121 122 Using a Scripting Frame Work Chapter Using the Universal Result Set 9
The universal result set provides a common access model for tabular or grid data. The advantage to using the universal result set is that you can map both a relational or OLAP query to it and then use one JSP to display the results. For example, you can create a JSP page that displays an HTML grid with query result data, using the grid tags. You can then use this JSP to display OLAP query results (cubeView object) or relational query results (queryInfo object). The universal result set is implemented by grid tags that utilize the IWAAGrid interface. The IWAAGrid instance is organized by page, row, column, and cells, and the OLAP and relational header information is placed in the data cells. The page, row, and column indices start at zero. This chapter includes the following topics, which describe universal result set functionality:
● “Exporting to PDF, RTF, HTML, Excel, and PowerPoint” on page 129
● “Generating a Universal Chart” on page 133
● “Using Calculations and Subtotals” on page 135
● “Joining Grids” on page 126
The following figure shows an overview of the universal result set; solid lines indicate that the objects are mapped, and dashed lines indicate that the objects are accessed by tags.
Figure 35 Universal Result Set Functionality
cubeView queryInfo
IWAAGrid Instance or Grid
Transformation Grid Join Grid
Iterator Tags Export Charting
The following list describes the universal result set objects:
Using the Universal Result Set 123 ● cubeView - An OLAP query and partial result set
● queryInfo - A relational query and partial result set
● IWAAGrid Instance or Grid - An IWAAGrid object, also referred to as a grid
● Join - An IWAAGrid object, stored in memory, that combines two grids
● Transformation Grid - An IWAAGrid object, stored in memory, that performs calculations
● Iterator tags - Tags that iterate through a grid and enable you to display query result data
● Export - Tags that export a grid, join, or transformation grid to another format, such as PDF or HTML
● Charting - Tags that export a grid, join, or transformation grid to a chart
The tags that utilize a grid, join, or transformation grid are defined in the WAACoreDesign_7_0.tld. For each export, iterator, and charting tag, there are adapter tags that apply to relational and OLAP queries. These tags map the queryInfo object or the cubeView object to an IWAAGrid instance and then perform the same functionality as their corresponding grid tags. For example, the useGridChartBean tag generates a universal chart; the adapter tags useQueryInfoChartBean and useCubeViewChartBean map the queryInfo or cubeView to an IWAAGrid and then generate a universal chart.
Sample Code Table 19 Sample Code for Export, Charting, and Iterating a Grid
Application Link JSP
hab-samples CommonFunctions - Define a Chart to simpleIterationTableWithChart.jsp Display Cube View Results
hab-samples CommonFunctions - Export SQL Query ExampleSqlExport.jsp Results
hab-samples CommonFunctions - Create an HTML Table SimpleIterationTable.jsp to Display a Cube View
The following figure shows the iterator, export, and chart tags. Solid lines indicate that tags are mapped to each other, and dashed lines indicate that tags utilize each other.
124 Using the Universal Result Set Figure 36 Iterator, Export, and Chart Tags
use(QI|CV)Cell ValueFormat useCubeView useQueryInfo
useCubeView useQueryInfo Grid Grid
IW AAGrid o r G rid Display the data using ite ra to r ta g s
useGrid Export useGridChartBean useGridPage Bean SelectorBean
useQueryInfo useQueryInfo ChartBean ExportBean
useCubeView useCubeView ChartBean ExportBean
Key
Generates M apped HTML
No HTML U tiliz e
These tags enable you to map a cubeView or queryInfo to an IWAAGrid instance, then export the data to another format, display the data in a universal chart, or iterate the data and display it.
The following steps provide an overview of the tag’s functionality: 9 Create and execute a cubeView with formatting - The useCubeView tag creates and executes a cubeView and the useCubeViewCellValueFormat tag provides formatting information. 10 Create and execute a queryInfo with formatting - The useQueryInfo tag creates and executes a QueryInfo and the useQueryInfoCellValueFormat tag provides data formatting information. 11 Create and map an IWAAGrid instance to a cubeView. The useCubeViewGrid tag creates and maps a IWAAGrid instance to the cubeView. 12 Create and map a IWAAGrid instance to a queryInfo. The useQueryInfoGrid tag creates and maps a IWAAGrid instance to the queryInfo. 13 Display the IWAAGrid object using iterator tags. The iterator tags iterate through a IWAAGrid instance and the property tags access data. For more information, see “Using Iterator, Property, and Format Tags” on page 97. 14 Use the useGridExportBean to export the IWAAGrid object to PDF, RTF, HTML, text, Excel, or PowerPoint format. For more information, see “Exporting to PDF, RTF, HTML, Excel, and PowerPoint” on page 129. The following tags are convenience tags:
Using the Universal Result Set 125 ❍ useCubeViewExportBean - An adapter class for exporting grid data. The cubeview data is mapped to an IWAAGrid instance, and the useGridExportBean tag is then executed.
❍ useQueryInfoExportBean - An adapter class for exporting grid data. The QueryInfo data is mapped to an IWAAGrid instance and the useGridExportBean tag is then executed. 15 Use the useGridChartBean to generate a chart using the IWAAGrid object. For more information, see “Generating a Universal Chart” on page 133. The following tags are convenience tags:
❍ useCubeViewChartBean - An adapter class for generating a universal chart using CubeView data. The cubeview data is mapped to an IWAAGrid instance and the useGridChartBean tag is then executed.
❍ useQueryInfoChartBean - An adapter class for generating a universal chart using QueryInfo data. The QueryInfo data is mapped to an IWAAGrid instance, and the useGridChartBean tag is then executed.
Joining Grids The join functionality enables you to join two grids based on specified criteria for the pages, rows, and columns resulting in a new grid. The following tags implement joins:
● useJoinGrid - Use this tag to specify how to join two grids into one grid. Grids are joined by appending the pages of one grid to another or by pairing off pages from each grid. After pages are paired off, the rows or columns on each of the pages may be appended or prepended to the other or joined (similar to a SQL join) by comparing data cells. Joins are specified by page join type, and then by row/column join type (if applicable). If either join type requires matching criteria or other configuration information, a join expression may be set.
● addJoinGridValueMapping - Use this tag to match values between two grids before the join is executed. You can match a metadata value or a data value.For example if the First grid lists time as Qtr1, Qtr2, Qtr3, and Qtr4 and the second grid lists time as Q1, Q2, Q3, and Q4. You can match the time values in the two grids, so when the join is executed the matching values are treated as the same. Qtr1 matches Q1, Qtr2 matches Q2 and so on.
Note: If you are using the addJoinGridValueMapping tag, you must set the execute attribute in the useJoinGrid tag to false. After the mapping is complete use the executeJoinGrid tag to execute the join. For example, your tag sequence would be: useJoinGrid( ..execute=False), addJoinGridMappingValue( ), executeJoinGrid ()
● executeJoinGrid - Use this tag to execute the joining of two grids into one grid based on the criteria set up with the useJoinGrid tag. This tag is needed if the execute attribute in the useJoinGrid tag is false.
This following examples shows code snippets using the sample JSPs installed with the hab- samples and hab-test applications:
126 Using the Universal Result Set Sample JSPs Table 20 Sample JSPs for Join Tags
JSP Description
Application: hab-samples This JSP demonstrates joining two SQL grids. Link: CommonFunctions > Join two SQL Queries JSP: All the OLAP JSPs in this section
Application: hab-test This JSP demonstrates joining two grids and enables a user Link: Core > Join URS to change the join criteria. JSP: TSTJoinGrid.jsp
These examples illustrate the useJoin tag attribute usage. See the Sample JSPs to review the complete JSP.
Example 1 - Join Two Relational Queries by Column Metatdata Suppose you have one query that lists cities and their Zip codes and another query that lists people and their Zip codes. You can execute a join on the Zip codes to display the people, cities, and Zip codes together.
This joins the two grids columnwise, matching the cell values in row zero of each grid (which are the relational column headers).
Example 2 - Join Two Relational Queries by Remapping Column Metatdata Headers Suppose you have a query that lists time as Qtr1, Qtr2, Qtr3, and Qtr4 and another query that lists time as Q1, Q2, Q3, and Q4. You can map Qtr1 to Q1, Qtr2 to Q2 and so on; then perform a join.
This joins two grids columnwise matching the cell values in row zero of each grid (which are the relational column headers). For each occurrence of Q1, Q2, Q3, and Q4 in the second grid, the resulting join grid contains the values Qtr1,Qtr1, Qtr1, respectively. This does not change the values in the second grid.
Joining Grids 127 Example 3 - Join Two OLAP Grids Together, Matching Pages by Page Labels And Appending Rows Suppose you have two cubes: The first cube has yesterday’s data, and the second cube has today’s data. To see yesterday’s and today’s data together in one query, create a query for each cube and place them in grids. Then join the grids, matching pages where the page labels are identical and then appending rows, as follows:
This matches pages in the OLAP grid if the complete page labels are identical, and then appends the rows from grid 2 to the rows of grid 1. The results are as follows: Grid 1, page 1 .yesterdays data . . Grid 2, page 1 .todays data . . Grid 1, page n .yesterdays data . . Grid 2, page n .todays data . .
Example 4: Join a Relational Grid to Every Page of an OLAP Grid, and Append the Matching Relational Columns Suppose you have an OLAP grid with sales data, including sales people, and a relational grid that contains the sales people’s contact information. You can join the grids so that the contact information is appended to the OLAP grid as follows:
This example shows the sales report with the contact information appended to the columns: east Contact Information Contact Information Contact Information West Contact Information Contact Information Contact Information South Contact Information Contact Information Contact Information
128 Using the Universal Result Set Exporting to PDF, RTF, HTML, Excel, and PowerPoint This section describes how to use the export function, which outputs a grid to the following formats: PDF, RTF, HTML, Excel, and PowerPoint. The exports are based on XSLT technology and are fully customizable. Only a grid is produced in the output; a chart is not included.
➤ To set up and use the export function: 1 Set up an XSLT style sheet to specify formatting options, such as the height, width, and so on. For more information, see “Using the XSLT Style Sheets” on page 132.
Tip: The sample XSLT files are WAAGridToXslfo.xslt and WAAGridToHtml.xslt.
2 Optional: Set up an Export XML file to define export options and override parameters for the XSLT file. For more information, see the Administration Tools. Use the useGridExportManager to load the export XML file. You can validate the export XML file with the WAAGridExportManager_7_0.dtd file.
Tip: Alternatively, you can use the adapter tags useQueryInfoExportManager and useCuveViewExportManagertags.
3 Use the useGridExport to complete these steps:
❍ Create a container to hold the export options, from an export XML file and XSLT parameters that you add using the addGridExport and addGridExportXSLTParamaters tags.
❍ Optional: Specify a pointer to a parent useGridExport object. The parent object can also point to its own parent object and so on, creating a chain of objects. This enables you to inherit definitions and then extend or alter them.
Tip: Alternatively, you can use the adapter tags useQueryInfoExport and useCubeViewExport.
4 Optional: Override or add export options and XSLT parameters using the following tags:
❍ addGridExport - Sets the export name, type, MIME type, and XSLT file names in the export XML file.
Tip: You can alternatively use the adapter tags addQueryInfoExport and addCubeViewExport.
❍ addGridExportXSLTParamaters - This tag sets XSLT parameters for a specific export.
Tip: Alternatively, you can use the adapter tags addQueryInfoExportXSLTParamaters and addCubeViewExportXSLTParamaters tags.
Exporting to PDF, RTF, HTML, Excel, and PowerPoint 129 5 Use one of the following tags to generate an HTML control that displays the export options set up by the WAAExport.xml file:
❍ useGridExportBean - Exports the grid to an IWAAGrid object, which is supported by WAAGridExport. You use this tag define export options for grid data.
❍ useQueryInfoExportBean - An adapter tag for exporting a QueryInfo into an IWAAGrid object, which is supported by WAAGridExport. You use this tag define export options for relational data.
❍ useCubeViewExportBean - An adapter tag for exporting a CubeView into an IWAAGrid object, which is supported by WAAGridExport. You use this tag define export options for OLAP data. 6 The following figure shows an example of the HTML control generated using the useGridExportBean tag and the WAAExport.xml file that is installed with the Sample Application. A pull down list is displayed, with an export option listed for each
Figure 37 Export HTML Control
➤ To export to an output file, click an export option and follow the instructions to save or display the output file.
Examples This section shows sample JSPs that are installed with the hab-samples and hab-test applications.
130 Using the Universal Result Set Sample JSPs Table 21 Sample JSPs for Export Tags
JSP Description
Application: hab-samples This JSP demonstrates exporting relational query results. Link: CommonFunctions - Export SQL Query Results JSP:ExampleSqlExport.jsp
Application: hab-test This JSP demonstrates exporting OLAP query results. Link: Olap - View Builder component with Cube View output JSP:TSTViewBuilderWithCubeViewOut putPage.jsp
Processing Overview The following figure provides an overview of the exporting functionality. The oval icons represent third-party components installed with Application Builder. The darker boxes represent document files and the lighter boxes represent Web Application Architecture (WAA) components. Using Java code you can substitute in your own processors for the WAA components.
Figure 38 Exporting to Multiple Formats
IWAAGrid
Grid WAAGrid XML Export Document
.XSLT file XSLT Transformer
XSL:FO
HTML FOP JFor
Power EXCEL Point PDF RTF
The following components are described:
● IWAAGrid - The grid that contains data from a CubeView or QueryInfo
Exporting to PDF, RTF, HTML, Excel, and PowerPoint 131 ● WAAGridExport - The class that uses the grid object to produce the Grid XML document, which is memory-resident. The full class name is com.hyperion.waa.utility.core.WAAGridExport.convertGridToXML().
● Grid XML Document - The XML document that represents the grid
● XSLT processor - The XSLT stylesheet processor that processes the Grid XML document and the XSLT style sheet to produce an HTML or XSL:FO document. The XSL:FO document is memory-resident and is used by FOP or JFor to output to PDF or RTF files, respectively. The XPath Processor is included with XSLT processor.
Note: The XSLT processor transforms XML documents into HTML, text, or XSL-FO files. It is an open source utility and part of the Apache XML Project. For more information, see http://xml.apache.org.
● HTML - The HTML document output by the XSLT processor
● XSL:FO - The XSL:FO document output by the XSLT processor, which is memory-resident. For more information, see http://www.w3.org/TR/xsl/.
● Formatting Objects Processor (FOP) - The formatting objects processor that uses the XSL:FO document to produce a PDF file. FOP transforms XSL-FO files to PDF. For more information, see http://xml.apache.org/fop/.
● JFor - The object processor that uses the XSL:FO document to produce an RTF file. JFor is an open source utility that transforms XSL-FO files to RTF. For more information, see http://www.jfor.org/.
Using the XSLT Style Sheets The following two sample XSLT style sheets are provided to transform the grid XML into basic examples:
● WAAGridToXslfo.xslt - Converts a grid XML document to XSL:FO output. There are a number of parameters that can be overridden by parameter settings in the XML file. For example, you can vary the output for page sizing.
● WAAGridToHtml.xslt - Converts a Grid XML document to HTML output.
To override the parameters in the XSLT file, use the parameter settings in the WAAExportGrid.xml file rather than change the XSLT file. You can also use one of the XSLT files as the basis for a new one. For more information, see the Administration Tools.
Note: Do not modify the sample XSLT files.
The XSLT parameter values are listed in the Cascading Style Sheets Level 2 (CSS2) document. CSS2 is a style sheet language that enables authors and users to attach style (for example, fonts, spacing, and aural cues) to structured documents, such as HTML documents and XML applications. For more information, see http://www.w3.org/TR/REC-CSS2/.
132 Using the Universal Result Set Generating a Universal Chart This section describes how to generate a universal chart using the charting tags. Universal charting performs charting of grid data enabling you to create custom charts and modify existing charts using NetCharts charting engine. There is a Chart object (WAAGridChart, WAACubeViewChart, WAAQueryInfoChart), which represents a set of definitions for one or more charts. These definitions may be read from an XML file or dynamically created using tags or Java API calls. You can also have a manager that holds basic definitions, which you can then customize for a particular user. For example, you can set up charting options to change the chart colors, height or width, and so on.
➤ To generate a universal chart: 1 Optionally set up a Chart XML file to define a chart and chart options. For more information, see the Administration tools.
Tip: The chart names, options, and valid values are defined in the NetCharts CDL (Chart Definition Language) documentation. Some options are valid for all chart types; others are specific to a particular chart type.
Use the useGridChartManager to load the chart XML file. You can optionally validate the chart XML file with the WAAGridChartManager_7_0.dtd file.
Tip: You can alternatively use the adapter tags useQueryInfoChartManager and useCubeViewChartManager.
2 Use the useGridChart tag to perform the following tasks:
❍ Specify the default chart XML file that is loaded in by the useGridChartManager tag.
❍ Create a container to hold chart definitions and options.
Tip: Alternatively, you can use the adapter tags useQueryInfoGridChart and useCubeViewGridChart tags.
❍ Contain a pointer to another useGridChart object. 3 Optional: Override or add chart definitions and options using the following tags:
❍ addGridChart - This tag adds a chart definition containing a chart type, OutputMIMEType, height, and width.
Tip: Alternatively, you can use the adapter tags addQueryInfoChart and addCubeViewChart tags.
Generating a Universal Chart 133 ❍ addGridChartOptions - This tag defines chart options to add or override the chart options set by the chart XML file.
Tip: Alternatively, you can use the adapter tags addQueryInfoChartXSLTParamaters and addCubeViewChartXSLTParamaters.
4 Use the useGridChartBean tag to display the HTML chart. It uses the chart XML file and charting definitions specified by the useGridChart tag.
Tip: You can alternatively use the adapter tags useQueryInfoChartBean and useCubeViewChartBean.
Examples This section shows sample a JSP installed with the hab-samples and hab-test applications.
Sample JSPs Table 22 Sample JSP for Chart Tags
JSP Description
Application: hab-samples This JSP shows how to create a chart to display a cube view. Link: Sample Pages > CommonFunctions > Define a It uses the WAAGridChart.xml file. Chart to Display Cube View Results JSP: simpleIterationTableWithChart.js p
134 Using the Universal Result Set Chapter Using Calculations and Subtotals 10
You use the transformation grid tags to perform calculations, subtotals, and breaks. You can map the transformation grid to an OLAP grid or a relational grid, or you can create an empty transformation grid. After you create the grid, you can insert pages, rows, and columns that contain calculations or text. A calculation may contain a cell reference, a numeric value, or a function. A calculation also defines operations, such as adding the value in one cell to another or multiplying the values in cells. You can use the sample code in this chapter to learn more about calculations: This chapter includes the following topics:
● “Using Transformation Tags” on page 135
● “Using Breaks or Subtotals” on page 137
● “Using Transformation Functions” on page 139
● “Using the Cell Object” on page 142
● “Cell and Range References” on page 142
Using Transformation Tags The following figure shows the transformation tags. Solid lines with arrows indicate that tags are mapped to each other; dashed lines indicates that tags utilize each other.
Using Calculations and Subtotals 135 Figure 39 Transformation Tags
use(QI|CV)Cell ValueFormat useCubeView useQueryInfo
useCubeView useQueryInfo Grid Grid
- useTransformation Grid Display Display the transformation Define grid using C alculations xxxGridxxx iterator tags insertTranformation GridPage
insertTranformation GridRow
insertTranformation GridCol
SetTranform ationGri dCell
The universal result set tags enable you to map a cubeView or queryInfo to an useCubeViewGrid or a useQueryInfoGrid, respectively. The following steps provide an overview of the transformation tag functionality:
5 Enable ECMA Script - The useScriptingFrameworkScript tag enables a scripting framework. The Free EcmaScript Interpreter (FESI) is used by the transformation tags to perform calculations. FESI supports recursion, which is needed by the transformation grid. 6 Create a transformation grid - The useTransformationGrid tag creates a transformation grid and optionally maps it to the cell data in the useCubeViewGrid or a useQueryInfoGrid tag object. The transformation grid is stored in memory and is processed in two steps: You insert calculations in step 1; you render the grid, which executes the calculations, in step 2. 7 Define calculations - The insertTransformationGridPage, insertTransformationGridRow, and insertTransformationGridColumn tags insert a page, row, and column, respectively, into the transformation grid and the existing page, row, or column cells are pushed down or to the right. For example if you insert a row 3, then the existing row 3 is pushed down to row 4 and so on. The inserted pages, rows, and columns are used to store calculations. 8 Define breaks - The insertTransformationGridRow and insertTransformationGridColumn tags insert breaks. The grid must contain labeled rows or columns, and the grid must be sorted on the rows or columns for which you want breaks. You can define a condition that causes a break and the row or column where you want to insert it. 9 Define calculations for specific cells - The setTransformationGridCell tag is used to set a calculation and store its result in a specific cell. You can also use the setTransformationGridCell tag to blank out specific cells.
136 Using Calculations and Subtotals 10 Execute Calculations - Execute the calculations and display the transformation grid, using iterator tags. Use the iterator tags to iterate through a grid and display it. The calculations are executed automatically before the data is displayed. For more information, see “Using Iterator, Property, and Format Tags” on page 97.
Examples This section shows sample JSPs installed with the hab-samples and hab-test applications.
Sample JSPs Table 23 Sample JSPs for OLAP Tags
JSP Description
Application: hab-samples This page runs a predefined cube view, iterates over the Link: Sample Pages > CommonFunctions > Calculate universal result set to build a result table, and uses the grid Values from an OLAP Grid transformation tags to add calculated values to the rows and columns. This page demonstrates how to use built-in math JSP: TransformationGridExample.jsp functions and embed them within each other.
Application: hab-test This JSP demonstrate a transformation grid with calculations Link: Olap - View Builder component with Cube View and breaks. To see query results in a transformation grid, output from the Cube View Output pull-down, select Grid Results (Transformed). JSP:TSTViewBuilderWithCubeViewOut putPage.jsp
Using Breaks or Subtotals Breaks define a group of rows or columns based on the sorted values in a row or column changing. Breaks work similarly to a subtotal function. You must have the entire transformation grid created before you define breaks. The following functionality for breaks is included:
● You can define the text that appears in the break headers.
● You can break on one or more columns or rows.
● You can use any supported calculation for the break, such as this.count(‘break’) or this.avedev(‘break’). For a list of all supported functions, see Table 25 on page 139.
You can insert breaks on rows or columns using the insertTransformationGridRow or insertTransformationGridColumn tag, respectively. For more information, see the “WAACoreDesign Tag Library” chapter in the Hyperion System 9 BI+ Application Builder J2EE JSP Technical Reference Guide. The attributes breakRowExpression or breakColumnExpression define which tuples determine the break point, as follows: breakExpression := (h+ | h- | tuple-number[,(...)])
❍ h+ - The break is determined by evaluating the all the tuples in the row header or column header starting with the first tuple. For example if you have three tuples on the column edge, the break is evaluated from tuple 0, 1, 2.
Using Breaks or Subtotals 137 ❍ h- - The break is determined by evaluating the all the tuples in the row header or column header starting with the last tuple. For example if you have three tuples on the column edge, the break is evaluated from tuple 2, 1, 0. Performance may improve if you use this syntax, because it is looking for a break starting at the outer edge where changes occur first.
❍ A tuple number - 0 or any positive integer
❍ A list of tuple numbers - 0..Integer.MAX_VALUE) Specify the list of tuples in descending order to improve performance. For example, 5,3 generally performs better than 3,5 because it is looking for a break starting at the outer edge where changes occur first.
Note: The order of tuples on which to break should be in the reverse of the order in which they were sorted. This improves performance by reducing the number of comparisons.
Sample JSP The following table shows sample JSPs that are installed with the hab-samples and hab-test applications:
Table 24 Sample JSPs for OLAP Tags
JSP Description
Application: hab-samples This page runs a predefined cube view, maps it to a grid, and Link: Sample Pages> CommonFunctions > Calculate iterates over the grid to show the query results. Then it uses SUb totals from an OLAP Grid the grid transformation tags to add breaks JSP: TransformationGridExample.jsp
Application: hab-test This JSP demonstrates a transformation grid with Link: Olap - View Builder component with Cube View calculations and breaks. To see query results in a output transformation grid, from the Cube View Output pull-down, select Grid Results (Transformed). JSP:TSTViewBuilderWithCubeViewOut putPage.jsp
The following code snippet, taken from the hab-test application - TstViewBuilderWithCubeViewOutpurPage.jsp, creates a break whenever column tuple 0 changes on the row. It calculates and displays a count for each break group.
The following figure shows an OLAP view with breaks:
138 Using Calculations and Subtotals Figure 40 OLAP View with Row Breaks
Using Transformation Functions A transformation function is a predefined mathematical or statistical calculation applied to a transformation row, column, or cell. You use transformation functions to perform calculations, such as average, count, min, or max. Table 25 Transformation Functions
Function Name and Arguments Description
double avedev(String rstListReference) Returns the average of the absolute deviations of a data set from their sample mean, ignoring nonnumeric values.
double average(String rstListReference) Returns the average (arithmetic mean) of a data set, ignoring nonnumeric values.
double averagea(String rstListReference) Returns the average (arithmetic mean) of a data set, ignoring nonnumeric values and including missing data.
double correl(String rstListReference1, String Returns the correlation coefficient of two data sets, rstListReference2) ignoring nonnumeric values.
double count(String rstListReference) Returns the count of a data set, ignoring nonnumeric values.
double counta(String rstListReference) Returns the count of a data set, ignoring nonnumeric values and including missing data.
double covar(String rstListReference1, String Returns the average of the products of deviations of two rstListReference2) data sets from their mean, ignoring nonnumeric values.
double devsq(String rstListReference) Returns the sum of squares of deviations of a data set from their sample mean, ignoring nonnumeric values.
protected double fixDouble(double dResult) This is a temporary expensive fix to the Java bug.
double geomean(String rstListReference) Returns the geometric mean of a data set, ignoring nonnumeric values.
Using Transformation Functions 139 Table 25 Transformation Functions (Continued)
Function Name and Arguments Description
int getColumnIndex() Gets the column index.
WAATransformationGrid getGrid() Gets the grid.
int getPageIndex() Gets the page index.
int getRowIndex() Gets the row index.
double harmean(String rstListReference) Returns the harmonic mean of a data set, ignoring nonnumeric values.
double kurt(String rstListReference) Returns the kurtosis of a data set, ignoring nonnumeric values.
double maximum(String rstListReference) Returns the maximum of a data set, ignoring nonnumeric values.
double median(String rstListReference) Returns the median of a data set, ignoring nonnumeric values.
double minimum(String rstListReference) Returns the minimum of a data set, ignoring nonnumeric values.
double mode(String rstListReference, int iMultiOption) Returns the mode of a data set, ignoring nonnumeric values.
double number(String rstCellReference) Returns the numeric value of a cell.
double order(String rstListReference, int iPosition, Returns the K-th order in a data set, ignoring nonnumeric boolean bAscending) values.
double pearson(String rstListReference1, String Returns the Pearson product moment correlation rstListReference2) coefficient of two data sets, ignoring nonnumeric values.
double percentile(String rstListReference, double Returns the K-th percentile of a data set, ignoring non- dPercentile) numeric.
double product(String rstListReference) Returns the product of a data set, ignoring nonnumeric values.
double quartile(String rstListReference, byte byQuartile) Returns the quartile of a data set, ignoring nonnumeric values.
double rank(String rstListReference, double dCompare, Returns the 1 based rank of a number in data set, boolean bAscending) ignoring nonnumeric values.
protected void setColumnIndex(int iColumnIndex) Sets the column index.
protected void setPageIndex(int iPageIndex) Sets the page index.
protected void setRowIndex(int iRowIndex) Sets the row index.
double skew(String rstListReference) Returns the skewness of distribution of a data set, ignoring nonnumeric values.
double stdev(String rstListReference) Returns the standard deviation of a data set from their sample mean, ignoring nonnumeric values.
140 Using Calculations and Subtotals Table 25 Transformation Functions (Continued)
Function Name and Arguments Description
double stdevp(String rstListReference) Returns the standard deviation of a data set from their population mean, ignoring nonnumeric values.
double sum(String rstListReference) Returns the sum of a data set, ignoring nonnumeric values.
String text(String rstCellReference) Returns the textual value of a cell.
Object value(String rstCellReference) Returns the value of a cell.
double variance(String rstListReference) Returns the variance of a data set from their sample mean, ignoring nonnumeric values.
double variancep(String rstListReference) Returns the variance of a data set from their population mean, ignoring nonnumeric values.
Function Syntax Functions are case-sensitive; function arguments are case-insensitive. The syntax for functions is: FunctionName(arguments)
Table 26 Mathematical Functions
Item Description
FunctionName The name of a mathematical or statistical function
arguments A numeric value, a list reference, or an embedded function
Embedded Functions as Arguments You can embed functions as arguments within a function. Example In the following example, the function sum is embedded in the function average: “The average is ” + this.avg ( ‘cb:c-3') + “and the sum is "+ this.sum (“cb:c-3”) “the larger number is” WAAMath.max (this.avg(‘cb:c-3'), this.sum (“cb:c-3”));
Order of Precedence for Rows, Columns, and Cells The following rules determine the order of precedence for calculations specified in a transformation row, column, or cell.
● The cell calculation has precedence over row, column, and page calculations.
Using Transformation Functions 141 ● The precedence attribute in the insertTransformationGridRow and insertTransformationGridColumn tags specifies the row or column precedence. If the precedences are the same, the rowOverColumnPrecedence attribute in the useTransformationGrid tag specifies the row or column precedence.
For example, if you define a calculation for row(1) and column(1), the cell at the intersection row(1) and column(1) contains 2 calculations. If you set the precedence of the column to True then the column calculation is evaluated. If you set both the column and row precedence to True, the precedence specified in the useTransformationGrid is used to determine which calculation is evaluated.
Using the Cell Object The transformation grid cell object is exposed in the scripting framework. The following members are made available on that cell object for the lifetime of the script evaluation:
● grid property as the containing grid of the type WAATransformationGrid.
● pageIndex property as an int for the cell page index.
● rowIndex property as an int for the cell row index.
● columnIndex property as an int for the cell column index.
● All methods on the cell object, which are defined in the Javadoc for the WAATransformationGrid.WAAJSCell class
Cell and Range References A list reference identifies a one or more cell values in a transformation grid. The following syntax is used:
● A list reference is a series of range or cell references:
● A range reference contains a starting and ending cell reference:
● A value reference is either a cell reference or an explicit value:
● A number reference is either a cell reference or an explicit number:
● A string reference is either a cell reference or an explicit string.
● A cell reference contains edge specifiers with tuple references, where the current tuple for each edge is the default:
142 Using Calculations and Subtotals
● A tuple reference can be a base specifier, base specifier with offset, offset from the default base specifier of current, or an absolute:
● A tuple number is 0 or any valid positive integer:
● A number is any valid double:
● A string is 0 or more characters:
Reference Examples To insert a calculation in a specific row, and all pages and columns, refer to the row and omit the column and page references:
To insert a calculation in all cells, reference the cell and omit the row, column, and page specification:
The following figure shows the first, last, and body cells for rows and columns. Indices change based on the insertion of pages, rows, or columns. For example, the figure shows rows 0-4. If you insert row 1, then the original rows 1 through 4 are pushed down and are assigned the new indices of 2 through 5. You can display the grid after all the calculations are inserted. The calculations are executed taking the inserted pages, rows, and columns into account.
Figure 41 Transformation Grid Indices
Cell and Range References 143 144 Using Calculations and Subtotals Chapter Using and Scheduling Tasks and 11 Alerts
This chapter describes how to use tags to set-up a task definition builder and schedule definition builder. A task definition builder and schedule definition builder enable a user to build tasks and schedule them, respectively. You use tasks and alerts for the following purposes:
● Send an e-mail with a report attached.
● Update a database with a message.
● Update a log file.
● Connect to a URL (which is a server) and retrieve information or launch a program.
● Create report, which may be an OLAP view, a relational query or a universal result set report.
● Create a data source, which may be a file.
● Utilize metadata or properties from a database.
● Perform an alert based on a condition.
● Test a condition using ECMA script.
You group tasks into a task definition to perform functions, such as sending e-mail, generating a report, or performing an action based on a condition. Each task definitions has an ID, name, description, and knowledge of an ancestor, parent, and nested tasks. A typical task definition consists of a hierarchical tree of tasks, where tasks are either nested or siblings. Typically, you use JSP tags to create a task and schedule definition builder. A user then accesses it to build and schedule tasks.
Using Tags to Create a Definition Builder A task definition builder and schedule definition builder enable a user to build tasks and schedule them, respectively. The Administration Tools provides a task and schedule definition builder; you can also use JSP tags to create one.
Initializing the Default Tasks A task is a unique class derived from taskClass.java that performs a function. Default tasks are defined in the following class files and automatically loaded into the ATF repository:
Using and Scheduling Tasks and Alerts 145 ● com.hyperion.atf.services.task.AtfTaskProvider.class
● com.hyperion.waa.utility.core.WAATaskProvider.class
● com.hyperion.waa.utility.olap.WAATaskProvider.class
● com.hyperion.waa.utility.relational.WAATaskProvider.class
The WAATaskRegistry.xml loads the default task providers automatically when the ATF repository starts up. You must have the WAATaskRegistry.xml file registered in your web.xml as follows:
You also need to register the WAATaskRegistry.xml file with the WAAApplicationServicesServlet, as follows, so it is loaded when the ATF repository is initially loaded:
Note: You can programmatically define a custom task and add it to the registry using the existing task structure and ATF repository.
Creating a Task Definition Builder Page You create a task definition builder to build, run and schedule tasks.
Note: Where localhost and 8080 are the machine and port of the deployed test application.
The following code is taken from the TSTTaskDefinitionBuilderPage.jsp. <%@ page contentType="text/html;charset=UTF-8" %> <%@ page import="com.hyperion.atf.services.task.*, com.hyperion.waa.utility.core.*, java.sql.*, javax.sql.*, java.util.*, javax.mail.*, javax.mail.internet.*, java.io.*, javax.activation.*" %>
146 Using and Scheduling Tasks and Alerts <%@ page errorPage="/jsp/waa/web/core/WAAErrorPageDesign.jsp" %> <%@ taglib uri="/WAAApplicationDesign.tld" prefix="waaapplicationdesign" %> <%@ taglib uri="/WAACoreDesign.tld" prefix="waacoredesign" %> <%@ taglib uri="/WAAOlapDesign.tld" prefix="waaolapdesign" %> <%@ taglib uri="/WAARelationalDesign.tld" prefix="waarelationaldesign" %> <%! public static final StringFORM_NAME = "Form"; %>
|
Back to ">Test Application
Using Tags to Create a Definition Builder 147 The following figure shows the task defintion builder with a simple mail task.
Figure 42 Task Definition Builder
Sample JSPs The following table shows a sample JSP installed with the hab-samples and hab-test applications. Table 27 Sample Task Tags
JSP Description
Application: hab-test This JSPs demonstrates how to build a task definition Link: Core > Task Definition Builder builder. JSP: TSTTaskDefinitionBuilderPage.jsp
Application: hab-test This JSP demonstrate execution of a static task. Link: Core > Execute Static Task Definition JSP:TSTExecuteStaticTaskDefinitio nPage.jsp
Application: hab-test This JSP demonstrate execution of a dynamic task. Link: Core > Execute Dynamic Task Definition JSP:TSTExecuteDynamicTaskDefiniti onPage.jsp
148 Using and Scheduling Tasks and Alerts Creating a Scheduled Task Definition Builder Page You create a task scheduler to schedule a task. The following code is taken from the TSTScheduledTaskDefinitionBuilderPage.jsp: <%@ page contentType="text/html;charset=UTF-8" %> <%@ page import="com.hyperion.atf.services.task.*, com.hyperion.waa.utility.core.*, java.sql.*, javax.sql.*, java.util.*, javax.mail.*, javax.mail.internet.*, java.io.*, javax.activation.*" %> <%@ page errorPage="/jsp/waa/web/core/WAAErrorPageDesign.jsp" %> <%@ taglib uri="/WAAApplicationDesign.tld" prefix="waaapplicationdesign" %> <%@ taglib uri="/WAACoreDesign.tld" prefix="waacoredesign" %> <%@ taglib uri="/WAAOlapDesign.tld" prefix="waaolapdesign" %> <%@ taglib uri="/WAARelationalDesign.tld" prefix="waarelationaldesign" %> <%! public static final StringFORM_NAME = "Form"; %>
|
Using Tags to Create a Definition Builder 149 Back to ">Test Application
The following figure shows the scheduled task defintion builder with a simple mail task:
Figure 43 Scheduled Task Definition Builder
Examples This section shows sample JSPs installed with the hab-samples and hab-test applications:
Sample JSPs Table 28 Sample Task Tags
JSP Description
Application: hab-test This JSP demonstrates how to build a scheduled task Link: Core > Scheduled Task Definition Builder definition builder. JSP: TSTScheduledTaskDefinitionBuilde rPage.jsp
150 Using and Scheduling Tasks and Alerts Chapter Using Analyzer Tags 12
This chapter describes how to use Analyzer and Application Builder together in the following ways:
● Viewing Analyzer reports within a Application Builder application
● Setting up Analyzer with Dreamweaver Integration. After you do this, you can use the Dreamweaver integration to modify Analyzer HTML Web client default reports. You can also add Application Builder components to Analyzer HTML Web client default reports.
Note: Application Builder Release 9.x is compatible with versions of Hyperion Analyzer prior to and including Release 7.2. It is not compatible with Hyperion® System™ 9 BI+ Web Analysis™.
Note: You cannot access a Hyperion report from Analyzer using the Application Builder tags.
Using Tags With Application Builder You use the Analyzer Reports tags defined in the WAAAnalyzerDesign.tld file and documented in the “Analyzer Reports Tag Library” chapter of the Hyperion System 9 BI+ Application Builder J2EE JSP Tag Library Technical Reference Guide. The following figure shows the Analyzer integration:
Figure 44 Integration with Analyzer
Hy perion HTML WAAReport Bean Hyperion Web Client WAAConnection Analyzer WAAReportTreeBean
Hyperion Application Builder
Relational OLAP RDBMS Database
Using Analyzer Tags 151 Analyzer and Application Builder communicate in the following ways:
● The WAAReportTreeBean sends a request to the HTML Web client or a specific report
● The WAAReportBean receives HTML code from the HTML Web client and renders the HTML into an Analyzer report.
● The WAAConnection facilitates communication between the HTML Web client and the WAA beans.
Before You Begin You need the following software and information to use the Analyzertags:
● Analyzermust be installed and running on a computer to which you have access.
● You must be logged on to the Analyzer server with a valid Analyzer user ID and password.
● an Analyzer report must exist on the Analyzer server. For more information, see the Analyzerdocumentation.
Note: The WAAAnalyzerDesign tags communicate through the Analyzer HTMLViewer servlet within the HTML Web client.
● The HYSL_HAB_HYA.mxp extension must be installed in Dreamweaver before you can drag the Analyzer tags to a JSP.
For example, you can connect to Analyzer, run an Analyzer report, then close the connection using the tags defined in the WAAAnalyzerDesign.tld file. You can integrate these tags into Dreamweaver using the HYSL_HYA.mxp extension. Following is a typical tag usage for running an Analyzer report in Application Builder:
● useConnection - Specify the Analyzer user ID and password and the URL of the Analyzer servlet that runs the HTML client. A new Analyzer session is created from which you can run and view reports.
Note: Local host is relative to the Application Builder server and port number.
● useReportTreeBean - Generate a tree of the Analyzer reports for a given Analyzer connection.
● useReportBean - Specify the Analyzer report group and report name. The request for the report is sent to the Analyzer URL action system, which returns the report’s HTML code. The WAA code formats the report’s HTML code and displays it. The connection to the Analyzer report is dynamic. For example, you can use the Analyzer report’s drill-up and drill-down functions.
Note: You need a separate connection for each Analyzer report that you view.
152 Using Analyzer Tags ● closeConnection - Specify the connection id created using the useConnection tag.
Figure 17 shows an Analyzer report embedded in a Application Builder application. The useReportBean tag attributes are shown pointing to the elements of the report that they display.
Figure 45 Analyzer Report
AllowChartType AllowDrill AllowInfo Page Show Page Panel
Show Info Panel
Sample JSPs The following table shows a sample JSP installed with the hab-samples application. Table 29 Sample JSP for Analyzer Tags
JSP Description
Application: hab-samples Shows how to run an Analyzer report using Application Link: Sample Pages > Run an Analyzer Report Builder tags. JSP: ReportTreeConnectedToReport.jsp
Using Tags With Application Builder 153 Using Tags With Analyzer The Application Builder Dreamweaver integration with Analyzer enables you to build an Analyzer HTML Web client default report using the Analyzer HTML Web client tags within Dreamweaver. It also enables you to use Application Builder tags in your Analyzer HTML Web client default report.
Note: When you build an Analyzer report, you must use the predefined Analyzer JSPs.
You need the following configuration and information to use the Application Builder Dreamweaver integration with Analyzer:
● Analyzer must be installed and running on a computer to which you have access.
● You must be logged into the Analyzer server with a valid Analyzer user ID and password.
● You must install Dreamweaver MX.
● The HYSL_HYA.mxp extension must be installed in Dreamweaver before you can drag the Analyzer tags to a JSP. After you install the extension manager, shut down Analyzer and restart it.
The procedures in this section use the following nomenclature:
● Analyzer_Dir, where Analyzer_Dir is the directory of the deployed Analyzer Web application. With all default settings, this is c:\hyperion\analyzer\appserver\webapps\Analyzer6_Server on Windows.
● Hab_Dir, where Hab_Dir is a directory containing an expanded Application Builder.war file. This example uses hab-blank, which contains the WAA architecture without prebuilt applications.
Integration editing is done by way of the Application Builder Dreamweaver MX integration. (Any HTML editor may be used.)
Using Analyzer with Dreamweaver Integration The Application Builder Dreamweaver integration with Analyzer enables you to build an Analyzer HTML Web client default report using the Analyzer HTML Web client tags within Dreamweaver.
Note: Ensure that you have the HYSL_HYA.mxp extension file installed in Dreamweaver.
➤ To integrate Application Builder Dreamweaver with Analyzer: 1 Back up Analyzer_Dir. 2 Copy the following directories from Hab_Dir to Analyzer_Dir:
154 Using Analyzer Tags ● images
● applet
● html
● jsp 3 Copy the following directories from Hab_Dir\web-inf to Analyzer_Dir\web-inf without overwriting any Analyzer_Dir files:
● classes
Note: The Application Builder configuration files are in this directory.
● tlds
● dtds
Note: Do not overwrite the ADM properties files.
4 Rename the Hab_Dir\web-inf\lib\Acme.jar file to Acme-HAB.jar.
5 Copy the Hab_Dir\web-inf\lib directory into the Analyzer_Dir\web-inf\lib directory without overwriting any Analyzer_Dir files. This includes the following files:
● Acme.jar
Tip: To avoid overwriting the Analyzer version, rename this file as Acme-hab.jar.
● F1J8Swing.jar
● HyperionADMWidgets.jar
● Sandstone.jar
● WAAXsl.jar
● commons-*
Tip: This replaces two.jar files shipped with Analyzer
● css-2.0.5.49.jar
● hyperion-atf.jar
● jakarta-*
● jaxp-api.jar
● jcrontab.jar
● jdom.jar
● jtrove-0.1.5.jar
Using Tags With Analyzer 155 ● log4j.jar
● waa-common.jar
● webreporting.jar
● xalan.jar
● xerces.jar
● xercesImpl.jar 6 Copy the following ADM .jar files into Analyzer_Dir\web-inf\lib, replacing the versions that are already there:
● Ap.jar
● Adm.jar 7 Copy the following tags and their contents from Hab_Dir\web-inf\web.xml into the appropriate place in Analyzer_Dir\web-inf\web.xml:
●
●
●
●
Note: There may be more than one instance of each tag, but all instances of a tag are grouped together.
The Analyzer.xml file contains comments from the example web.xml provided by Apache Tomcat. It is easy to edit a comment mistakenly rather than add a tag. View the finished web.xml in an XML editor or Web browser to ensure that the tags are correctly copied.
8 Comment out the
9 If you are using a custom Application Builder application, copy the
Using Tags in an Analyzer JSP The Analyzer HTML client uses a set of templates that are stored by default in the Analyzer_Dir\templates directory. You can use Application Builder tags on the report.jsp only. Application Builder can handle all report.jsp functionality except for a URL component.
156 Using Analyzer Tags Note: Ensure that you have the HYSL_HAB.mxp extension file installed in Dreamweaver.
There is a separate templates_xx directory, where xx matches the language code for each supported non-English locale.
➤ To use Application Builder tags in an Analyzer JSP: 1 Start Analyzer and log on. 2 Back up the Analyzer\templates\report.jsp file to save it in its original format. 3 Edit the Analyzer_Dir\templates\report.jsp file in DreamweaverMX.
Note: This is the JSP file that renders an Analyzer report.
4 From the Dreamweaver menu, select Commands > Hab Tools > Insert HAB Page Template. 5 Comment out the
6 Replace the
Note: The
7 Go to the bottom of the JSP, add Application Builder tags, and save the page.
Note: F12 preview does not work. Analyzer tags store their state in the servlet session, so they cannot be viewed simply by running the JSP file.
8 Navigate to the page in Analyzer to run a report and preview your output. 9 After you finish, restore the report.jsp with the file that you backed up in step 2.
Using Tags With Analyzer 157 158 Using Analyzer Tags Chapter Using Reports Tags 13
This chapter describes how to use Hyperion Reports and Application Builder together by viewing Reports reports within a Application Builder application. You use the Reports tags defined in the WAAReportsDesign.tld file and documented in the “Reports Tag Library” chapter of the Hyperion System 9 BI+ Application Builder J2EE JSP Technical Reference Guide. The following figure shows the Reports integration.
Note: Application Builder Release 9.x is compatible with versions of Hyperion Reports prior to and including Release 7.2. It is not compatible with Hyperion® System™ 9 BI+ Financial Reporting™.
Figure 46 Integration with Reports
Hyperio n WAAReport Bean Hyperion Web WAAConnection Client Reports WAAReportsSelectorBean Hyperion Application Builder
Relational OLAP RDBMS Database
Reports and Application Builder communicate in the following ways:
● The WAAReportsSelectorBean sends a request to the Web client for a specific report.
● The WAAReportBean receives HTML code from the Web client and renders the HTML into a Reports report.
● The WAAConnection facilitates communication between the Web client and the WAA beans.
Before You Begin You need the following software and information to use the Reports tags:
Using Reports Tags 159 ● Reports must be installed and running on a computer to which you have access.
● You must be logged on to the Reports server with a valid Reports user ID and password.
● A Reports report must exist on the Reports server. For more information, see the Reports documentation.
Note: The WAAReportsDesign tags communicate through Reports Web client.
For example, you can connect to Reports, run a Reports report, then close the connection using the tags defined in the WAAReportsDesign.tld file. You can integrate these tags into Dreamweaver using the HYSL_HAB.mxp extension. Following is a typical tag usage for running a Reports report in Application Builder:
● useConnection - Specify the Reports user ID and password and the URL of the Analyzer servlet that runs the HTML client. A new Analyzer session is created from which you can run and view reports.
Note: Local host is relative to the Application Builder server and port number.
● useReportBean - Specify the Reports report name, type and allowPOV attributes. The request for the report is sent to Reports, which returns HTML code. The WAAReportBean formats the report’s HTML code and displays it. The connection to the report is dynamic. For example, you can use the report’s drill-up and drill-down functions.
● useReportSelectorBean - This tags uses a connection to Reports to display a list of reports stored in the repository.
● closeConnection - Specify the connection id created using the useConnection tag.
The following figure shows a Reports control that lists all reports stored in the repository. A user can select a report to display. The useReportSelectorBean communicates to the useReportBean using the connectBeans tag.
160 Using Reports Tags Figure 47 Reports useReportsSelectorBean
The following figure shows a Reports report embedded in a Application Builder application. The useReportBean tag attributes are shown pointing to the elements of the report that they display. If the report type is Snapshot, the data and controls are static; if the report type is Report, the data and controls are dynamic.
Figure 48 Reports Report
AllowPOV
Before You Begin 161 Sample JSPs The following table shows a sample JSP that is installed with the hab-samples and hab-test applications: Table 30 Sample JSP for Reports Tags
JSP Description
Application: hab-samples Shows how to run a Reports report using Application Builder Link: Sample Pages > Common Functions > Run a tags. Reports Report JSP: ReportSelectorConnectedToReport. jsp
162 Using Reports Tags Chapter Best Practices 14
This chapter describes best practices for building Application Builder applications.
Work in Stages Create a JSP in stages and test it as you are writing. For example, create a view or a query, create an HTML table to display it with iterator tags, then access cell specific information such as annotations.
Utilize Debugging Messages You can set debugging levels to see messages from the JSP code. The useApplicationSession tag and useApplicationContext tag use the attribute messageLogLevel which you can set to one of the following levels:
● None - No messages are logged.
● All - All messages are logged.
● Debug - Only Debug, Information, Warning, and Fatal messages are logged.
● Information - Only Information, Warning, Error, and Fatal messages are logged.
● Warning - Only Warning, Error, and Fatal messages are logged.
● Error - Only Fatal and Error messages are logged.
● Fatal - Only Fatal messages are logged.
Monitor Application Information Use the hab-test application to monitor application information:
● To see a tag’s usage and access of application objects and properties, use the waa/test/TSTApplicationInfoPage.jsp.
● To see a tag’s usage and access of application objects and properties for administrative functionality, use the waa/test/TSTApplicationAdministratorPage.jsp.
Best Practices 163 ● To see the current application’s resources such as loaded classes, classpath, path, and session information, use the /waa/test/core/TSTApplicationServerEnvironmentPage.jsp.
➤ To access the hab-test application: 1 If necessary, start the relational database server and OLAP server. 2 Log on to the hab-test application by typing the following URL in your Web browser: http://hostname:port/hab-test/
where hostname:port is the computer name or IP address and port of the deployed hab-test application. If you installed the application server on your machine, the hostname is localhost. If you are using Apache Tomcat, the port is 8080.
Note: The username and password are analyst and password, respectively.
3 Click the TSTWelcomePage.jsp
Invalidate Unneeded Objects After you are done using an object either invalidate it or close it so it does not continue to use resources.
➤ To invalidate an object, take one of the following actions:
● Use the
● Use the corresponding close tag. For example, use the closeSchema tag when you are done using the useSchema object.
Garbage Collection If not set properly, garbage collection can affect performance. The heap size controls the frequency at which garbage collection is invoked. If your heap size is too small, the garbage collection is too frequent. If the heap size is too big, the garbage collection is less frequent, but it may take a very long time.
Utilize Nesting Use nesting to your advantage by writing mini-JSPs that perform specific functions, such as iterating a grid and displaying the results. Then reuse the JSP using the JSP:include statement.
Note: The nesting is applied across included JSPs.
164 Best Practices Utilize Object Scopes
● Scopes must match between ancestor tags and their nested tags. For example, if a cube scope is request and a nested cubeView scope is session, then the cube object is invalidated when the request terminates; but the cubeView will still need it within the session.
● If a needed ancestor tag is out of the scope of the dependent tag, it cannot be accessed, and an error occurs.
Following is a list of the tag scopes:
● System - Creates a tag id that can exist on multiple applications in the same Virtual Machine. For example, if you set the useDataSourcePoolManager tag id = x, scope=”System”, and app1 and app2 are in the same VM, they can both access the x object.
● Application - Creates a tag id that exists throughout the lifetime of the application.
● Session - Creates a tag id that exists for the duration of the JSP session. You use session scope with data object tags and XXXBean tags. For example, with session scope, you can create tagA on JSP1 and tagB on JSP2 and link them together on JSP 3 using their tag ids.
● RootServlet - Creates a tag id that exists on multiple JSPs using the
Note: The root servlet's class name is added as a prefix to the tag id, making the tag id unique across multiple JSPs.
● Servlet - Creates a unique tag id that exists only on the JSP where it is created and has session persistence. When you leave the page, the object is retained and persists for the session. For example, the useSchema tag id with Servlet scope exists on the JSP where it is created and has session persistence.
Note: The servlet's class name is added as a prefix to the tag id, making the tag id unique across multiple JSPs. For example, if the tag id XX is declared on JSP1 and JSP2, two unique ids are created: JSP1:XX and JSP2:XX.
● Request - Creates a tag id that exists throughout the lifetime of the request.
● Page - Creates a tag id that exists only on the JSP where it is created. When you leave the page the object is destroyed and when you return to the page a new instance of the object is created.
● Nested - Creates a tag id that exists for the duration of the tag. For example, the useSchema tag id with nested scope exists between the opening
Utilize Object Scopes 165 Connecting to OLAP This section describes how license key connections are utilized with ADM pooling. The examples in this section show Essbase Analytic Services products; however you could also use a star schema data source, Hyperion Financial Management data source, or Hyperion Planning data source instead.
ADM Pooling and Licensing You can connect to OLAP directly or use ADM pooling as the following figure illustrates:
Figure 49 Connecting to OLAP
You can optionally use Essbase Deployment Services (EDS) to connect to Essbase Analytic Services.
Note: EDS also has pooling functionality that is totally unrelated to ADM pooling. For more information, see the EDS documentation.
Connecting Directly You can use a direct connection to Essbase Analytic Services, as the following figure illustrates:
166 Best Practices Figure 50 Connecting Directly to OLAP
A license key defines the maximum number of connections to a data source that are simultaneously enabled. If you are connecting to a data source directly, you can use up to the maximum number. The schema tags create connections and destroy them:
● useSchema - Use this tag to create a direct connection to OLAP. The connection remains until you execute the closeSchema tag.
● closeSchema - Use this tag to drop the connection created by the corresponding useSchema tag.
● The cubeView tags use a connection, set up by the useSchema tag, to execute data queries.
Connecting With ADM Pooling The following table defines the XML tags that configure an ADM pool. These options are set in the data source XML file; for an example, see the WAADataSources.xml file. For detailed information on how to set up ADM pooling, see the Hyperion System 9 BI+Application Builder J2EE Administrator’s Guide. Table 31 ADM pool Configuration
XML Tag Description
Connecting to OLAP 167 Table 31 ADM pool Configuration (Continued)
XML Tag Description
Note: The ReleaseDQConnection tag is not supported by ADM Essbase Native driver. If this property is set to True, the entire result set is cached immediately after the query has completed and the pooled connection is released. The advantage to setting this tag to True is that the pooled connection is always released. The disadvantages are as follows:
● The entire data query is executed, possibly creating a time delay.
● Memory is needed to cache the entire result set.
Tip: If you set this tag to True, you still need to use the closeCubeView() tag to release the memory containing the query results.
A license key defines the maximum number of connections to a data source. If you are connecting to data source directly, you can use up to the maximum number. If you are using connection pooling, the connection pools can contain connections up to the maximum number.
Note: You can have an unlimited number of cubeView tags using the pooled connections. However, you must wait longer for a free connection as the number of cubeView tags goes up, eventually leading to time-out errors.
You use schema tags and cubeView tags to create/destroy connections and utilize/release connections, respectively. The number of connections created are bounded by the
● Ratio set to 1/2 - This creates one connection for every two useSchema tags.
● Max set to 8 - The maximum number of connections is 8. Set the max <= number of allowable connections defined by the license keys.
● Min set to 1 - The minimum number of connections is 1. One connection is always open.
Note: If you define more than one pool, you must incorporate this into your pool design. For example, if you define three pools for a data source and the maximum number of connections is 9; set the max for each pool <= number 3.
168 Best Practices In the following diagram there are 4 useSchema tags, which create 2 connections.
Figure 51 Connecting with ADM Pooling
The following schema tags create connections:
● useSchema - Use this tag to create a pooled connection to OLAP. The pooled connection remains until you execute the closeSchema tag. Then, depending on your pool settings, the connection may be destroyed.
● closeSchema - Use this tag to possibly destroy the connection created by the corresponding useSchema tag. In Figure 51 if the Min is set to 2, the closeSchema does not destroy a connection.
The cubeView tags utilize connections to execute data queries:
● useCubeView - Use this tag to execute a data query, which utilizes one connection and memory to store a partial result set.
Note: If you have the ReleaseDQConnection tag set to True in the ADM pool, the entire result set is stored in memory and the pooled connection is released. To utilize the ReleaseDQConnection tag functionality, you must use the ADM EDS driver.
● closeCubeView - Use this tag to release one connection back to the pool and to release memory used to store the result set.
Example 1 The following example uses ADM pooling with the ReleaseDQConnection tag set to True, which drops a connection after the useCubeView tag is executed: useSchema () useCubeView ()
<---At this point the connection is dropped; however memory is still held. You must use the closeCubeView to release the memory.--> closeCubeView () closeSchema ()
Connecting to OLAP 169 Note: The advantage to setting the ReleaseDQConnection tag to True is that the connection is always released. The disadvantages are that the entire data query is executed, possibly creating a time delay, and memory is needed to cache the entire result set.
Example 2 The following example uses ADM pooling with the ReleaseDQConnection set to False, which drops a connection after the useCubeView tag is executed: useSchema () useCubeView ()
<---At this point the connection is still utilized and memory for the partial data query result set is still held. You must use the closeCubeView to release the memory and connection.--> closeCubeView () closeSchema ()
170 Best Practices Chapter Using Quick Builder Integration 15 Files
This chapter describes how to generate the Quick Builder integration files that are needed to integrate Application Builder tags, wizards, menu items, icons, and commands into Dreamweaver MX. The files and utilities are as follows:
● Extended Tag Information Files - The XML files that define tag structure at a high level. This file, WAAExtInfoTags.xml, can be reused to integrate tags into other IDEs. This file is verified against the WAATagExtInfo_7_0.dtd file located in the WAADoclet.jar file.
● Dreamweaver Specific Documents - The XML files that define Dreamweaver specific information, such as wizards, menus, and commands. This XML file is for Dreamweaver MX only, because it uses Dreamweaver-specific configuration information. This file, WAADWMXConfig.xml, is verified against the hab_dw_config.dtd located in the WAADreamweaverMX.jar file.
● Java Ant - The Java Ant utility that combines the XML files and the property files into the set of localized HTM, MXI, GIF, and XML files. There is one set of files generated for each supported language. The Ant utility is located in
● Set of generated localized files:
❍ Dreamweaver Dialog Files - The HTML files that render the dialog boxes for components, wizards, and commands
❍ Dreamweaver Interface Files - The MXI files that define the interfaces for the entire extension. For example, they specify the location of each file. At runtime, the files are loaded to create menus, icons, and so on.
❍ Image files - The GIF files that define the icons used in Dreamweaver
❍ Dreamweaver Custom Tag Files - The XML files that define how to render an icon for a component in design view
● The Macromedia Extension Manager - The utility that packages the set of localized files into an .mxp file. This utility is available in the Dreamweaver Extension Manager. Select File > Package Extension, then select the .mxi file to package.
● Extension Files - The Dreamweaver .mxp extension file that you install, with the Dreamweaver Extension Manager, to use the components, wizards, and menus in Dreamweaver
The files and utilities shown in the following figure are used to generate Quick Builder Integration files:
Using Quick Builder Integration Files 171 Figure 52 Generating Quick Builder Integration Files for Dreamweaver
W AATagExtInfo_7_0 hab_dw_config.dtd .d td Label Property F ile s
Dream weaver- Extended Tag specific In fo rm a tio n F ile s docum ents W A A E x tIn fo T a g s .x m l W AADW MXConfig Help Property .x m l F ile s
System Property F ile s
Java A nt BuildDW M X
Localized Localized Localized Im a g e file s Dream w eaver Dream w eaver Dream w eaver (*.g if) dialog files in te rfa c e file s c u s to m ta g file s (*.h tm ) (*.m j) (*.x m l)
M acrom edia Extension M anager
HAB Dreamweaver Extension (HYSL_HAB.mxp)
Modifying Components The components that insert tags are defined in the file WAAExtInfoTags.xml, which is verified against the WAATagExtInfo_7_0.dtd file located in the WAADoclet.jar file. You can modify the components defined in the XML file in the following ways:
● Changing icons - The reference to the icons used to represent a tag or component is defined in the XML files; the icons themselves are stored separately. These can be changed by either changing the reference or overwriting the icon (.gif) file.
● Modifying or creating a new Java class - These changes require Java programming skills. For more information, see “Customizing Tags and Beans” on page 177.
● Removing components - You can remove components by commenting out the component definition in the XML file.
After a component has been changed, you must regenerate the Quick Builder integration files, as shown in Figure 52 on page 172.
172 Using Quick Builder Integration Files Modifying Quick Builder Menus The menus used by Quick Builder are defined in the file WAAExtInfoTags.xml, which is verified the WAATagExtInfo_7_0.dtd file located in the WAADoclet.jar file. The DTD file is fully commented to aid modification of the menus.
Note: This section describes how Quick Builder integrates with the Dreamweaver menu API in a general way. To understand how the menu system works, it is strongly recommended that you refer to the Dreamweaver help documentation for modifying menus.
The Menus section of the WAADwmxConfig.xml file has the following structure: Menus - the heading of the section menu-insert - directive to insert the menu menu - start of a menu section containing other menu items name - menu section name id - menu section id separator - separator to use between menus id - separator id menuitem - the menu item name - name of the menu id - id of the menu menufile - .htm file to use when inserting the menu item
The WAADwmxConfig.xml file mimics the Dreamweaver menus.xml file syntax. Quick Builder uses the file HYSL_HAB_Template.htm as the menu command file, and implements the Dreamweaver Menu API method receiveArguments() to process arguments passed from a menu item. You can change a menu in one of the following ways:
● Remove a menu item - Comment it out in the DWConfig*.xml file.
● Modify the behavior of a menu item - Modify the .htm file that implements the Dreamweaver commands for that menu item.
● Add a new menu item to a Quick Builder menu - You must create an .htm file that implements the appropriate functionality against the Dreamweaver Menu API. After this is created, insert the menu item into the menu by making an entry in the DWConfig.xml file using the syntax described previously.
After a menu has been modified, you must regenerate the Quick Builder files as shown in Figure 52 on page 172.
Using Quick Builder Integration Files 173 Modifying Quick Builder Wizards The wizards used by Quick Builder are located in the \wizards directory. Each wizard uses a separate XML and Javascript file. The XML files are verified against WAATagExtInfo_7_0.dtd file located in the WAADoclet.jar file. The following table lists the wizards and their descriptions: Table i: Wizard Files
Filename Description
OlapIteratorWizard.xml Defines a wizard to iterate an OLAP cube and display the results in an HTML OlapIteratorWizard.js table.
GridChartWizard.xml Defines a wizard to insert a grid and chart, enabling you to display data from GridChartWizard.js OLAP data sources.
QueryBuilderWizard.xml Defines a wizard to insert a query builder, enabling you to build queries QueryBuilderWizard.js against relational data sources.
QueryListWizard.xml Defines a wizard to insert a list of relational queries stored in the repository. QueryListWizard.js
QueryResultListWizard. Defines a wizard to insert a table displaying the results of a relational query. xml QueryResultListWizard. js
VBGCWizard.xml Defines a wizard to insert a view builder, a grid, and a chart, enabling you to VBGCWizard.js create a view against an OLAP data source and display the results in a grid and a chart.
ViewBuilderWizard.xml Defines a wizard to insert a view builder, enabling you to create a view ViewBuilderWizard.js against an OLAP data source.
ViewListWizard.xml Defines a wizard to insert a list of OLAP data source views stored in the ViewListWizard.js repository.
After a wizard has been modified, you must regenerate the resource files and the IDE components using the binaries. For more information, see Figure 52 on page 172.
Using the Resource Files The text for each tag and its attributes are located in a string property file and referenced by a tag. For example, the description for a label is defined by the HYAExtInfoLabels_en.properties file. The text that is displayed on Quick Builder’s dialogs and help files can be modified by editing the string property files, without changing Quick Builder functionality. The default values for a component is defined in the component’s XML file, which you can edit. The text for all strings are defined in the following files:
174 Using Quick Builder Integration Files ● WAAExtInfoLabels_language.properties
● WAADwmx_language.properties
● WAAExtInfoHelp_languageproperties These Analyzer tags are used within Analyzer :
● HYAExtInfoLabels_language.properties
● HYADwmx_language.properties
● HYAAExtInfoHelp_language.properties
where language is one of the following strings:
● en for English
● fr for French
● de for German
● jp for Japanese
● zh_CN for simplified Chinese
● zh_TW for traditional Chinese
After a modification is made to the resource file, you must regenerate the Quick Builder files as shown in Figure 52 on page 172.
Creating Quick Builder Integration Files This example describes the steps needed to create Quick Builder integration files, using the English resource file as an example.
Note: The hab\tools\ide\data\build_hya.bat file automates steps 2 through 5 in this example.
➤ To create Quick Builder integration files: 1 Navigate to the WAA\Project directory and run Ant, as follows: antbuild BuildDWMX
2 To create the Macromedia Extension Package (.mxp) file, run the Macromedia Extension Manager and select File > Package Extension, selecting the .mxi file to package. This produces a HYSL_HAB*.mxp file, which can be distributed to users. 3 To install the HYSL_HAB.mxp file into Dreamweaver, run the Macromedia Extension Manager and select File > Install Extension, selecting the .mxp file to install. 4 Restart Dreamweaver.
Creating Quick Builder Integration Files 175 176 Using Quick Builder Integration Files Chapter Customizing Tags and Beans 16
You can customize tags and beans in one of the following ways:
● “Changing the JSP” on page 177
● “Changing the Behavior of a Bean” on page 177
● “Adding or Removing Functionality of a Bean” on page 178
Changing the JSP All tags that generate HTML code have a contentUri attribute that specifies the JSP that renders the tag. You create and specify a new JSP to render the tag. Use the contentUri attribute in one of the following ways:
● Leave it blank to use the default JSP. The default JSP is located in your the application deployment
Note: The JSP name corresponds to the tag class name with the words Use, Bean, Design, and Tag deleted. For example, WAAReportTree.jsp corresponds to WAAReportTreeBeanTag.
● Create a new JSP to render the tag. Specify the JSP location and name relative to the application deployment
Changing the Behavior of a Bean All tags that generate HTML code have a className attribute that specifies the implementing bean. You can create and specify a new bean for a tag. Hyperion recommends that you create a new bean that extends the one you want to change. Do not make changes to the existing bean.
➤ To change the behavior of a bean: 1 Extend the tag’s base object class and modify its behavior. 2 Set the tag’s className attribute to the name of the new bean. 3 To use the existing tag handler, ensure that the new class has the same attributes; otherwise you must write a new tag handler. For more information, see the next section.
Customizing Tags and Beans 177 Note: The classname attribute is an option on all WAABean tags. You can override the class methods for any tag containing a classname attribute by extending the original class.
Adding or Removing Functionality of a Bean To add or remove functionality of a bean or change a bean’s attributes:
4 Extend the base object class. 5 Extend the base tag handler class. 6 Add get and set methods in the object class. 7 Add get and set methods in the tag handler class. 8 Create a custom TLD, and add the new tag entry.
Note: Do not add a tag to a Application Builder .tld file.
9 To use your new tag on your JSP, create a taglib JSP directive. 10 To make your tag available in Quick Builder, add the tag information to a component XML file, add the string information to the resource file, then regenerate the Quick Builder component files creating a new .mxp file. For more information, see “Using Quick Builder Integration Files” on page 171.
When you create a new bean, it should typically extend WAAFormElementBean or one of its children. The following figure shows the base bean classes for the WAA and the classes that derive from them.
Figure 53 WAAFormElementBean Bean Class Hierarchy
WAABean
WAAFormElementBean
WAAItemListBean WAATabBean
WAAItemTreeBean
The tag handler class for the bean should typically extend WAAUseFormElementBeanDesignTag or one of its children. The following figure shows the class diagrams for the classes (The class TagSupport is a standard JSP tag class).
178 Customizing Tags and Beans Figure 54 WAAUseFormElementBeanDesignTag Class Hierarchy
TagSupport
WAATag
WAADesignTag
WAAUseObjectDesignTag
WAAUseBeanDesignTag
WAAUseFormElementBeanDesignTag
WAAUseItemListBeanDesignTag WAAUseTabBeanDesignTag
WAAUseItemTreeBeanDesignTag
When you create the JSP to render the bean, it should call getBean from the WAACore library to get the bean and to render the HTML, as shown in the following example taken from the WAAViewBuilder.jsp: <%@ taglib uri="/WAACore.tld" prefix="waacore" %>
Adding or Removing Functionality of a Bean 179 180 Customizing Tags and Beans A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Glossary
ad hoc report An online analytical query created on-the- annotation Text data that is stored for OLAP data or fly by an end user. relational data. There are two kinds of annotations: data source and WAA. A data source annotation is assigned to ADM Client Interfaces Exposes public client interfaces, an OLAP data cell and can be either a Essbase Analytic which are available for use by the developer to access a data Services linked reporting object (LRO) or a Hyperion source. Financial Management cell text. A WAA annotation is set ADM Pooling Enables users to share a connection to a up using an XML file, and it can be assigned to an OLAP data source. ADM pooling also controls the security to cell, OLAP view, relational row, or relational view. A WAA your data source. annotation is text, a URL, or a file.
Administration Tools A set of tools to assist with the annotation repository Stores annotation information for administration of applications created with Application views and cell data. It also stores WAA drill-through Builder. mapping information for a WAA drill-through.
ALE Analytic Language for Expression. A language-based ANT A Java-based build tool, part of the Jakarta project representation used to specify queries within the Analytic from Apache. ANT users create XML-based build files that Data Model (ADM). describe their project build processes.
ALE query Retrieves member information and data cells API See also Application Programming Interface (API). from a data source using the Analytic Data Model. For applet In Java, a program that can run in a Web browser. example, you can specify both member and data cell Small programs written in languages other than Java are queries using one of the following query representations: sometimes referred to as applets. Analytic Language for Expression (ALE);Extensible Mark- up language (XML), which is an ADMML.dtd compliant application A related set of dimensions and dimension XML text; or an Expression Tree. members that are used to meet a specific set of analytical or reporting requirements. Analysis Tools Framework (ATF) repository Stores secured object information for users, groups, folders, Application Programming Interface (API) A library of views, task definitions, scheduled task definitions, and functions that you can use in a custom program. Provides permissions. It also includes a cron scheduling utility that programmatic access to an application’s data or services. schedules and runs tasks. Application Builder provides a Java API that you can use to develop client programs. Analytic Data Model (ADM) A generic, object-oriented interface that accesses different OLAP data sources. The application server A middle-tier server that is used to ADM developed by Hyperion is used in several Hyperion deploy and run Web-based application processes. products, such as Reports, Application Builder, and authentication Verification of identity as a security Hyperion Financial Management. measure. Authentication is typically based on a user ID and password. Passwords and digital signatures are forms of authentication.
Glossary 181 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z bean A reusable component, or building block, that can cube A block of data that contains three or more be combined with other components in the same or other dimensions. Multidimensional cubes are better suited for computers in a distributed network to form an complex data analyses than for relational databases application. because relational databases are limited to two dimensions. A Essbase Analytic Services database consists of miniature calc script A set of commands that define how a database cubes that make up a larger cube, or hypercube. is consolidated or aggregated. A calculation script may also contain commands that specify allocation and other cube view An object that contains the XML calculation rules separate from the consolidation process. representation of an OLAP data query and partial results of the query. cell A unit of data representing the intersection of dimensions in a multidimensional database; the data The values (monetary or non-monetary) associated intersection of a row and a column in a worksheet. with the query intersection. chart Charts are graphical representations of the data data cell query The extraction of one or more values from retrieved from a specified grid. Examples of chart types a multi-dimensional data source. For example, the are bar, line, and pie. CubeView query navigates from the metadata to the data cells. child A member that has a parent above it in the database outline. data load The process of populating an Essbase Analytic Services database with data. Loading data establishes class A template definition of the methods and variables actual values for the cells defined by the structural outline in a particular kind of object. The class defines all of the of the database. common properties of the different objects that belong to it. See also object. data query The extraction of one or more values from a multi-dimensional data source. A data query utilizes the column A vertical display of information in a grid or cube view object to return data cell values and data cell table. A column can contain data from a single field, attributes. It also enables access to member names and derived data from a calculation, or textual information. usage of a data cell object for data persistence. The terms column and field are sometimes used interchangeably. Contrast with row. data source A storage area containing data that is available to the user. A data source may be a multidimensional component A module of program functionality that has database, a relational database, or a file. defined inputs, processes, and outputs, and that, when incorporated into a larger program or system, provides data source annotation An annotation assigned to a application functionality. The basic building block of both OLAP data cell. It can be either a Essbase Analytic Services Hyperion Analytic Application Framework and the linked reporting object (LRO) or a Hyperion Financial Analytic Applications. Hyperion Analytic Application Management cell text. Framework Components include: Application-Server data source drill-through A Essbase Analytic Services or Components, Common Application Components, Essbase Integration Server (EIS) drill-through or a Custom Application Components, Snap-in Components, Hyperion Financial Management drill-through line item Client Sub-Components. Analytic Application detail (DTLID). components include: Application Component Classes and Application Components (AC Instances). data source XML file The XML file that specifies OLAP data sources, Analytic Data Model pools, and relational composite objects A pattern in the ADM design which data sources. For example, the waadatasources.xml describes the relationship between child objects and the file is the data source XML file used in the Sample parent objects that contain them. Application.
182 Glossary A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
database A collection of related information. Each unit EAR file An enterprise archive file used to distribute J2EE (record) of the database is typically organized in a fixed Web applications. Contains WAR files, JAR files, and format to make it easy to retrieve selected portions of the deployment information. data on demand. Each record is made up of one or more edge A component of an OLAP cube. Valid edges include data fields, and each data field can hold one piece of data Row, Column, Page, and Slicer. For example, if a report (known as a value). has Product and Sales on the columns and Region on the database administrator (DBA) An individual who rows, then the Row edge contains Product and Sales and administers database servers, such as Essbase Analytic the column edge contains Region. Services, and who may also design, maintain, and create Enterprise Beans Server-side components that databases. encapsulate the business logic of an application. DB2 Database 2. A IBM-proprietary relational database execute A command that runs a specified Calc script product, providing an open database environment that object against a OLAP result set. In most cases, a Calc runs on a wide variety of computing platforms. script object represents a file containing Calc script DBA See also database administrator (DBA). commands.
dimension A data category that is used to organize export A means by which a user can direct the output of business data for retrieval and preservation of values. Each data or the results of a query. dimension usually contains a hierarchy of related members expression tree query An object-based representation and grouped within it. For example, a Year dimension often manipulation of Analytic Language for Expression queries. includes members for each time period, such as quarters This is ideal for interactive query building. and months. Other common business dimensions may be measures, natural accounts, products, and markets. Extensible Markup Language (XML) A language comprised of a set of tags used to assign attributes to data drill-through The navigation from a data value in one that can be interpreted between applications based on the cube to corresponding data in another data source. For schema used. example, you can access context-sensitive transactional data. Drill-through occurs usually from the lowest point of external authentication The practice of storing user logon atomicity in a database (detail) to a next level of detail in credentials in a corporate authentication repository (such an external data source. as Lightweight Directory Access Protocol, or LDAP, directory) as an alternative to maintaining users and drill-through XML file Contains information required to groups for each Hyperion product. map from an OLAP cube’s data cell to a SQL query to retrieve detailed consolidation information. For example, fact table A container for one or more relational tables the WAADrillThrough.xml file is the drill-through XML that define the data values for each dimension intersection file used in the Sample Application. in the OLAP model. For example, if the OLAP model contains Products, Region, and Year dimensions, the fact DTD file A document type definition file. Defines the table might include data values for the number of units of type of elements, attributes, and entities in an associated Product A sold in New York in January. XML document. filter functions Filter functions filter the set of objects Dynamic Time Series A process that is used to perform returned by execution of the query. The following member dynamic period-to-date reporting for all values associated filter functions are implemented by all Analytic Data with a query. Model drivers: AllMembers, Children, Descendents, dynamic time series functions Hidden outline members Member, SystemMemberList, and TopOfHierarchy. that provide period-to-date reporting at up to eight levels, folder An object in the ATF repository used as a storage such as year-to-date and month-to-date totals. An container for other objects such as views, queries, or other administrator assigns Dynamic Time Series members to folders. members of the time-based dimension in your database outline.
Glossary 183 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z generation A layer in a hierarchical tree structure that J2EE roles Used to implement ADM pooling. A J2EE role defines member relationships in a database. For example, assigned to J2EE users in your application server. Essbase Analytic Services orders generations incrementally J2EE users J2EE application users that are assigned to from the dimension (generation 1) down to the child roles in your application server to access your Application members. Builder application. grid A report object that can contain data from external JAR file A Java archive file. A platform-independent file data sources. A grid contains a row, column, and format that permits many files to be aggregated into one (optionally) a page axis. file. guided analysis. Functionality that Java Database Connectivity (JDBC) A Java API in the links and launches reports and views J2EE framework that enables Java programs to execute from one Hyperion product to SQL statements. This allows Java programs to interact with another. Users can easily navigate any SQL-compliant database supporting JDBC. JDBC from any Application Builder report makes it possible to write a single database application that to related financial reports (rendered can run on different platforms and interact with different in Reports), unstructured content RDBMSs. (using Hyperion Central) and interactive out-of-the-box analysis Java developer A person who is competent in Java (rendered in Analyzer ). programming, specifically the Java 2.0 Standard Edition as well as the Java 2.0 Enterprise Edition. hab-blank.ear file An enterprise archive file that contains the WAA framework and minimal deployment Java Development Kit (JDK) A software development kit information to create a new web application. from JavaSoft used to produce Java programs, containing the software and tools that developers need to compile, hab-samples.ear file An enterprise archive file that debug, and run applets and applications. contains the WAA framework, deployment information, and customized code for the Sample Application. Java Naming and Directory Interface (JNDI) A standard extension to the Java platform, providing Java technology- hierarchy A set of multidimensional relationships in an enabled applications with a unified interface to multiple outline, often created in a tree formation. For example, naming and directory services in the enterprise. It enables parents, children, and generations represent a hierarchy. seamless connectivity to heterogeneous enterprise naming Hypertext Markup Language (HTML) The programming and directory services. It also enables developers to build language used to generate Web pages on the World Wide powerful and portable directory-enabled applications Web. using this industry standard. icon A graphical representation of an object or concept Java Server Pages (JSP) Technology for controlling the that invokes an application or program. desktop shortcut content and appearance of web pages through the use of servlets. instantiate To create a single occurrence of an object based on its class. Java Virtual Machine (JVM) Technology that enables the Java 2 platform to host applications on any computer or invisible tags A tag which may or may not produce operating system without rewriting or recompiling. The invisible HTML elements on a Web page, as well as JVM is also responsible for the compactness of processing server-side requests. applications targeting the Java 2 platform, and is the J2EE A framework for developing and deploying foundation of its security capabilities. enterprise applications. The J2EE platform consists of a set JavaBeans Reusable software components written in the of services, application programming interfaces (APIs), Java programming language. You write JavaBeans just as and protocols that provide the functionality for developing you write any other Java class. You can also take existing multitiered Web-based applications. components, applets, or Java classes and turn them into JavaBeans.
184 Glossary A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
JDBC Pooling Database connectivity where a JDBC data metadata A set of data that defines and describes the source is created and configured for connection pooling properties and attributes of the data stored in a database or with a relational database. The JDBC data source used by an application. Examples of metadata are efficiently creates and manages connections to a relational dimension names, member names, properties, time database. periods, and security.
JDBC-ODBC Bridge Driver A bridge is a device that Microsoft Virtual Machine (VM) A self-contained governs the flow of traffic between networks or network operating environment that facilitates the execution of Java segments and forwards packets between them. A driver is a programs on a Microsoft operating system. program that extends the operating system to support a Model-View-Controller Model (MVC) Consists of a device such as a disk or tape drive; or a program that controller servlet that dispatches requests to appropriate enables an application to use a device such as a printer. Action classes provided by the application developer, JSP join Creates a relationship between two tables based on custom tag libraries, and associated support in the matching key column values in relational databases and as controller servlet. For example, this model assists an SQL command. developers in creating interactive form-based applications, and utility classes to support XML parsing, automatic JSP developer A person that is competent in Java server population of JavaBeans properties (based on the Java page technology and has user knowledge of an OLAP or reflection APIs), and internationalization of prompts and relational data source. messages. key column In relational databases, a column or columns multidimensional database (MDDB) A method of that form a unique identifier for each row. For example, organizing, storing, and referencing data through three or EMPLOYEE_ID might be a key column. more dimensions. An individual value is the intersection leaf member A member that has no children. of a point for a set of dimensions.
log A system-maintained record of transactional data multithreading Within a single program, concurrent resulting from actions and commands. handling of multiple, separately executable sequences of log file A system-maintained file that records program instructions. transactional data resulting from actions and commands. named group An object that describes levels and For example, an application log file records user actions generations for dimensions. A level is a branch within a that are performed on that application; a client log file dimension. The levels are numbered incrementally from records client messages, actions, and errors. the leaf member (level 0) towards the root. For example, member query Enables you to navigate from the metadata in a Essbase Analytic Services Accounts dimension that to the data. A member query utilizes the MemberSelection consists of general ledger accounts, all of the detail object to return member objects and hierarchy accounts are Level 0 members. The accounts one level relationship objects. It also enables access to member higher are Level 1, their parents are Level 2, and so on. It properties. For example, the logical relationships between can happen that a parent has two or more children that are dimension/member and hierarchy/hierarchy relation are different levels. described in the MemberSelection query. So the object A program component that is related to an MemberSelection query can access a member. You can also application or database. Objects can be outlines, rules files, specify the level of the members that you want in the calculation scripts, report scripts, or data sources. They are MemberSelection query. stored within the application or database subdirectory on member selection An object that contains the XML the server or client machine. representation of an OLAP member query and the results object factory Enables developers to derive objects from of the query. Web Application Architecture classes and have the architecture instantiate them transparently. This makes application customization much easier.
Glossary 185 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Object Management Group (OMG) A consortium that permission A level of access users and groups can have for created the Common Warehouse Metadata Initiative, managing data or other users and groups. Permissions can which defines a standard model for OLAP metadata to be be granted to users and groups explicitly or by means of browsed and interchanged. filters. Administrators can also set global minimum permissions as settings for Essbase Analytic Services ODBC See Open Database Connectivity (ODBC). applications and databases, so that all users can have at OLAP See online analytical processing (OLAP). least access to data specified by the minimum permission online analytical processing (OLAP) A setting for a particular scope. The scope of a permission multidimensional, multi-user, client-server computing refers to the area of data it encompasses. The scope of a environment for users who need to analyze consolidated permission can be the system, an application, or a enterprise data. OLAP systems feature functionality such database. as drilling down, data pivoting, complex calculations, point of view (POV) A unique set of dimension members trend analyses, and modeling. that defines specific intersections of data.
Open Database Connectivity (ODBC) Standardized POV See point of view (POV). application programming interface (API) technology that query To request information from a data provider. For allows applications to access multiple third-party example, queries are used to access a relational data source. databases. query functions A method to filter retrieved information order of precedence A set of rules that determines the in a query language. Enables you to filter the set of objects order in which arithmetic operations take place in a returned by execution of an OLAP query. For example, the formula. Multiplication (*) and division (/) are performed following member query functions are implemented by all first (first tier operations), followed by addition (+) and Analytic Data Model (ADM) drivers: AllMembers, subtraction (-) (second tier operations). When there are Children, Descendents, Member, SystemMemberList, and multiple operations involving the same tier, the operations TopOfHier archy. are performed from left to right. Use of parentheses alters the normal order, with the operations contained within the queryInfo An object that contains a SQL query and innermost parenthesis performed first. partial results of the query. outline The database structure of a multidimensional Quick Builder Enables you to build applications within database, including all dimensions, members, tags, types, Macromedia > Dreamweaver > . Tags from the consolidations, and mathematical relationships. Data is Application Builder tag library are represented by icons, stored in the database according to the structure defined in menus, and wizards. For example, a Web designer can the outline. build an application graphically by dragging and dropping Dreamweaver icons onto a Java server page. page axis Enables you to set up views (pages) of selected members, to organize the data in a data entry form into Quick Builder component Reference tags, from the smaller, logical groups. Each page on the page axis can Application Builder tag library, that are displayed as icons have members selected from one dimension or from within Dreamweaver. multiple dimensions. For example, you could set up one RDBMS See relational database management system page to enter data for Radio promotions and another page (RDBMS). to enter data for Web promotions. related content. Information that is parent A member that has an aggregated branch of associated with OLAP or relational children below it. data such as a drill-through, annotation, or guided analysis link.
186 Glossary A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
relational data access component A component that can single sign-on The ability of an externally-authenticated be accessed within an application that enables you to view user to access multiple, linked Hyperion applications after the relational data that is associated with specific OLAP logging on to the first application. The user can launch members at the given cell. other applications from the first application (and from other linked Hyperion applications) without logging on relational database management system (RDBMS) A again. The user’s ID and password are already database management system for accessing data in a authenticated. relational database and storing data in the form of related tables. A RDBMS takes SQL statements entered by a user slicer The slicer edge can contain one or more or contained in an application program and creates, dimensions, but only one member can be specified for updates, or provides access to the relational database. each dimension. For example, if the member Actuals from the Scenario dimension is on the slicer then the data in the repository group A parent object to repository users, or a result set is all data that intersects the row, col, and page container for storing ATF repository users with the same members, and also has the scenario dimension set to permissions. Actuals. The data omitted from this slice is any data repository user An individual who is registered in the ATF associated with the non-selected members of the Scenario repository. dimension, for example Budget, Variance, Forecast, etc.
role Used to define group privileges, and are granted to special permission A group of predefined permissions users or groups of users in order to determine who can granted to users, groups, folders, views , or queries within perform the activities associated with the privileges. A user the repository. A special permission is a single bit, whereas may perform the activities only if he has been granted the a permission is a combination of one or more special required role or if he is a member of a group that has been permissions. granted the required role. SQL See also Structured Query Language (SQL). root member The highest member in a dimension star schema A logical model that represents your branch. See also leaf member. relational data in a form that mirrors that of OLAP data. A row A horizontal display of information in a grid or table. star schema contains a fact table and one or more A row can contain data from a single field, derived data dimension tables. from a calculation, or textual information. The words row Structured Query Language (SQL) A computer language and record are sometimes used interchangeably. Contrast used to access data in relational databases. with column. substitution variable A variable that acts as a global schema In relational databases, a logical model that placeholder for information that changes regularly. You set represents the data and the relationships between the data. the variable and a corresponding string value; the value schema definition Used to create objects and set their can then be changed at any time. Substitution variables properties. The objects you create correspond to your can be used in calculation scripts, report scripts, Essbase metadata. For example, you create a dimension object for Spreadsheet Services, and Essbase API. each dimension in your data source. table In relational databases, a form of data storage in servlet Small Java programs, or modules of Java code that which data is stored in records comprised of fields. Each run in a server application. For example, an applet that record is defined by a unique, or primary, key. runs on a server, usually meaning a Java applet that runs tag A Java class that implements a specialized interface on a Web server. enabling it to be used in a Java server page for processing. sibling A child member at the same generation as another child member and having the same immediate parent. For example, the members Florida and New York are both children of the member, East, and siblings of each other.
Glossary 187 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z tag library A collection of custom tags which can be universal result set An object implementing the imported for use in a JSP page. Individual tags are grouped IWAAGrid interface, enabling clients to access OLAP or into several tag libraries according to their functionality. A relational data in the same way. The advantage is that you tag library is similar to an XML document that contains only need to create the JSP once to display both relational information about individual tags. For example, in and OLAP data. The Universal Result Set is also used to Application Builder, there is a relational tag library that generate output to various formats, for example PDF or contains relational tags and an OLAP tag library that HTML. You can create a single JSP that can display either contains OLAP tags. relational and OLAP data in a grid. thin driver A Java based driver that is inherently cross- URL See Uniform Resource Locator (URL). platform, because it is written exclusively in Java. User ID The key word that defines the user to the tool tip A tiny pop-up window that presents a short authentication server, and the user to the external description of a toolbar or picture button’s action. Tool authentication method. In some cases the User ID may be tips are dialogs that briefly describe or define a button’s a short “cryptic” id. In other situations the User ID may be functionality. the users complete name. top-level member A dimension member at the top of the view In relational databases, a logical table created by tree in a dimension outline hierarchy, or the first member combining columns from one or more tables. A view can of the dimension in sort order if there is no hierarchical contain metadata and formatting information used to relationship among dimension members. The top-level query an OLAP data source. member name is generally the same name as the visible tags A tag which produces visible HTML elements dimension name if a hierarchical relationship exists. on a Web page, as well as processing server-side requests. UDA A user-defined attribute. A UDA is a term associated WAA annotation Text, a URL, or a file. A WAA with members of an outline to describe a particular annotation is set up using tags and it can be assigned to an characteristic of the members. Users can specify UDAs OLAP data cell or cubeView, and a relational row or within calculation scripts and reports so that they return queryInfo. lists of members that have the specified UDA associated with them. UDAs can be applied to dense as well as sparse WAA Core Domain Contains the basic framework for the dimensions. architecture, as well as general purpose, reusable components. The relational and OLAP Domain extend the unary operator A group of mathematical indicators (+, -, core objects. *, /, %) that define how roll-ups take place on the database outline. WAA drill-through Navigates from an OLAP data cell to corresponding data in a relational data source. Uniform Resource Locator (URL) An address for a resource located on the World Wide Web, such as a WAA OLAP Domain Contains components designed to document, image, downloadable file, service, or electronic facilitate typical analysis tasks, such as building and saving mailbox. URLs use a variety of naming schemes and access queries, displaying members and data, drilldown, and so methods, such as HTTP, FTP, and Internet mail. An on. example of a URL is http://www.hyperion.com. A URL can WAA Relational Domain Contains components designed also point to a file located on a local or network drive, such to facilitate SQL drill-through from an OLAP cube to the as file:///D:/essbase/docs/essdocs.htm. relational database that was used to build the cube. union An SQL command that is a type of join that Functionality to edit and run an SQL query is also combines the results of two SELECT statements. A union provided. is often used to merge lists of values contained in two WAA Utility Components Low level building blocks used tables. to perform processing for events, a repository, the hash table, and exceptions.
188 Glossary A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
WAA Web Components Handle functions specific to Web applications. For example, Web components handle user flow between the various JSPs. analysis tasks, such as building and saving queries, displaying members and data, drilldown, and so on.
WAR file A Web archive file. A WAR file contains the complete directory structure and all files that define the Web application. For example, Web applications are typically distributed as WAR files.
Web Application Architecture (WAA) A set of Java beans, Java server pages, servlets, applets, and miscellaneous supporting elements that can be combined in a variety of ways to quickly create Web-based analytic applications. Web Application Architecture (WAA) provides tag libraries and reusable components that implement from 50% - 80% of the functionality required for a typical custom analytic application. The architecture is designed with reuse and rapid development in mind.
web designer A person with HTML skills and user knowledge of data sources.
web server A computer that delivers, or serves up, Web pages.
XML query An ADM query formatted as an XML string. For example, the tags defined in Application Builder are used to define a member and data XML query.
Glossary 189 190 Glossary A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Index
tasks components removing from QuickBuilder, 172 A connecting ADM, 166 addJoinGridValueMapping tag, 126 core domain, 8 ADM pooling and connections, 166 cubeView alerts properties, 105 overview, 145 Analyzer tags, 151 annotation tags, 86 D annotations data cell values data-source, 87 properties setting up, 87 data cell values, 104 WAA, 88 data formatting, 111 application information data source annotations, 87 monitoring, 163 data source drill-throughs, 84 Architecture overview, 7 de.txt (German) string resource text file, 175 arguments debugging messages, 163 cell reference, 142 drill-through column reference, 142 data source, 84 embedded functions, 141 setting up, 83 row reference, 142 WAA, 84 drill-through tags, 83 B DWConfig.xml file, 172 beans defined for a tag, 177 E behavior, modifying QuickBuilder component, 175 embedded functions arguments, 141 error messages, 163 C events processing with beans, 14 cell formatting, 111 Excel, export, 129 cell reference arguments, 142 executeJoinGrid tag, 126 charting tags, 125 export tags, 125, 129 column reference arguments, 142 export with XSLT, 132 combining grids, 126 component behavior, modifying, 175
Index A 191 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
F J FESI, 119 J2EE usage, 11 file structure of XML, 172 Java scriptlets, 53 files creating an HTML table, 58 de.txt (German) string resource file, 175 passing request parameters, 56 HYSL_HAB_Template.htm, 173 request expressions, 62 jp.txt (Japanese) string resource text, 175 traffic lighting, 56 Macromedia Extension Import (.mxi), 172 Javadoc, 13 formatting join tags, 126 cell and data, 111 jp.txt (Japanese) string resource text file, 175 examples, 116 JSP XML file, 113 architecture, 17 defined for the tag, 177 G included, 18 scripting, 120 global objects, 120 grid export, 129 grid tags, 123 L guided analysis license keys, 166 setting up, 91 lists, HTML controls, 75 guided anlaysis tags, 92 M Macromedia Extension Import (.mxi) file, 172 H menus, modifying QuickBuilder, 173 HTML export, 129 messages, debugging, 163 HTML lists and trees, 75 metadata properties, 102 HTML table model view controller model, 13 creating with Java scriptlets, 58 iterating through, 99 O HTTPRequest, 16 object scopes, 165 HTTPSession, 16 OLAP domain, 8 Hyperion Analyzer tags, 151 OLAP iterator tags Hyperion Products displaying query results, 99 using guided analysis tags, 92 Olap Iterator tags and property tags, 98 Hyperion Reports tags, 159 OLAP properties HYSL_HAB_Template.htm file, 173 metadata, 102 OLAP query results I displaying, 99 integration OLAP tags, overview, 63 Hyperion Analyzer, 151 Hyperion Reports, 159 P iterator tags PDF export, 129 OLAP, 98 pooling relational, 109 ADM, 166
192 Index F A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
PowerPoint export, 129 session data storage, 14 product integration single sign-on Hyperion Analyzer, 151 setting up for Hyperion Application Builder, 47 Hyperion Reports, 159 properties T cubeView, 105 tag categoreies, 25 relational, 111 tag dependencies, 28 property tags tag library descriptors, 23 OLAP, 98 tag library overview, 21 tag sequence, 27 Q tags Query Result List, 26 useSqlResultListBean, 26 QuickBuilder task framework behavior of components, modifying, 175 scripting, 121 components, removing from, 172 tasks menus, modifying, 173 definition builder, 146 wizards, modifying, 174 overview, 145 registry and intializing, 146 scheduled task definition builder, 149 R tld files, 23 related content tags, 83 traffic lighting relational domain, 8 example, 104 relational iterator tags, 109 OLAP, 98 relational tags, overview, 68 trees, HTML controls, 75 rendering tags, 28 Reports tags, 159 request expressions, 62 U request, processing, 19 universal result set, 123 row reference arguments, 142 universal result set, overview, 124 RTF export, 129 useJoinGrid tag, 126 useSqlResultListBean tag, 26 S utility components, 8 scheduled task definition builder, 149 scope, 29 W scopes of objects, 165 WAA annotations, 88 scripting WAA applications, 9 global objects, 120 WAA architecture, 7 in JSPs, 120 WAA drill-throughs, 84 in tasks, 121 Web Application Architecture task framework, 121 processing, 16 scripting framework, 119 Web components, 8 scripting variables, 30 wizards, modifying, 174 traffic lighting, 98 scriptlets X Java, 53 XML
Index Q 193 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
file structure, 172 XSLT export, 132
194 Index X