Académique Documents
Professionnel Documents
Culture Documents
Copyright 2005, 2010 Oracle and/or its affiliates. All rights reserved. The Programs (which include both the software and documentation) contain proprietary information; they are provided under a license agreement containing restrictions on use and disclosure and are also protected by copyright, patent, and other intellectual and industrial property laws. Reverse engineering, disassembly, or decompilation of the Programs, except to the extent required to obtain interoperability with other independently created software or as specified by law, is prohibited. The information contained in this document is subject to change without notice. If you find any problems in the documentation, please report them to us in writing. This document is not warranted to be errorfree. Except as may be expressly permitted in your license agreement for these Programs, no part of these Programs may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose. If the Programs are delivered to the United States Government or anyone licensing or using the Programs on behalf of the United States Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the Programs, including documentation and technical data, shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement, and, to the extent applicable, the additional rights set forth in FAR 52.227-19, Commercial Computer Software--Restricted Rights (June 1987). Oracle USA, Inc., 500 Oracle Parkway, Redwood City, CA 94065. The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inherently dangerous applications. It shall be the licensee's responsibility to take all appropriate fail-safe, backup, redundancy and other measures to ensure the safe use of such applications if the Programs are used for such purposes, and we disclaim liability for any damages caused by such use of the Programs. The Programs may provide links to Web sites and access to content, products, and services from third parties. Oracle is not responsible for the availability of, or any content provided on, third-party Web sites. You bear all risks associated with the use of such content. If you choose to purchase any products or services from a third party, the relationship is directly between you and the third party. Oracle is not responsible for: (a) the quality of third-party products or services; or (b) fulfilling any of the terms of the agreement with the third party, including delivery of products or services and warranty obligations related to purchased products or services. Oracle is not responsible for any loss or damage of any sort that you may incur from dealing with any third party. Oracle, JD Edwards, and PeopleSoft are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
Contents
Chapter 1: Chapter 2:
High-Level Architecture of Siebel Self-Service Applications 13 Self-Service Application Components and How They Interact 15
About the Siebel Database and Business Objects About the Model-View-Controller Design Pattern
Model Layer 19 Data Binding Layer 20 Controller Layer 21 View Layer 22
16 19
22 23
Chapter 3:
Customization Strategy for Self-Service Applications Customization Support for Self-Service Applications Customizable Files for Self-Service Applications 30
Files That Must Be Renamed Before Customization 30 Files That Cannot Be Renamed Before Customization 31
32 33
Contents
33
Chapter 4:
37 37 38 37 38
Installing and Configuring the Oracle Application Server Connecting to the Oracle Application Server
Deploying the Standard Java EE Application to the Oracle Application Server Importing the Java EE Application Into Oracle JDeveloper Process of Cleaning Up After Importation 39
40 Cleaning the Model and ViewController Projects Removing Duplicate Class Files 40
Connecting to an Oracle Database for Data Passivation Configuring Endpoint URLs 42 44 46 Configuring Authentication in Oracle JDeveloper Deploying a Patch to a Development Workstation
41
Chapter 5:
59
60 62 63 64 64
Customizing Page Templates for Self-Service Applications Customizing Regions for Siebel Self-Service Applications About Template Indirection 64
Contents
Page Template Mapping Example for Self-Service Applications Setting Page Template Mappings for Self-Service Applications About Page Flows for Self-Service Applications 76 77 80 Page Flow Example for the Self-Service Shopping Cart Customizing Page Flows for Self-Service Applications About Process Trains for Self-Service Applications
Sample Process Train for Self-Service Applications
66 74 75
80
81
Service Request Process Train Example for Siebel E-Support Customizing Process Trains for Self-Service Applications
Customizing the Service Request Process Train 94 Customizing the Menu Model to Add the Survey Page 96
85
94
Chapter 6:
Menu Model Example for Self-Service Applications Customizing the Menu for Self-Service Applications
Using the Condition Property to Hide Detail Nodes in List-Detail Pages Using the af:goLink Tag for Navigating to Secure and Nonsecure Pages
Chapter 7:
Chapter 8:
Contents
124
125 126
129
130 131
Configuring Lazy Component Load During Deployment 131 Configuring Lazy Component Load in Oracle JDeveloper 132
Process of Creating New ADF Business Components from Siebel Web Services
Creating a Web Service Client Proxy 132 Creating a Programmatic View Object 133 Creating an Application Module 134 Modifying ADF Business Component Code to Access Web Service Data
132
136
161
162
Adding a Field to a Siebel Business Component 162 Adding the Business Component Field to an Integration Object Exposing Siebel Data to External Applications 163 Re-Creating the Web Service Client Proxy 164 Extending ADF Business Components 167
Configuring Failover on the SessionAM Application Module About ADF Data Control About ADF Binding 171 171 169
169
Chapter 9:
Project 174 Profile for the Model Project 174 Profile for the ViewController Project 175 Profile for the Java EE Application 175 Descriptor 176
Deploying a Customized Java EE Application to the Oracle Application Server Deploying a Customized Java EE Application to an Enterprise Archive File Deploying the EAR File to the Oracle Application Server in the Development Environment 178
6 Siebel Self-Service Application Developers Guide Version 8.1, Rev. A
177
177
Contents
Configuring the Endpoint URL After Deployment Testing Deployed Java EE Applications 180
179 180
Chapter 10: Monitoring Diagnostic Information and Error Messages for Siebel Self-Service Applications
About the Oracle Dynamic Monitoring Service Configuring Java EE Logging 181
Creating the j2ee-logging.xml File 182 Configuring the logging.properties File 183 Configuring the Java Policy File 183
181
About Oracle Application Diagnostics for Java About Error Pages for Self-Service Applications
About Enabling Web Services Tracing on the Siebel Server About Monitoring Siebel Application Performance Configuring Diagnostic Logging on the Siebel Server
Index
Contents
Siebel Self-Service Application Developers Guide describes the architecture and configuration of Oracles Siebel Self-Service Applications, version 8.1. Its audience is developers who are familiar with the Java programming language, Java Platform, Enterprise Edition (Java EE) applications, and Oracle JDeveloper.
Whats New in Siebel Self-Service Application Developers Guide Version 8.1, Rev. A
Table 1 lists changes described in this version of the documentation to support release 8.1 of the software.
Table 1. Topic
New Product Features in Siebel Self-Service Application Developers Guide, Version 8.1, Rev. A Description Modified topic. Click Yes when asked whether to migrate the projects in the application to Oracle JDeveloper version 10.1.3.3. Modified topic. Better performance is obtained by adding a custom extension column to a base table, rather than by using a join to an extension table.
Importing the Java EE Application Into Oracle JDeveloper on page 38 Adding a Field to a Siebel Business Component on page 162
Additional Changes in Siebel Self-Service Application Developers Guide Version 8.1, Rev. A
Directory paths in examples have been modified to conform to UNIX syntax rather than Microsoft Windows.
Table 2. Topic
New Product Features in Siebel Self-Service Application Developers Guide, Version 8.1 Description Structure of the Siebel Self-Service Applications, which are Java EE applications. Tasks for customizing applications and testing and deploying customized applications. It also lists the customizable files. Initial deployment of applications to the development environment for customization, as well as other setup tasks. Detailed description of the page templates and customization tasks. Detailed description of the menu model and customization tasks. Customizing the appearance of user interface features, such as buttons and tabs. Customizing Oracle ADF Business Components, Web service client proxies, and the Java Object Cache. Binding user interface (UI) objects to business logic. Testing your customized applications in Oracle JDeveloper and in the development environment, and then deploying the applications to the production environment. Provides log file, diagnostics, and troubleshooting information.
Chapter 2, Siebel Self-Service Application Architecture Chapter 3, Overview of Customizing Siebel Self-Service Applications Chapter 4, Setting Up the Development Environment for Siebel Self-Service Applications Chapter 5, Customizing Pages for Siebel Self-Service Applications Chapter 6, Customizing Menus for Siebel Self-Service Applications Chapter 7, Customizing the Appearance of Siebel Self-Service Applications Chapter 8, Customizing the Model Layer for Siebel Self-Service Applications Chapter 9, Deploying and Testing Customized Siebel Self-Service Applications Chapter 10, Monitoring Diagnostic Information and Error Messages for Siebel Self-Service Applications
Related Documents
For more information on deploying Siebel Self-Service Applications, see Siebel Self-Service Application Deployment Guide on the Siebel Bookshelf. NOTE: The Siebel Bookshelf is available on Oracle Technology Network (OTN), Oracle E-Delivery, or it might be installed locally on your intranet, or on a network location. For more information on individual applications, see the following guides on the Siebel Bookshelf: Siebel E-Commerce Administration Guide
10
For more information on Oracle application development tools and Oracle Application Server, see the following documentation on Oracle Technology Network: Oracle Application Development Framework Developers Guide For Forms/4GL Developers Oracle Application Server Administrators Guide Oracle Application Server Installation Guide for the operating system you are using Oracle JDeveloper 10g Online Help
For information on configuring Siebel Business Applications other than Siebel Self-Service Applications, see Configuring Siebel Business Applications on the Siebel Bookshelf.
11
12
This chapter describes the architecture of Siebel Self-Service Applications. It includes the following topics: About Siebel Self-Service Applications on page 13 About the Siebel Database and Business Objects on page 16 About the Model-View-Controller Design Pattern on page 19 Project Structure of Self-Service Applications on page 22 About Session Handling in Self-Service Applications on page 23
13
Figure 1 illustrates the high-level architecture of Siebel Self-Service Applications, showing their relation to Siebel Business Applications.
Figure 1.
14
Figure 2.
1 2 3 4
Siebel business objects retrieve and organize data from the Siebel Database. Integration objects and business services abstract a useful subset of the data. Business services are deployed as Web services to be consumed by the Java EE application. Siebel Web services are called from the Model layer of the Java EE application, which is organized according to the Model-View-Controller design pattern. Data is passed by a Simple Object Access Protocol (SOAP) message. The Java EE application populates view objects within the ADF Business Components with Siebel data.
15
Siebel Self-Service Application Architecture About the Siebel Database and Business Objects
6 7 8
ADF Binding and ADF Data Control associate data from the view objects with user interface objects. The Controller layer selects views for presentation. Data is displayed in the UI by the View layer and sent to the client through HTTP or HTTPS.
For more information on the architecture of Siebel Business Applications, see Configuring Siebel Business Applications. NOTE: Oracle Application Development Framework (Oracle ADF) requires a connection to an Oracle database for data passivation, which is not shown in Figure 2 on page 15. For more information on the database connection, see Connecting to an Oracle Database for Data Passivation on page 41.
Siebel Objects Description Standard relational database organized into tables containing columns. Siebel business objects retrieve data from the Siebel Database according to the required business logic. Associates columns from one or more tables into a single structure. Business components provide a layer of wrapping over tables, allowing UI objects to reference business components rather than the underlying tables. Business components contain fields, which correspond to table columns. For example, Contact is a Siebel business component containing contact information such as first name, last name, and address. NOTE: Siebel business components are not the same as ADF Business Components. For more information on Siebel business components, see Configuring Siebel Business Applications. For more information on ADF Business Components, see Oracle Application Development Framework Developers Guide For Forms/4GL Developers on Oracle Technology Network.
Business component
16
Siebel Self-Service Application Architecture About the Siebel Database and Business Objects
Table 3. Object
Siebel Objects Description Groups related business components together. Business objects allow you to establish relationships among business components according to your business logic. For example, the Opportunity business object links business components such as Opportunity, Product, and Contact allowing you to display products related to an opportunity or contacts associated with the opportunity. For more information on Siebel business objects, see Configuring Siebel Business Applications.
Business object
Integration component
Abstracts business component data for integrating Siebel Business Applications with external applications. For more information on Siebel integration components, see Integration Platform Technologies: Siebel Enterprise Application Integration.
Integration object
Abstracts a business object for integrating Siebel Business Applications with external applications. For more information on Siebel integration objects, see Integration Platform Technologies: Siebel Enterprise Application Integration.
17
Siebel Self-Service Application Architecture About the Siebel Database and Business Objects
Table 3. Object
Siebel Objects Description Contains a set of methods that operate on integration objects. Siebel business services can simplify the task of moving data and converting data formats between Siebel Business Applications and external applications. While business components and business objects are typically tied to specific tables in the Siebel data model, Siebel business services are not tied to specific objects, but act upon objects to achieve a particular goal. NOTE: In Java EE, business logic is often referred to as business services. These business services are not the same as Siebel business services. For more information on Siebel business services, see Integration Platform Technologies: Siebel Enterprise Application Integration.
Business service
Web service
Exposes business logic in a way that can be accessed by any application. Business services in Siebel Business Applications can be exposed as Web services to be consumed by an external application. Web services combine component-based development with Internet standards and protocols that include HTTP, XML, Simple Object Access Protocol (SOAP), and Web Services Description Language (WSDL). You can reuse Web services regardless of how they are implemented. Web services can be developed on any computer platform and in any development environment as long as they can communicate with other Web services, using these common protocols. Siebel EAI UI Data Sync (UDS) Web services provide external Web applications access to Siebel data and functionality. UDS Web services expose version-independent interfaces with strongly typed arguments and provide access to UI operations, such as insert, delete, update, query and execute. These Web services are available through the Custom Application Object Manager (CustomAppObjMgr) component. For more information on Siebel UDS Web services, see Integration Platform Technologies: Siebel Enterprise Application Integration. For more information on Custom Application Object Manager components, see Siebel Self-Service Application Deployment Guide.
18
Model Layer
The Model layer of an application consists mainly of the ADF Business Components module. An ADF Business Component encloses an application module and one or more view objects. A view object calls a Web service and retrieves the required number of rows from the Siebel Database as needed. Pagination is also implemented in the view objects. For information on using view objects to access Siebel Web services, see Modifying ADF Business Component Code to Access Web Service Data on page 136. The Model layer does the following: Contains the business logic and the operations that control data access and modification Notifies the View layer when the user interface needs to be refreshed Allows the View layer to query it
19
The Model layer in Siebel Self-Service Applications consists of the modules described in Table 4.
Table 4. Module
Model Layer Modules Description Contain application modules with programmatic view objects that retrieve rows from the Siebel database by calling Web services. Simplify building business logic for developers familiar with fourthgeneration programming language (4GL) tools, such as Oracle Forms. For more information on ADF Business Components, see Oracle Application Development Framework Developers Guide For Forms/ 4GL Developers on Oracle Technology Network. For more information on configuring ADF Business Components, see Chapter 8, Customizing the Model Layer for Siebel Self-Service Applications.
Is a distributed cache of Java objects that can be used on any Java platform and by any Java application. It allows applications to share objects across requests and users, and coordinates the life cycle of the objects across processes. Objects are cached within the process memory space. The Java Object Cache is a single service shared by all threads running in the process. The Java Object Cache can manage any Java object. To facilitate sharing of cached objects, all objects within the cache are accessed by name. For more information about the Java Object Cache, see About the Java Object Cache on page 123. For information on configuring the Java Object Cache, see Configuring the Java Object Cache on page 125.
Calls Siebel Web services. Created by Oracle JDeveloper. For information on creating Web service client proxies, see Creating a Web Service Client Proxy on page 132.
20
The data binding layer in Siebel Self-Service Applications consists of the modules described in Table 5.
Table 5. Module
Data Binding Modules Description Describes and manages the characteristic interactions between specific kinds of UI components (View and Controller layers) and the methods provided by the Model layer. For more information on using ADF Binding, see About ADF Binding on page 171. For more information on ADF Binding, see Oracle Application Development Framework Developers Guide For Forms/4GL Developers on Oracle Technology Network.
ADF Binding
Provides supplemental metadata about the Model layer's capabilities and constraints, as well as a simple interface for normalizing typical transactional interactions with the Model layer. For more information on using ADF Data Control, see About ADF Data Control on page 169. For more information on ADF Data Control, see Oracle Application Development Framework Developers Guide For Forms/4GL Developers on Oracle Technology Network.
For more information on the JSR-227 specification, see the following: JSR 227: A Standard Data Binding & Data Access Facility for J2EE at http://jcp.org JSR 227 FAQ on Oracle Technology Network at http://www.oracle.com/technology/products/jdev/htdocs/techinfo/jsr227.html
Controller Layer
The Controller layer defines the Java EE applications behavior: Controls UI navigation, selecting views for presentation Determines what happens when a user interacts with a component, such as clicking a button Dispatches user requests, such as database queries
The Controller allows the business logic (Model) and presentation logic (View) to be changed independently, simplifying application maintenance.
21
In Siebel Self-Service Applications, the JavaServer Faces (JSF) framework is used as the Controller layer. JSF is a server-side, component-based framework for developing Web applications. It separates the navigation and data flow, consistent with the MVC framework, and allows developers to manipulate standard UI components with visual editors. For more information on JSF, see JavaServer Faces Technology at http://java.sun.com
View Layer
The View layer renders the contents of the Model layer and determines how data is displayed. It forwards user input to the Controller. JSF can be used for the View, as well as for the Controller. However, Siebel Self-Service Applications use ADF Faces as the View layer. ADF Faces is a set of UI components based on JSF. ADF Faces conforms to Java specification JSR-127 and extends the functionality of JSF version 1.1: Has more than 100 types of components Supports client-side validation Allows partial-page rendering Provides page-flow scoped variables, making it easier to pass values from one page to another Supports internationalization
ADF Faces is implemented as JavaServer Pages (JSP) files. These files, which have the extension .jspx, are XML files with specialized tags in them. For more information on ADF Faces, see Oracle Application Development Framework Developers Guide For Forms/4GL Developers on Oracle Technology Network.
ADF Business Components Java Object Cache Web Service Client Proxy
JSPX pages with JSF and ADF Faces components JSF navigation Data bindings to the Model layer
22
The applications are supplied in an Enterprise Archive (EAR) file, which is deployed to the Oracle Application Server. For information on deploying EAR files, see Chapter 9, Deploying and Testing Customized Siebel Self-Service Applications.
Figure 3.
The session handling flow is described in the following topics: Siebel Web Service Authentication on page 24 Siebel Web Service Handler Class on page 24 SessionAM Application Module on page 25 Session Attributes in the View Layer on page 25 Access Control and Authorization on page 25 Session Cookie on page 27 Failover on page 27
23
24
Session information can persist after HttpSession timeout or browser closure, a feature not supported by HttpSession. Thus if one node in a clustered environment fails, the transaction can be activated from other nodes. For more information, see Failover on page 27.
25
The user's responsibility assignments are stored in Siebel Business Applications. Each responsibility contains a number of permissions. The responsibility-permissions mappings are stored in the AccessControl.xml file. This file is based on a defined XML schema. The mappings contained in this file are loaded the first time the ADF Binding filter, SelfServiceFilter, is accessed. They are stored in application scope. Logged-in and anonymous user permissions are loaded into the session based on the responsibilities returned by the Siebel Web service. All requests to the application are through SelfServiceFilter. For more information on authentication in Siebel Self-Service Applications, see Siebel Self-Service Application Deployment Guide and Siebel Security Guide.
In Oracle JDeveloper, when you first use the Data Control Palette to build your data-bound JSF page, the Oracle ADF data binding configuration settings are automatically added to web.xml. The following example shows part of a web.xml file containing ADF Binding settings: <context-param> <param-name>CpxFileName</param-name> <param-value>view.DataBindings</param-value> </context-param> <filter> <filter-name>adfBindings</filter-name> <filter-class>oracle.adf.model.servlet.ADFBindingFilter</filter-class> </filter> <filter-mapping> <filter-name>adfBindings</filter-name> <url-pattern>*.jsp</url-pattern> </filter-mapping> <filter-mapping>
26
<filter-name>adfBindings</filter-name> <url-pattern>*.jspx</url-pattern> </filter-mapping> For more information about the Data Control Palette and binding objects, see Binding a View Object to a User Interface Page on page 171.
Session Cookie
Session information is passed to the client browser as a session cookie. The session stays active while the user continues to send new requests within the time frame configured by the <sessiontimeout> element in the web.xml file. The default session length is 35 minutes.
Failover
The session cookie can be persistent if the deploying company wants to use a failover mechanism. In failover mode, the Oracle ADF run time saves an additional browser cookie that the run time uses to track the latest passivation snapshot ID for each client running an application. Even though the users next request will be processed in the context of a new HttpSession, perhaps even in a different application server instance, the user is unaware that this has occurred. The additional browser cookie is used to reactivate any available application module instance with the user's last pending state snapshot before handling the request. Failover is configured at the application module level. For information on configuring failover, see Configuring Failover on the SessionAM Application Module on page 169. For information on data passivation and activation of the application module state, see Oracle Application Development Framework Developers Guide For Forms/4GL Developers on Oracle Technology Network.
27
28
This chapter describes the process of customizing Siebel Self-Service Applications. It includes the following topics: Customization Strategy for Self-Service Applications on page 29 Customization Support for Self-Service Applications on page 30 Customizable Files for Self-Service Applications on page 30 Roadmap for Customizing Siebel Self-Service Applications on page 32 About the Application Configuration File for Self-Service Applications on page 33 About the Source Code for Java Classes in Self-Service Applications on page 33
29
Overview of Customizing Siebel Self-Service Applications Customization Support for Self-Service Applications
Table 6.
Customizable Files to Copy and Rename Filename *.jspx faces-config-*.xml *.css *.js *.gif, *.jpg, *.png *.tld Description Pages and panels JSF configuration and page flows Style sheets JavaScript files Images Custom tag library definitions
30
Overview of Customizing Siebel Self-Service Applications Customizable Files for Self-Service Applications
Table 6.
Customizable Files to Copy and Rename Filename *.java *.class *.jar *bc4j.xcfg *AM.xml, *VO.xml, *EO.xml Description Java classes (source) Java classes (compiled) Java libraries ADF Business Component configuration ADF Business Component definitions Data binding context Data bindings Java resource bundles XML data XML data
Table 7.
Customizable Files Not to Rename Filename adf-faces-skins.xml region-metadata.xml Description Skin (UI look-and-feel) definitions, such as button and tab appearance Panel definitions ADF Faces configuration Java EE configuration (deployment descriptor)
Configuration
adf-faces-config.xml web.xml
31
Overview of Customizing Siebel Self-Service Applications Roadmap for Customizing Siebel Self-Service Applications
Install and configure Siebel Business Applications. Install the Oracle Application Server and Oracle JDeveloper. Import the Java EE application into Oracle JDeveloper for customization.
See Chapter 4, Setting Up the Development Environment for Siebel Self-Service Applications. Configure the View and Controller layers. These two layers are contained in a single project, ViewController, in the Java EE application in Oracle JDeveloper. For more information on the ViewController project, see Project Structure of Self-Service Applications on page 22. Customization strategies for the View and Controller layers are the following:
Copy and customize JSPX files. Leverage page, panel, and image indirections to reference physical filenames. After a patch or upgrade, manually merge new features into customized JSPX files, if needed. Copy and customize faces-config-*.xml files for page flows, menus, and process trains. Create new resource bundles to override default prompts and messages.
Chapter 5, Customizing Pages for Siebel Self-Service Applications Chapter 6, Customizing Menus for Siebel Self-Service Applications Chapter 7, Customizing the Appearance of Siebel Self-Service Applications
Configure the Siebel Business Objects and Data Objects layers. For information on configuring these Siebel objects, see Configuring Siebel Business Applications.
Configure Siebel business services and Web services. For information on configuring these Siebel objects, see Integration Platform Technologies: Siebel Enterprise Application Integration.
Configure the Model layer. The Model layer is contained in the Model project in the Java EE application in Oracle JDeveloper. The Model project contains ADF Business Components, as well as Web service calls. Customization strategies for the Model layer are the following:
32
Overview of Customizing Siebel Self-Service Applications About the Application Configuration File for Self-Service Applications
Create new ADF Business Components where needed, create new UI objects, and then bind the UI objects to the new ADF Business Components. Expose Siebel business services as Web services, create Web service proxies in Oracle JDeveloper, create new ADF Business Components, new UI objects, and then bind the new ADF Business Components to the new UI. Copy and customize DataBindings.cpx to update the data binding context.
See Chapter 8, Customizing the Model Layer for Siebel Self-Service Applications. Test customized applications in Oracle JDeveloper and on the Oracle Application Server in the development environment. See Chapter 9, Deploying and Testing Customized Siebel Self-Service Applications. Deploy customized applications to the Oracle Application Server on the production environment. See Chapter 9, Deploying and Testing Customized Siebel Self-Service Applications. Enable event monitoring and logging for Siebel Self-Service Applications. See Chapter 10, Monitoring Diagnostic Information and Error Messages for Siebel Self-Service Applications.
33
Overview of Customizing Siebel Self-Service Applications About the Source Code for Java Classes in Self-Service Applications
34
This chapter describes the tasks necessary for setting up the development environment to customize Siebel Self-Service Applications. It includes the following topics: Installing and Configuring Siebel Business Applications on page 35 Installing Oracle JDeveloper on page 37 Installing and Configuring the Oracle Application Server on page 37 Connecting to the Oracle Application Server on page 37 Deploying the Standard Java EE Application to the Oracle Application Server on page 38 Importing the Java EE Application Into Oracle JDeveloper on page 38 Process of Cleaning Up After Importation on page 39 Connecting to an Oracle Database for Data Passivation on page 41 Configuring Endpoint URLs on page 42 Configuring Authentication in Oracle JDeveloper on page 44 Deploying a Patch to a Development Workstation on page 46
35
Setting Up the Development Environment for Siebel Self-Service Applications Installing and Configuring Siebel Business Applications
For information on installing and initially configuring Siebel Business Applications, see the Siebel Installation Guide for the operating system you are using. For additional information about Siebel Enterprise Server deployment and common component setup tasks, see Siebel Self-Service Application Deployment Guide. For information on supported versions of Siebel Business Applications and other Oracle software required for using Siebel Self-Service Applications, see Siebel System Requirements and Supported Platforms on Oracle Technology Network.
36
Setting Up the Development Environment for Siebel Self-Service Applications Installing Oracle JDeveloper
3 4
37
Setting Up the Development Environment for Siebel Self-Service Applications Deploying the Standard Java EE Application to the Oracle Application Server
b c 5 a b c d 6
Choose the connection type that matches the server version, for example, Oracle Application Server 10g 10.1.3. Click Next.
In Step 2 of the wizard: Enter the user name of the application server administrator, for example, oc4jadmin. Enter the password of the application server administrator, for example, welcome1. Select the Deploy Password check box. Click Next.
Host Name. Computer running the Oracle Application Server. If the same computer is used for both development and testing, this will be localhost. OPMN Port. Port for Oracle Process Manager and Notification Server (OPMN) requests, for example, 6003. OC4J Instance Name. This is typically home.
7 8 9
Select the Single Instance check box, and then click Next. In Step 4 of the wizard, click Test Connection. If the word Success! is displayed in the Status box, click Finish. If not, make sure that the Oracle Application Server is running, and then start the wizard again.
38
Setting Up the Development Environment for Siebel Self-Service Applications Process of Cleaning Up After Importation
The EAR file is found in ORACLE_HOME/j2ee/home/applications after you deploy the standard Java EE application to the Oracle Application Server (see Deploying the Standard Java EE Application to the Oracle Application Server on page 38). NOTE: After importing Siebel Self-Service Applications into Oracle JDeveloper, you can add source files for additional applications. For a detailed example of importing source files for Siebel Communications E-Commerce into Oracle JDeveloper, see Siebel Self-Service Application Deployment Guide.
10 Click Yes.
The Java EE application is imported into JDeveloper.
1 2
Cleaning the Model and ViewController Projects on page 40 Removing Duplicate Class Files on page 40
39
Setting Up the Development Environment for Siebel Self-Service Applications Process of Cleaning Up After Importation
4 5
Select the ViewController project in the Applications Navigator. From the Run menu, choose Clean ViewController.jpr. A warning appears asking whether you want to recursively delete the content of the output directory ViewController\classes.
40
Setting Up the Development Environment for Siebel Self-Service Applications Connecting to an Oracle Database for Data Passivation
a b c d
Name the database connection, for example, SelfServiceDS. Provide authentication parameters. Provide connection parameters. Test the connection.
41
Setting Up the Development Environment for Siebel Self-Service Applications Configuring Endpoint URLs
If the word Success! is displayed in the Status box, click Finish. If not, make sure that the database is running, and then start the wizard again.
4 5 6
From the Tools menu, choose Embedded OC4J Server Preferences. The Embedded OC4J Server Preferences for Application_Name dialog appears. Select the Data Sources node under Current Workspace. In the Data Sources dialog, make sure that the following check boxes are selected:
Create data-source elements where not defined Update existing data-source elements Auto-update data-sources.xml when running or deploying to OC4J
7 8 9
Click Refresh Now, and then click OK. Open Model/src/META-INF/data-sources.xml. Make sure that the password for SelfServiceDS is stored in clear text.
10 Open Model/src/Model.jpx in a text editor. 11 Edit the _NamedConnection line to refer to the new database connection:
<Attr Name="_NamedConnection" Value="SelfServiceDS" />
To configure the endpoint URL for the Siebel Web Server Extension 1 2 3
In Oracle JDeveloper, right-click the ViewController project, and then choose Project Properties. In the Project Properties window, click Run/Debug. The Run/Debug dialog appears. Under Run Configurations, click Edit. The Launch Setting dialog appears.
In the Java Options field, add the following parameter, separating it from other expressions by a space: -DSIEBEL_WEBSERVER_URL=http://<host>[:<port>]/custappsvcs/ start.swe?SWEExtSource=WebService&SWEExtCmd=Execute where host is a Siebel Server and port is optional NOTE: Do not include the language code in the custappsvcs virtual directory name.
42
Setting Up the Development Environment for Siebel Self-Service Applications Configuring Endpoint URLs
5 6
Click OK in the Launch Settings dialog. Click OK in the Run/Debug dialog to close the Project Properties window.
NOTE: When working with deployed applications, you can configure the endpoint URL in Oracle Enterprise Manager during deployment or in the Web application deployment descriptor file, orionapplication.xml, after deployment. For more information on endpoint URL configuration, see Deploying the EAR File to the Oracle Application Server in the Development Environment on page 178 and Configuring the Endpoint URL After Deployment on page 179. You can also specify the Adobe Form Server for Siebel Public Sector E-Support.
To configure the endpoint URL for the Adobe Form Server (Siebel Public Sector ESupport only) 1 2 3
In Oracle JDeveloper, right-click the ViewController project, and then choose Project Properties. In the Project Properties window, click Run/Debug. The Run/Debug dialog appears. Under Run Configurations, click Edit. The Launch Setting dialog appears.
In the Java Options field, add the following parameter, separating it from other expressions by a space: -DADOBE_FORM_SERVER_URL=http://<host>[:<port>]/jboss-net/services/ AdobeFSService where host is the Adobe Form Server and port is optional
5 6
Click OK in the Launch Settings dialog. Click OK in the Run/Debug dialog to close the Project Properties window.
43
Setting Up the Development Environment for Siebel Self-Service Applications Configuring Authentication in Oracle JDeveloper
Table 8. File
Files to Modify for Configuring JAAS Directory Self-Service root directory (SelfService_ROOT) For example: /usr/Siebel/SelfService81
SelfService-oc4j-app.xml
application.xml
JDeveloper_ROOT\jdev\system\oracle.j2ee.10.1.3.mm.nn
\embedded-oc4j\config For example: JDeveloper 10.1.3.3/jdev/system/ oracle.j2ee.10.1.3.41.57/embedded-oc4j/config
system-jazn-data.xml web.xml
SelfService_ROOT\ViewController\public_html\WEB-INF
3 4
Open JDeveloper_ROOT/jdev/system/oracle.j2ee.10.1.3.41.57/embedded-oc4j/config/ application.xml in a text editor. Edit the <jazn> element to read the following: <jazn provider="XML" jaas-mode="doAsPrivileged"> <property name="role.mapping.dynamic" value="true"/> <property name="custom.loginmodule.provider" value="true"/> </jazn>
44
Setting Up the Development Environment for Siebel Self-Service Applications Configuring Authentication in Oracle JDeveloper
a b c d
In Oracle JDeveloper, from the Tools menu, choose Embedded OC4J Server Preferences Under the Global node, expand Authentication (JAZN), then Login Configuration. Click New. In the Create Application Login Configuration dialog, type the following in the Application Name field, then click OK: current-workspace-app
e f
Under current-workspace-app, click Add next to Login Modules. In the Create Login Module dialog, type the following in the Class field, then click OK: oracle.apps.ss.base.view.security.SelfServiceLoginModule
g h i
From the Control Flag pull-down menu, choose required. Click the Options tab, then click Add. In the Create Login Config Option dialog, add the following parameter, and then click OK: Name debug Value true
Protect your customized pages by customizing ViewController\public_html\WEB-INF\web.xml. NOTE: This applies if you are not using single sign-on (SSO). For SSO, resource protection setup is done is the SSO client software.
a b c d e
In Oracle JDeveloper, expand the ViewController project, then the Web Content node, and then the WEB-INF node. Under WEB-INF, right-click web.xml, then choose Properties. In the Web Application Deployment Descriptor window, select Security Constraints, then click New. With the Web Resources tab selected under Constraint, click Add (if protected does not already exist). In the Create Web Resource Collection dialog, type the following in the Web Resource Name field, then click OK: protected
f g
With the protected Web Resource selected, select the URL Patterns tab, then click Add. In the Create URL Pattern dialog, type the URL pattern in the URL Pattern field, then click OK. For example: /faces/ss/ABC/common/* where ABC is the name of your company
45
Setting Up the Development Environment for Siebel Self-Service Applications Deploying a Patch to a Development Workstation
Select the security roles that will have access to the JSPX pages that follow the URL pattern, for example:
j k
Click Next.
46
Setting Up the Development Environment for Siebel Self-Service Applications Deploying a Patch to a Development Workstation
In the Location page, complete fields using values from the following table, then click Next. Field EAR File Application File Directory Copy Files to Application Source Roots Description The location of the EAR file containing the source code. The name of the application file to be used in JDeveloper. The default is the name of the EAR file. The location of the application directory to be used. Select this check box. The location of the EAR file containing the source code.
The EAR Modules page appears and lists the module names and project names found in the EAR file.
Click Next. The Finish page displays a list of the projects installed with the new application.
Click Finish.
47
Setting Up the Development Environment for Siebel Self-Service Applications Deploying a Patch to a Development Workstation
48
This chapter describes user interface (UI) page templates in Siebel Self-Service Applications and how to customize them. It includes the following topics: About User Interface Page Templates for Self-Service Applications on page 50 Service Request Page Example for Siebel E-Support on page 60 Customizing Page Templates for Self-Service Applications on page 62 Customizing Regions for Siebel Self-Service Applications on page 63 Creating Page Templates for Siebel Self-Service Applications on page 64 About Template Indirection on page 64 About Page Template Mappings for Siebel Self-Service Applications on page 64 Page Template Mapping Example for Self-Service Applications on page 66 Customizing Page Template Mappings for Self-Service Applications on page 74 Setting Page Template Mappings for Self-Service Applications on page 75 About Page Flows for Self-Service Applications on page 76 Page Flow Example for the Self-Service Shopping Cart on page 77 Customizing Page Flows for Self-Service Applications on page 80 About Process Trains for Self-Service Applications on page 80 Service Request Process Train Example for Siebel E-Support on page 85 Customizing Process Trains for Self-Service Applications on page 94
49
Customizing Pages for Siebel Self-Service Applications About User Interface Page Templates for Self-Service Applications
Figure 4.
Menus and branding information are at the top, sidebars (such as for searching and for displaying menu trees) are on the left side, useful links are on the right side, and the main page content is in the middle. The underlying template structure for this page is shown in Figure 5.
Figure 5.
50
Customizing Pages for Siebel Self-Service Applications About User Interface Page Templates for Self-Service Applications
Every page in Siebel Self-Service Applications starts from a standard page skeleton, allowing developers to concentrate on the application-specific display contents. The page skeleton, a .jspx file, provides an af:panelBorder tag to encapsulate the content. The af:panelBorder tag includes references to a page header region and a page footer region. The purpose of these regions is to render the top and bottom portions of a page; they include branding information, menus, copyright information, and other similar components. Template indirection is used to avoid the hard coding of any image or .jspx filename used for regions. For more information about template indirection, see About Template Indirection on page 64. For more information about page templates, see the following topics: Standard Page Skeleton File on page 51 af:panelBorder Tag and Facets on page 54 Regions on page 55 Page Header on page 55 Page Footer on page 58 Error Messages and Generic Error Page on page 59 Service Request Page Example for Siebel E-Support on page 60
51
Customizing Pages for Siebel Self-Service Applications About User Interface Page Templates for Self-Service Applications
<!-- Remove the afc:cache tag if the page is not full-page cacheable. You can add more varyBy constraints based on the page cacheability, as in the following example. A page cached should vary based on user permission for various menu bars and menu tabs. --> <!-- <afc:cache rendered="#{configBean[FULL_PAGE_CACHE_ENABLED]}" varyBy="menuAdapterBean.menuTabCacheString menuAdapterBean.menuBarCacheString"> --> <af:form id="compId8"> <!-- Enter the permission for the user to view this page. --> <af:panelBorder rendered="#{!(empty sessionBean.permission['PERMISSION_NAME'])}"> <f:facet name="top"> <!-- Reference to the page header file --> <af:region id="pageHeaderBin" regionType="ss.common.region.pageHeader"/> </f:facet> <f:facet name="left"> <af:panelGroup layout="vertical" styleClass="ss_left_bin"> <!-The left facet contents go here. -->
</af:panelGroup> </f:facet> <f:facet name="right"> <af:panelGroup layout="vertical" styleClass="ss_right_bin"> <!-- The right facet contents go here. --> </af:panelGroup> </f:facet> <f:facet name="innerTop"> <af:panelGroup layout="vertical" styleClass="ss_itop_bin"> <!-- The inner top facet contents go here. --> </af:panelGroup> </f:facet> <f:facet name="innerBottom"> <af:panelGroup layout="vertical"> <!-- The inner bottom facet contents go here. This is a reference to the page footer file. --> <af:region id="pageFooterBin" regionType="ss.common.region.pageFooter"/>
52
Customizing Pages for Siebel Self-Service Applications About User Interface Page Templates for Self-Service Applications
</af:panelGroup> </f:facet> <!-- Main content of the page starts here. It is rendered in the page central content area. --> <!-- Uncomment the third- and fourth-level menu components if you are using custom third- and fourth-level menus and they have been defined in the menu model. Third- and fourth- level menus are used only for discrete and unrelated top-level pages. --> <!-- Custom third-level menu --> <!-- <ss:menuThird var="menuThird" value="#{menuModel.model}"> <f:facet name="nodeStamp"> <af:goMenuItem text="#{menuThird.label}" rendered="#{menuThird.rendered}"/> </f:facet> </ss:menuThird> --> <!-- Custom fourth-level menu --> <!-- <ss:menuFourth var="menuFourth" value="#{menuModel.model}"> <f:facet name="nodeStamp"> <af:goMenuItem text="#{menuFourth.label}" rendered="#{menuFourth.rendered}"/> </f:facet> </ss:menuFourth> --> <!-- Main content of the page ends --> </af:panelBorder> <!-- Check whether the user has permission to view the page. The rendered attribute is the negation of the rendered attribute of af:panelBorder. --> <af:panelGroup layout="vertical" rendered="#{empty sessionBean .permission['PERMISSION_NAME']}"> <af:region id="pageHeaderBinNoPerm" regionType="ss.common.region.pageHeader"/> <af:outputLabel value="#{messageBean['USER_NOT_AUTHORIZED_TO_VIEW']}"/> <af:region id="pageFooterBinNoPerm" regionType="ss.common.region.pageFooter"/> </af:panelGroup> </af:form> <!--</afc:cache> --> </af:document>
53
Customizing Pages for Siebel Self-Service Applications About User Interface Page Templates for Self-Service Applications
</f:view> </jsp:root>
54
Customizing Pages for Siebel Self-Service Applications About User Interface Page Templates for Self-Service Applications
Regions
A region is a logical subdivision of a page. Regions are used extensibly to modularize pages, as well as for reusability. A region can be included anywhere within a page by using the af:region tag, but it is typically included within the af:panelGroup tag, which determines the layout. A facet can contain multiple regions by having multiple af:region tags. Regions are defined in the region-metadata.xml file in the ViewController/public_html/META-INF directory. The definition of each region consists of the region name and a corresponding JSPX filename. The region name is used in top-level pages to include a region. At run time, the physical filename is looked up and included in the container page. NOTE: The custom component for the vertical menu, if used, is located in the top portion of the left facet. Any additional region is rendered below the vertical menu if the rendered property is true. Based on their requirements, developers can also include one or more regions in any of the unused (top, bottom, inner left, and inner right) facets. The following example shows two regions that are laid out vertically in the right facet: <f:facet name=right> <af:panelGroup layout=vertical> <af:region id="pageRightBin1" regionType="ss.base.common.region.rightBin1"/> <af:region id="pageRightBin2" regionType="ss.base.common.region.rightBin2"/> </af:panelGroup> </f:facet>
Page Header
The header file, pageHeader.jspx, includes such items as the company logo, global menus and icons (for example, Help), menu tabs, menu bars, and a message tag. The following is an example pageHeader.jspx file, which is in the ViewController/public_html/ss/base/common/region directory: <?xml version='1.0' encoding='windows-1252'?> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0" xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces" xmlns:afh="http://xmlns.oracle.com/adf/faces/html"> <af:regionDef var="attr"> <!-- <af:goLink text="" id="pageContent" destination="#pageContent" shortDesc="#{messageBean.SS_SKIP_NAV_LNK}">
55
Customizing Pages for Siebel Self-Service Applications About User Interface Page Templates for Self-Service Applications
<af:objectImage shortDesc="#{messageBean.SS_SKIP_NAV_LNK}" source="/ss/image/ t.gif"/> </af:goLink> --> <af:panelPageHeader styleClass="ss0"> <f:facet name="branding"> <af:panelGroup styleClass="ss_brand"> <af:objectImage shortDesc="#{imageBean['SS_COMPANY_LOGO'].description}" source="#{imageBean['SS_COMPANY_LOGO'].physicalName}"/> </af:panelGroup> <!-- <af:panelGroup> <jsp:include page="${templateManagerBean['ss.base.util.brand']}"/> </af:panelGroup> --> </f:facet> <f:facet name="menuGlobal"> <af:panelGroup layout="horizontal" styleClass="ss00" rendered="#{attr.globalMenuShown}"> <f:facet name="separator"> <af:objectImage source="#{imageBean['SS_GLOBAL_SEPARATOR'].physicalName}" shortDesc="#{imageBean['SS_GLOBAL_SEPARATOR'].description}"/> </f:facet> <af:menuButtons> <af:goMenuItem text="#{sessionBean.authenticated?pageHeaderBean .loggedInUserInfo:messageBean.SS_GEN_GUEST}"/> </af:menuButtons> <af:menuButtons startDepth="0" var="menuGlobal" value="#{menuModel.model}"> <f:facet name="nodeStamp"> <af:goMenuItem text="#{menuGlobal.label}" destination="#{menuGlobal.fileName}" rendered="#{menuGlobal.type=='global' && menuGlobal.rendered}" /> </f:facet> </af:menuButtons> </af:panelGroup> </f:facet>
56
Customizing Pages for Siebel Self-Service Applications About User Interface Page Templates for Self-Service Applications
<f:facet name="menu1" > </f:facet> <f:facet name="menu2" > <af:panelGroup rendered="#{skinFamily.menuLayout=='horizontal' and attr.otherMenuShown}"> <af:menuTabs startDepth="0" var="menuTab" value="#{menuModel.model}"> <f:facet name="nodeStamp"> <af:goMenuItem text="#{menuTab.label}" destination="#{menuTab.fileName}" rendered="#{menuTab.rendered and menuTab.type!='global'}"/> </f:facet> </af:menuTabs> <af:menuBar startDepth="1" var="menuBar" value="#{menuModel.model}"> <f:facet name="nodeStamp"> <af:goMenuItem text="#{menuBar.label}" destination="#{menuBar.fileName}" rendered="#{menuBar.rendered}" /> </f:facet> </af:menuBar> </af:panelGroup> </f:facet> </af:panelPageHeader> <!--<f:verbatim> <a name="pageContent"></a> </f:verbatim>--> <!-- <afh:script text="function addFavIco() { try { var _pagehead = document.getElementsByTagName('head')[0]; var favico = document.createElement('link'); favico.setAttribute('rel','shortcut icon'); favico.setAttribute('href','../../../ss/skin/img/fav.ico'); _pagehead.appendChild(favico); } catch(e){} } addFavIco();" /> -->
57
Customizing Pages for Siebel Self-Service Applications About User Interface Page Templates for Self-Service Applications
</af:regionDef> </jsp:root>
Page Footer
The page footer file, pageFooter.jspx, includes the links for the global menus and copyright messages. The following is an example pageFooter.jspx file, which is in the ViewController/ public_html/ss/base/common/region directory: <?xml version='1.0' encoding='windows-1252'?> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0" xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces" xmlns:afh="http://xmlns.oracle.com/adf/faces/html"> <af:regionDef> <af:panelGroup layout="horizontal" styleClass=ss51 id=footerOuterPGrp> <af:panelGroup layout="horizontal" styleClass="ss50" id="footerInnerPGrp"> <af:panelHorizontal halign="start" id="copyRightPHz"> <af:outputLabel value="#{messageBean.SS_GEN_COPY_RIGHT}" id="copyRightOlb"/> </af:panelHorizontal> <af:panelHorizontal halign="end" id="footerPHz"> <f:facet name="separator"> <af:objectImage source="#{imageBean['SS_FOOTER_SEPARATOR'].physicalName}" shortDesc="#{imageBean['SS_FOOTER_SEPARATOR'].description}" id="footerSeparator"/> </f:facet> <af:goLink text="#{messageBean.SS_GEN_ABOUT_US}" destination="http://www.oracle.com" styleClass="ss16" /> <af:goLink text="#{messageBean.SS_GEN_CONTACT_US}" destination="#{sessionBean.URL['/ss/base/contact/email/SendEmail.jspx']}" styleClass="ss16"/> <af:goLink text="#{messageBean.SS_GEN_LEGAL_NOTICE_AND_TERMS_OF_USE}" destination="#" styleClass="ss16"/> <af:goLink text="#{messageBean.SS_GEN_PRIVACY_STATEMENT}" destination="http://www.oracle.com/html/privacy.html" styleClass="ss16"/> </af:panelHorizontal> </af:panelGroup>
58
Customizing Pages for Siebel Self-Service Applications About User Interface Page Templates for Self-Service Applications
</af:panelGroup> <af:panelGroup rendered="#{sessionBean.developmentMode}" id="developModePGrp"> <afh:script text="// ----- AppSession attribute Begin ----Account=#{sessionBean.accountsString}, AccountId=#{sessionBean.accountId}, AccountType=#{sessionBean.accountType}, AddrCity=#{sessionBean.addrCity}, AddrCountry=#{sessionBean.addrCountry}, AddrState=#{sessionBean.addrState}, AddrZip=#{sessionBean.addrZip}, Authenticated=#{sessionBean.authenticated}, b2BUser=#{sessionBean.b2BUser}, b2CUser=#{sessionBean.b2CUser}, cartId=#{sessionBean.cartId}, contactId=#{sessionBean.contactId}, currencyCode=#{sessionBean.currencyCode}, emailAddress=#{sessionBean.emailAddress}, faxNumber=#{sessionBean.faxNumber}, firstName=#{sessionBean.firstName}, guest=#{sessionBean.guest}, homePhoneNumber=#{sessionBean.homePhoneNumber}, lastName=#{sessionBean.lastName}, locale=#{sessionBean.locale}, merchantAdmin=#{sessionBean.merchantAdmin}, Permission=#{sessionBean.permission}, priceListId=#{sessionBean.priceListId}, primaryAccountId=#{sessionBean.primaryAccountId}, primaryAccountType=#{sessionBean.primaryAccountType}, primaryAddressId=#{sessionBean.primaryAddressId}, responsibility=#{sessionBean.responsibilities}, rootAccountId=#{sessionBean.rootAccountId}, siteCode=#{sessionBean.siteCode}, siteName=#{sessionBean.siteName}, skinFamily=#{sessionBean.skinFamily}, userName=#{sessionBean.userName}, userType=#{sessionBean.userType}, workPhoneNumber=#{sessionBean.workPhoneNumber} ----- AppSession attribute End -----" /> </af:panelGroup> </af:regionDef> </jsp:root>
59
Customizing Pages for Siebel Self-Service Applications Service Request Page Example for Siebel E-Support
<af:messages globalOnly="true"/> <af:panelGroup layout="vertical" styleClass="af_showOneTab_body"> The error page defined in the web.xml file contains the generic error page functionality for unhandled exceptions.
<!-- Main page content --> <af:panelBorder> <!-- Page header is in the top facet. --> <f:facet name="top"> <af:region id="header" regionType="ss.base.common.pageHeader"/> </f:facet>
<f:facet name="left">
60
Customizing Pages for Siebel Self-Service Applications Service Request Page Example for Siebel E-Support
<af:panelGroup layout="vertical" styleClass="ss_left_bin"> <af:region id="left1" regionType="ss.base.sr.ServiceRequest.left1"/> <af:region id="left2" regionType="ss.base.sr.ServiceRequest.left2"/> <af:region id="left3" regionType="ss.base.sr.ServiceRequest.left3"/> <af:region id="left4" regionType="ss.base.sr.ServiceRequest.left4"/> <af:region id="left5" regionType="ss.base.sr.ServiceRequest.left5"/> <af:region id="left6" regionType="ss.base.sr.ServiceRequest.left6"/> </af:panelGroup> </f:facet> <f:facet name="right"> <af:panelGroup layout="vertical" styleClass="ss_right_bin"> <af:region id="right1" regionType="ss.base.sr.ServiceRequest.right1"/> <af:region id="right2" regionType="ss.base.sr.ServiceRequest.right2"/> <af:region id="right3" regionType="ss.base.sr.ServiceRequest.right3"/> <af:region id="right4" regionType="ss.base.sr.ServiceRequest.right4"/> <af:region id="right5" regionType="ss.base.sr.ServiceRequest.right5"/> <af:region id="right6" regionType="ss.base.sr.ServiceRequest.right6"/> </af:panelGroup> </f:facet> <f:facet name="innerTop"> <af:region id="innerTop1" regionType="ss.base.sr.ServiceRequest.innerTop1"/> </f:facet> <f:facet name="innerBottom"> <af:region id="innerBottom1" regionType="ss.base.sr.ServiceRequest.innerBottom1"/> </f:facet>
<!-- Page footer is in the bottom facet. --> <f:facet name="bottom"> <af:region id="footer" regionType="ss.base.common.pageFooter"/>
61
Customizing Pages for Siebel Self-Service Applications Customizing Page Templates for Self-Service Applications
</f:facet>
<!-- Body is not within a facet, therefore rendered in page central content area. --> <af:region id="body" regionType="ss.base.sr.ServiceRequest.body"/>
Copy the page definition file for the page template and rename it. For example, Catalog.jspx is defined in ViewController/classes/oracle/apps/ss/base/view/ pageDefs/catalog/CatalogPageDef.xml. Copy this file and rename the copy to CatalogABCPageDef.xml.
62
Customizing Pages for Siebel Self-Service Applications Customizing Regions for Siebel Self-Service Applications
Open DataBindingsABC.cpx and edit the mappings for your customized page template and its page definition in the <pageMap> and <pageDefinitionUsages> sections, for example: <pageMap> ... <page path="/ss/base/catalog/CatalogABC.jspx" usageId="CatalogABCPageDef"/> ... </pageMap> ... <pageDefinitionUsages> ... <page id="CatalogABCPageDef" path="oracle.apps.ss.base.view.pageDefs.catalog.CatalogABCPageDef"/> ... </pageDefinitionUsages>
7 8
Open ViewController/public_html/WEB-INF/web.xml in a text editor or Oracle JDeveloper. Under the CpxFileName parameter, make an entry for your customized DataBindingsABC.cpx file, for example: <param-name>CpxFileName</param-name> <param-value>view.DataBindingsABC</param-value>
To customize a region 1 2 3
Copy the regions JSPX file and rename it, for example, CatalogNarrowByBinRegionABC.jspx, where ABC is the name of your company. Make changes to the copy in Oracle JDeveloper or a text editor. Redefine the mapping in WEB-INF/region-metadata.xml to use the new region.
63
Customizing Pages for Siebel Self-Service Applications Creating Page Templates for Siebel Self-Service Applications
64
Customizing Pages for Siebel Self-Service Applications About Page Template Mappings for Siebel Self-Service Applications
Template mappings allow you to use different pages for different functions, such as product category and service request. In the standard application, page template mappings are stored in a file called template-faces-config.xml. Each template is represented as a set of five properties that are defined in the TemplateListLoader managed bean. These properties shown in Table 9.
Table 9. Property
Page Template Mapping Properties Description Template name. Do not use spaces to separate words, for example: BrowseProduct SS_CATALOG_CATEGORY_PAGE
logicalName
physicalName
description
Seeded message code used to show the template name in the language of the user. Use capital letters separated by underscores, for example: SS_MY_ACCOUNT_B2B_PAGE_TEMPLATE SS_SR_CASE_DESC
type
The possible values are: image (for images) ViewId (for .jspx files; that is, pages)
pageName
Used to group the templates based on the page name (mainly for pages with template rules). Can be one of the following values (context type in parentheses): Home (User Type) Browse Products (Product Category) Checkout Start (User Type) My Accounts (UserType) Product Categories (Product Category) Product Details (Product Category) Promotion Details (Product Category) Service Request Start (SR Type) General
NOTE: The pageName value is General for all images and for page templates (.jspx files) with no template mapping rules.
65
Customizing Pages for Siebel Self-Service Applications Page Template Mapping Example for Self-Service Applications
Entries for templates take the forms shown in the following examples: Page with a template mapping rule: <value>SS_CATALOG_PROD_LIST_PAGE</value> <value>/ss/base/catalog/ListView.jspx</value> <value>SS_CATALOG_PRODUCT_TEMPLATE</value> <value>ViewId</value> <value>Product Details</value> Page without a template mapping rule: <value>SS_LOGIN</value> <value>/ss/base/common/LaunchLogin.jspx</value> <value>SS_LOGIN_TEMPLATE</value> <value>ViewId</value> <value>General</value> Image: <value>SS_ORACLE_LOGO</value> <value>/ss/base/image/logo.png</value> <value>SS_ORACLE_LOGO</value> <value>image</value> <value>General</value>
66
Customizing Pages for Siebel Self-Service Applications Page Template Mapping Example for Self-Service Applications
<managed-bean-name>templateListLoader</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.setup.template.TemplateListLoader</ managed-bean-class> <managed-bean-scope>session</managed-bean-scope> <!-- Template Properties --> <managed-property> <property-name>beanProps</property-name> <list-entries> <value-class>java.lang.String</value-class> <value>logicalName</value> <value>physicalName</value> <value>description</value> <value>type</value> <value>pageName</value> </list-entries> </managed-property> <!-- Template Mappings --> <managed-property> <property-name>mappings</property-name> <list-entries> <value>Login</value> <value>/ss/base/auth/LoginLaunch.jsp</value> <value>Login Template</value> <value>ViewId</value> <value>Login</value>
67
Customizing Pages for Siebel Self-Service Applications Page Template Mapping Example for Self-Service Applications
<value>Logout</value>
68
Customizing Pages for Siebel Self-Service Applications Page Template Mapping Example for Self-Service Applications
<value>General</value>
<value>SS_HOME_DEF</value> <value>/ss/base/catalog/Catalog.jspx</value> <value>SS_HOME_DEF_DESC</value> <value>ViewId</value> <value>Home</value> <!-- Service Request Pages --> <value>SS_SR_START_PAGE</value> <value>/ss/base/sr/SRIdentifyProblem.jspx</value> <value>SS_SR_START_DEFAULT_TMPL</value> <value>ViewId</value> <value>Service Request Start</value>
69
Customizing Pages for Siebel Self-Service Applications Page Template Mapping Example for Self-Service Applications
<value>SS_SR_TROUBLE_TICKET</value> <value>/ss/base/sr/SRIdentifyProblem.jspx</value> <value>SS_SR_TROUBLE_TICKET_TMPL</value> <value>ViewId</value> <value>Service Request Start</value> ... <!-- Service Request Images --> <!-- The logicalName values are from MLOVs --> <value>Case</value> <value>/ss/image/case.gif</value> <value>SS_SR_CASE_DESC</value> <value>image</value> <value>General</value>
70
Customizing Pages for Siebel Self-Service Applications Page Template Mapping Example for Self-Service Applications
71
Customizing Pages for Siebel Self-Service Applications Page Template Mapping Example for Self-Service Applications
<value>Technical Problem</value> <value>/ss/image/technicalproblem.gif</value> <value>SS_SR_TECH_PROBLEM_DESC</value> <value>image</value> <value>General</value> <!-- General Images --> <value>SS_EXPAND_BUTTON</value> <value>/ss/skin/img/plus.gif</value> <value>Expand Button</value> <value>image</value> <value>General</value>
<value>SS_CONFIG_EXCLUDED_ITEM_ICON</value> <value>/ss/image/excluded.gif</value> <value>Excluded Item</value> <value>image</value> <value>General</value> ... <!-- Product Categories, Browse Products, Product Details, and Promotion Details --> <value>SS_CATALOG_CATEGORY_PAGE</value> <value>/ss/base/catalog/Category.jspx</value> <value>SS_CATALOG_CAT_TMPL</value> <value>ViewId</value>
72
Customizing Pages for Siebel Self-Service Applications Page Template Mapping Example for Self-Service Applications
<value>Product Categories</value>
<value>SS_CATALOG_PROMO_DTLS_PAGE</value> <value>/ss/base/catalog/promotion/PromotionDetails.jspx</value> <value>SS_CATALOG_PROMO_DTLS_TMPL</value> <value>ViewId</value> <value>Promotion Details</value> <!-- My Accounts --> <value>SS_MY_ACCOUNT_B2B</value> <value>/ss/base/home/MyAccountHomeB2B.jspx</value> <value>SS_MY_ACCOUNT_B2B_PAGE_TEMPLATE</value> <value>ViewId</value> <value>My Accounts</value>
73
Customizing Pages for Siebel Self-Service Applications Customizing Page Template Mappings for Self-Service Applications
<value>ViewId</value> <value>My Accounts</value> <!-- Home --> <value>SS_ESERVICE_HOME_PAGE</value> <value>/ss/base/km/EserviceHome.jspx</value> <value>SS_ESERVICE_HOME_PAGE_TEMPLATE</value> <value>ViewId</value> <value>Home</value> <!-- Checkout --> <value>SS_CART_CHECKOUT_HOME</value> <value>/ss/base/cart/checkout/Shipping.jspx</value> <value>Checkout Page Template</value> <value>ViewId</value> <value>CheckoutHome</value> ... </list-entries> </managed-property> </managed-bean> </faces-config>
74
Customizing Pages for Siebel Self-Service Applications Setting Page Template Mappings for Self-Service Applications
Open template-faces-config-ABC.xml in a text editor and make the necessary changes to create your new page mappings. For the available properties of page template mappings, see Table 9 on page 65.
75
Customizing Pages for Siebel Self-Service Applications About Page Flows for SelfService Applications
Figure 6.
The arrows in Figure 6 represent the page flows to and from the Shopping Cart detail page, CartDetail.jspx, which shows the items in the Shopping Cart. Arrow labels represent the actions taken on the starting page that lead to the destination page. For example, users can continue shopping and rename their Shopping Cart, or examine product details (page not shown). Anonymous users must log in to be able to check out. For information on using Oracle JDeveloper, see Oracle JDeveloper 10g Online Help.
76
Customizing Pages for Siebel Self-Service Applications Page Flow Example for the Self-Service Shopping Cart
<!-- Shopping Cart Navigation Rules --> <navigation-rule> <!--from-view-id>/ss/base/cart/CartDetail.jspx</from-view-id--> <!--from-view-id>/*</from-view-id--> <!-- Without from-view-id, access is allowed to Shopping Cart detail and checkout pages from the Shopping Cart bin on any page. --> <navigation-case> <from-outcome>dialog:viewcart</from-outcome> <to-view-id>/ss/base/cart/CartDetail.jspx</to-view-id> </navigation-case> <navigation-case> <from-action>#{CartDetailBean.checkOutAction}</from-action> <from-outcome>B2BCheckOut</from-outcome> <to-view-id>/ss/base/cart/checkout/Shipping.jspx</to-view-id> <redirect/> </navigation-case> <navigation-case> <from-action>#{CartDetailBean.checkOutAction}</from-action> <from-outcome>B2CCheckOut</from-outcome> <to-view-id>/ss/base/cart/checkout/ShippingAndBillingB2C.jspx</to-view-id> <redirect/> </navigation-case> <navigation-case> <from-action>#{CartDetailBean.checkOutAction}</from-action>
77
Customizing Pages for Siebel Self-Service Applications Page Flow Example for the Self-Service Shopping Cart
<from-outcome>GUESTCheckOut</from-outcome> <to-view-id>/ss/base/cart/checkout/PreCheckout.jsp</to-view-id> <redirect/> </navigation-case> </navigation-rule> <!-- Navigation from Shopping Cart Detail Page --> <navigation-rule> <from-view-id>/ss/base/cart/CartDetail.jspx</from-view-id> <navigation-case> <from-action>#{CartDetailBean.executeCartAction}</from-action> <from-outcome>login</from-outcome> <to-view-id>/ss/base/common/Login.jspx</to-view-id> <redirect/> </navigation-case> <navigation-case> <from-action>#{CartDetailBean.reconfigure}</from-action> <from-outcome>reconfigure</from-outcome> <to-view-id>/ss/base/catalog/ProductDetails.jspx</to-view-id> </navigation-case> <navigation-case> <from-action>#{CartDetailBean.executeCartAction}</from-action> <from-outcome>dialog:renameCart</from-outcome> <to-view-id>/ss/base/cart/popup/RenameCart.jspx</to-view-id> </navigation-case> <navigation-case> <from-outcome>continueShopping</from-outcome> <to-view-id>#{CartDetailBean.continueShopping}</to-view-id> <redirect/> </navigation-case>
78
Customizing Pages for Siebel Self-Service Applications Page Flow Example for the Self-Service Shopping Cart
</navigation-rule> ... <!-- Shopping Cart Backing Beans --> <managed-bean> <managed-bean-name>CartManageDisplayBean</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.cart.CartManageDisplayBean</ managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean> <managed-bean> <managed-bean-name>CartDetailBean</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.cart.CartDetailBean</managed-beanclass> <managed-bean-scope>request</managed-bean-scope> <managed-property> <property-name>bindings</property-name> <value>#{bindings}</value> </managed-property> </managed-bean> <managed-bean> <managed-bean-name>CartListBean</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.cart.CartListBean</managed-beanclass> <managed-bean-scope>request</managed-bean-scope> </managed-bean> ... </faces-config>
79
Customizing Pages for Siebel Self-Service Applications Customizing Page Flows for Self-Service Applications
In the Applications Navigator in Oracle JDeveloper, expand the WEB-INF node under ViewController/public_html, and then double-click faces-config-ABC.xml to open it. NOTE: This file is very large. It is recommended to open it in the Overview view.
Click the Diagram tab. The schematic view of the pages, page flows, and navigation rules opens, as shown in Figure 6 on page 76. NOTE: Working with this file in the Diagram view in Oracle JDeveloper is computationally intensive.
Edit the page flows and navigation rules using the Structure window and Properties Inspector. You can also edit the source code by clicking the Source tab.
80
Customizing Pages for Siebel Self-Service Applications About Process Trains for SelfService Applications
Process trains are rendered by classes that build on CoreProcessTrain. For example, in Siebel SelfService Applications, the VerticalProcessTrainRenderer class, which is referenced in faces-configbase.xml, implements a vertical process train. For more information on process train classes, see Oracle JDeveloper 10g Online Help. Process trains are defined in a configuration file, typically called faces-config-baseapplication_name-train.xml, which is in the ViewController/public_html/WEB-INF directory.
Building the Menu Model <!-- Sample Menu Model For Process Train in SampleSkinPage.jspx --> <managed-bean> <managed-bean-name>menuItem_a1</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.util.MenuItem</managed-bean-class> <managed-bean-scope>none</managed-bean-scope> <managed-property> <property-name>label</property-name> <value>Select Request Type</value> </managed-property> <managed-property> <property-name>fileName</property-name> <value>/ss/base/common/train1.jspx</value> </managed-property> </managed-bean>
81
Customizing Pages for Siebel Self-Service Applications About Process Trains for SelfService Applications
<managed-bean> <managed-bean-name>menuItem_a2</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.util.MenuItem</managed-bean-class> <managed-bean-scope>none</managed-bean-scope> <managed-property> <property-name>label</property-name> <value>Identify Problem</value> </managed-property> <managed-property> <property-name>fileName</property-name> <value>/ss/base/common/train2.jspx</value> </managed-property> </managed-bean>
<managed-bean> <managed-bean-name>menuItem_a3</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.util.MenuItem</managed-bean-class> <managed-bean-scope>none</managed-bean-scope> <managed-property> <property-name>label</property-name> <value>Suggested Solutions</value> </managed-property> <managed-property> <property-name>fileName</property-name> <value>/ss/base/common/train3.jspx</value> </managed-property> </managed-bean>
<managed-bean> <managed-bean-name>menuItem_a4</managed-bean-name>
82
Customizing Pages for Siebel Self-Service Applications About Process Trains for SelfService Applications
<managed-bean-class>oracle.apps.ss.base.view.util.MenuItem</managed-bean-class> <managed-bean-scope>none</managed-bean-scope> <managed-property> <property-name>label</property-name> <value>Contact Information</value> </managed-property> <managed-property> <property-name>fileName</property-name> <value>/node4.jspx</value> </managed-property> </managed-bean>
<managed-bean> <managed-bean-name>menuItem_a5</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.util.MenuItem</managed-bean-class> <managed-bean-scope>none</managed-bean-scope> <managed-property> <property-name>label</property-name> <value>Review and Submit</value> </managed-property> <managed-property> <property-name>fileName</property-name> <value>/node5.jspx</value> </managed-property> </managed-bean>
83
Customizing Pages for Siebel Self-Service Applications About Process Trains for SelfService Applications
<managed-property> <property-name>label</property-name> <value>Confirmation</value> </managed-property> <managed-property> <property-name>fileName</property-name> <value>/node6.jspx</value> </managed-property> </managed-bean> Defining the Process Train <managed-bean> <managed-bean-name>menuTreeModelTrain</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.util.MenuTreeModelAdapter </managed-bean-class> <managed-bean-scope>session</managed-bean-scope> <managed-property> <property-name>childProperty</property-name> <value>children</value> </managed-property> <managed-property> <property-name>listInstance</property-name> <list-entries> <value-class>oracle.apps.ss.base.view.util.MenuItem</value-class> <value>#{menuItem_a1}</value> <value>#{menuItem_a2}</value> <value>#{menuItem_a3}</value> <value>#{menuItem_a4}</value> <value>#{menuItem_a5}</value> <value>#{menuItem_a6}</value> </list-entries>
84
Customizing Pages for Siebel Self-Service Applications Service Request Process Train Example for Siebel E-Support
</managed-property> </managed-bean> Building the Menu <managed-bean> <managed-bean-name>menuModelTrain</managed-bean-name> <managed-bean-class> oracle.apps.ss.base.view.util.MenuModelAdapter</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> <managed-property> <property-name>viewIdProperty</property-name> <value>viewId</value> </managed-property> <managed-property> <property-name>instance</property-name> <value>#{menuTreeModelTrain.model}</value> </managed-property> </managed-bean> </faces-config>
85
Customizing Pages for Siebel Self-Service Applications Service Request Process Train Example for Siebel E-Support
<value>IdentifyProblemSinglePageNode</value> <value>ReviewandSubmitNode</value> <value>ConfirmationNode</value> <value>Request for Information</value> When a user submits a Request for Information SR, the user sees first an expanded (single-page) Identify Problem page, then a Review and Submit page, and finally a Confirmation page. The following is the process train model for service requests in Siebel E-Support, faces-config-base-sr-train.xml: <?xml version="1.0" encoding="windows-1252"?> <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd"> <faces-config xmlns="http://java.sun.com/JSF/Configuration"> <!-- DO NOT CHANGE ANY OF THE MANAGED BEAN NAMES IN THIS FILE --> Defining the Menu Model <managed-bean> <managed-bean-name>SelectRequestTypeNode</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.sr.SRMenuItem</managed-bean-class> <managed-bean-scope>none</managed-bean-scope> <managed-property> <property-name>label</property-name> <value>SS_SR_SELECT_SR_TYPE</value> </managed-property> <managed-property> <property-name>fileName</property-name> <value>/ss/base/sr/SRSelectRequestTypeBody.jspx</value> </managed-property> <managed-property> <property-name>viewId</property-name> <value>/ss/base/sr/SRSelectRequestTypeBody.jspx</value>
86
Customizing Pages for Siebel Self-Service Applications Service Request Process Train Example for Siebel E-Support
</managed-property> </managed-bean>
<managed-bean> <managed-bean-name>IdentifyProblemNode</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.sr.SRMenuItem</managed-bean-class> <managed-bean-scope>none</managed-bean-scope> <managed-property> <property-name>label</property-name> <value>SS_SR_IDENTIFY_PROBLEM</value> </managed-property> <managed-property> <property-name>fileName</property-name> <value>/ss/base/sr/SRIdentifyProblem.jspx</value> </managed-property> <managed-property> <property-name>viewId</property-name> <value>/ss/base/sr/SRIdentifyProblem.jspx</value> </managed-property> </managed-bean>
87
Customizing Pages for Siebel Self-Service Applications Service Request Process Train Example for Siebel E-Support
<managed-bean> <managed-bean-name>SuggestedSolutionsNode</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.sr.SRMenuItem</managed-bean-class> <managed-bean-scope>none</managed-bean-scope> <managed-property> <property-name>label</property-name> <value>SS_SR_SUGGESTED_SOLUTION</value> </managed-property> <managed-property> <property-name>fileName</property-name> <value>/ss/base/sr/SRSuggestedSolutions.jspx</value> </managed-property> <managed-property> <property-name>viewId</property-name> <value>/ss/base/sr/SRSuggestedSolutions.jspx</value> </managed-property> </managed-bean>
88
Customizing Pages for Siebel Self-Service Applications Service Request Process Train Example for Siebel E-Support
<managed-bean-scope>none</managed-bean-scope> <managed-property> <property-name>label</property-name> <value>SS_SR_CONTACT_INFORMATION</value> </managed-property> <managed-property> <property-name>fileName</property-name> <value>/ss/base/sr/SRContactInformation.jspx</value> </managed-property> <managed-property> <property-name>viewId</property-name> <value>/ss/base/sr/SRContactInformation.jspx</value> </managed-property> </managed-bean>
<managed-bean> <managed-bean-name>AddAttachmentsNode</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.sr.SRMenuItem</managed-bean-class> <managed-bean-scope>none</managed-bean-scope> <managed-property> <property-name>label</property-name> <value>SS_SR_ADD_ATTACHMENT</value> </managed-property> <managed-property> <property-name>fileName</property-name> <value>/ss/base/sr/SRCreateAttachContainer.jspx</value> </managed-property> <managed-property> <property-name>viewId</property-name> <value>/ss/base/sr/SRCreateAttachContainer.jspx</value>
89
Customizing Pages for Siebel Self-Service Applications Service Request Process Train Example for Siebel E-Support
</managed-property> </managed-bean>
<managed-bean> <managed-bean-name>ReviewandSubmitNode</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.sr.SRMenuItem</managed-bean-class> <managed-bean-scope>none</managed-bean-scope> <managed-property> <property-name>label</property-name> <value>SS_SR_REVIEW_SUBMIT</value> </managed-property> <managed-property> <property-name>fileName</property-name> <value>/ss/base/sr/SRReviewandSubmit.jspx</value> </managed-property> <managed-property> <property-name>viewId</property-name> <value>/ss/base/sr/SRReviewandSubmit.jspx</value> </managed-property> </managed-bean>
90
Customizing Pages for Siebel Self-Service Applications Service Request Process Train Example for Siebel E-Support
<managed-bean> <managed-bean-name>ReviewandSubmitSinglePageNode</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.sr.SRMenuItem</managed-bean-class> <managed-bean-scope>none</managed-bean-scope> <managed-property> <property-name>label</property-name> <value>SS_SR_REVIEW_SUBMIT</value> </managed-property> <managed-property> <property-name>fileName</property-name> <value>/ss/base/sr/SRReviewandSubmitSingle.jspx</value> </managed-property> <managed-property> <property-name>viewId</property-name> <value>/ss/base/sr/SRReviewandSubmitSingle.jspx</value> </managed-property> </managed-bean> Building the Menu <managed-bean> <managed-bean-name>menuModelSRTrain</managed-bean-name>
91
Customizing Pages for Siebel Self-Service Applications Service Request Process Train Example for Siebel E-Support
<managed-bean-class>oracle.apps.ss.base.view.sr.MenuModelSRAdapter</managed-beanclass> <managed-bean-scope>request</managed-bean-scope> <managed-property> <property-name>viewIdProperty</property-name> <value>viewId</value> </managed-property> <managed-property> <property-name>instance</property-name> <value>#{menuTreeModelSRTrain.model}</value> </managed-property> Defining the Process Trains <managed-property> <property-name>srPageFlowList</property-name> <!-- The case of the request type must match the case in the database. --> <list-entries> <value-class>java.lang.String</value-class> <value>Request for Information</value> <value>IdentifyProblemSinglePageNode</value> <value>ReviewandSubmitSinglePageNode</value> <value>ConfirmationNode</value> <value>Request for Information</value>
92
Customizing Pages for Siebel Self-Service Applications Service Request Process Train Example for Siebel E-Support
<value>Case</value>
93
Customizing Pages for Siebel Self-Service Applications Customizing Process Trains for Self-Service Applications
2 3
94
Customizing Pages for Siebel Self-Service Applications Customizing Process Trains for Self-Service Applications
Create a managed bean for the survey node, for example: <managed-bean> <managed-bean-name>SurveyNode</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.sr.SRMenuItem</managed-bean-class> <managed-bean-scope>none</managed-bean-scope> <managed-property> <property-name>label</property-name> <value>SS_SR_SURVEY</value> </managed-property> <managed-property> <property-name>fileName</property-name> <value>/ss/base/sr/SRSurvey.jspx</value> </managed-property> <managed-property> <property-name>viewId</property-name> <value>/ss/base/sr/SRSurvey.jspx</value> </managed-property> </managed-bean>
Edit the process train for the Case service request type, adding a survey node: <value>Case</value> <value>IdentifyProblemNode</value> <value>SuggestedSolutionsNode</value> <value>SurveyNode</value> <value>ContactInformationNode</value> <value>AddAttachmentsNode</value> <value>ReviewandSubmitNode</value> <value>ConfirmationNode</value> <value>Case</value>
7 8
95
Customizing Pages for Siebel Self-Service Applications Customizing Process Trains for Self-Service Applications
For more information on the menu model and customizing it, see Chapter 6, Customizing Menus for Siebel Self-Service Applications.
3 4
Open faces-config-ABC-menu.xml in a text editor. Add a managed bean for the third-level menu: <managed-bean> <managed-bean-name>m3_SRSURVEY</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.util.MenuItem</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> <managed-property> <property-name>label</property-name> <value>SS_SR_CREATE_REQUEST</value> </managed-property> <managed-property> <property-name>fileName</property-name> <value>/ss/base/sr/SRSurvey.jspx</value>
96
Customizing Pages for Siebel Self-Service Applications Customizing Process Trains for Self-Service Applications
Add the third-level menu as a child of the second-level Service Request menu: <managed-bean> <managed-bean-name>m2_ServiceRequest</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.util.MenuItem</managed-bean-class> ... <managed-property> <property-name>children</property-name> <list-entries> <value-class>oracle.apps.ss.base.view.util.MenuItem</value-class> <value>#{m3_SRCRCONFIRM}</value> <value>#{m3_SRCRSELECTTYPE}</value> <value>#{m3_SRREVIEW}</value> <value>#{m3_SRCONTACTINFO}</value> ... <value>#{m3_SRSUGGESTSOLUTION}</value> <value>#{m3_SRSURVEY}</value> <value>#{m3_SRREVIEWSINGLE}</value> ... </list-entries> </managed-property> </managed-bean>
Open SRSurvey.jspx in Oracle JDeveloper or a text editor, and then modify the af:form tag as follows: <af:form binding="#{backing_ss_base_sr_SRSummary.srSurveyform}">
97
Customizing Pages for Siebel Self-Service Applications Customizing Process Trains for Self-Service Applications
Open the SRSummary managed bean (ViewController/src/oracle/apps/ss/base/view/sr/ SRSummary.java) in Oracle JDeveloper or a text editor, and then add the following code: private CoreForm srSurveyform; public void setSrSurveyform(CoreForm form) { createSRTabCount = 12 //Assign a unique value. this.srSurveyform = form; } public CoreForm getSrSurveyform() { return srSurveyform; } public boolean getSRSurveyRendered() { if (createSRTabCount == 12) //Use the same value as above. return true; else return false; } NOTE: You must assign to createSRTabCount a value that does not already exist in the SRSummary.java file.
98
This chapter describes the menu model in Siebel Self-Service Applications and how to customize it. It includes the following topics: About the Menu Model for Self-Service Applications on page 99 Menu Model Example for Self-Service Applications on page 101 Customizing the Menu for Self-Service Applications on page 113 Showing and Hiding Menu Nodes Based on Business Logic on page 114 Using the Condition Property to Hide Detail Nodes in List-Detail Pages on page 114 Using the af:goLink Tag for Navigating to Secure and Nonsecure Pages on page 118
Figure 7.
Menu Model
At depth 0, global menus and menu tabs are defined, with the only difference being the type of node. If the type is global, a node is rendered as a global menu item; if not, it is rendered as a tab. Each node in the menu model can have child menu nodes, for example, the Shopping Cart child node of the Products node and the Current Cart node of the Shopping Cart node.
99
Customizing Menus for Siebel Self-Service Applications About the Menu Model for Self-Service Applications
Every node of the menu is encapsulated as a MenuItem JavaBean that consists of various properties for each node, shown in Table 10.
Menu Node Properties Description Associates a list of children with the node, if applicable. Used to display the node based on some business rule. A valid value is ManagedBean.method as a String. For more information, see Showing and Hiding Menu Nodes Based on Business Logic on page 114.
Filename of the node. Name of the node. One or more permissions attached to the node that determine which users can view it. Determines whether the node is rendered. The default value is true. An expression can be used to get the value from the configuration parameters, for example, to hide a product tree if Siebel E-Commerce is not implemented. Set to true only for the eight types of pages that support template mappings. If this property is set to true, the fileName property will be interpreted as a template name and the view ID for the page will be retrieved using the ContextTemplateBean API. For more information on templates, see About Page Template Mappings for Siebel Self-Service Applications on page 64. Type of node; that is, global or default.
pageTemplate
type
The entire menu model is loaded when the session is created and placed in the session scope. Later, the menu model is used to render the context-based menus depending on the logged-in end user's permissions.
About Permissions
Users are assigned responsibilities in Siebel Self-Service Applications, and every responsibility is associated with a set of permissions. When the user first logs in, the application loads the complete set of permissions that are assigned to the logged-in user using the PermissionLoader class (oracle.apps.ss.base.model.security.PermissionLoader.java). Further, because every menu node can be assigned one or more permissions, the menu implementation displays either only those menu nodes that do not have any permissions associated with them, or those nodes that have the same permission assigned to the logged-in user. The code needed for this specific implementation is in the MenuItem.isRendered() function.
100
Customizing Menus for Siebel Self-Service Applications Menu Model Example for Self-Service Applications
When a user requests a page, such as by clicking a menu tab, the product-specific contents within this container page are shown only if the user has the necessary permission to view that page. Otherwise, an error message is shown. For more information, see af:panelBorder Tag and Facets on page 54. Additionally, developers can use this same Permission bean for controlling the display of buttons on their pages by using the Expression Language expression: sessionBean.permission['PermissionName'] The menu model is easily customizable. For example, if a developer creates a new permission to control the display of a specific page, he or she needs to add only this permission to any menu node where it applies, and then stop and restart the Oracle Application Server.
About Bookmarking
All the pages that are constructed using the af:goXYZ tag can be bookmarked. Because menus are constructed using the af:goMenuItem tag and links on a page are constructed using the af:goLink tag, menus and links on a page can be bookmarked. However, the end page from a navigation rule cannot be bookmarked because a navigation rule is executed using a forward request to the end page. When a request is forwarded, the page from which the navigation rule is executed is shown in the URL. To retrieve the URL for product pages, the products.getUrl() API is used, which in turn calls the contextTemplateBean.getProductsPage() API. The ContextTemplateBean API returns a view Id based on the rule defined. Other parameters needed to show the page must be appended to the products.getUrl() API. Bookmarkable pages in the application are not just for bookmarking, but can also be indexed by search engines. Therefore, the site ID and language parameters are added while constructing the URL.
10 1
Customizing Menus for Siebel Self-Service Applications Menu Model Example for Self-Service Applications
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd"> <faces-config xmlns="http://java.sun.com/JSF/Configuration"> <!-- Global Menu Items --> <managed-bean> <managed-bean-name>menuGlobal_Preferences</managed-bean-name> <managed-bean-class>oracle.apps.ss.common</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> <managed-property> <property-name>label</property-name> <value>GlobalPreferences</value> </managed-property> <!-- Setting the image for the global menu --> <managed-property> <property-name>icon</property-name> <value>/images/preferences.gif</value> </managed-property> <managed-property> <property-name>type</property-name> <value>global</value> </managed-property> <managed-property> <property-name>fileName</property-name> <value>/global/Preferences.jspx</value> </managed-property> </managed-bean> <managed-bean> <managed-bean-name>menuGlobal_Help</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.util.MenuItem</managed-bean-class> <managed-bean-scope>session</managed-bean-scope>
102
Customizing Menus for Siebel Self-Service Applications Menu Model Example for Self-Service Applications
<managed-property> <property-name>label</property-name> <value>GlobalHelp</value> </managed-property> <managed-property> <property-name>icon</property-name> <value>/images/help.gif</value> </managed-property> <managed-property> <property-name>type</property-name> <value>global</value> </managed-property> <managed-property> <property-name>fileName</property-name> <value>/global/Help.jspx</value> </managed-property> </managed-bean> <managed-bean> <managed-bean-name>menuGlobal_Logout</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.util.MenuItem</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> <managed-property> <property-name>label</property-name> <value>GlobalLogout</value> </managed-property> <managed-property> <property-name>icon</property-name> <value>/images/logout.gif</value> </managed-property> <managed-property>
10 3
Customizing Menus for Siebel Self-Service Applications Menu Model Example for Self-Service Applications
<property-name>type</property-name> <value>global</value> </managed-property> <managed-property> <property-name>fileName</property-name> <value>/global/Logout.jspx</value> </managed-property> <!-- Displays the logout menu item only when the user is logged in --> <managed-property> <property-name>condition</property-name> <value>sessionBean.isUserLoggedIn</value> </managed-property> </managed-bean> <!-- Global Menu Items End --> <!-- Third-level Menu --> <managed-bean> <managed-bean-name>menuList_MyCart</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.util.MenuItem</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> <managed-property> <property-name>label</property-name> <value>MenuList_MyCart</value> </managed-property> <managed-property> <property-name>fileName</property-name> <value>/CurrentCart.jspx </value> </managed-property> <!-- The condition property defaults to false in the application and can therefore be omitted unless they need to be true. -->
104
Customizing Menus for Siebel Self-Service Applications Menu Model Example for Self-Service Applications
<managed-property> <property-name>condition</property-name> <value>FALSE</value> </managed-property> </managed-bean> <managed-bean> <managed-bean-name>menuList_SavedCart</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.util.MenuItem</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> <managed-property> <property-name>label</property-name> <value>MenuList_SavedCart </value> </managed-property> <managed-property> <property-name>fileName</property-name> <value>/SavedCart.jspx </value> </managed-property> <!-- Declaring permissions attached to the node --> <managed-property> <property-name>permission</property-name> <list-entries> <value>SAVED_CART</value> <value>ANOTHER_PERMISSION</value> <!-- Can have multiple permissions --> </list-entries> </managed-property> </managed-bean> <managed-bean> <managed-bean-name>menuList_SharedCart</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.util.MenuItem</managed-bean-class> <managed-bean-scope>session</managed-bean-scope>
10 5
Customizing Menus for Siebel Self-Service Applications Menu Model Example for Self-Service Applications
<managed-property> <property-name>label</property-name> <value>MenuList_SharedCart </value> </managed-property> <managed-property> <property-name>fileName</property-name> <value>/SharedCart.jspx </value> </managed-property> <managed-property> <property-name>permission</property-name> <list-entries> <value>SHARED_CART</value> </list-entries> </managed-property> </managed-bean> <!-- Third-level Menu Ends --> <!-- Menu Bar Items and Second-level Menu --> <managed-bean> <managed-bean-name>menubar_Browse</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.util.MenuItem</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> <managed-property> <property-name>label</property-name> <value>MenuBar_Browse </value> </managed-property> <managed-property> <property-name>fileName</property-name> <value>BrowseProduct</value> </managed-property>
106
Customizing Menus for Siebel Self-Service Applications Menu Model Example for Self-Service Applications
</managed-bean> <managed-property> <property-name>pageTemplate</property-name> <value>true</value> </managed-property> </managed-bean> <managed-bean> <managed-bean-name>menubar_ShoppingCart</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.util.MenuItem</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> <managed-property> <property-name>label</property-name> <value>MenuBar_ShoppingCart </value> </managed-property> <managed-property> <property-name>fileName</property-name> <value>/CurrentCart.jspx </value> </managed-property> <!-- Declaring Children for the Menu Bar Items --> <managed-property> <property-name>children</property-name> <list-entries> <value-class>oracle.apps.ss.base.view.util.MenuItem</value-class> <value>#{menuList_MyCart}</value> <value>#{menuList_SavedCart}</value> <value>#{menuList_SharedCart}</value> </list-entries> </managed-property>
10 7
Customizing Menus for Siebel Self-Service Applications Menu Model Example for Self-Service Applications
<!-- Declaration of Children Ends --> </managed-bean> <managed-bean> <managed-bean-name>menubar_OrderStatus</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.util.MenuItem</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> <managed-property> <property-name>label</property-name> <value>MenuBar_OrderStatus</value> </managed-property> <managed-property> <property-name>fileName</property-name> <value>/Order.jspx</value> </managed-property> </managed-bean> <managed-bean> <managed-bean-name>menubar_OrderApproval</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.util.MenuItem</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> <managed-property> <property-name>label</property-name> <value>MenuBar_OrderApproval</value> </managed-property> <managed-property> <property-name>fileName</property-name> <value>/OrderApproval.jspx</value> </managed-property> </managed-bean> <managed-bean> <managed-bean-name>menubar_Lists</managed-bean-name>
108
Customizing Menus for Siebel Self-Service Applications Menu Model Example for Self-Service Applications
<managed-bean-class>oracle.apps.ss.base.view.util.MenuItem</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> <managed-property> <property-name>label</property-name> <value>MenuBar_Lists</value> </managed-property> <managed-property> <property-name>fileName</property-name> <value>/Lists.jspx</value> </managed-property> </managed-bean> <!-- Menu Bar Items End --> <!-- Menu Tabs and First-level Menu --> <managed-bean> <managed-bean-name>menuTab_MyAccount</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.util.MenuItem</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> <managed-property> <property-name>label</property-name> <value>MenuTab_MyAccount</value> </managed-property> <managed-property> <property-name>fileName</property-name> <value>/myAccount.jspx</value> </managed-property> </managed-bean> <managed-bean> <managed-bean-name>menuTab_Statements</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.util.MenuItem</managed-bean-class>
10 9
Customizing Menus for Siebel Self-Service Applications Menu Model Example for Self-Service Applications
<managed-bean-scope>session</managed-bean-scope> <managed-property> <property-name>label</property-name> <value>MenuTab_Statements</value> </managed-property> <managed-property> <property-name>fileName</property-name> <value>/Statements.jspx</value> </managed-property> <managed-property> <property-name>type</property-name> <value>external</value> </managed-property> </managed-bean> <managed-bean> <managed-bean-name>menuTab_Products</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.util.MenuItem</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> <managed-property> <property-name>label</property-name> <value>MenuTab_Products</value> </managed-property> <!-- The fileName value is the same as the first node of the menu bar to make sure that the first node of the menu bar is selected when this tab is selected. --> <managed-property> <property-name>fileName</property-name> <value>/CurrentCart.jspx</value> </managed-property> <!-- Setting Children for Product Menu Tab --> <managed-property>
110
Customizing Menus for Siebel Self-Service Applications Menu Model Example for Self-Service Applications
<property-name>children</property-name> <list-entries> <value-class>oracle.apps.ss.base.view.util.MenuItem</value-class> <value>#{menubar_Browse}</value> <value>#{menubar_ShoppingCart}</value> <value>#{menubar_OrderStatus}</value> <value>#{menubar_OrderApproval}</value> <value>#{menubar_Lists}</value> </list-entries> </managed-property> </managed-bean> <managed-bean> <managed-bean-name>menuTab_Support</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.util.MenuItem</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> <managed-property> <property-name>label</property-name> <value>MenuTab_Support</value> </managed-property> <!-- The rendered property is true by default, but can be mapped to a configuration parameter using Expression Language. ->> <managed-property> <property-name>rendered</property-name> <value>#{configBean.eServiceEnabled}</value> </managed-property> <managed-property> <property-name>fileName</property-name> <value>/Statements.jspx</value> </managed-property> <managed-property>
11 1
Customizing Menus for Siebel Self-Service Applications Menu Model Example for Self-Service Applications
<property-name>type</property-name> <value>external</value> </managed-property> </managed-bean> <!-- Menu Tabs End --> <!-- Menu Tree Model Adapter from Menu Nodes --> <managed-bean> <managed-bean-name>menuTreeModel</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.util.MenuTreeModelAdapter</managedbean-class> <managed-bean-scope>session</managed-bean-scope> <managed-property> <property-name>childProperty</property-name> <value>children</value> </managed-property> <!-- Passing Instances of the Menu Node to Create the Tree --> <managed-property> <property-name>listInstance</property-name> <list-entries> <value-class>oracle.apps.ss.base.view.util.MenuItem</value-class> <value>#{menuGlobal_Preferences}</value> <value>#{menuGlobal_Help}</value> <value>#{menuGlobal_Logout}</value> <value>#{menuTab_MyAccount}</value> <value>#{menuTab_Statements}</value> <value>#{menuTab_Products}</value> <value>#{menuTab_Support}</value> </list-entries> </managed-property>
112
Customizing Menus for Siebel Self-Service Applications Customizing the Menu for Self-Service Applications
</managed-bean> <!-- Menu Tree Model Adapter Ends --> <!-- Menu Model Starts --> <managed-bean> <managed-bean-name>menuModel</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.util.MenuModelAdapter</managed-beanclass> <managed-bean-scope>session</managed-bean-scope> <managed-property> <property-name>viewIdProperty</property-name> <value>viewId</value> </managed-property> <!-- Passing Menu Tree Model Instances to Create the Menu Model --> <managed-property> <property-name>instance</property-name> <value>#{menuTreeModel.model}</value> </managed-property> </managed-bean> <!-- Menu Model Ends --> </faces-config>
11 3
Customizing Menus for Siebel Self-Service Applications Showing and Hiding Menu Nodes Based on Business Logic
Replace faces-config-base-menu.xml with faces-config-ABC-menu.xml in ViewController/ public_html/web.xml under the context parameter javax.faces.CONFIG_FILES: <context-param> <param-name>javax.faces.CONFIG_FILES</param-name> <param-value>...,/WEB-INF/faces-config-ABC-menu.xml,...</param-value> </context-param>
Open faces-config-ABC-menu.xml in a text editor, and make the necessary changes to create your new menu structure. For the available properties of each menu node, see Table 10 on page 100. For an example of customizing the menu, see Customizing the Menu Model to Add the Survey Page on page 96.
114
Customizing Menus for Siebel Self-Service Applications Using the Condition Property to Hide Detail Nodes in List-Detail Pages
If there are no results shown in the Orders node (a search returns no rows) the Order Details and Line Details nodes must not be shown. The condition property is used to accomplish this result. The following example shows the sample code for the Orders, Order Details, and Line Details nodes in faces-config-base-menu.xml: <managed-bean> <managed-bean-name>m3_OrderStatus_Orders</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.util.MenuItem</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> <managed-property> <property-name>label</property-name> <value>Orders</value> </managed-property> <managed-property> <property-name>fileName</property-name> <value>/faces/ss/base/order/Orders.jspx</value> </managed-property> </managed-bean> <managed-bean> <managed-bean-name>m3_OrderStatus_OrderDetails</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.util.MenuItem</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> <managed-property> <property-name>label</property-name> <value>Order Details</value> </managed-property> <managed-property> <property-name>fileName</property-name> <value>/faces/ss/base/order/OrderDetails.jspx</value> </managed-property> <managed-property> <property-name>condition</property-name>
11 5
Customizing Menus for Siebel Self-Service Applications Using the Condition Property to Hide Detail Nodes in List-Detail Pages
<value>orderBean.isOrderDetailsShown</value> </managed-property> </managed-bean> <managed-bean> <managed-bean-name>m3_OrderStatus_LineDetails</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.util.MenuItem</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> <managed-property> <property-name>label</property-name> <value>Line Details</value> </managed-property> <managed-property> <property-name>fileName</property-name> <value>/faces/ss/base/order/LineDetails.jspx</value> </managed-property> <managed-property> <property-name>condition</property-name> <value>orderBean.isLineDetailsShown</value> </managed-property> </managed-bean> NOTE: The condition managed property is not set for the Orders node, because it does not depend on the business logic. Only the Order Details and Line Details nodes are hidden if there are no records under the Orders node. The Java code for orderBean will be similar to the following example: public class OrderBean { public OrderBean() { } boolean lineDetailsNode = false; boolean orderDetailsNode = false;
116
Customizing Menus for Siebel Self-Service Applications Using the Condition Property to Hide Detail Nodes in List-Detail Pages
this.lineDetailsShown = lineDetailsShown; } public boolean isLineDetailsShown() { // Check whether one or more results are in the View Object. If yes return true; else return false. HttpServletRequest httpRequest = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest(); BindingContext ctx = DCUtil.getBindingContext(httpRequest); DCDataControl dc = ctx.findDataControl("SessionAMDataControl"); SessionAMImpl sessionAM = (SessionAMImpl) dc.getDataProvider(); OrderAMImpl ordersAM = (OrderAMImpl)sessionAM.getOrderAM(); ordersVOImpl orderVO = (ordersVOImpl)ordersAM.getordersVO1(); if (orderVO.getFetchedRowCount() != 0) { return true; } else { return false; } } public void setOrderDetailsShown(boolean orderDetailsShown) { this.orderDetailsShown = orderDetailsShown; } public boolean isOrderDetailsShown() { // Check whether one or more results are in the View Object. If yes return true; else return false. HttpServletRequest httpRequest = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest(); BindingContext ctx = DCUtil.getBindingContext(httpRequest); DCDataControl dc = ctx.findDataControl("SessionAMDataControl"); SessionAMImpl sessionAM = (SessionAMImpl) dc.getDataProvider(); OrderAMImpl ordersAM = (OrderAMImpl)sessionAM.getOrderAM(); ordersVOImpl orderVO = (ordersVOImpl)ordersAM.getordersVO1();
11 7
Customizing Menus for Siebel Self-Service Applications Using the af:goLink Tag for Navigating to Secure and Nonsecure Pages
Using the af:goLink Tag for Navigating to Secure and Nonsecure Pages
An application can have both secure (SSL-enabled) and nonsecure (not SSL-enabled) pages. Depending on the page type, a request must be forwarded to either a secure or nonsecure server. To do so, generate the destination for the af:goLink tag by using one of the APIs in Table 11.
APIs for Generating Page Destinations Destination Page Is SSL Enabled Yes No
118
This chapter describes the tasks involved in customizing the overall appearance of Siebel Self-Service Applications. It includes the following topics: About Skins for ADF Faces on page 119 Customizing Self-Service Application Appearance on page 120 Customizing Menu Orientation for Self-Service Applications on page 120
11 9
Customizing the Appearance of Siebel Self-Service Applications Customizing SelfService Application Appearance
120
Customizing the Appearance of Siebel Self-Service Applications Customizing Menu Orientation for Self-Service Applications
<managed-bean-class>oracle.apps.ss.base.view.util.SkinProperties</managed-beanclass> <managed-bean-scope>application</managed-bean-scope> <managed-property> <property-name>menuLayout</property-name> <value>horizontal</value> </managed-property> </managed-bean> <managed-bean> <managed-bean-name>Sample</managed-bean-name> <managed-bean-class>oracle.apps.ss.base.view.util.SkinProperties</managed-beanclass> <managed-bean-scope>application</managed-bean-scope> <managed-property> <property-name>menuLayout</property-name> <value>vertical</value> </managed-property> </managed-bean> </faces-config> You can copy, rename, and customize the faces-config-base-skin-properties.xml file to determine the orientation of menus in your applications.
12 1
Customizing the Appearance of Siebel Self-Service Applications Customizing Menu Orientation for Self-Service Applications
3 4 5
Open faces-config-ABC-skin-properties.xml in a text editor. Create a managed bean with the same name as the skin family defined in the adf-faces-skins.xml file. Set the value of the menuLayout property to either horizontal or vertical, depending on how you want the menus in the application to appear.
122
This chapter describes the tasks involved in customizing the Model layer of Siebel Self-Service Applications. It includes the following topics: About the Java Object Cache on page 123 Configuring the Java Object Cache on page 125 Creating Java Object Cache Loader Classes on page 126 About ADF Business Components on page 130 Optimizing ADF Business Component Performance on page 131 Process of Creating New ADF Business Components from Siebel Web Services on page 132 Process of Extending ADF Business Components on page 161 Configuring Failover on the SessionAM Application Module on page 169 About ADF Data Control on page 169 About ADF Binding on page 171 Binding a View Object to a User Interface Page on page 171
12 3
Customizing the Model Layer for Siebel Self-Service Applications About the Java Object Cache
Java Object Cache Configuration Parameters Description Maximum cache lifetime in seconds. Default is 36000 (10 hours). Minimum cache lifetime in seconds. Default is 3600 (1 hour). Maximum cache region size in bytes. Default is 5242880 (5 MB). Minimum cache region size in bytes. Default is 1048576 (1 MB).
Regions do not have these parameters hard-coded. Instead they have user-defined attributes in SelfServiceCacheRegion.xml that reference the configuration parameters: ttl-type. Valid values are high and low, which correspond to MaxTimeToLive and MinTimeToLive, respectively. max-size-type. Valid values are max and min, which correspond to MaxComponentSize and MinComponentSize, respectively.
124
Customizing the Model Layer for Siebel Self-Service Applications Configuring the Java Object Cache
MaxComponentSize="5242880" MinComponentSize="1048576" EnablePriming="True"> <region name="SS_ECOM_PRODUCTS"> <attributes> <cache-loader> <classname>oracle.apps.ss.ecom.catalog.ProductLoader</classname> </cache-loader> <flag>distribute</flag> <user-defined> <name>ttl-type</name> <value>low</value> </user-defined> <user-defined> <name>max-size-type</name> <value>max</value> </user-defined> </attributes> </region> </cache>
12 5
Customizing the Model Layer for Siebel Self-Service Applications Creating Java Object Cache Loader Classes
Create and edit new cache regions, setting the following attributes:
In most cases, implementing a CacheLoader object is the preferred method. With a cache loader, the Java Object Cache automatically determines if an object needs to be loaded into the cache when the object is requested. The Java Object Cache coordinates the load if multiple users request the object at the same time. If an object is not in the cache, then the CacheLoader.load() method is executed. When the load method returns the object, the Java Object Cache inserts that returned object into itself. To create a Java Object Cache loader class, you must extend the CacheLoader class, as in the following example, which shows the LovCacheLoader class: package oracle.apps.ss.base.model.util.cache; import java.util.HashMap; import java.util.Locale; import java.util.logging.Logger; import oracle.apps.ss.base.model.util.ServerUtil; import oracle.apps.ss.base.model.util.lov.proxy.EAILOVPortClient;
126
Customizing the Model Layer for Siebel Self-Service Applications Creating Java Object Cache Loader Classes
import oracle.apps.ss.base.model.util.lov.proxy.types.com.siebel .xml.listquery.ListQuery; import oracle.apps.ss.base.model.util.lov.proxy.types.com.siebel .xml.listquery.ListsQuery; import oracle.apps.ss.base.model.util.lov.proxy.types.com.siebel .xml.listresult.ListResult; import oracle.apps.ss.base.model.util.lov.proxy.types.com.siebel .xml.listresult.ListValueResult; import oracle.apps.ss.base.model.util.lov.proxy.types.com.siebel .xml.listresult.ListValuesResult; import oracle.apps.ss.base.model.util.lov.proxy.types.com.siebel .xml.listresult.ListsResult; import oracle.ias.cache.CacheLoader;
/** This is the loader implementation of the LOVCache. The load method of CacheLoader class is overridden in this class. The load method is invoked with LOV Type as key when a cache miss happens for that key.An instance of this class is registered as loader for LOV cache during creation of LOV cache region by static initialization of CacheManager. */ public class LovCacheLoader extends CacheLoader { static final java.util.logging.Logger log = Logger.getLogger("oracle.apps.ss.base.model.util.cache.LovCacheLoader"); // Default constructor public LovCacheLoader() { } /** This method overloads the load method of the CacheLoader. The EAILOVWSProxy calls to get the data from the data source are made here. * @param handle This refers to the cache region name. * @param args This is the Lov Key that contains the LovType and Language. */ public Object load(Object handle, Object args) { LovCacheKey lovKey = (LovCacheKey)getName(handle); String lovLanguage = lovKey.getLanguage(); String lovType = lovKey.getLovType(); Boolean obj = false; try { EAILOVPortClient myPort = new EAILOVPortClient();
12 7
Customizing the Model Layer for Siebel Self-Service Applications Creating Java Object Cache Loader Classes
myPort.setEndpoint(ServerUtil.getEndPointURL()); ListsQuery listsQuery = new ListsQuery(); ListQuery[] listQuery = new ListQuery[1]; listQuery[0] = new ListQuery();
if (listResult.length > 0) { HashMap<String, String> hashMap = new HashMap<String, String>(); ListValuesResult listValuesResult = listResult[0].getListValuesResult(); ListValueResult[] listValueResult = listValuesResult.getListValueResult();
for (int i = 0; i < listValueResult.length; i++) { hashMap.put(listValueResult[i].getValue(), listValueResult[i].getDisplayValue()); } log.info("Exiting with lov map in session language with size = "+hashMap.size()); return hashMap; } else { log.info("Load cache with Boolean.FALSE because the Web service call returned no records for the combination of LOV type and language"); return obj; } }
128
Customizing the Model Layer for Siebel Self-Service Applications Creating Java Object Cache Loader Classes
catch (Exception ex) { log.severe(ex.getMessage()); } // For all WS exceptions, load null return } } For more information on accessing Siebel data using Web services, see Modifying ADF Business Component Code to Access Web Service Data on page 136. null;
12 9
Customizing the Model Layer for Siebel Self-Service Applications About ADF Business Components
// Log and handle exceptions catch (Exception ex) { } // Return null for Web service exceptions return null; } }
By reducing the coding and testing work related to common application plumbing, ADF Business Components let developers focus on implementing business solutions. The key ADF Business Component components that are used in Siebel Self-Service Applications are the following: Application module An application module is the transactional component that UI clients use to work with application data. It defines an updatable data model and top-level procedures and functions (called service methods) related to a logical unit of work related to an end-user task. An application module contains one or more view objects. Application modules can be nested within other application modules to access the functionality of the top-level modules. In Siebel Self-Service Applications, all application modules are nested within the SessionAM application module. For more information on SessionAM, see SessionAM Application Module on page 25.
130
Customizing the Model Layer for Siebel Self-Service Applications Optimizing ADF Business Component Performance
View object A view object represents a SQL query and simplifies working with its results. You can also use programmatic view objects that are based on Web services. For more information on programmatic view objects, see Creating a Programmatic View Object on page 133. You can link a view object with others to create master-detail hierarchies.
The source code for all ADF Business Component classes in Siebel Self-Service Applications is provided with the applications. For information on working with ADF Business Components, see Oracle Application Development Framework Developers Guide For Forms/4GL Developers on Oracle Technology Network.
NOTE: Lazy component load is recommended because all ADF Business Components in Siebel SelfService Applications are nested within the SessionAM application module and would therefore all be loaded at once if lazy component load was not configured.
Click Continue.
13 1
Customizing the Model Layer for Siebel Self-Service Applications Process of Creating New ADF Business Components from Siebel Web Services
In the Java Options field, add the following parameter, separating it from other parameters by a space: -Djbo.load.components.lazily=true
5 6
Process of Creating New ADF Business Components from Siebel Web Services
You perform the following tasks to create an ADF Business Component from a Siebel Web service:
1 2 3 4
Creating a Web Service Client Proxy on page 132 Creating a Programmatic View Object on page 133 Creating an Application Module on page 134 Modifying ADF Business Component Code to Access Web Service Data on page 136
The Asset Management sample files provided with Siebel Self-Service Applications are used as examples in many of the procedures.
132
Customizing the Model Layer for Siebel Self-Service Applications Process of Creating New ADF Business Components from Siebel Web Services
For information on creating WSDL files from Siebel Web services, see Integration Platform Technologies: Siebel Enterprise Application Integration.
Right-click the new proxy, and then choose Edit Handlers and Custom Mappings. The Edit Handlers and Custom Mappings dialog appears.
5 6 7
On the Edit Handlers tab, select the proxy under Port. Click Add. The Handler Details dialog appears. Browse for the following handler class: oracle.apps.ss.base.model.security.SiebelWSHandler
8 9
Name the handler SiebelWSHandler, and then click OK. Click OK to close the Edit Handlers and Custom Mappings dialog.
NOTE: If you modify the WSDL later, you must re-create the proxy.
13 3
Customizing the Model Layer for Siebel Self-Service Applications Process of Creating New ADF Business Components from Siebel Web Services
In the New Gallery, choose Business Tier, ADF Business Components, and then View Object. The Create View Object wizard appears.
3 4
Complete the following fields: Name Package Value oracle.apps.ss.base.model.<component>.<subcomponent> For example: oracle.apps.ss.base.model.sample.model Name View object name, for example: SampleViewObj
b c 5
On the Attributes page, click New one or more times to define the view object attributes your programmatic view object requires. For example, the asset management sample view object has the following attributes:
6 7
On the Attribute Settings page, make any necessary adjustments to the settings for the attributes you defined. On the Java page, enable a custom view object class to contain your code. Under View Object Class: ViewObjectImpl, select the following check boxes:
Click Finish.
134
Customizing the Model Layer for Siebel Self-Service Applications Process of Creating New ADF Business Components from Siebel Web Services
3 4
On the Welcome page, click Next. On the Name page, complete the following fields, and then click Next: Name Package Value oracle.apps.ss.base.model.<component>.<subcomponent> For example: oracle.apps.ss.base.model.sample.model Name Application module name, for example: SampleAppModule
Select the view object that you created in Creating a Programmatic View Object on page 133, for example SampleViewObj, and then move it to the Data Model pane. A new instance of the view object is created.
b c 6 7 8
(Optional) Use the Instance Name field to rename the view object instance, for example SearchAssetForDisplay. Click Next.
On the Application Modules page, expand the oracle.apps.ss.base.model.security node, select SessionAM, and then move it to the Selected pane. Click Next. On the Java page under Application Module Class: SampleAppModuleImpl, select the Generate Java File(s) check box, and then click Next. On the Finish page, confirm that your choices are correct, and then click Finish.
The application module is created. A data control for the application module is also created and appears in the Data Controls Palette. You can drag and drop a view object from the data control onto a UI page to add the view objects functionality to that UI page (see Binding a View Object to a User Interface Page on page 171).
13 5
Customizing the Model Layer for Siebel Self-Service Applications Process of Creating New ADF Business Components from Siebel Web Services
1 2
Overriding View Object Implementation Class Methods on page 136 Creating the UserData Wrapper Object on page 138
These tasks are part of Process of Creating New ADF Business Components from Siebel Web Services on page 132. The following examples of modifying ADF Business Component code are also provided, along with a list of Java classes in Siebel Self-Service Applications that call Siebel Web Services: Example of Pagination and Sorting on page 139 Example of Query by Example on page 146 Example of Querying Using the Asset Management Sample Files on page 148 Java Classes in Siebel Self-Service Applications That Call Siebel Web Services on page 154
136
Customizing the Model Layer for Siebel Self-Service Applications Process of Creating New ADF Business Components from Siebel Web Services
protected boolean hasNextForCollection(Object rowset) { if (((UserData)getUserDataForCollection(rowset)).hasNext()) { return true; } else { setFetchCompleteForCollection(rowset, true); return false; } } create(). This method is called when the view object instance is created and can be used to initialize any state required by the programmatic view object. At a minimum, this overridden method will contain the following lines to make sure that the programmatic view object has no trace of a SQL query related to it: protected void create() { super.create(); getViewDef().setQuery(null); getViewDef().setSelectClause(null); setQuery(null); } getQueryHitCount(). This method is called to support the getEstimatedRowCount() method. Your implementation returns a count, or estimated count, of the number of rows that will be retrieved by the programmatic view object's query. For example: public long getQueryHitCount(ViewRowSetImpl viewRowSet) { return ((UserData)getUserDataForCollection(viewRowSet.getQueryCollection())) .getRecordCount(); } createRowFromResultSet(). This method is called to populate each row of retrieved data. Your implementation will call createNewRowForCollection() to create a new blank row and then populateAttributeForRow() to populate each attribute of data for the row. For example: public ViewRowImpl createRowFromResultSet(Object o, ResultSet rs) { ViewRowImpl tRow = createNewRowForCollection(o); ContactData cd = ((UserData)getUserDataForCollection(o)).getNextContact(); populateAttributeForRow(tRow, 0, cd.getRowId());
13 7
Customizing the Model Layer for Siebel Self-Service Applications Process of Creating New ADF Business Components from Siebel Web Services
populateAttributeForRow(tRow, 1, cd.getLastName()); return tRow; } releaseUserDataForCollection(). Your code can store and retrieve a user data context object with each row set. This method is called to allow you to release any resources that might be associated with a row set that is being closed. For example: protected void releaseUserDataForCollection(Object qc, Object rs) { ResultSet userDataRS = getResultSet(qc); if (userDataRS != null) { try { userDataRS.close(); } catch (SQLException s) { // exception-related code } } super.releaseUserDataForCollection(qc, rs); } Because the view object component can be related to several active row sets at run time, many of these framework methods receive an Object parameter in which the framework passes the collection of rows, as well as the array of bind variable values that might affect which rows are put into the specific collection. You can store a UserData object with each collection of rows so that your custom data source implementation can associate any needed data source context information. The framework provides the setUserDataForCollection() and getUserDataForCollection() methods to get and set this context information for each collection. Each time one of the overridden framework methods is called, you can use the getUserDataForCollection() method to retrieve the correct ResultSet object associated with the collection of rows that the framework populates.
138
Customizing the Model Layer for Siebel Self-Service Applications Process of Creating New ADF Business Components from Siebel Web Services
LIKE B*
setSortorder. ASC or DESC. setSortsequence. Indicates column order. Can have positive integer values (1, 2, 3, ...).
pagesize. The number of records to be returned for a component. The default is 10. NOTE: The MaximumPageSize server parameter controls the maximum page size. If the pagesize attribute is greater than the maximum page size defined in the server parameter, an error occurs. The Siebel business component also contains a maxCursorFetchSize parameter. If you try to query beyond this size, the following error will be thrown: There were more rows than could be returned. Please refine your query to bring back fewer rows (SBL-DAT-00500). The workaround is to query in forwardOnly mode.
startrownum. The starting point for record retrieval. The 0-based index of the record within the record set. recordcountneeded. True or false. When set to true, indicates that a record count is needed for this component. UserData sets the value to true because recordcount is used in the view objects get QueryHitCount() method implementation. recordcount. A value set by the EAI UI Data Adapter business service, indicating the approximate record count provided by the object manager based on the search specification.
Executes the query and buffers the rows. Exposes a method to retrieve the next row from the buffer. If the buffer is completely read, refills it with fresh rows by placing another Web service call. This is used by the view objects createRowFromResultSet() method implementation. Exposes a method to determine whether there are more rows to return to the view object. This is used by the view objects hasNextForCollection() method implementation. Exposes a method to determine the estimated row count. This should return the recordcount value set by the EAI UI Data Adapter business service. The returned value is used by the view objects get QueryHitCount() method implementation.
ContactVOImpl Class In this example, the overridden methods in ContactVOImpl.java are the following: protected void executeQueryForCollection(Object rowset, Object[] params, int noUserParams) {
13 9
Customizing the Model Layer for Siebel Self-Service Applications Process of Creating New ADF Business Components from Siebel Web Services
setUserDataForCollection(rowset, new UserData(getOrderByClause())); super.executeQueryForCollection(rowset, params, noUserParams); } protected boolean hasNextForCollection(Object rowset) { if (((UserData)getUserDataForCollection(rowset)).hasNext()) { return true; } else { setFetchCompleteForCollection(rowset, true); return false; } } protected void create() { super.create(); getViewDef().setQuery(null); getViewDef().setSelectClause(null); setQuery(null); } public long getQueryHitCount(ViewRowSetImpl viewRowSet) { return ((UserData)getUserDataForCollection(viewRowSet.getQueryCollection())) .getRecordCount(); } public ViewRowImpl createRowFromResultSet(Object o, ResultSet rs){ ViewRowImpl tRow = createNewRowForCollection(o); ContactData cd = ((UserData)getUserDataForCollection(o)).getNextContact(); populateAttributeForRow(tRow, 0, cd.getRowId()); populateAttributeForRow(tRow, 1, cd.getLastName()); return tRow; }
140
Customizing the Model Layer for Siebel Self-Service Applications Process of Creating New ADF Business Components from Siebel Web Services
UserData Class In this example, the UserData object contains the following code: package model; import java.math.BigDecimal; import java.math.BigInteger; import model.types.com.siebel.xml.wc_contacts_io.data.ContactData; import model.types.com.siebel.xml.wc_contacts_io.data.ListOfWc_Contacts_IoData; import model.types.com.siebel.xml.wc_contacts_io.query.ContactQuery; import model.types.com.siebel.xml.wc_contacts_io.query.ListOfWc_Contacts_IoQuery; import model.types.com.siebel.xml.wc_contacts_io.query.QueryType;
public class UserData { private ListOfWc_Contacts_IoQuery query; private model.WC_Contacts_BSClient myPort = null; private ContactData [] cd; private int fetchedSize; private int recordCount; private int resultSize; private int resultIndex; private String orderClause;
public UserData(String orderByClause) { setOrderClause(orderByClause); createQuery(); getNextResultSet(); } public void setFetchedSize(int size) { this.fetchedSize = size; } public int getFetchedSize() {
14 1
Customizing the Model Layer for Siebel Self-Service Applications Process of Creating New ADF Business Components from Siebel Web Services
return this.fetchedSize; } public int getRecordCount() { return this.recordCount; } public void setRecordCount(int count) { this.recordCount = count; } public void setResultSize(int resultSize) { this.resultSize = resultSize; } public int getResultSize() { return resultSize; } public void setResultIndex(int resultIndex) { this.resultIndex = resultIndex; } public int getResultIndex() { return resultIndex; } public void setOrderClause(String orderClause) { this.orderClause = orderClause; } public String getOrderClause() { return orderClause; } public void getNextResultSet() { setResultIndex(0); query.setStartrownum(new BigInteger(Integer.toString(getFetchedSize()))); setSortCriteria();
142
Customizing the Model Layer for Siebel Self-Service Applications Process of Creating New ADF Business Components from Siebel Web Services
// Get the query results. try { ListOfWc_Contacts_IoData contact_result = myPort.WC_Contacts_BSQueryPage("", query, "LIC", "All");
setRecordCount(contact_result.getRecordcount().intValue()); cd = contact_result.getContact();
setFetchedSize(getFetchedSize()+cd.length); setResultSize(cd.length); } catch (Exception e) { } } public boolean hasNext() { if ((fetchedSize - resultSize + resultIndex) < recordCount) { return true; } return false; } public ContactData getNextContact() { // The result index is 0-based and the result size is 1-based. int ri = getResultIndex(); if(query==null || ri == getResultSize()) { getNextResultSet(); ri = getResultIndex(); } setResultIndex(ri+1); return cd[ri]; } // Clear any sort criteria set earlier. public void clearSortCriteria() {
14 3
Customizing the Model Layer for Siebel Self-Service Applications Process of Creating New ADF Business Components from Siebel Web Services
query.getContact().getRowId().setSortsequence(""); query.getContact().getRowId().setSortorder(""); query.getContact().getLastName().setSortsequence(""); query.getContact().getLastName().setSortorder(""); } /* After setOrderByClause is called in ViewObjectImpl, executeQuery is called, which in turn calls executeQueryForCollection. * Sort criteria are set before viewObjectImpl.executeQueryForCollection is called. * In executeQueryForCollection, a new instance of the UserData object is attached to the rowset using setUserDataForCollection. * The sort parameters are passed to the constructor of UserData, which sets the orderByClause in UserData.orderClause. * The orderByClause has the format "column_name [ASC|DESC]" */ public void setSortCriteria() { String sortColumn = null; String sortOrder = "ASC"; if (getOrderClause() != null && !"".equals(getOrderClause())) { clearSortCriteria(); String [] s = getOrderClause().split(" "); if (s! = null) { for (int i = 0; i < s.length; i++) { if (i == 0) { sortColumn = s[0]; } else { sortOrder = "DESC"; } } } } if ("ROWID".equals(sortColumn )) {
144
Customizing the Model Layer for Siebel Self-Service Applications Process of Creating New ADF Business Components from Siebel Web Services
query.getContact().getRowId().setSortorder(sortOrder); query.getContact().getRowId().setSortsequence("1"); } else if ("LASTNAME".equals(sortColumn)) { query.getContact().getLastName().setSortorder(sortOrder); query.getContact().getLastName().setSortsequence("1"); } } public void createQuery() { try { myPort = new model.WC_Contacts_BSClient(); } catch (Exception e) { } query = new ListOfWc_Contacts_IoQuery(); query.setStartrownum(new BigInteger(Integer.toString(getFetchedSize()))); query.setPagesize(new BigInteger(Integer.toString(100))); ContactQuery cq = new ContactQuery(); QueryType rowidQuery = new QueryType(); rowidQuery.set_value(""); // Empty query type cq.setRowId(rowidQuery); QueryType lastnameQuery = new QueryType(); lastnameQuery.set_value("LIKE 'B*'"); lastnameQuery.setSortorder("ASC"); lastnameQuery.setSortsequence("1"); cq.setLastName(lastnameQuery); query.setContact(cq); query.setRecordcountneeded(true); } }
14 5
Customizing the Model Layer for Siebel Self-Service Applications Process of Creating New ADF Business Components from Siebel Web Services
When an end user clicks on table navigation links, if the view rowset already contains the requested rows, the user interface will display them. If the rows have not yet been retrieved, the createRowFromResultSet() method is called, which in turn calls the UserData.getNextContact() method. In UserData, each Web service API call retrieves 100 contact rows and buffers them. As soon as the buffer is completely read, another Web service API call is placed, which retrieves another 100 rows, and so on.
UserAMImpl Class The following is the sample code for UserAMImpl.java: /** This method indicates the typical setup of WHERE Clause conditions on the VO through ViewCriteria. * Attribute names are the same as VO attribute names. * Only one ViewCriteriaRow is supported. * No comparator operator is used. * The attribute values are retrieved and applied using the equal (=) operator. */ public void setCriterion() { System.out.println("View criteria have been set in UserVO...");
146
Customizing the Model Layer for Siebel Self-Service Applications Process of Creating New ADF Business Components from Siebel Web Services
} UserVOImpl Class The following is the sample code for UserVOImpl.java: /** Override the executeQueryForCollection() method for custom Java data source support. * Pass ViewCriteria to the UserData constructor from the VO. */ protected void executeQueryForCollection(Object rowset, Object params[], int noUserParams) { setUserDataForCollection(rowset, new UserData(getViewCriteria(),getOrderByClause())); super.executeQueryForCollection(rowset, params, noUserParams); }
14 7
Customizing the Model Layer for Siebel Self-Service Applications Process of Creating New ADF Business Components from Siebel Web Services
UserData Class The following is the sample code for UserData.java: /* The constructor gets the handle of ViewCriteria through the vc parameter. The constructor can read the attribute values and use them in building the Web service request. */ public UserData(ViewCriteria vc, String sortClause) { ViewCriteriaRow row = (ViewCriteriaRow)vc.getRowAtRangeIndex(0); System.out.println ("Accessing the criteria in the UserData object..."); System.out.println ("VOCriteria rows are found in: " + row.getClass()); Object[] cnames = row.getAttributeNames(); Object[] cvalues = row.getAttributeValues(); for (int i = 0; i < cnames.length; i++) System.out.println("Attribute name: " + cnames[i] + " Value: " + cvalues[i]); } Sample Output The following is the sample output: 08/03/01 18:34:35 View criteria have been set in UserVO... 08/03/01 18:34:35 Accessing the criteria in the UserData object... 08/03/01 18:34:35 VOCriteria rows are found in: class oracle.jbo.ViewCriteriaRow 08/03/01 18:34:35 Attribute name: UserName Value: null 08/03/01 18:34:35 Attribute name: FirstName Value: Catherine 08/03/01 18:34:35 Attribute name: LastName Value: R* 08/03/01 18:34:35 Attribute name: Age Value: 4
148
Customizing the Model Layer for Siebel Self-Service Applications Process of Creating New ADF Business Components from Siebel Web Services
The Web services in Siebel Self-Service Applications are based on the EAI UI Data Adapter business service, which supports the pagination parameters described in Creating the UserData Wrapper Object on page 138. For more information on the EAI UI Data Adapter business service, see Integration Platform Technologies: Siebel Enterprise Application Integration.
SampleAppModuleImpl Class SampleAppModuleImpl.java contains the following code: package oracle.apps.ss.base.model.sample; import java.rmi.RemoteException; import java.util.Calendar; import javax.xml.rpc.soap.SOAPFaultException; import javax.xml.soap.SOAPException; import oracle.apps.ss.base.model.bc4j.SSApplicationModuleImpl; import oracle.apps.ss.base.model.sample.common.SampleAppModule; import oracle.apps.ss.base.model.sample.model.AssetManagementPortClient; import oracle.apps.ss.base.model.sample.model.types.com.siebel.xml .asset_management_io.data.AssetMgmtAssetData; import oracle.apps.ss.base.model.sample.model.types.com.siebel.xml .asset_management_io.data.ListOfAsset_Management_IoData; import oracle.apps.ss.base.model.sample.model.types.com.siebel.xml .asset_management_io.query.AssetMgmtAssetQuery; import oracle.apps.ss.base.model.sample.model.types.com.siebel.xml .asset_management_io.query.ListOfAsset_Management_IoQuery; import oracle.apps.ss.base.model.sample.model.types.com.siebel.xml .asset_management_io.query.QueryType; import oracle.apps.ss.base.model.util.ServerUtil; import oracle.apps.ss.base.model.util.ValidationException; // --------------------------------------------------------------------// --// --// --File generated by Oracle ADF Business Components Design Time. Custom code may be added to this class. Warning: Do not modify method signatures of generated methods.
// ---------------------------------------------------------------------
14 9
Customizing the Model Layer for Siebel Self-Service Applications Process of Creating New ADF Business Components from Siebel Web Services
public class SampleAppModuleImpl extends SSApplicationModuleImpl implements SampleAppModule { /* Default constructor (do not remove) */ public SampleAppModuleImpl() { } /* Sample main for debugging Business Components code using the tester */ public static void main(String[] args) { launchTester("oracle.apps.ss.base.model.sample", /* package name */ "SampleAppModuleLocal" /* Configuration Name */); } /* Container's getter for SearchAssetForDisplay */ public SampleViewObjImpl getSearchAssetForDisplay() { return (SampleViewObjImpl)findViewObject("SearchAssetForDisplay"); } public void searchAssetForDisplay() { try { System.out.println("Calling searchAssetForDisplay without parameters"); AssetManagementPortClient proxy = new AssetManagementPortClient(); proxy.setEndpoint(ServerUtil.getEndPointURL());
/* Query for assets. */ ListOfAsset_Management_IoQuery listOfAssetQuery = getDefaultListOfAssetQuery(); AssetMgmtAssetQuery assetMgmtAssetHeader = new AssetMgmtAssetQuery(); QueryType loadAssetQueryType = new QueryType(); loadAssetQueryType.set_value(""); assetMgmtAssetHeader.setAssetId(loadAssetQueryType); assetMgmtAssetHeader.setProductName(loadAssetQueryType); assetMgmtAssetHeader.setStatus(loadAssetQueryType); listOfAssetQuery.setAssetMgmtAsset(assetMgmtAssetHeader);
150
Customizing the Model Layer for Siebel Self-Service Applications Process of Creating New ADF Business Components from Siebel Web Services
/* Load the query results. */ ListOfAsset_Management_IoData searchAssetData = proxy.assetManagementQueryPage(null, listOfAssetQuery, "LIC", "All"); System.out.println("RecordCount: " + searchAssetData.getRecordcount()); System.out.println("searchAssetData" + searchAssetData); fillAssetVO(searchAssetData,"AssetListDisplay"); } catch(SOAPFaultException e) { throw new ValidationException(e); } catch(RemoteException e) { throw new ValidationException(e); } catch(SOAPException e) { throw new ValidationException(e); } catch(Exception e) { throw new ValidationException(e); } }
/* Clear the query. */ private ListOfAsset_Management_IoQuery getDefaultListOfAssetQuery() { ListOfAsset_Management_IoQuery listOfAssetQuery = new ListOfAsset_Management_IoQuery(); AssetMgmtAssetQuery assetMgmtAssetHeader = new AssetMgmtAssetQuery(); assetMgmtAssetHeader.setAssetId(EMPTY_QUERY_TYPE); assetMgmtAssetHeader.setIntegrationId(EMPTY_QUERY_TYPE); assetMgmtAssetHeader.setProductId(EMPTY_QUERY_TYPE); assetMgmtAssetHeader.setProductName(EMPTY_QUERY_TYPE); assetMgmtAssetHeader.setProductDescription(EMPTY_QUERY_TYPE);
15 1
Customizing the Model Layer for Siebel Self-Service Applications Process of Creating New ADF Business Components from Siebel Web Services
assetMgmtAssetHeader.setProductPartNumber(EMPTY_QUERY_TYPE); assetMgmtAssetHeader.setBillingAccountId(EMPTY_QUERY_TYPE); assetMgmtAssetHeader.setServiceAccountId(EMPTY_QUERY_TYPE); assetMgmtAssetHeader.setStatus(EMPTY_QUERY_TYPE); assetMgmtAssetHeader.setInstallDate(EMPTY_QUERY_TYPE); assetMgmtAssetHeader.setParentAssetId(EMPTY_QUERY_TYPE); listOfAssetQuery.setAssetMgmtAsset(assetMgmtAssetHeader); return listOfAssetQuery; } private static final QueryType EMPTY_QUERY_TYPE = new QueryType();
/* Populate the view object */ public void fillAssetVO(ListOfAsset_Management_IoData assetOutputData, String populateVO) { SampleViewObjImpl assetVO = null; if(assetOutputData != null) { AssetMgmtAssetData[] assetArr = assetOutputData.getAssetMgmtAsset(); if(assetArr != null) { System.out.println("Number of assets retrieved: " + assetArr.length); assetVO = getSearchAssetForDisplay(); assetVO.clearCache(); assetVO.first();
for (int i=0;i<assetArr.length;i++) { SampleViewObjRowImpl assetVORow = (SampleViewObjRowImpl) assetVO.createRow(); assetVORow.setAssetId(assetArr[i].getAssetId()); assetVORow.setProductName(assetArr[i].getProductName()); assetVORow.setAssetStatus(assetArr[i].getStatus());
152
Customizing the Model Layer for Siebel Self-Service Applications Process of Creating New ADF Business Components from Siebel Web Services
String month = ""; String dayOfMonth = ""; String year = ""; if (calendar != null) { month = (calendar.get(Calendar.MONTH)>8)?"" + (calendar.get(Calendar.MONTH)+1):"0" + (calendar.get(Calendar.MONTH)+1); dayOfMonth = (calendar.get(Calendar.DAY_OF_MONTH)>9)?"" + calendar.get(Calendar.DAY_OF_MONTH):"0" + calendar.get(Calendar.DAY_OF_MONTH); year = "" + calendar.get(Calendar.YEAR); } assetVO.insertRow(assetVORow); } } } } }
15 3
Customizing the Model Layer for Siebel Self-Service Applications Process of Creating New ADF Business Components from Siebel Web Services
Java Classes in Siebel Self-Service Applications That Call Siebel Web Services
Table 13 lists the Java classes that make Web service calls and the purposes of those calls.
Table 13.
Java Classes in Siebel Self-Service Applications That Call Siebel Web Services Comments The view object for template rules uses the TemplateRuleId and TemplateRule caches to show data on the screen. Hence there are no Web service calls from view object or user data classes. Filename (.java) TemplateAMImpl Description Application module implementation. Transactions: updating, deleting, or inserting a template. Cache loader for template ID cache. Querying and storing template rules. Cache loader for template rule cache. Used when there is a cache miss and a specific template rule is to be loaded. Application module implementation. Transactions: updating, deleting, creating, and saving sites. Data class implementation. For all CRUD operations, the Web service call is made from here. Cache loader for getting sire attributes. Querying for Site Selection and Site Administration pages. Cache loader for getting all site codes. Querying for Site Selection and Site Administration pages. Cache Loader for getting the site name for the specific language. Querying for Site Selection and Site Admin pages.
Site
The caches used for the Site Selection page are SiteAttribute, SiteCode, and SiteLang.
SiteAMImpl
SiteData
SiteAttributeCache Loader
SiteCodeCacheLoader
SiteLangCacheLoader
154
Customizing the Model Layer for Siebel Self-Service Applications Process of Creating New ADF Business Components from Siebel Web Services
Table 13.
Java Classes in Siebel Self-Service Applications That Call Siebel Web Services Comments The cache used for the list of values (LOV) pop-up window and the Utility APIs is the LovCache. Filename (.java) UtilAMImpl Description Application module implementation. Transactions: querying for LOV values. Cache loader for getting the LOV code and its values for the specific language. Querying for the LOV popup window and for the Utility LOV APIs. Data Class implementation. The service call for querying the LOV values is made from here. Application module implementation. Transactions: querying for time zone values Data class implementation. The Web service call for querying time zone values is made from here. Cache loader for time zone values. Cache loader for currency values.
LovCacheLoader
LovData
Utility TimeZone
UtilAMImpl
TimeZoneData
TimeZoneCacheLoader Utility Currency The cache used to get currency values is the CurrencyCache. CurrencyCacheLoader
15 5
Customizing the Model Layer for Siebel Self-Service Applications Process of Creating New ADF Business Components from Siebel Web Services
Table 13.
Java Classes in Siebel Self-Service Applications That Call Siebel Web Services Comments Root application module for managing users. Filename (.java) PartyManager Description This is the main class for the User Management application module. Used for Data Manipulation Language (DML) operations on all entities related to accounts, contacts, and users. Methods for executing Web service calls related to: Registration and forgotten password functionality Creating, deleting, and updating contacts Creating, deleting, and updating accounts and personal addresses Making existing contacts users Updating passwords and security questions Updating personal details
AccountManager
All Web service calls related to account management are executed here. Has two methods: executeDML and executeQuery. All Web service calls related to contact management are executed here. Has two methods: executeDML and executeQuery.
ContactManager
156
Customizing the Model Layer for Siebel Self-Service Applications Process of Creating New ADF Business Components from Siebel Web Services
Table 13.
Java Classes in Siebel Self-Service Applications That Call Siebel Web Services Comments Self-Service user registration. Filename (.java) RegistrationAMImpl Description Application module implementation. Methods for registering different types of users and for forgotten password functionality. These methods prepare the data to be used for Web service calls and call PartyManager APIs. AccountDetailsVOImpl View object implementation. Web service calls for querying account details. These details are used for verification purposes in secondary user access flows. Application module implementation. Methods for querying, updating, and deleting personal data and addresses. View object implementation. Web service calls for querying personal profile details. Data class implementation for ContactAddressVO. Web service calls for querying contact addresses.
PersonAMImpl
ContactDetailsVOImpl
ContactAddressUser Data
15 7
Customizing the Model Layer for Siebel Self-Service Applications Process of Creating New ADF Business Components from Siebel Web Services
Table 13.
Java Classes in Siebel Self-Service Applications That Call Siebel Web Services Comments Company and account data management. Filename (.java) OrganizationAMImpl Description Application module implementation. Methods for querying, updating, and deleting contact and account data, contact and account addresses. Data class implementation for ContactVO. Web service calls for querying contacts. Data class implementation for AccountVO. Web service calls for querying accounts. Data class implementation for AccountAddressVO. Web service calls for querying account addresses. Web service calls for querying user responsibilities. Data class implementation for ContactAddressVO. Web service calls for querying contact addresses. View object implementation. Web service calls for querying account details. Data class implementation for ContactAccountVO. Web service calls for querying accounts related to a contact.
ContactUserData
AccountUserData
AccountAddressUser Data
UsertypesLoader
ContactAddressUser Data
AccountDetailsVOImpl
ContactAccountUser Data
158
Customizing the Model Layer for Siebel Self-Service Applications Process of Creating New ADF Business Components from Siebel Web Services
Table 13.
Java Classes in Siebel Self-Service Applications That Call Siebel Web Services Comments Approvals related to registration and to existing contacts made to Self-Service users. Filename (.java) ApprovalInboxAMImpl Description Application module implementation. Methods for: Approving and rejecting approval requests for registration Querying inbox items Sending notification mails Showing contact details for which approvals are requested
ContactInboxItems UserData
Data class implementation for ContactInboxItemVO. Web service calls for querying inbox items for a contact. Static methods that abstract the Web service proxy invocations on the Siebel Inbox.
SiebelInboxManager
15 9
Customizing the Model Layer for Siebel Self-Service Applications Process of Creating New ADF Business Components from Siebel Web Services
Table 13.
Java Classes in Siebel Self-Service Applications That Call Siebel Web Services Comments The Web service calls to fetch order data are made through the Data classes, which in turn call the OrderManager class. Filename (.java) OrderAMImpl Description Application module implementation. Transactions: querying and updating orders. For all query and update operations, the Web service call is made from here. Data class implementation. Querying orders, the Web service call for which is routed through this class to the OrderManager class. Data class implementation. Querying details of an order details, the Web service call for which is routed through this class to the OrderManager class. Data class implementation. Querying line item details of an order, the Web service call for which is routed through this class to the OrderManager class. Data class implementation. Querying of shipment and line item details for an order, the Web service call for which is routed through this class to the OrderManager class.
OrderManager
OrderHeaderSummary Data
OrderDetailsData
OrderLinesData
OrderShipmentDetails Data
160
Customizing the Model Layer for Siebel Self-Service Applications Process of Extending ADF Business Components
Table 13.
Java Classes in Siebel Self-Service Applications That Call Siebel Web Services Comments The Web service calls to fetch payment data are made through the Data classes, which in turn call the PaymentManager class. Filename (.java) PaymentAMImpl Description Application module implementation. Transactions: querying payment history, querying and updating payment wallet details. For all query and update operations, the Web service call is made from here. Data class implementation. Querying payment history, the Web service call for which is routed through this class to the PaymentManager class. Data class implementation. Querying details of the Payment wallet, the Web service call for which is routed through this class to the PaymentManager class.
PaymentManager
PaymentHisUserData
PayWalletUserData
1 2 3 4 5
Adding a Field to a Siebel Business Component on page 162 Adding the Business Component Field to an Integration Object on page 162 Exposing Siebel Data to External Applications on page 163 Re-Creating the Web Service Client Proxy on page 164 Extending ADF Business Components on page 167
In this example, the Favorite Color field is added to a contact record and accessed by Siebel SelfService Applications. For details on modifying Siebel objects, see Configuring Siebel Business Applications. For details on working with integration objects, see Integration Platform Technologies: Siebel Enterprise Application Integration.
16 1
Customizing the Model Layer for Siebel Self-Service Applications Process of Extending ADF Business Components
162
Customizing the Model Layer for Siebel Self-Service Applications Process of Extending ADF Business Components
6 7 8
Add an integration component field for Favorite Color. Validate and synchronize the SS_Account_IO integration object. Compile the SRF.
a b c d 4 a b c 5
Choose a locked project. Select the Reuse Integration Object radio button. Select SS_Account_IO from the drop-down menu. Click Next.
On the Business Service Page: Name the new business service, for example, SSAccount. NOTE: You cannot use the name of an already existing business service. Select the Deploy Business Service check box. Click Next.
On the UDS Methods Page, select the following check boxes, and then click Next:
QueryPage Execute
Enter a URL for the Web service, for example: http://myhost/custappsvcs_enu/ start.swe?SWEExtSource=WebService&SWEExtCmd=Execute
16 3
Customizing the Model Layer for Siebel Self-Service Applications Process of Extending ADF Business Components
b c 7 a b 8
On the Report Page: Under UI Business, choose SelfServiceAccount. Enter a name for the report (export file).
On the Integration Object Builder page, select the Deploy the Integration Object check box, and then click Finish.
5 6
On the Web Service Description page, click Browse, and then navigate to SSAccount.wsdl. Click Next. The model for the WSDL file is built.
7 8
On the Port Endpoints page, select Run against a service deployed to an external server, and then click OK. On the Custom Mappings page, click Next.
164
Customizing the Model Layer for Siebel Self-Service Applications Process of Extending ADF Business Components
a b
c d a b c
Name the handler SiebelWSHandler, and then click OK. Click Next.
11 On the Support Files page, select the Generate JUnit Test Code check box, and then click Finish.
The proxy source files are generated in Model/Application Sources/oracle.apps.ss/base/ model.um.ABC/proxy.
You must replace the classes for SelfServiceAccount with the new proxy classes you created in Generating the New Web Service Client Proxy on page 164.
Navigate to /temp/JARs/oracle/apps/ss/base/model/um/proxies/account.
16 5
Customizing the Model Layer for Siebel Self-Service Applications Process of Extending ADF Business Components
Replace the following class files in that directory with the analogous classes from your proxy: Old Proxy Class SelfServiceAccount_PortType SelfServiceAccount_Service SelfServiceAccountClient SelfServiceAccountExecute_Input SelfServiceAccountExecute_Output SelfServiceAccountQueryPage_Input SelfServiceAccountQueryPage_Output New Proxy Class SSAccount_PortType SSAccount_Service SSAccountClient SSAccountExecute_Input SSAccountExecute_Output SSAccountQueryPage_Input SSAccountQueryPage_Output
4 5
Navigate to /temp/JARs/oracle/apps/ss/base/model/um/proxies/account/runtime. Replace the following class files in that directory with the analogous classes from your proxys /runtime subdirectory: Old Proxy Class SelfServiceAccount_Service_Impl SelfServiceAccount_Service_SerializerRegistry12 SelfServiceAccount_Service_SerializerRegistry SelfServiceAccount_Stub SelfServiceAccountExecute_Input_Literal Serializer SelfServiceAccountExecute_Output_Literal Serializer SelfServiceAccountQueryPage_Input_Literal Serializer SelfServiceAccountQueryPage_Output_Literal Serializer New Proxy Class SSAccount_Service_Impl SSAccount_Service_SerializerRegistry12 SSAccount_Service_SerializerRegistry SSAccount_Stub SSAccountExecute_Input_Literal Serializer SSAccountExecute_Output_Literal Serializer SSAccountQueryPage_Input_Literal Serializer SSAccountQueryPage_Output_Literal Serializer
6 7 8
Navigate to /temp/JARs/oracle/apps/ss/base/model/um/proxies/account/types/com/ siebel/selfservice/common. Replace the /account directory with the /account directory from your proxys /types/com/ siebel/selfservice/common subdirectory. Create a Java Archive (JAR) file of the contents of /temp/JARs, and name it commoncomp-wsproxies.jar, using the following command in the command-line interface: jar cvf commoncomp-ws-proxies.jar META-INF/ oracle/
Navigate to SelfService_ROOT/Model/lib.
166
Customizing the Model Layer for Siebel Self-Service Applications Process of Extending ADF Business Components
For more information on extending ADF Business Component code, see Modifying ADF Business Component Code to Access Web Service Data on page 136.
Edit the ContactUserData class to call the Web service to get the Favorite Color data, for example: // Favorite Color if (cnames[i] != null && "FavoriteColor".equals(cnames[i].toString())) { QueryType qt1 = new QueryType(); qt1.set_value((cvalues[i] != null) ? ("LIKE'" + FormatterUtil.insertEscSequence(cvalues[i]).toString() + "'") : ""); cquery.setFavoriteColor(qt1); } NOTE: Be sure to include statements to clear any existing queries and sort criteria for FavoriteColor.
16 7
Customizing the Model Layer for Siebel Self-Service Applications Process of Extending ADF Business Components
3 4 5 6 7
Click Attributes, and then click New. Add the FavoriteColor attribute. Click OK to close the editor. Restore your custom code to the ContactVOImpl class. Edit the ContactVOImpl class in Oracle JDeveloper or a text editor to populate the FavoriteColor attribute, for example: ContactData contact = ((ContactUserData)getUserDataForCollection(o)).getNextContact(); if(contact != null) { tRow = createNewRowForCollection(o); contact_row = (ContactVORowImpl)createNewRowForCollection(o); populateAttributeForRow(tRow,0,contact.getId()); populateAttributeForRow(tRow,1,contact.getFirstName()); populateAttributeForRow(tRow,2,contact.getMiddleName()); populateAttributeForRow(tRow,3,contact.getLastName()); ... populateAttributeForRow(tRow,42,contact.getFavoriteColor()); } return tRow; ...
168
Customizing the Model Layer for Siebel Self-Service Applications Configuring Failover on the SessionAM Application Module
3 4
Click the Pooling and Scalability tab. Select the Failover Transaction State Upon Managed Release check box, and then click OK. The jbo.dofailover property, with a value of true, appears in the Configuration Manager dialog.
16 9
Customizing the Model Layer for Siebel Self-Service Applications About ADF Data Control
</parameters> <executables> <iterator id="AccountVO1Iterator" Binds="${myVO}" DataControl="SessionAMDataControl"/> </executables> <bindings> <table id="OrganizationAM1AccountVO1" IterBinding="AccountVO1Iterator"> <AttrNames> <Item Value="Id"/> <Item Value="AccountName"/> <Item Value="Location"/> <Item Value="ParentAccountName"/> <Item Value="PrimaryAccountFlag"/> <Item Value="IsIndividualAccount"/> </AttrNames> </table> </bindings> </pageDefinition> The page definition file has the following sections: parameters. Defines a parameter for the View Object to be passed in the page definition of the region. executables. Defines an iterator binding that tracks the current row in a data collection, in this example a list of accounts. bindings. Defines a table to access data in the View Object, for example, account names.
For more information on regions, see Regions on page 55 and Customizing Regions for Siebel SelfService Applications on page 63.
170
Customizing the Model Layer for Siebel Self-Service Applications About ADF Binding
17 1
Customizing the Model Layer for Siebel Self-Service Applications Binding a View Object to a User Interface Page
In the context menu that appears, choose Create, Tables, and then ADF Table. The Edit Table Columns dialog appears.
6 7
Choose the view object attributes to display and arrange them in the desired order. Select the following check boxes:
Click OK.
The table that displays view object data is added to the UI page. Data bindings and data controls are created automatically.
172
This chapter describes how to test your customized Siebel Self-Service Applications, and then deploy them to the production environment. It includes the following topics: Testing a Java EE Application in Oracle JDeveloper on page 173 Process of Packaging the Java EE Application for Deployment on page 174 Deploying a Customized Java EE Application to the Oracle Application Server on page 177 Deploying a Customized Java EE Application to an Enterprise Archive File on page 177 Deploying the EAR File to the Oracle Application Server in the Development Environment on page 178 Configuring the Endpoint URL After Deployment on page 179 Testing Deployed Java EE Applications on page 180 Deploying the EAR File to the Production Environment on page 180
17 3
Deploying and Testing Customized Siebel Self-Service Applications Process of Packaging the Java EE Application for Deployment
1 2 3 4 5
Creating a Deployment Project on page 174 Creating a Deployment Profile for the Model Project on page 174 Creating a Deployment Profile for the ViewController Project on page 175 Creating a Deployment Profile for the Java EE Application on page 175 Creating a Deployment Descriptor on page 176
174
Deploying and Testing Customized Siebel Self-Service Applications Process of Packaging the Java EE Application for Deployment
17 5
Deploying and Testing Customized Siebel Self-Service Applications Process of Packaging the Java EE Application for Deployment
Click OK.
3 4 5
On the Welcome page, click Next. In Step 1, select orion-application.xml, and then click Next. In Step 2, select 10.0, and then click Finish. The new orion-application.xml file appears under Deployment/Application Sources/META-INF.
In a text editor, open the original SelfService_ROOT/orion-application.xml file, and change the data-sources tag to the following: <data-sources path="SelfService_ROOT/SelfService-data-sources.xml" />
Copy SelfService_ROOT/orion-application.xml.
176
Deploying and Testing Customized Siebel Self-Service Applications Deploying a Customized Java EE Application to the Oracle Application Server
8 9
Navigate to the directory where the new orion-application.xml file resides, for example, SelfService_ROOT/Deployment/src/META-INF. Replace the new orion-application.xml with the version from the EAR file. application.xml. The contents should be those of the version from the EAR file.
17 7
Deploying and Testing Customized Siebel Self-Service Applications Deploying the EAR File to the Oracle Application Server in the Development Environment
Deploying the EAR File to the Oracle Application Server in the Development Environment
You can deploy the EAR file from the Oracle Enterprise Manager Application Server Control console. During deployment, you can configure the endpoint URL for the Siebel Web Server Extension. NOTE: The Oracle Application Server service, for example, Oracle-OracleAS_10_1_3ProcessManager, must be started.
Enter the administrator username and password, for example, oc4jadmin and welcome1. The Cluster Topology page appears.
3 4 5 6
Click the name of the OC4J instance to which you want to deploy the EAR file. The OC4J:instance page appears. Click the Applications tab. On the Applications page, select the default check box, and then click Deploy. On the Select Archive page:
a b
Under Archive, click Browse to select the EAR file to deploy. Under Deployment Plan:
If this is the first time that you are deploying an EAR file, select Automatically create a new deployment plan. If you have previously deployed an EAR file and saved the deployment plan, select Deployment plan is present on local host, and then browse for the deployment plan.
c 7 a b
Click Next.
On the Application Attributes page: Enter a name for the application, such as SelfService81. Enter a name for the Context Root or keep the default, which is read from the EAR file.
178
Deploying and Testing Customized Siebel Self-Service Applications Configuring the Endpoint URL After Deployment
c 8 9
Click Next.
On the Deployment Settings page, click Edit Deployment Plan. (Optional) Confirm that the jaasMode parameter for authentication using the Java Authentication and Authorization Service (JAAS) is set to doAsPrivileged:
a b c a b
On the Edit Deployment Plan page, click Edit Jazn under Value. On the Edit Deployment Plan: jazn page, make sure that the value for the jaasMode parameter is set to doAsPrivileged. Click Continue.
10 Configure the endpoint URL for the Siebel Web Server Extension:
On the Edit Deployment Plan page, click Edit Properties under Value. On the Edit Deployment Plan: properties page, enter the following in the value (java.lang.String) field for the SIEBEL_WEBSERVER_URL property: http://<host>[:<port>]/custappsvcs/ start.swe?SWEExtSource=WebService&SWEExtCmd=Execute where host is a Siebel Server and port is optional NOTE: Do not include the language code in the custappsvcs virtual directory name. NOTE: If you do not enter a value, the deployment will fail. You can insert a placeholder value during the deployment, and then edit it later in the orion-application.xml file (see Configuring the Endpoint URL After Deployment on page 179).
Click Continue.
11 Click OK to return to the Deployment Settings page. 12 (Optional) Click Save Deployment Plan, and then specify a location to save the deployment plan. 13 Click Deploy.
The Progress Messages window on the Progress: Deploy page shows the deployment steps. If the deployment succeeds, the Confirmation page appears.
17 9
Deploying and Testing Customized Siebel Self-Service Applications Testing Deployed Java EE Applications
Set the value of the SIEBEL_WEBSERVER_URL property to the following: http://<host>[:<port>]/custappsvcs/ start.swe?SWEExtSource=WebService&SWEExtCmd=Execute where host is a Siebel Server and port is optional NOTE: Do not include the language code in the custappsvcs virtual directory name. For example: <property name="SIEBEL_WEBSERVER_URL" value="http://SiebelServer/custappsvcs/ start.swe?SWEExtSource=WebService&SWEExtCmd=Execute"/>
To test an application 1
In a Web browser, navigate to the Sites page: http://<host>[:<port>]/<ContextRoot>/faces/ss/base/site/SiteList.jspx
2 3 4
Test the application. If necessary, make changes to it in Oracle JDeveloper. Remove the following files from ViewController/public_html that are used for testing and debugging:
180
After proper configuration, each statement in the log is prefixed with the user name of the loggedin user (or GUEST if none is logged in). The log files are generated in the /<username>/logs and ORACLE_HOME/opmn/logs directories on the computer running the Oracle Application Server. You can use either log file. For more information on logging, see the following:
18 1
Monitoring Diagnostic Information and Error Messages for Siebel Self-Service Applications Configuring Java EE Logging
Oracle Application Server Performance Guide on Oracle Technology Network Oracle Application Server DMS API Reference on Oracle Technology Network
182
Monitoring Diagnostic Information and Error Messages for Siebel Self-Service Applications About Oracle Application Diagnostics for Java
18 3
Monitoring Diagnostic Information and Error Messages for Siebel Self-Service Applications About Error Pages for Self-Service Applications
Hot deployment. Deployed dynamically as a WAR file into running Java applications. The applications do not have to be restarted. Real-time Java Virtual Machine (JVM) monitoring. Monitors the complete Java stack, including thread state and Java method and line visibility. Differential heap analysis. Creates complete memory snapshots for offline analysis. Simplifies memory growth and leak analysis. Cross-tier trace with an Oracle database. Analyzes transactions between the database and the Java middle tier. Identifies Java threads associated with long-running SQL code.
AD4J is available with Oracle Enterprise Manager 10g Release 4 and later. For more information on AD4J, see Oracle Technology Network.
184
Monitoring Diagnostic Information and Error Messages for Siebel Self-Service Applications Configuring Diagnostic Logging on the Siebel Server
where lang is the language code, for example enu. For more information on configuring logging on Siebel Servers, see Siebel System Monitoring and Diagnostics Guide.
Windows: srvrmgr /g <GatewayServerHostname> /e <EnterpriseServerHostname> /u SADMIN /p password UNIX: srvrmgr -g <GatewayServerHostname> -e <EnterpriseServerHostname> -u SADMIN -p password
Enter the following commands at the srvrmgr prompt: change evtloglvl %=m for component [EAIObjMgr_lang] change evtloglvl %=n for component [CustomAppObjMgr_lang] where m and n are integer values from 0 to 5
18 5
Monitoring Diagnostic Information and Error Messages for Siebel Self-Service Applications Configuring Diagnostic Logging on the Siebel Server
186
Index
A
AD4J, about logging Java applications 183 ADF Binding about 21 ADF binding filter 26 mapping UI pages to page definitions 171 ADF Business Components about 20, 130 about data controls 169 accessing Web service data 136 application module, defined 130 asset management example 148 binding to UI page 171 configuring failover 169 creating application module 134 creating from Siebel Web services 132 creating programmatic view object 133 extending 161, 167 optimizing performance 131 overriding view object implementation methods 136 pagination and sorting example 139 query by example (QBE) example 146 SessionAM application module 25 view object, defined 131 working with, reference 131 wrapper class for Siebel Web service data 138 ADF Data Control about 21 about associating ADF Business Components with UI pages 169 ADF Faces about 22 ADF Faces Skins 119 customizing application appearance 120 customizing menu orientation 120 adf-faces-skins.xml, determining application appearance 119 Adobe Form Server, connecting to 43 af:panelBorder tag about 54 example 60 application architecture about and diagram 13 components and application flow (diagram) 15
project structure in Oracle JDeveloper 22 application configuration file, web.xml 33 application modules about 130 creating 134 application.xml, configuring authentication in Oracle JDeveloper 44
B
bins See regions Business Components, ADF See ADF Business Components business components, Siebel about 16 adding fields 162 exposing to external applications 163 business objects, Siebel 17 business services, Siebel 18
C
cleaning up after importing Java EE application into JDeveloper 39 cleaning Model and ViewController projects 40 removing duplicate class files 40 condition property, hiding detail nodes 114 Controller layer, about 21 create() method, about and example 137 createRowFromResultSet() method, about and example 137 Custom Application Object Manager (CustomAppObjMgr), Siebel Server component 18 customizing Java EE applications customizable files 30 customization strategy 29 customization support 30 roadmap 32
D
data bindings about 20, 171 removing duplicate class files 40 data passivation connecting to Oracle database 41
18 7
Index E
definition 41 database Oracle 41 Siebel 16 DataBindings.cpx customizing 62 mapping UI pages to page definitions 171 deploying applications creating deployment descriptor 176 creating deployment profile for application 175 creating deployment profile for Model project 174 creating deployment profile for ViewController project 175 creating Deployment project 174 to EAR file 177 to Oracle Application Server 177 to Oracle Application Server, as EAR file 178 to production environment 180 deployment descriptor orion-application.xml 176 web.xml 33 documents, related 10 Dynamic Monitoring Service (DMS), about measuring application server performance 181
request process train example 85 faces-config-sample-train.xml, sample process train 81 facets about 54 regions 54 failover about 27 configuring 169 fragments See regions
G
getQueryHitCount() method, about and example 137
H
hasNextForCollection() method, about and example 136
I
integration components about 17 adding integration component fields 162 integration objects, about 17
E
endpoint URL configuring after deployment 179 configuring during deployment 178 configuring in Oracle JDeveloper 42 Enterprise Archive (EAR) files deploying Java EE application to 177 deploying to Oracle Application Server in development environment 178 deploying to Oracle Application Server in production environment 180 importing into Oracle JDeveloper 38 error messages, about 59 error pages, about 184 executeQueryForCollection() method, about and example 136
J
j2ee-logging.xml, creating logging configuration file 182 Java Authentication and Authorization Service (JAAS), configuring in JDeveloper 44 Java classes calling Siebel Web services (table of) 154 source code provided 33, 131 Java EE applications Controller layer 21 creating deployment descriptor 176 creating deployment profile for application 175 creating deployment profile for Model project 174 creating deployment profile for ViewController project 175 creating Deployment project 174 customizable files 30 customization strategy 29 deploying EAR file to Oracle Application Server 178 deploying EAR file to production environment 180 deploying patches to development
F
faces-config-base.xml, page flow example 77 faces-config-base-menu.xml, menu model example 101 faces-config-base-skin-properties.xml, customizing menu orientation 120 faces-config-base-sr-train.xml, service
188
Index L
environment 46 deploying to EAR file 177 deploying to Oracle Application Server 38, 177 importing into Oracle JDeveloper 38 logging errors 181 Model layer 19 Model-View-Controller design pattern 19 packaging for deployment 174 roadmap for customizing 32 testing deployed applications 180 testing in Oracle JDeveloper 173 View layer 22 Java logging technology, reference 182 Java Object Cache 20 about 123 clearing by template indirection rules page 123 configuration parameters (table) 124 configuring 125 creating loader classes 126 example 124 flushing in system settings view 123 LovCacheLoader class example 126 region attributes 124 Java policy file, configuring logger permissions 183 java.util.logging package 182 JavaServer Faces (JSF), about 22 JDeveloper See Oracle JDeveloper JSR-127 specification 22 JSR-227 specification 20
customizing 96, 113 customizing orientation 120 hiding based on business logic 114 locale-specific 101 menu model example 101 menu node properties, table 100 showing based on business logic 114 using the condition property to hide detail nodes 114 MinComponentSize, Java Object Cache configuration parameter 124 MinTimeToLive, Java Object Cache configuration parameter 124 Model layer about 19 customizing 123 Model project, cleanup 40 Model-View-Controller (MVC) design pattern about 19 Controller layer 21 data binding 20 Model layer 19 View layer 22
O
Oracle Application Diagnostics for Java (AD4J), about 183 Oracle Application Server about Dynamic Monitoring Service (DMS) 181 connecting to 37 deploying applications to 177 installing and configuring 37 testing applications 180 Oracle database, connection for data passivation 41 Oracle Global Customer Support (GCS), support for customizations 30 Oracle JDeveloper binding view object to UI page 171 cleaning up projects 40 configuring authentication 44 configuring endpoint URL 42 configuring lazy component load 132 connecting to Oracle Application Server 37 creating ADF Business Component application module 134 creating ADF Business Component view object 133 creating deployment descriptor 176 creating deployment profile for application 175 creating deployment profile for Model
L
lazy component load configuring during deployment 131 configuring in Oracle JDeveloper 132 logging diagnostic, configuring on Siebel Server 185 Java applications using AD4J 183 Java EE, configuring 181 logging.properties, configuring 183
M
MaxComponentSize, Java Object Cache configuration parameter 124 MaxTimeToLive, Java Object Cache configuration parameter 124 menus about menu model 99 adding survey page, example 96 bookmarking pages 101
18 9
Index P
project 174 creating deployment profile for ViewController project 175 creating Deployment project 174 creating Web service client proxy 132 customizing page flows 80 customizing process trains 94 deploying Java EE application to EAR file 177 deploying Java EE application to Oracle Application Server 177 extending ADF Business Components 167 importing Java EE applications 38 installing 37 packaging Java EE application for deployment 174 project structure, Java EE applications 22 removing duplicate class files 40 testing Java EE applications 173 orion-application.xml configuring endpoint URL after deployment 179 creating deployment descriptor 176
about 80 customizing 94 sample file 81 service request example 85 programmatic view objects, creating projects, removing data 40
133
Q
query by example (QBE), using ADF Business Components 146
R
region-metadata.xml, about 55 regions about 54, 55 customizing 63 related documents 10 releaseUserDataForCollection() method, about and example 138 renaming files before customization, about 30 roadmap, for customizing Siebel Self-Service Applications 32
P
page flows about 76 customizing 80 example 77 page templates about 50 af:panelBorder tag 54 creating 64 customizing 62 customizing mappings 74 error page 59 facets 54 mappings 64 page footer 58 page header 55 regions 54, 55 Service Request example 60 setting mappings 75 standard template 51 template indirection 64 template mapping example 66 pagination, using ADF Business Components 139 panels See regions patches, deploying to development environment 46 permissions, about 100 process trains
S
SelfService-oc4j-app.xml, configuring authentication in Oracle JDeveloper 44 session handling access control and authorization 25 ADF binding filter 26 attributes in View layer 25 failover, about 27 failover, configuring 169 in Siebel Self-Service Applications 23 session cookie 27 SessionAM application module 25 Siebel Web service authentication 24 Siebel Web service handler class 24 SessionAM application module configuring failover 169 root application module, about 25, 130 Siebel Business Applications installing and configuring 35 monitoring performance 184 Siebel Database, about 16 Siebel E-Commerce, declarative cache file sample 124 Siebel E-Support page example 60 process train example 85 Siebel objects, about 16 Siebel Public Sector E-Support
190
Index T
interpreting references to deploying company as deploying agency 13 Siebel Self-Service Applications access control and authorization 25 architecture 13 components and application flow (diagram) 15 customization support 30 page template 50 roadmap for customizing 32 session handling 23 Siebel Web Server Extension, connecting to 42 SiebelWSHandler.java, Web service handler class 133, 164 Simple Object Access Protocol (SOAP) passing data from Siebel Server to Java EE application 15 tracing messages on Siebel Server 184 site administration, setting page template mappings 75 skins about 119 customizing application appearance 120 customizing menu orientation 120 sorting, using ADF Business Components 139 source code, Java classes 33 srvrmgr utility, using to configure diagnostic logging 185 support for customizations 30 system-jazn-data.xml, configuring authentication in Oracle JDeveloper 44
V
View layer about 22 session attributes 25 view object implementation classes, overriding methods 136 view objects about 131 binding to UI page 171 create() method, overriding 137 createRowFromResultSet() method, overriding 137 creating programmatic 133 executeQueryForCollection() method, overriding 136 getQueryHitCount() method, overriding 137 hasNextForCollection() method, overriding 136 releaseUserDataForCollection() method, overriding 138 ViewController project, cleanup 40
W
Web services about 18 accessing data using ADF Business Components 136 accessing data using ADF Business Components, asset management example 148 activating 36 authentication 24 clearing cache 36 creating ADF Business Components from 132 creating client proxy 132, 164 enabling tracing on Siebel Server 184 Java classes calling (table of) 154 re-creating client proxy 164 replacing SelfServiceAccount client proxy classes 165 Self-Service, list of 36 Siebel Web service handler class 24, 133, 164 UserData wrapper class 138 Web Service Client Proxy 20 web.xml about application configuration file 33 configuring authentication in Oracle JDeveloper 44
T
template indirection, about 64 template mappings about 64 example 66 template-faces-config.xml, page template mapping example 66 templates, page See page templates testing applications in Oracle JDeveloper 173 on Oracle Application Server 180
U
user responsibilities, about 100 UserData wrapper class 138
19 1
Index W
192