Atg Service Center Ui Prog Guide
Atg Service Center Ui Prog Guide
Atg Service Center Ui Prog Guide
Version 10.1
UI Programming Guide
Oracle ATG
One Main Street
Cambridge, MA 02142
USA
Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Documentation Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Related Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Framework Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Service Center User Interface Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Service Center Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
User Interface Modules and Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
User Interface Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
User Interface Sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Customizing Service Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
I. Programming Service Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3. Service Center User Interface Data Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Schema Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Initializing Framework Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Data Combining . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Framework Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Framework Definition Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
FrameworkDefinition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
SkinDefinition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
TabDefinition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
CellDefinition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
PanelStackDefinition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
PanelDefinition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Framework Supporting Object Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
ContentDefinition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
TemplateDefinition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Framework Configuration Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Configuration Object Inherited Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
FrameworkConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
ContentConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
TemplateConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
SkinConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
TabConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
CellConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
PanelStackConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
PanelConfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Framework Instance Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Instance Object Inherited Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
ContentInstance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
TemplateInstance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
FrameworkInstance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
SkinInstance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
TabInstance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
CellInstance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
PanelStackInstance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
PanelInstance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
PanelTarget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Modifying Framework Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Adding a Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Modifying a Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
iii
Deleting a Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4. Service Center Framework API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Changing Tabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Submitting Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Forwarding and Redirecting URLs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
II. Developing Pages in Service Center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5. Service Center UI Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Working with JavaServer Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Tag Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Servlet Beans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Component Locations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Customization Best Practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Extending Configuration Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Adding JavaScript and CSS Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using Service Center Debugging Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Service Center Debugging Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Dojo Debugging Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6. Working with the Global Context Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Global Context Area Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
NavContainers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
NavItems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
NavSearch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
NavContext . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
NavActionContainers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
NavActionFactory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
NavAction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Rendering the Global Context Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Rendering NavContainers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Rendering NavSearch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Rendering NavContext . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Rendering NavActions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating a New NavAction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Example: Creating a Options Policy Menu Item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7. Working with Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating a New Tab Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Example: Creating a New Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Modifying a Tab Action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Deleting a Tab Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Adding a New Panel Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Example: Adding Three New Panels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Customer Management Panel Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Troubleshooting Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8. Working with Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Modifying Existing Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Working with Page Fragments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Overriding the Default Page Fragment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Modifiable Form Configuration Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating New Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating a Pop-up Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating the Caller Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating the JSP file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating the JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9. Working With Grids and Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
iv
32
33
33
35
36
39
41
41
41
41
42
42
42
42
43
43
44
45
45
46
47
48
48
49
50
51
52
52
53
53
53
54
54
57
57
58
61
62
62
62
64
65
67
67
68
69
69
73
75
76
77
80
81
vi
Introduction
Welcome to the Service Center UI Programming Guide. This document provides information on the
administration and customization of the Service Center UI.
Audience
This manual is intended for administrators, programmers and page developers who are responsible for the
customization and modification of the default Service Center UI. It assumes that you have a working knowledge
of programming techniques, as well as Java, XML and XSD.
Documentation Conventions
The following conventions are used in this manual:
Installation Directory
<ATG10dir>the directory where you installed ATG 10.1. For example, the default location for UNIX
installations is /ATG/ATG10.1.
Menu Navigation
The > (greater than) symbol indicates menu choices. For example, File > Save means you should select
the Save option on the File menu.
Related Documents
Document
Description
1 Introduction
Document
Description
Document
Description
Framework Modules
The following modules exist for the Service Center UI:
<ATG10dir>/Service/Framework/Agent
<ATG10dir>/Service/Agent
<ATG10dir>/Service/SelfService
<ATG10dir>/DCS-CSR/DCS-CSR
<ATG10dir>/Service-UI/Framework/Agent
<ATG10dir>/Service-UI/Agent
<ATG10dir>/Service-UI/SelfService
<ATG10dir>/DCS-CSR-UI/DCS-CSR-UI
1 Introduction
ATG applications use Service Center to display a graphical interface that enables agents to provide customer
support. The following section provides an overview of the Service Center UI structures and architecture.
Configuration Objects Defines the state of the framework for a particular user. Refer to the Framework
Configuration Objects (page 25) section
Instance Objects Holds the live or transient state of the framework for a browser window. Refer to the
Framework Instance Objects (page 28) section
The framework data for Service Center is contained in XML files that are located in various configuration layers.
When an ATG server instance is started, the XML instance files associated with the modules or applications
installed in your environment are combined into a single XML file. Using XML data binding, the combined XML
file is converted into atg.svc.framework.repository.
beans.FrameworkObject servlet bean instances.
The /Service/Framework/lib/classes/atg/xsds/FrameworkDataSpecification.xsd file defines
the framework data structure. It is also used to validate and parse XML instance files. The rules that are used to
combine the XML instance files are defined in the FrameworkDataSpecification.xsd.
combinerCustomizer.xml file. Using these matching rules, the combiner reviews the XML files, locates
matches and then combines the matched elements. Refer to Appendix A, The XML Combiner Script (page 119)
for the framework definition objects combiner customizer rules.
For detailed information on data binding through xml-combine, refer to the ATG Platform Programming Guide.
Schema Elements
The FrameworkDataSpecification.xsd XML schema, which defines the data structures within the UI,
contains the following objects:
framework-template Root element for all framework objects
framework-object Base class that contains attributes that are shared by all framework objects.
framework-definition Defines the initial state of the object
skin-definition Defines the look and feel of the application
tab-definition Defines navigation, page structure and panel stacks
cell-definition Represents the basic layout within a page
panel-stack-definition Contains an ordered collection of panel identifiers
panel-definition Defines a rectangular region of the page with content
content-definition A supporting object that allows you to link static content to framework objects
10
The FrameworkXMLManager contains code that handles framework objects, sets up cacheMap initializers,
sets up the JAXB context paths, initializes and adds base map keys for framework objects
Data Combining
The FrameworkDataSpecification.xsd.combinerCustomizer.xml file sets up rules to combine XML files.
The framework definition tags, such as framework-definition or template-definition, are matched
using the id sub-tag. The map-entry tag is matched using the key sub-tag.
Refer to the Appendix A, The XML Combiner Script (page 119) for details on the rules used for data combining.
11
Framework Objects
The Service Center UI is defined using the following objects. The data structure is defined by the
FrameworkDataSpecification.xsd XML schema, with data files stored in corresponding XML files.
The FrameworkObject base class contains attributes that are shared by all framework objects via an inheritance
relationship. The FrameworkObject shared attributes can be organized into four groups:
Indexing attributes for queries and database housekeeping:
appId
id
objectType
Naming attributes for strings and images:
descriptionKey
imageUrl
nameKey
resourceBundle
State attributes for flags and other state data:
default
enabledYn
Object attributes for integration to other objects in the system:
contentIds
optionNames
templateIds
The attributes of the FrameworkObject are:
Attribute
Type
Description
id
string
appId
string
enabledYn
12
boolean
Attribute
Type
Description
nameKey
string
objectType
string
descriptionKey
string
imageUrl
string
resourceBundle
string
defaultFrameworkId
string
contentIds
contains
mapEntry
elements
templateIds
contains
mapEntry
elements
optionNames
contains
mapEntry
elements
Returns
Method
Description
Map
getContents
Map
getTemplates
Map
getFrameworkObjects
13
FrameworkDefinition
The FrameworkDefinitionobject is a container object for navigation, layout, and look-and-feel for the entire
UI. The FrameworkDefinition object contains skins and tabs. Skins contain configurable look-and-feel and
template definitions for the UI layout. Tabs define the top-level navigation for the application.
The attributes of the FrameworkDefinition object, in addition to the attributes inherited from the
FrameworkObject base class, are:
Attribute
Description
frameworkId
Logical identifier that other objects use to refer to this object. This is exposed to other
objects and to the code, and is the primary external way to refer to the object.
currentTabId
skinIds
Ordered list of the look-and-feel skins used by the framework that is mapped to a userfriendly local key.
tabIds
Returns
Method
Description
List
getSkins
List
getTabs
List
getFrameworkDefinitions
14
<object-type>FrameworkDefinition</object-type>
<description-key>selfService.framework.description</description-key>
<image-url>/image/default.gif</image-url>
<framework-id>selfServiceFramework</framework-id>
...
The framework-definition also identifies the skin IDs used within the framework. For example, the skins
used in this framework definition object are the htmlSkin and the originalSkin. The priority sets the skin
priority in the layout:
<skin-ids>
<id-entry>
<id>htmlSkin</id>
<priority>100</priority>
</id-entry>
<id-entry>
<id>originalSkin</id>
<priority>200</priority>
</id-entry>
</skin-ids>
The framework-definition identifies the tab IDs used within the framework. The priority property sets the
tab priority, for example:
<tab-ids>
<id-entry>
<id>browseTab</id>
<priority>100</priority>
</id-entry>
<id-entry>
<id>searchTab</id>
<priority>200</priority>
</id-entry>
<tab-ids>
SkinDefinition
The SkinDefinition object contains and provides a way to package the look-and-feel definitions available to
the application.
The SkinDefinition object, in addition to the attributes inherited from the FrameworkObject base class,
contains the following attribute:
Attribute
Description
skinId
Logical identifier that other objects use to refer to this object, which is exposed to other
objects and to the code. This is the primary external way to refer to the object.
15
Returns
Method
Description
SkinDefinition
findByUserSegment
AndSkinId
<skin-definition>
<id>MySimpleTabsSkin</id>
<app-id>selfService</app-id>
<enabled-yn>true</enabled-yn>
<name-key>mySimpleTabsSkin.name</name-key>
<object-type>SkinDefinition</object-type>
<description-key>mySimpleTabsSkin.description</description-key>
<image-url>../../image/icons/my_skin_tabs.gif</image-url>
<content-ids>
<map-entry>
<key>style</key>
<value>MySkinSimpleTabsCSS</value>
</map-entry>
<map-entry>
<key>javaScript</key>
<value>MySkinSimpleTabsJS</value>
</map-entry>
</content-ids>
<template-ids>
<map-entry>
<key>errorTemplate</key>
<value>errorPanel</value>
</map-entry>
<map-entry>
<key>panelTemplate</key>
<value>simpleTabsPanel</value>
</map-entry>
<map-entry>
<key>layoutTemplate</key>
<value>simpleTabsLayout</value>
</map-entry>
</template-ids>
<option-names>
<map-entry>
<key>myOption1</key>
<value>SkinSimpleTabsShowLogo</value>
</map-entry>
</option-names>
<skin-id>mySimpleTabsSkin</skin-id>
</skin-definition>
16
TabDefinition
The TabDefinition object has multiple functions, which are related to the overall purpose of dividing the
application into large functional areas:
Define top-level navigation between functional areas
Specify page structure using layout cells and templates
Define panel stacks containing related content groupings
The attributes of the TabDefinition object, in addition to the attributes inherited from the FrameworkObject
base class, are described below:
Attribute
Description
tabId
Logical identifier that other objects use to refer to this object, which is
exposed to other objects and to the code. This is the primary external way
to refer to the object.
titleKey
actionId
nextStepsId
The identifier of the default next steps menu that is displayed with the tab.
visibleYn
accessRight
The access right that defines the security user role required to view the tab.
panelStackAssignments
currentPanelStacks
The listing of the identifiers of the panel stacks currently being displayed on
the tab. The panelStackAssignments attribute indicates which cell the
panel stack populates within the page layout.
panelStackOrder
The list of all panel stacks for the tab in rendering order. This supports panel
stacks that must be rendered in a specific order.
cellAssignments
Indicates the initial panel stack that is displayed in each cell. Contains the
reverse mapping of the panelStackAssignments map.
17
Returns
Method
Description
TabDefinition
findByUserSegmentAndTabId
The following is an example of an Self Service tab-definition that defines a document tab layout:
<tab-definition>
<id>MySsDocumentTabDefinition</id>
<app-id>selfService</app-id>
<enabled-yn>true</enabled-yn>
<name-key>myDocumentTab.name</name-key>
<object-type>TabDefinition</object-type>
<description-key>myDocumentTab.description</description-key>
<image-url>/image/myDocumentTabdefault.gif</image-url>
<tab-id>myDocumentTab</tab-id>
<title-key>myDocumentTab.label</title-key>
<action-id>/main.jsp?t=documentTab</action-id>
<visible-yn>false</visible-yn>
<access-right></access-right>
<panel-stack-assignments>
<map-entry>
<key>documentPanels</key>
<value>centerColumn</value>
</map-entry>
</panel-stack-assignments>
<cell-assignments>
<map-entry>
<key>centerColumn</key>
<value>documentPanels</value>
</map-entry>
</cell-assignments>
</tab-definition>
CellDefinition
The CellDefinition object represents the basic layout unit within the page structure. The CellDefinition
can refer to a DOM element or to another identifier on the page that contains a panel stack.
The attributes of the CellDefinition object, in addition to the attributes inherited from the
FrameworkObject base class, are:
18
Attribute
Description
cellId
Logical identifier that other objects use to refer to this object that is exposed to other
objects and to the code. This is the primary external way to refer to the object.
cellOpenYn
The cellOpenYn flag determines whether a cell is toggled open or closed. Used in Service
Center only.
accessRight
The access right that defines the security user role required to view the cell.
Returns
Method
Description
CellDefinition
findByUserSegment
AndCellId
<cell-definition>
<id>SsCenterCellDefinition</id>
<app-id>selfService</app-id>
<enabled-yn>true</enabled-yn>
<name-key>centerColumn.name</name-key>
<object-type>CellDefinition</object-type>
<description-key>centerColumn.description</description-key>
<image-url>/image/default.gif</image-url>
<cell-id>centerColumn</cell-id>
<cell-open-yn>true</cell-open-yn>
<access-right></access-right>
</cell-definition>
PanelStackDefinition
The PanelStackDefinition object contains an ordered collection of panel identifiers. The
PanelStackDefinition object is assigned to a cell that corresponds to a DOM element on the page. The cell
defines the position of the PanelStackDefinition object on the page.
The attributes of the PanelStackDefinition object, in addition to the attributes inherited from the
FrameworkObject base class, are described below:
19
Attribute
Description
panelStackId
Logical identifier that other objects use to refer to this object and is exposed to other
objects and code. This is the primary external way to refer to the object.
titleKey
Resource bundle key for the label that is associated with the panel stack.
tabAffinityYn
The tabAffinity flag indicates if the panel stack is associated with a particular tab
(true) or if it can be rendered under any tab, as in the case of user preferences (false).
If the tabAffinity flag is true and this was the last panelStack viewed under a tab,
when the user navigates back to that tab, the panel stack will be rendered.
panelIds
Returns
Method
Description
List
getPanels
Returns
Method
Description
PanelStackDefinition
findByUserSegment
AndPanelStackId
20
<panel-stack-id>helpPanels</panel-stack-id>
<header>contentHeader</header>
<error-panel-id>errorPanel</error-panel-id>
<title-key>helpPanels.label</title-key>
<tab-affinity-yn>true</tab-affinity-yn>
<panel-ids>
<id-entry>
<id>SsErrorPanel</id>
<priority>100</priority>
</id-entry>
</panel-ids>
</panel-stack-definition>
PanelDefinition
The PanelDefinition object is the basic content unit for the application. The PanelDefinition defines a
rectangular region of the page with related content referenced by an included JSP content template.
The attributes of the PanelDefinition object, in addition to the attributes inherited from the
FrameworkObject base class, are:
Attribute
Description
panelId
Logical identifier that other objects use to refer to this object, which is
exposed to other objects and to the code. It is the primary external way to
refer to the object.
contentUrl
otherContext
onload
onunload
helpKey
Provides a string for inline help accessible via a help icon located on the
panel title bar.
titleKey
Resource bundle key for the label that is associated with the panel.
visibleYn
showTitleYn
Indicates whether the panel has a visible title bar or only a content area with
no title bar.
panelOpenYn
allowPanelToggleYn
Indicates whether the entire panel, including title bar, can be closed or
minimized and represented by a placeholder in the available panels.
21
Attribute
Description
allowContentToggleYn
tabHolderYn
Determines whether the panel can hold other panels in a tabbed format.
alwaysTabbedYn
tabbedYn
allowTabbingYn
currentPanelId
Holds the identifier of the currently visible panel based on the selected tab
for tab-holder panels.
panelItemCount
Provides a way for the panel label to contain a number representing the
number of items displayed in the panel. For example, a panel that displays 17
search results in its content area is able to display My Search Results (17) in
the title bar.
accessRight
The access right that defines the security user role required to view the panel.
tabbedPanelIds
Lists the identifiers of the other panels that are tabbed with the current tabholder panel. The tabs are rendered in the order that the corresponding
panels identifiers occur in the list.
Returns
Method
Description
PanelDefinition
findByUserSegment
AndPanelId
<panel-definition>
<id>SsContactUsPanel</id>
<app-id>selfService</app-id>
22
<enabled-yn>true</enabled-yn>
<name-key>contactUsPanel.name</name-key>
<object-type>PanelDefinition</object-type>
<description-key>contactUsPanel.description</description-key>
<image-url>/image/default.gif</image-url>
<panel-id>contactUsPanel</panel-id>
<content-url>/panels/contactUsPanel.jsp</content-url>
<help-key>contactUsPanel.help</help-key>
<title-key>contactUsPanel.label</title-key>
<visible-yn>true</visible-yn>
<show-title-yn>true</show-title-yn>
<panel-open-yn>true</panel-open-yn>
<allow-panel-toggle-yn>false</allow-panel-toggle-yn>
<available-yn>false</available-yn>
<content-open-yn>true</content-open-yn>
<allow-content-toggle-yn>false</allow-content-toggle-yn>
<tab-holder-yn>false</tab-holder-yn>
<always-tabbed-yn>false</always-tabbed-yn>
<tabbed-yn>false</tabbed-yn>
<allow-tabbing-yn>false</allow-tabbing-yn>
<allow-slots-yn>false</allow-slots-yn>
<tab-scroll-index>0</tab-scroll-index>
<panel-item-count>0</panel-item-count>
<access-right>TBD</access-right>
</panel-definition>
ContentDefinition
The ContentDefinition object provides an extensible way to link static content, such as CSS, HTML or
JavaScript to framework objects. The MIME type of the content is specified with the ContentDefinition
object. Any framework object can define content definitions mapped by key. The following is an example of how
to import CSS contents into a JSP page:
<c:out value="${mySkin.contents.css.body}"/>
The attributes of the ContentDefinition object, in addition to the attributes inherited from the
FrameworkObject base class, are:
Attribute
Description
body
The text context that is defined as an alternative to referencing the content by a URL.
23
Attribute
Description
contentId
Logical identifier that other objects use to refer to this object. This identifier is exposed
to other objects and to the code. and is the primary external way to refer to the object.
mimeType
The type of content being defined. For example, content with a MIME type of text/css
would place CSS contents in the body. Content with a MIME type of text/javascript
would place JavaScript in the body. Other common content types in a Web application
might be text/html or text/xml.
otherContext
The Web context for rendering content from other Web applications.
url
urlYn
Indicates whether the content is referenced externally by a URL. If the URL flag is false,
the body of the static content is contained internally in the body attribute of the content
definition.
Returns
Method
Description
ContentDefinition
findByUserSegment
AndContentId
TemplateDefinition
The TemplateDefinition object defines templates for objects in the framework. Templates are JSP pages that
define the page structure for a framework object. Any framework object has the ability to define its own layout
templates mapped by key. The following is an example of how to import a skin layout template:
<dspel:include page="${mySkin.templates.layoutTemplate.url}"/>
The attributes of the TemplateDefinition object, in addition to the attributes inherited from the
FrameworkObject base class, are:
24
Attribute
Description
otherContext
The Web context for rendering content from other Web applications.
Attribute
Description
templateId
Logical identifier that other objects use to refer to this object, which is exposed to other
objects and to the code. It is the primary external way to refer to the object.
url
Returns
Method
Description
TemplateDefinition
findByUserSegment
AndTemplateId
<template-definition>
<id>SsSimpleLinksEveryonePanelTemplate</id>
<app-id>selfService</app-id>
<enabled-yn>true</enabled-yn>
<object-type>TemplateDefinition</object-type>
<template-id>simpleLinksPanel</template-id>
<url>/skins/templates/simpleLinksPanelTemplate.jsp</url>
</template-definition>
25
Attribute
Description
configType
enabledYn
The enabled flag turns the object on or off in the UI via the object configuration. Value is
true or false.
id
Repository identifier.
userId
FrameworkConfig
The FrameworkConfig object manages user configuration for the FrameworkDefinition object.
The attributes of the FrameworkConfig object, in addition to the attributes inherited from the
ConfigurationObject base class, are:
Attribute
Description
configType
FrameworkConfig
currentTabId
The identifier of the currently selected tab for the current user.
frameworkId
tabIds
ContentConfig
The ContentConfig object manages user configuration for the ContentDefinition object and has the same
attributes as the ContentDefinition object.
TemplateConfig
The TemplateConfig object manages user configuration for the TemplateDefinition object and has the
same attributes as the TemplateDefinition object.
SkinConfig
The SkinConfig object is a placeholder configuration object for the SkinDefinition object with no
significant attributes.
26
TabConfig
The TabConfig object manages user configuration for the TabDefinition object. The attributes of the
TabConfig object, in addition to the attributes inherited from the ConfigurationObject base class, are:
Attribute
Description
configType
TabConfig
tabId
visibleYn
The visibleYn flag indicates whether the tab is visible for the current user.
CellConfig
The CellConfig object manages user configuration for the CellDefinition object. The attributes of the
CellConfig object, in addition to the attributes inherited from the ConfigurationObject base class, are:
Attribute
Description
configType
CellConfig
cellId
cellOpenYn
The cellOpen flag indicates whether the cell is open or closed for the current user.
PanelStackConfig
The PanelStackConfig object manages user configuration for the PanelStackDefinition object.
The attributes of the PanelStackConfig object, in addition to the attributes inherited from the
ConfigurationObject base class, are:
Attribute
Description
configType
PanelStackConfig
panelIds
panelStackId
PanelConfig
The PanelConfig object manages user configuration for the PanelDefinition object. The attributes of the
PanelConfig object, in addition to the attributes inherited from the ConfigurationObject base class, are:
27
Attribute
Description
configType
PanelConfig
availableYn
The available flag indicates whether the panel is displayed in the available panels for
the current user.
contentOpenYn
Indicates whether the panel content area is open or closed for the current user.
currentPanelId
Holds the identifier of the initially visible panel tab for the current user. Applies to tabholder panels.
panelId
panelOpenYn
The panel open flag indicates whether the entire panel is open or closed, including
the title bar, for the current user.
tabbedPanelIds
Lists the identifiers of the other panels that are tabbed with the current tab-holder
panel for the current user. Applies to tab-holder panels.
tabbedYn
The tabbed flag indicates whether the panel is initially tabbed on a tab-holder panel
for the current user. If set to false, the panel is not tabbed within the panel.
tabScrollIndex
Supports the scrollable tabs feature configuration for horizontal tab scrolling.
visibleYn
28
Attribute
Description
enabledYn
The enabled flag turns the object on or off in the UI for the duration of the users
browser session. Value is true or false.
instanceType
ContentInstance
The ContentInstance object manages transient state for the ContentDefinition object and has attributes
similar to the ContentDefinition object.
TemplateInstance
The TemplateInstance object manages transient state for the TemplateDefinition object and has
attributes similar to the TemplateDefinition object.
FrameworkInstance
The FrameworkInstance object manages transient state for the FrameworkDefinition object. The attributes
of the FrameworkInstance object, in addition to the attributes inherited from the InstanceObject base
class, are:
Attribute
Description
instanceType
FrameworkInstance
currentTabId
frameworkId
previousTabId
tabIds
SkinInstance
The SkinInstance object is a placeholder configuration object for the SkinDefinition object with no
attributes currently defined.
TabInstance
The TabInstance object manages transient state for the TabDefinition object. The attributes of the
TabInstance object, in addition to the attributes inherited from the InstanceObject base class, are:
Attribute
Description
instanceType
TabInstance
cellAssignments
Map indicating the panel stacks that are currently assigned to each layout cell in
the browser.
29
Attribute
Description
currentPanelStacks
Map indicating the cell to which each panel stack is currently assigned in the
browser.
nextStepsId
Identifier indicating the current next steps menu for the tab in the browser.
tabId
visibleYn
CellInstance
The CellInstance object manages transient state for the CellDefinition object. The attributes of the
CellInstance object, in addition to the attributes inherited from the InstanceObject base class, are:
Attribute
Description
instanceType
CellInstance
cellId
cellOpenYn
Indicates whether the cell is open or closed in the browser. Tracks the openclosed state of the columns.
currentPanelStackId
Identifier that indicates the current panel stack displayed in the cell in the
browser.
PanelStackInstance
The PanelStackInstance object manages transient state for the PanelStackDefinition object.
The attributes of the PanelStackInstance object, in addition to the attributes inherited from the
InstanceObject base class, are:
30
Attribute
Description
instanceType
PanelStackInstance
panelStackId
panelTargetElements
List of panel target elements in the panel stack, each representing a single
instance of a panel within the UI.
targetMap
Maps a lists of panel target elements keyed by the logical panel identifier. Each
key in the map contains a list of all of the instances of a particular panel target
in the UI.
PanelInstance
The PanelInstance object manages transient state for the PanelDefinition object. The attributes of the
PanelInstance object, which are in addition to the attributes inherited from the InstanceObject base class,
are:
Attribute
Description
instanceType
PanelInstance
availableYn
Indicates whether the panel is listed in the available panels in the browser.
contentOpenYn
Indicates whether the panel content area is open or closed in the browser.
currentPanelId
Holds the identifier of the currently visible panel tab in the browser. Applies to tabholder panels.
panelId
panelOpenYn
Indicates whether the entire panel is open or closed, including the title bar, in the
browser.
tabbedPanelIds
Lists the identifiers of the other panels that are tabbed with the current tab-holder
panel in the browser. Applies to tab-holder panels.
tabbedYn
Indicates whether the panel is currently tabbed on a tab-holder panel in the browser.
tabScrollIndex
Supports the transient scrollable tabs feature for horizontal tab scrolling.
visibleYn
PanelTarget
The PanelTarget object manages transient state for a single instance of a panel in the UI. By providing an autogenerated unique identifier for each panel instance, the PanelTarget object allows multiple instances of the
same PanelDefinition to exist simultaneously on the page.
The attributes of the PanelInstance object, in addition to the attributes inherited from the InstanceObject
base class, are:
Attribute
Description
instanceType
PanelTargetElement
panelId
targetElementId
31
Adding a Definition
The following is an example of a new content definition named myexistingTabAction:
<content-definition>
<id>myexistingTabAction</id>
<app-id>workspace</app-id>
<enabled-yn>true</enabled-yn>
<object-type>ContentDefinition</object-type>
<content-id>myexistingTabAction</content-id>
<mime-type>text/javascript</mime-type>
<body>atgChangeTab(atg.svc.framework.changeTab("DefaultTab"),
null, null, null);</body>
<url-yn>true</url-yn>
</content-definition>
Modifying a Definition
The following example shows a modification to an existing myexistingTabAction element that changes the
enabled-yn element from true to false. The myexistingTabAction element is matched on the contentdefinition and id tags:
<content-definition>
<id>myexistingTabAction</id>
<enabled-yn>false</enabled-yn>
</content-definition>
Deleting a Definition
The following is an example of how to delete a definition named myexistingTabAction. Modifications should
be made to the serviceFramework.xml file located in your customization directory:
<content-definition xml-combine="remove">
<id>myexistingTabAction</id>
</content-definition>
32
Service Center provides an API that accesses various features of the UI framework. The following information is
discussed in this section:
atgChangeTab Provides code that allows you to change the tab in the framework while setting arguments
for atgSubmitAction
atgSubmitAction Provides code that submits information from a form
frameworkUrl Provides code that identifies forwarding and redirecting URLs
Changing Tabs
The atgChangeTab performs the necessary client and server side actions to change the current tab in the
framework using the following attributes that set arguments for atgSubmitAction.
newTab
nextSteps
panelStack
panels
extraParams
The following functions are available in atg.svc.framework. Additional information is available in the ATG API
Reference for Knowledge Manager and Self Service:
Attribute
Description
changeTab
Change to the specified tab on the client-side only. Must be called in conjunction
with a server-side call to atgSubmitAction that specifies the ID of a valid tab
defined in the UI framework.
Arguments:
tabId ID of the tab to make the current tab
33
Attribute
Description
toggleSidebar
Changes and restores the state of the sidebar from the default expanded view
showing all of the helpful panels to a minimized view showing a vertical bar.
Arguments:
none
toggleResearch
Knowledge Manager only. Changes and restores the state of the middle column
in Knowledge Manager from the expanded view showing all of the research
panels to a default minimized view showing a vertical bar.
Arguments:
none
selectTabbedPanel
Selects the specified panel in a row of tabbed panels as the current panel.
Arguments:
panelId ID of the panel to make the current panel
nextStepsId ID of the next steps
nextStepsPanelId optional ID of the next steps panel
togglePanel
Removes or restores the specified side panel. Removed panels are taken out of
the display and moved to a link in the Available Panels panel. Clicking the link in
Available Panels restores the panel to its original position.
Arguments:
panelId ID of the panel to toggle
togglePanelsToTabs
togglePanelContent
Shows and hides the content area of a panel. The title bar of the panel remains in
place.
Arguments:
panelId ID of the panel to toggle
startCall
Initiates a new agent session with a customer without ending the existing
session.
endCall
endAndStartCall
Initiates a new agent session with a customer and terminates the existing session.
Framework parameters are submitted to the server using the atgSubmitAction function or with form handlers
using a successURL formatted by the frameworkUrl tag library.
34
Submitting Actions
The atgSubmitAction is used to submit a form. The JavaScript function atgSubmitAction has the following
signature, which accepts a single object argument:
The params argument is a JavaScript object that may contain any combination of the following properties that
are used to configure the framework request. Some properties are converted to request or query parameters
and submitted to the server. Others are assigned to the submitted form. Most of the properties are either
optional or have defaults, so they do not have to be specified with each request.
Property
Description
url
Optional target URL for submitting framework requests. Overrides the default
framework URL.
mimeType
handleAs
form
Reference to the DOM form to submit the framework request. The form can be a
DSP form linked to a form handler. Either form or formId is required.
formId
Looks up the form to submit with the framework request. Either form or formId
is required.
formInputValues
Requires the form specified in the form property. Maps form element names to
values. Each value is bound to the corresponding form element for submission
as such: For each name in formInputValues, set form[name].value =
forminputValues[name]
tab
nextSteps
String name of the next steps to render in the next steps panel. Submits the
request parameter ns.
panelStack
Navigates to the specified panel stack under the current tab. Renders all of the
currently-enabled member panels of the panel stack in the cell for which the
panel stack is assigned under the tab definition. Submits the request parameter
ps.
panels
Array of panel identifiers to refresh. The panel will remain in its current place but
the contents will be re-rendered. Submits the request parameter p. For example:
["panel1", "panel2"]
selectTabbedPanels
35
Property
Description
paramsMapName
Optional. Fully qualified Nucleus path of the form-handler bean map property
that will receive the extraParams. Allows JavaScript data to be passed to a form
handler.
formHandler
extraParams
listParams
Optional. Map of keys to arrays of values. Requires the form specified in the
form property and the form handler specified in the formHandler property.
The values contained in each array are submitted to the same array-based form
handler property. For example, {param1: [a,b,c], param2: [x,y,z]}.
mapParams
Optional. Map of keys to other maps. Requires the form specified in the form
property and the form handler specified in the formHandler property. The outer
keys map to the corresponding property names on formHandler. The inner
keys are appended to a comma-delimited list of key-value pairs. For example,
{property1: {key1: value1, key2: value2}}.
queryParams
Optional. Map of parameters that are added without modification to the request
URL as query parameters.
sync
showLoadingCurtain
36
which will be added to the query parameters as contentHeader=true. The result is stored in the successURL
page variable, which can be assigned to a form handler property.
<svc-ui:frameworkUrl var="successURL" panelStacks="globalPanels,
cmcShoppingCartPS" contentHeader="true"/>
The following attributes can be assigned to the tag. Custom dynamic attributes are also allowed and will be
included to the redirection URL as query parameters.
Attribute
Description
context
dynamicIncludes
Context
panels
Delimited list of panel identifiers for the panels to refresh. The panels will
remain in their current place but the contents will be re-rendered. Includes the
request parameter p. The default delimiter is a comma. The default delimiter
can be overridden with the splitChar attribute.
panelStacks
Delimited list of panel stack identifiers for the panel stacks to navigate to under
the current panel. Renders the currently-enabled member panels of the panel
stack in the cell for which the panel stack is assigned under the tab definition.
Includes the request parameter ps. The default delimiter is a comma. The
default delimiter can be overridden with the splitChar attribute.
selectTabbedPanels
Delimited list of panel identifiers for the tabbed panels to set to the selected
state. Applies only to panels that are in a row of tabbed panels. The default
delimiter is a comma. The default delimiter can be overridden with the
splitChar attribute.
splitchar
Sets the delimiter to the specified set of characters overriding the default
comma delimiter.
tab
url
var
37
38
This section discusses UI components that are specific to Service Center. General page development
information, such as working with tags, forms and servlets, can be found in the ATG Page Developer's Guide.
Tag Libraries
As a Web page designer, you build the front-end interface for the application out of JSPs that use the DSP tag
library. The DSP tag library used by Service Center are listed in Appendix B, B: Tag Libraries (page 121).
For additional information on working with tag libraries, refer to the ATG Page Developer's Guide.
Servlet Beans
Servlet beans are Java-based Web components that are managed by a container and generate dynamic content
from Java objects. They also transform data in XML documents. Detailed information on working with servlet
beans and integrating XML with servlet beans can be found in the ATG Page Developer's Guide.
41
Component Locations
Service Center comes with a number of preconfigured elements and components that allow you to modify your
Web application. The following directories contain the application UI files and JSP files that define structural
components of the application.
When the Configuration and Installation Manager (CIM) configures your applications, it accesses the files in the
following locations:
Application
Directory
Knowledge Manager
<ATG10dir>/Service-UI/Agent/j2ee-apps/Agent/
Self Service
<ATG10dir>/Service-UI/j2ee-apps/SelfService/
<ATG10dir>/DCS-CSR-UI/
The following example adds myScript1.js and myScript2.js to myServiceCenter. To add to the list,
ensure that you use the += syntax:
42
applicationScriptFiles+=
/myServiceCenter/myScripts/myScript1.js,
/myServiceCenter/myScripts/myScript2.js
2. If dojoDebug is turned on, as discussed in Dojo Debugging Mode (page 44), you must add your custom
scripts to the debugScriptFiles list:
debugScriptFiles+=
/myServiceCenter/myScripts/myScript1.js,
/myServiceCenter/myScripts/myScript2.js
The pop-up window presents a table of the data IDs that drive the display of the panel, as well as the JSP that
renders the panel content and the Web application that contains the JSP. The table also displays the resource
bundle and the key that are used to display the panel content.
43
Below the table is a list of the JSP sources, as well as a list of the included JSP files. This page is cross-linked to the
Dynamo Server Admin, which queries for the panel data, allowing real-time modification.
To turn on debug mode, set the useDebugPanelStackMode property of the /atg/svc/agent/ui/
AgentUIConfiguration to true.
44
The global context area is a UI located at the top of the page in Service Center. This JSP-based UI is produced
using a series of configuration files that define the contents of each navigational item. The following section
describes the components that make the global context area, as well as steps to modify the UI.
The global context area is comprised of three separate navigation containers, the PrimaryNavContainer, the
SecondaryNavContainer and the OptionsNavContainer. Each navigation container is a component of type
NavContainer, which defines the navigational item components of type NavItem that will be displayed in the
UI. The following individual navigation classes make up the entire global context area architecture:
NavItem A NavItem component encapsulates the components that make up a single navigational element
within the UI. A NavItem is comprised of NavSearch, NavContent and NavAction elements
NavSearch A NavSearch component provides the display and control elements that are displayed and
executed when a user clicks the search option on the NavItem
NavContent This component provides the display and control elements that are displayed and executed
when a use clicks on the context area of the NavItem
NavAction A NavAction defines the display and control elements for a single action. NavActions can be
referenced by a NavActionFactory using static component references or, in some cases can be dynamically
generated by a NavActionFactory. Dynamic NavActions are those that can change in availability,
appearance or execution, depending on the current state of the agents environment
NavActionContainer This component defines one or more NavActions available to the NavItem
45
Anatomy of a NavItem
Each NavItem has a property file that contains commonly used attributes and sub-components, which can be
found in:
ATG Product
Location
/DCS-CSR-UI/src/config/atg/svc/agent/ui/
Knowledge Manager
/service-UI/Agent/src/config/atg/svc/agent/ui/
/service-UI/framework/Agent/src/config/atg/svc/
agent/ui/
The NavAction component contains properties for a resource bundle and a label, as well as a JavaScript
function call. These properties can be modified to customize the NavAction. The labels for the components are
all localized in a resource bundle, which is typically FrameworkResources. Note: There are separate bundles for
the Service Center Framework, Commerce Service Center, and Knowledge Manager.
NavContainers
NavContainers contain multiple NavItems, which are divided into search, context and action subcomponents.
There are three default NavContainers:
PrimaryNavContainer Holds information such as Customer, Order, Product and Ticket and is rendered on
the bottom row of the global context area
SecondaryNavContainer H olds information such as Store, Site, Catalog and Pricelists and is rendered on
the top row of the global context area
OptionsNavContainer This contains Log Out, Preferences and About information and is rendered to the
right of the SecondaryNavContainer
46
Name
Type
Description
id
string
IDs are optional. If you use an ID, it must be unique to the IDs that are
specified by other navigational components within the global context
area.
The ID is included when rendering the NavContainer component
within the DOM to enable custom CSS files to target the styling of the
NavContainer without having to modify the JSP file directly.
environmentTools
path
navItems
path
NavItems
A NavItem provides three optional subcomponents, as well as properties for controlling rendering priority
within the container, secured access and display of the item. The subcomponents are the search, context and
action container components.
Applications that use the global context area add their NavItems to the NavContainers NavItems list within
their own config layer using the += syntax.
NavItems contain the following configuration:
Name
Type
Description
id
string
IDs are optional. If you use an ID, it must be unique to the IDs
that are specified by other navigational components within the
global context area.
The ID is included when rendering the NavItem component
within the DOM to enable custom CSS files to target the styling
of the NavItem without having to modify the JSP file directly.
available
Boolean
sortPriority
integer
accessRight
string
labelResourceKey
string
The resource key that identifies the label that appears under
the NavItem in the UI.
resourceBundleName
string
47
Name
Type
Description
navSearch
path
navContext
path
navActionContainer
path
NavSearch
The NavSearch component defines the navigational elements for the search button that exists on the
navigation item, allowing the user to activate the search function. When a user clicks on the Search button, a
JavaScript code snippet is executed, performing the specific search action.
The NavSearch component has the following configuration:
Name
Type
Description
id
string
IDs are optional. If you use an ID, it must be unique to the IDs
that are specified by other navigational components within the
global context area.
The ID is included when rendering the NavSearch component
within the DOM to enable custom CSS files to target the
styling of the NavSearch without having to modify the JSP file
directly.
toolTipResourceKey
string
The resource key used to identify the tooltip text that appears
when hovering over the search element of the NavItem in the
UI.
resourceBundleName
string
javaScriptFunctionCall
path
NavContext
This component represents the context area on a NavItem. It provides a descriptive label for the NavItem that is
relative to the current context. The base version of the NavContext component defines layout properties such
as width limits, display strings and the JavaScript code snippet to execute.
The NavContext can be a static label or a dynamic value or a customized combination of the two. Customized
label strings are generated using subclasses of NavContext.
The NavContext component contains the following configuration:
48
Name
Type
Description
id
string
labelResourceKey
string
The resource key used to identify the text that appears as the
context element of the NavItem in the UI.
Note: Because NavContext displays contextual information,
it is common for this text value to be dynamic in nature,
depending on the current state of the agents environment.
As such, it is common for the getLabel() API to be
overridden to provide a dynamic value.
toolTipResourceKey
string
The resource key used to identify the tooltip text that appears
when hovering over the context element of the NavItem in
the UI.
minWidth
integer
maxWidth
integer
javaScriptFunctionCall
string
resourceBundleName
string
NavActionContainers
This component represents the action menu within a NavItem. The action menu contains a collection of links to
display within a pop-up window. The NavActionContainer references the NavActionFactory components
that provide the navigational display and control elements for the NavActions.
The NavContainer, which uses the NavActionFactory sortPriorty property to identify the priority of the
grouped NavActions defined within the NavActionFactory, has the following configuration:
49
Name
Type
Description
id
string
IDs are optional. However, when used, they must be unique to the
IDs that are specified by other navigational components within the
global context area.
The ID is included when rendering the NavActionContainer
component within the DOM to enable custom CSS files to target the
styling of the NavActionContainer without having to modify the
JSP file directly.
resourceBundleName
string
labelResourceKey
string
Identifies the resource key for the text that appears for the
NavActionContainer. This property, which is used only when a
NavActionContainer contains a single NavAction, will display the
text that appears for the action in the NavActions menu.
toolTipResourceKey
string
Identifies the resource key for the tooltip text that appears for the
NavActions menu.
navActionFactories
path
NavActionFactory
The NavActionFactory component enables you to group and sort NavActions that are displayed in
the action menu of the NavItem. A NavActionContainer can reference multiple NavActionFactories
and uses their sortPriority property to set their sort order. In turn, NavActions that are referenced by
a NavActionFactory are grouped together within the NavAction menu and can be sorted using the
NavAction sortPriority property.
50
Name
Type
Description
sortPriority
integer
available
Boolean
accessRight
string
Defines the access right required to use the actions generated by this
factory. If the agent does not have this right, the actions will not be
included in the UI.
navActions
path
NavAction
The NavAction component represents an individual option in an action menu. These components also contain
information on rendering priority and the properties that control the display. The navAction configures the
text label that is displayed in the menu, as well as the JavaScript snippet that executes when the menu option is
selected.
NavActions contain the following configurations:
Name
Type
Description
id
string
sortPriority
integer
available
Boolean
accessRight
string
resourceBundleName
string
51
Name
Type
Description
enabled
Boolean
labelResourceKey
string
The resource key used to identify the text that appears for
the action in the NavItems action menu.
javaScriptFunctionCall
string
Navigation items are rendered using a hierarchy of navigational objects and JSPs files. At the top level is the
NavContainer.jps, which is typically called from globalContentArea.jsp. The NavContainer object to be
rendered is imported and passed along to the navContainer.jsp file.
Rendering NavContainers
To render a NavContainer, the JSP references a NavContainer object that contains all of the NavItem
components to display. The JSP iterates over each NavItem, rendering the NavSearch, NavContext, and
NavAction subcomponents using navSearch.jsp, navContext.jsp and navActions.jsp respectively.
52
The navContainer.jsp iterates over the collection of NavItems passing each NavItem component to the
navItem.jsp file to render them individually.
Rendering NavSearch
The NavSearch component is rendered by the navSearch.jsp file to provide a link to a search page. The
navSearch.jsp page renders a <div> tab containing the navSearch ID, as well as the icon and tooltip. For
example:
<dspel:getvalueof var="navSearch" param="navSearch"/>
<%-- Embed the JavaScript function call and tooltip into the search component --%>
<a href="#" onclick="<c:out value="${navSearch.javaScriptFunctionCall}"/>"
class="gcn_btn_search" title="<c:out
value="${navSearch.toolTipText}"/>"><span><c:out
value="${navSearch.toolTipText}"/></span></a>
Rendering NavContext
The NavContext component is rendered by navContext.jsp to provide the context display information and
the context navigation link. The navContext.jsp file also renders a <div> tag with the NavContext ID. For
example:
<dspel:getvalueof var="navContext" param="navContext"/>
<%-- Embed the context label and tooltip into the context component --%>
<a href="#" onclick="<c:out value="${navContext.javaScriptFunctionCall}"/>"
class="gcn_btn_context"
title="<c:out value="${navContext.toolTipText}"/>"><c:out
value="${navContext.label}"/></a>
Rendering NavActions
The navActionContainer.jsp and the navActionItems.jsp files render the NavActions. NavActions are
rendered in three different ways, depending on the number of actions provided by the NavActionContainer,
and if the NavActionContainer has provided a label value.
Action pop-up menu with menu label This rendering provides a label on the action menu, as well as a popup menu with the available actions. There are two configurations that are rendered this way by default, the
Commerce Service Center Products NavItem and the Options menu in the OptionsNavContainer
Action pop-up menu with no menu label This rendering provides a pop-up menu with the available actions
and no label that has been identified in the NavContainer. This rendering includes multiple actions that
have no NavActionContainerLabel, such as the Customer NavItem, or a single NavActions with no
NavActionContainerLabel
No Action pop-up menu with an action label This rendering does not provide a pop-up menu for the
actions, rendering instead only a single action link. This single action provides the JavaScript function
that is executed when the action label is clicked. The rendered label and tooltip text is defined by the
NavActionConatinerLabel and NavActionConatinertoolTip properties. The configuration provides
only a single NavAction with a NavActionContainerLabel, such as the Respond NavItem
53
2. Modify the OptionsNavActionFactory file to include your new NavAction within the list. The following
OptionsNavActionFactory example shows that an OptionsPolicyNavAction has been added to the list
of actions available. Add the following properties file to the configuration layer to append the new action to
the /atg/svc/agent/ui/OptionsNavActionFactory:
actions+=\
/atg/svc/agent/ui/OptionsPolicyNavAction
3. Ensure that your resource bundle file contains the necessary references to your new action. The following
example resource file, which we defined in Step 1 as mycompany.myapp.ui.Resources, defines the label
resources used by the new NavAction:
# options
navitem.options.item.label=Options
navitem.options.action.label=Options
54
This adds the Corporate Policies menu label to the Options menu. When the agent selects this menu option,
the myPolicyPanelStack will be displayed.
55
56
When you create a new page, you create a tab definition that contains the other definition objects, thus
defining page structure and layout. For detailed information on the definition object, refer to the Framework
Objects (page 12) section.
57
1. Create an /atg/svc/framework/serviceFramework.xml file in your new custom module and add the
ContentDefinition item for the new tab action. This defines the JavaScript action that will be attached to
the TabDefinition item for the new tab and then executed.
2. To create a new navigational item within the tab, modify the NavContainer and other NavItem components
as outlined in Creating a New NavAction (page 54) section.
3. Append your new tab definition information to the default tab definition.
4. Create the panel stack definition that will be used by your new tab definition.
5. Create the JSP files and resources that you identified in your definitions.
Note: You must ensure that the access rights for the tab and the panels are correct.
58
<app-id>workspace</app-id>
<enabled-yn>true</enabled-yn>
<object-type>ContentDefinition</object-type>
<content-id>myNewTabAction</content-id>
<mime-type>text/javascript</mime-type>
<body>atgChangeTab(atg.service.framework.changeTab('myNewTab'),
null,null,null);</body>
<url-yn>true</url-yn>
</content-definition>
2. To create a new navigational item, modify the NavContainer and other NavItem components as outlined in
Creating a New NavAction (page 54) section.
3. Append your new tab definition information to the existing tab definition. This example creates a tab
definition named WsMyNewTabDefinition. The tab definition identifies the my.company.ui.Resources
file that defines the myNewTab.resource key, which would be created in your custom application:
<tab-definition>
<id>WsMyNewTabDefinition</id>
<app-id>workspace</app-id>
<enabled-yn>true</enabled-yn>
<object-type>TabDefinition</object-type>
<resource-bundle>my.company.ui.Resources</resource-bundle>
<content-ids>
<map-entry>
<key>actionJavaScript</key>
<value>myTabAction</value>
</map-entry>
</content-ids>
<template-ids>
<map-entry>
<key>contentHeader</key>
<value>contentHeaderTemplate</value>
</map-entry>
</template-ids>
<tab-id>myNewTab</tab-id>
<title-key>myNewTab.resource</title-key>
<visible-yn>true</visible-yn>
<access-right>GlobalPanel</access-right>
<panel-stack-assignments>
<map-entry>
<key>preferencesPanel</key>
<value>contentColumn</value>
</map-entry>
<map-entry>
<key>helpfulPanels</key>
<value>sidebarColumn</value>
</map-entry>
<map-entry>
<key>MyNewPS</key>
<value>contentColumn</value>
</map-entry>
<map-entry>
<key>globalPanels</key>
59
<value>globalCell</value>
</map-entry>
<map-entry>
<key>cmcHelpfulPanels</key>
<value>sidebarColumn</value>
</map-entry>
</panel-stack-assignments>
<current-panel-stacks>
<map-entry>
<key>MyNewPS</key>
<value>contentColumn</value>
</map-entry>
<map-entry>
<key>cmcHelpfulPanels</key>
<value>sidebarColumn</value>
</map-entry>
<map-entry>
<key>globalPanels</key>
<value>globalCell</value>
</map-entry>
</current-panel-stacks>
<panel-stack-order>
<id-entry>
<id>globalPanels</id>
<priority>0</priority>
</id-entry>
<id-entry>
<id>cmcHelpfulPanels</id>
<priority>1</priority>
</id-entry>
<id-entry>
<id>helpfulPanels</id>
<priority>2</priority>
</id-entry>
<id-entry>
<id>MyNewPS</id>
<priority>3</priority>
</id-entry>
<id-entry>
<id>preferencePanels</id>
<priority>4</priority>
</id-entry>
</panel-stack-order>
</tab-definition>
4. Create a MyNewPS panel stack definition that will be used by the new WsMyNewTabDefinition tab definition.
The panel stack definition identifies the my.company.ui.MyUserResource file that defines the MyNewPS
key, which would be created in your custom application:
<panel-stack-definition>
<id>MyNewPS</id>
<app-id>workspace</app-id>
<enabled-yn>true</enabled-yn>
<object-type>PanelStackDefinition</object-type>
60
<resource-bundle>my.company.ui.MyUserResource</resource-bundle>
<panel-stack-id>MyNewPS</panel-stack-id>
<header>contentHeader</header>
<error-panel-id>errorPanel</error-panel-id>
<title-key>MyNewPS</title-key>
<tab-affinity-yn>true</tab-affinity-yn>
<panel-ids>
<id-entry>
<id>errorPanel</id>
<priority>0</priority>
</id-entry>
<id-entry>
<id>myNewPanel1</id>
<priority>1</priority>
</id-entry>
<id-entry>
<id>myNewPanel2</id>
<priority>2</priority>
</id-entry>
<id-entry>
<id>myNewPanel3</id>
<priority>3</priority>
</id-entry>
</panel-ids>
</panel-stack-definition>
Create or modify the /atg/svc/framework/serviceFramework.xml file in your new custom module and
add the ContentDefinition items for the tab action. Note that you must include the ID so that the object
definition can be found during the combiner process. When writing the definition, you override only the
61
attributes that you want to modify. To change the atgChangeTab attribute to point to your myNewTab, you
would create the following:
<content-definition>
<id>existingTabAction</id>
<body>atgChangeTab(atg.svc.framework.changeTab('myNewTab'), null, null,
null):</body>
</content-defintion>
62
The appId property must be set to workspace for the panel to be loaded in Service Center
The accessRight may remain the default GlobalPanel right or a specific right. If using a specific right, the
right must be defined and assigned to Service Center users. Note: The access right must be defined or the tab
will not be rendered
The following provides an example of code that adds three new panels, myNewPanel1, myNewPanel2 and
myNewPanel3, to the WsCustomerPanelStack panel stack definition:
1. Create the mypanel1.jsp, mypanel2.jsp and mypanel3.jsp files that will be called by the panel
definitions. Create these files in the /panels/order/ directory of your custom application.
2. Create the /atg/svc/framework/serviceFramework.xml file in your custom application directory.
3. To this file, add a panel stack definition that contains the three new panels and their priorities. This appends
your new panels to the existing information that creates the Customer Panel Stack. For example:
<panel-stack-definition>
<id>WsCustomerPanelStack</id>
<panel-ids>
<id-entry>
<id>myNewPanel1</id>
<priority>4</priority>
</id-entry>
<id-entry>
<id>myNewPanel2</id>
<priority>5</priority>
</id-entry>
<id-entry>
<id>myNewPanel3</id>
<priority>6</priority>
</id-entry>
</panel-ids>
</panel-stack-definition>
4. Add a panel definition for each of the new panels. The following example displays the code for one of the
three panels:
<panel-definition>
<id>myNewPanel1</id>
<app-id>workspace</app-id>
<enabled-yn>true</enabled-yn>
<object-type>PanelDefinition</object-type>
<resource-bundle>atg.commerce.csr.FrameworkResources</resource-bundle>
<template-ids>
<map-entry>
<key>panelTemplate</key>
<value>panelTemplate</value>
</map-entry>
</template-ids>
<panel-id>myNewPanel1</panel-id>
<content-url>/panels/order/mypanel1.jsp</content-url>
<other-context>MyWebApplication</other-context>
<title-key>myNewPanel1</title-key>
<visible-yn>true</visible-yn>
<show-title-yn>true</show-title-yn>
63
<panel-open-yn>true</panel-open-yn>
<allow-panel-toggle-yn>false</allow-panel-toggle-yn>
<available-yn>false</available-yn>
<content-open-yn>true</content-open-yn>
<allow-content-toggle-yn>true</allow-content-toggle-yn>
<tab-holder-yn>true</tab-holder-yn>
<always-tabbed-yn>false</always-tabbed-yn>
<tabbed-yn>false</tabbed-yn>
<allow-tabbing-yn>true</allow-tabbing-yn>
<allow-slots-yn>false</allow-slots-yn>
<tab-scroll-index>0</tab-scroll-index>
<panel-item-count>0</panel-item-count>
<access-right>NewPanel2</access-right>
</panel-definition>
$class=atg.svc.agent.customer.CustomerPanelConfig
subSections+=\
/panels/customer/creditCards.jsp,\
/panels/customer/credits.jsp,\
/panels/customer/promotions.jsp,\
/panels/customer/myCustomerPanel1.jsp,\
/panels/customer/myCustomerPanel2.jsp,\
/panels/customer/myCustomerPanel3.jsp
contextRoots+=\
/DCS-CSR,\
/DCS-CSR,\
/DCS-CSR,\
/DCS-CSR,\
/DCS-CSR,\
64
/DCS-CSR
Troubleshooting Pages
When the application has started but your new tab, panel stack or panel is not visible, check the following
common causes:
1. Verify that the enableYn property is set to true (the default value).
2. If you are using an access right other than GlobalPanels, verify that your access right has been created in
the appropriate repository. If unsure, set the accessRight to GlobalPanels, which is an access right with
no restrictions. The GlobalPanels access right can be used for both tabs and panels.
3. If a panel stack is not displaying, verify that the panelStackId for the panel stack is added to the
panelStackAssignments, currentPanelStacks and panelStackOrder properties of the
TabDefinition item as described above.
4. If a panel is not displaying, verify that the panelId for the panel is added to the panelIds property in the
PanelStackDefinition item as described above.
5. If the top panel in the panel stack is not displaying, verify that the tabHolderYn property is set to true.
6. If a panel other than the top panel is not displaying, verify that the tabHolderYn property is false.
7. If tabbed panels are not displaying, verify the following:
The first panel is configured with tabHolderYn=true. The currentPanelId should be set to the same
value as the panelId. The tabbedPanelIds should be set to the list of panelIds of panels in the row of
tabs excluding the first panel
The panels after the first panel should be configured with tabHolderYn=false and currentPanelId
and tabbedPanelIds set to null
All the tabbed panels should be configured to alwaysTabbedYn=true, tabbedYn=true and
allowTabbingYn=true
65
66
Service Center obtains information by having users and agents complete forms. These forms are often required
to handle user information that come from a number of different formats. They also may require validation,
additional actions or the data acquired must be stored in specific repositories or databases. This section
identifies modifiable forms that are specific to Service Center, as well as information on creating new forms.
For information on working with forms, and detailed information on associating HTML form tags with Nucleus
components, refer to the ATG Page Developer's Guide. For information on creating forms for your application,
refer to the ATG Platform Programming Guide.
Page
Form/Page Area
Customer Information
Customer Information
Edit/View Customer
Customer Search
Gift Lists
Order Search
Order Search
Order View
Display values
67
Page
Form/Page Area
Product Catalog
Product Search
Forms are customized by modifying the associated configuration properties files that define the JSP fragments
that replace and/or append the field.
Note: Refer to the Customization Best Practices (page 42) section before modifying files.
The JSP fragment is integrated within your page layout to display the new or modified field. Service Center uses
a default JSP fragment that contains all of the standard fields displayed on a page, and an optional extended JSP
fragment used for creating additional fields.
The default page fragment component is mapped to the default JSP snippet in Service Center but may be
redirected with a configuration property to your own JSP page. The page contains a dsp: include tag that
reads the associated configuration file and then includes the page defined by the page fragment component.
For example, to change the default fragment to your own code, you would change the page fragments
servletContext and URL properties to point to your page.
The extended page fragment component allows you to append content to the page without changing the
default page fragment. The extended page fragment component contains the same functionality as, and is
defined directly after, the default page fragment component. By default, the extended properties files do not
contain a reference to a JSP file. You can define a JSP for the extended fragment to incorporate form properties
that are specific to your environment.
The default and extended page fragment components are instances of atg.web.PageFragment, which are
used to define the location of the JSP file. The configuration files that define the page fragment components
contain the following properties to identify the JSP:
servletContext - Specifies the context root of the JSP fragment that will be incorporated into the page
URL - Specifies the URL of the JSP fragment to be incorporated into the page
Both the default and extended property files are instances of PageFragment, allowing a servletContext and
URL to be specified for the JSP snippet. As such, the servletContext and URL property descriptions can be
applied for both fragment types.
For general information on working with forms, refer to the Forms section of the ATG Page Developer's Guide.
68
Note: The JSP fragments are dynamically included and the file will be compiled and executed before being
embedded into the form. As such, import any necessary components into your page to ensure successful
compiling.
Default
/Service-UI/Framework/Agent/config/atg/svc/agent/ui/fragments/
customer/CustomerViewDefault.properties
Extended
/Service-UI/Framework/Agent/config/atg/svc/agent/ui/fragments/
customer/CustomerViewExtended.properties
URL
/include/customer/ProfileViewUIFragment.jsp
Servlet Context
agent
Default
/Service-UI/Framework/Agent/config/atg/svc/agent/ui/fragments/
customer/CustomerNewDefault.properties
Extended
/Service-UI/Framework/Agent/config/atg/svc/agent/ui/fragments/
customer/CustomerNewExtended.properties
69
URL
/include/customer/ProfileNewUIFragment.jsp
Servlet Context
agent
Default
/Service-UI/Framework/Agent/config/atg/svc/agent/ui/fragments/
customer/CustomerEditDefault.properties
Extended
/Service-UI/Framework/Agent/config/atg/svc/agent/ui/fragments/
customer/CustomerEditExtended.properties
URL
/include/customer/ProfileEditUIFragment.jsp
Servlet Context
agent
Default
/Service-UI/Framework/Agent/config/atg/svc/agent/ui/fragments/
customer/CustomerSearchDefault.properties
Extended
/Service-UI/Framework/Agent/config/atg/svc/agent/ui/fragments/
customer/CustomerSearchExtended.properties
URL
/include/customer/ProfileSearchUIFragment.jsp
Servlet Context
agent
70
Default
/DCS-CSR-UI/config/atg/commerce/custsvc/ui/fragments/
gift/GiftlistCreateDefault.properties
Extended
/DCS-CSR-UI/config/atg/commerce/custsvc/ui/fragments/
gift/GiftlistCreateExtended.properties
URL
/include/gift/giftlist/giftlistCreateUIFragment.jsp
Servlet Context
DCS-CSR
Default
/DCS-CSR-UI/config/atg/commerce/custsvc/ui/fragments/
gift/GiftlistDetailsPurchaseDefault.properties
Extended
/DCS-CSR-UI/config/atg/commerce/custsvc/ui/fragments/
gift/GiftlistDetailsPurchaseExtended.properties
URL
/include/gift/giftlist/giftlistDetailsPurchaseUIFragment.jsp
Servlet Context
DCS-CSR
Default
/DCS-CSR-UI/config/atg/commerce/custsvc/ui/fragments/
gift/GiftlistDetailsViewDefault.properties
Extended
/DCS-CSR-UI/config/atg/commerce/custsvc/ui/fragments/
gift/GiftlistViewDetailsExtended.properties
URL
/include/gift/giftlist/giftlistDetailsViewUIFragment.jsp
Servlet Context
DCS-CSR
Default
/DCS-CSR-UI/config/atg/commerce/custsvc/ui/fragments/
gift/GiftlistSearchDefault.properties
Extended
/DCS-CSR-UI/config/atg/commerce/custsvc/ui/fragments/
gift/GiftlistSearchExtended.properties
URL
/include/gift/search/giftlistSearchUIFragment.jsp
Servlet Context
DCS-CSR
71
Default
/DCS-CSR-UI/config/atg/commerce/custsvc/ui/fragments/
gift/GiftlistSearchResultsDefault.properties
Extended
/DCS-CSR-UI/config/atg/commerce/custsvc/ui/fragments/
gift/GiftlistSearchResultsExtended.properties
URL
/include/gift/search/giftlistSearchResultsUIFragment.jsp
Servlet Context
DCS-CSR
Default
/DCS-CSR-UI/config/atg/commerce/custsvc/ui/fragments/
catalog/ProductSearchDefault.properties
Extended
/DCS-CSR-UI/config/atg/commerce/custsvc/ui/fragments/
catalog/ProductSearchExtended.properties
URL
/include/catalog/productSearchUIFragment.jsp
Servlet Context
DCS-CSR
Default
/DCS-CSR-UI/config/atg/commerce/custsvc/ui/fragments/
order/OrderSearchDefault.properties
Extended
/DCS-CSR-UI/config/atg/commerce/custsvc/ui/fragments/
order/OrderSearchExtended.properties
URL
/include/order/orderSearchUIFragment.jsp
Servlet Context
DCS-CSR
72
Default
/DCS-CSR-UI/config/atg/commerce/custsvc/ui/fragments/
order/OrderViewDefault.properties
Extended
/DCS-CSR-UI/config/atg/commerce/custsvc/ui/fragments/
order/OrderViewExtended.properties
URL
/include/order/orderViewUIFragment.jsp
Servlet Context
DCS-CSR
2. Define the URLs that are called on success and error conditions. For example:
<svc-ui:frameworkUrl var="successURL"
panelStacks="cmcShippingAddressPS"/>
<svc-ui:frameworkUrl var="errorURL" panelStacks="cmcShippingAddressPS"/>
3. Define the form and the elements used by the form. For example:
73
<dsp:setLayeredBundle basename="atg.commerce.csr.order.WebAppResources"/>
<dsp:form id="${formId}" formid="${formId}">
<dsp:input type="hidden" priority="-10" value=""
bean="CreateElectronicShippingGroupFormHandler.
newElectronicShippingGroup"/>
<dsp:input type="hidden" value="${errorURL }" name="errorURL"
bean="CreateElectronicShippingGroupFormHandler.
newElectronicShippingGroupErrorURL"/>
<dsp:input type="hidden" value="${successURL }" name="successURL"
bean="CreateElectronicShippingGroupFormHandler.
newElectronicShippingGroupSuccessURL"/>
<ul class="atg_dataForm atg_commerce_csr_addressForm"
id="atg_commerce_csr_neworder_newShippingAddress">
<li class="atg_commerce_csr_address">
<span class="atg_commerce_csr_fieldTitle">
<label class="atg_messaging_requiredIndicator">
<span class="requiredStar">*</span>
<fmt:message key="newAddress.email" />
</label>
</span>
<dsp:input id="${formId}_emailAddress" type="text"
bean="/atg/commerce/custsvc/order/
CreateElectronicShippingGroupFormHandler.
electronicShippingGroup.emailAddress" size="25" maxlength="50">
<dsp:tagAttribute name="dojoType"
value="atg.widget.form.ValidationTextBox" />
<dsp:tagAttribute name="trim" value="true" />
<dsp:tagAttribute name="required" value="true" />
</dsp:input>
</li>
5. If you are using JSP validation, provide the validation function. When the form or page is loaded, the
validation routine tracks user input and validates each input field. If the validation is successful, the submit
button is enabled:
74
<script type="text/javascript">
var ${formId}Validate = function () {
var disable = false;
<c:if test="${!empty isDisableSubmit}">disable =
${isDisableSubmit}();</c:if>
<c:if test="${!empty validateIf}">if (${validateIf}) {</c:if>
if (!dijit.byId("${formId}_emailAddress").isValid()) disable =
true;
<c:if test="${!empty validateIf}">}</c:if>
dojo.byId("${formId}").myaddAddressButton.disabled = disable;
};
_container_.onLoadDeferred.addCallback(function () {
${formId}Validate();
atg.service.form.watchInputs("${formId}", ${formId}Validate);
atg.keyboard.registerFormDefaultEnterKey("${formId}",
"addAddressButton", "buttonClick");
});
_container_.onUnloadDeferred.addCallback(function () {
atg.service.form.unWatchInputs('${formId}');
atg.keyboard.unRegisterFormDefaultEnterKey("${formId}");
});
</script>
</dsp:page>
6. Once you have created the form, create a customized JavaScript file to identify the submit action for your new
form. For example:
custom.commerce.csr.order.shipping.addElectronicAddress = function (){
atgSubmitAction({form:dojo.byId("mycsrAddElectronicAddress")});
};
75
2. Define the pop-up window URL with the window parameters. For example:
<c:url var="editAddressURL" context="/MY-DCS-CSR}"
value="editElectronic.jsp">
<c:param name="nickname" value="${addressKey}"/>
<c:param name="${stateHolder.windowIdParameterName}"
value="${windowId}"/>
</c:url>
Pass in the windowId and any other parameters that are required by the new pop up page.
3. Define the link that loads the pop-up page. For example:
<li class="atg_commerce_csr_editAddress">
<span class="atg_svc_shipAddressControls">
<a class="atg_tableIcon atg_propertyEdit" style="min-width:100px"
title="<fmt:message key="common.address.edit.mouseover"/>" href="#"
onclick="atg.commerce.csr.common.showPopupWithReturn({
popupPaneId: 'mycsrEditAddressFloatingPane',
title: '<fmt:message key="common.edit"/>',
url: '${editAddressURL}',
onClose: function( args ) {
if ( args.result == 'ok' ) {
atgSubmitAction({
panelStack :[ 'cmcShippingAddressPS','globalPanels'],
form : document.getElementById('transformForm')
});
}
}});return false;">
<fmt:message key="common.edit"/>
</a>
</span>
</li>
The onClose function defines the actions that should occur when the pop-up window is closed. When
the pop-up window is closed automatically, the pop-up page passes back the args.result value as ok,
refreshing the shipping address panel stack and global panel stacks.
76
2. Identify the success and error URLs for the form. For example:
<%-- forms success and error url --%>
<c:url var="successErrorURL"
context="/${sgConfig.editPageFragment.servletContext}"
value="${sgConfig.editPageFragment.URL}">
<c:param name="nickname" value="${nickname}"/>
<c:param name="${stateHolder.windowIdParameterName}"
value="${windowId}"/>
<c:param name="success" value="true"/>
</c:url>
77
<dsp:layeredBundle basename="atg.commerce.csr.order.WebAppResources">
<div id="atg_commerce_csr_editShippingAddress"
class="atg_commerce_csr_popupPanel
atg_commerce_csr_addressFormPopup">
<dsp:layeredBundle basename="${sgConfig.resourceBundle}">
<fmt:message var="editPageFragmentTitle"
key="${sgConfig.editPageFragmentTitleKey}"/>
</dsp:layeredBundle>
<h2>
<c:out value="${editPageFragmentTitle}"/>
</h2>
<div class="atg_commerce_csr_popupPanelCloseButton"></div>
4. Within the <div class>, define what happens whether or not there is an error to display. For example:
<div>
<%--When there is an error, display the error on the page. --%>
<dsp:droplet name="Switch">
<dsp:param bean=
"UpdateElectronicShippingGroupFormHandler.formError"
name="value"/>
<dsp:oparam name="true">
<br/><br/>
<span class="atg_commerce_csr_common_content_alert">
<fmt:message key="common.error.header"/></span>
<br>
<span class="atg_commerce_csr_common_content_alert">
<UL>
<dsp:droplet name="ErrorMessageForEach">
<dsp:param bean=
"UpdateElectronicShippingGroupFormHandler.formExceptions"
name="exceptions"/>
<dsp:oparam name="output">
<LI>
<dsp:valueof param="message"/>
</dsp:oparam>
</dsp:droplet>
</UL>
</span>
</dsp:oparam>
<dsp:oparam name="false">
<c:if test="${success}">
<%--When there is no error on the page submission, close the
popup page and refresh the parent page. The parent page
only will refresh if the result parameter value is ok.
--%>
<script type="text/javascript">
hidePopupWithResults
('atg_commerce_csr_editShippingAddress',{result : 'ok'});
</script>
</c:if>
</dsp:oparam>
</dsp:droplet>
</div>
78
79
( 'atg_commerce_csr_editShippingAddress', {result :
'cancel'});return false;"/>
</div>
</dsp:form>
<%-- end of editShippingAddressForm --%>
6. If you are using JSP validation, provide the validation function. When the form or page is loaded, the
validation routine tracks user input and validates each input field. If the validation is successful, the submit
button is enabled:
<%--) The following code is for JS validation--%>
<script type="text/javascript">
var ${formId}Validate = function () {
var disable = false;
<c:if test="${!empty isDisableSubmit}">disable =
${isDisableSubmit}();</c:if>
<c:if test="${!empty validateIf}">if (${validateIf}) {</c:if>
if (!dijit.byId("${formId}_emailAddress").isValid())
disable = true;
<c:if test="${!empty validateIf}">}</c:if>
dojo.byId("${formId}").addAddressButton.disabled = disable;
};
_container_.onLoadDeferred.addCallback(function () {
${formId}Validate();
atg.service.form.watchInputs("${formId}", ${formId}Validate);
atg.keyboard.registerFormDefaultEnterKey("${formId}",
"addAddressButton", "buttonClick");
});
_container_.onUnloadDeferred.addCallback(function () {
atg.service.form.unWatchInputs('${formId}');
atg.keyboard.unRegisterFormDefaultEnterKey("${formId}");
});
</script>
80
Tables and grids are similar in that they provide structured layouts for data. Tables, which are created in HTML,
display standard data that is defined using configuration files. Grids extend standard tables by allowing paging
and by using Dojo components.
Using configuration layering, you can identify the location and file names of JSP snippets to be included inside
the default pages. If these JSP snippets are not specified, the default grid pages are displayed. However, you
can choose to specify these JSP snippets, and extend the grid components, by providing additional rendering
information and grid data that is integrated into the existing grids.
Grids or tables can be modified to add columns, reorder or remove columns, change column widths or sorting,
as well as to change hover information.
The components of a grid that can be modified are:
Changing grid layouts
Column width
Number of rows displayed per page
Number of rows displayed at a time per user scrolls
Number of columns to display
Adding or modifying hover information
The components of a table that can be modified are:
Number of columns to display
Changing table layouts
Note: All grid and table components are located in the application UI modules, for example Service-UI or
DCS-CSR-UI.
81
Grid/Table
Location
Order History
/DCS-CSR-UI/config/atg/commerce/custsvc/ui/tables/order/
OrderHistoryGrid.properties
Scheduled Orders
/DCS-CSR-UI/config/atg/commerce/custsvc/ui/tables/order/
ScheduledOrdersGrid.properties
Ticket History
/Service-UI/Framework/Agent/config/atg/svc/agent/ui/
tables/ticket/CustomerTicketGrid.properties
/Service-UI/Framework/Agent/config/atg/svc/agent/ui/
CustomerProfileSearchUIConfiguration.properties
Grid/Table
Location
Exchange History
/DCS-CSR-UI/config/atg/commerce/custsvc/ui/tables/order/
ExchangeHistoryGrid.properties
Related Tickets
/DCS-CSR-UI/config/atg/commerce/custsvc/ui/tables/
ticket/RelatedTicketGrid.properties
Order Search
/DCS-CSR-UI/config/atg/commerce/custsvc/order/
OrderSearchUIConfiguration.properties
/DCS-CSR-UI/config/atg/commerce/custsvc/order/
OrderSearchResultsTable.properties
Approvals
/DCS-CSR-UI/config/atg/commerce/custsvc/ui/tables/
approvals/ApprovalsGrid.properties
Purchased Items
/DCS-CSR-UI/config/atg/commerce/custsvc/ui/tables/order/
PurchasedItemsGrid.properties
82
Grid/Table
Location
Submitted Orders
/DCS-CSR-UI/config/atg/commerce/custsvc/ui/tables/order/
SubmittedOrdersGrid.properties
Grid/Table
Location
Related Tickets
/DCS-CSR-UI/config/atg/commerce/custsvc/ui/tables/ticket/
RelatedTicketGrid.properties
Gift/Wish List
The following grids and tables can be modified on the Gift/Wish List panel of the Customer Profile:
Grid/Table
Location
/DCS-CSR-UI/src/config/atg/commerce/custsvc/ui/tables/gift/
giftlist/GiftlistEditResultsTable.properties
/DCS-CSR-UI/main/src/config/atg/commerce/custsvc/ui/
tables/gift/giftlist/GiftlistPurchaseResultsTable.properties
/DCS-CSR-UI/main/src/config/atg/commerce/custsvc/ui/tables/
gift/giftlist/GiftlistViewResultsTable.properties
/DCS-CSR-UI/main/src/config/atg/commerce/custsvc/ui/tables/
gift/customer/GiftlistGrid.properties
/DCS-CSR-UI/main/src/config/atg/commerce/custsvc/ui/tables/
gift/search/GiftlistGrid.properties
/DCS-CSR-UI/main/src/config/atg/commerce/custsvc/ui/tables/
gift/wishlist/WishlistEditResultsTable.properties
/DCS-CSR-UI/main/src/config/atg/commerce/custsvc/ui/tables/
gift/wishlist/WishlistViewResultsTable.properties
Promotions
The following grids and tables can be modified on the Available Promotions panel of the Order View page:
Grid/Table
Location
Browse Available
Promotions
/DCS-CSR-UI/main/src/config/atg/commerce/custsvc/ui/tables/
promotion/AvailablePromotionsGrid.properties
Promotions Search
/DCS-CSR-UI/main/src/config/atg/commerce/custsvc/ui/tables/
promotion/PromotionSearchGrid.properties
83
Property
Description
columns
formHandlerPath
The Nucleus path to the form hander that renders the results.
imageClosed
The file name of the image to render when the table item detail is not visible
or is closed.
imageOpen
The file name of the image to render when the table item detail is visible or is
open.
imagePath
tablePage
tablePath
rowsPerPage
The number of items to fetch per server request, usually extracted from the
results form handler.
defaultSortField
The default sort column. This field should point to the configured values in
the particular column configuration to be sorted. The ViewLink.sortField
must match what is defined in indexing output file for the index being
searched.
defaultSortDirection
84
/atg/commerce/custsvc/ui/tables/order/search/Originator,\
/atg/commerce/custsvc/ui/tables/order/search/State,\
/atg/commerce/custsvc/ui/tables/order/search/WorkOn
imageClosed=icon_find.gif
imageOpen=icon_find.gif
imagePath=/images/icons/
rowsPerPage=10
defaultSortField^=/atg/commerce/custsvc/ui/tables/order/search/ViewLink.sortField
defaultSortDirection^=/atg/commerce/custsvc/ui/tables/order/search
/ViewLink.defaultSort
tablePath=/atg/commerce/custsvc/ui/tables/order/search/OrderSearchResultsTable
tablePage=/atg/commerce/custsvc/ui/tables/order/search/OrderSearchTablePage
Property
Description
columns
dataModelPage
The page fragment component that contains the data model (for example,
JSON). Include the full Nucleus path to the component.
detailFormId
formHandlerPath
The Nucleus path to the form handler that renders the results.
gridHeight
The value assigned to the height CSS style for the table to determine its
visible height.
gridInstanceId
The JavaScript variable name that should be unique for each instance of the
table in the application.
gridPage
gridPath
gridWidgetId
The Dojo ID of the table widget that should be unique for each instance of
the grid in the application.
85
Property
Description
imageClosed
The file name of image to render when the grid item detail is not visible or
closed.
imageOpen
The file name of image to render when the grid item detail is visible or open.
imagePath
itemDetailPage
pageBaseOffset
The base of the paging: 0 for 0-based paging, 1 for 1-based paging, etc.
pageIndexElementName
progressNodeId
The optional ID for a DOM node to render status messages, such as search in
progress... or No results found. etc.
rowsPerPage
The size of the result to send back from the form handler in each page.
searchFormId
selectLink
An anchor tag template with pattern replacement for selecting the item in
the application.
viewLink
An anchor tag template with pattern replacement for viewing the item in the
application.
86
Each of the columns is configured using a property file, which identifies column properties. For example, the
ViewLink.properties file that is referenced in the CustomerTicketGrid file:
$class=atg.svc.agent.ui.tables.ColumnConfiguration
defaultSort=ascending
field=viewLink
sortField=id
width=6em
resourceBundle=atg.svc.agent.ui.UserMessages
resourceKey=view-ticket
isVisible=true
dataRendererPage=/atg/svc/agent/ui/tables/ticket/ColumnRendererPage
These configuration files allow you to make specific changes to individual columns within the grid.
Property
Description
cellRendererPage
The page fragment component that can contain a client-side JavaScript function
to render the cell contents. Includes the full Nucleus path to the component.
dataRendererPage
The page fragment component that returns server-side data in JSON that inserts a
cell. Includes the full Nucleus path to the component.
defaultSort
field
The field name identifier for the data to render in the column from the data model.
UI-only columns without a backing data representation should leave the field
parameter undefined.
sortField
The name of the data model field on which to sort, which is different than field.
If this property is undefined and sorting is enabled using defaultSort, the data
is sorted on the field property. If this property is defined and sorting is enabled
using defaultSort, the data is sorted on the sortField property. This property
allows a column to contain rendering and markup that does not interfere with the
sorting of the field. For example, the ViewLink column can have a link to view
an item where the column is not sorted on the link markup, but on a separate
corresponding data value.
87
Property
Description
isVisible
Whether to display the column in the UI or only to send back the data for the
column. This is useful for JavaScript widgets that store invisible column data
for other columns. For example, an onClick function in the ID field can use an
invisible DBState field to identify what to do when an order is opened.
resourceBundle
resourceKey
The key that references the column display name in the resource bundle.
width
The extent of the column using the Dojo-grid syntax (e.g. 5em or auto).
styles
The column CSS styles. Note: Styles are not modifiable for tables.
88
Property
Description
dataRendererPage
The page fragment component that returns server-side data in JSON that inserts a
cell. Includes the full Nucleus path to the component
field
The field name identifier for the data to render in the column from the data model.
UI-only columns without a backing data representation should leave the field
parameter undefined.
isVisible
Whether to display the column in the UI or only to send back the data for the
column. This is useful for JavaScript widgets that store invisible column data
for other columns. For example, an onClick function in the ID field can use an
invisible DBState field to identify what to do when an order is opened.
resourceBundle
resourceKey
The key that references the column display name in the resource bundle
Property
Description
width
The extent of the column using the Dojo-grid syntax (e.g. 5em or auto)
$class=atg.svc.agent.ui.tables.ColumnConfiguration
field=lastName
width=10%
resourceBundle=atg.svc.agent.WebAppResources
resourceKey=relatedTickets.lastName
isVisible=true
dataRendererPage=/atg/commerce/custsvc/ui/tables/ticket/ColumnRendererPage
89
2. To configure a Dojo-grid column to sort on a field other than the data field that is rendered in the column, set
the sortField to any field in the data model.
For example, your column might display a data field containing an HTML link or JavaScript, such as viewLink,
which is not appropriate for sorting. By setting the sortField property to ID, the column can still be sorted
by the corresponding ID property.
3. Configure an HTML-grid column by configuring the appropriate UI configuration file, such as the
CustomerProfileSearchUIConfiguration.properties or the
OrderSearchUIConfiguration.properties file.
2. To set the column width to fill the remaining space on the screen, set the width to auto.
90
servletContext the context root of the application that contains the page
The following is an example of the /atg/commerce/custsvc/ui/tables/order
/ColumnRendererPage:
$class=atg.web.PageFragment
URL=/include/order/columnRenderer.jsp
servletContext=DCS-CSR
Parameter
Description
field
colIndex
[bean]
The object(s) containing the data for the grid item. They will vary depending on the data
being rendered. For an order, the item is a single orderItemMap bean.
91
</c: when>
...
Parameter
Description
field
customerItemMap
resourceBundle
resourceKey
isPopup
Identifies if the search table is a pop up. For example, the customer search from the
Shopping Cart page is a pop up table
isHeading
92
4. In the properties file for the column or grid, update the dataRendererPage property to point to the
PageFragment properties file. For example:
dataRendererPage=NewColumnRendererPage
To avoid a recompile of the JAR, add both the new resource bundle and the new key into your <ATG10dir>/
locallib directory. You must restart your server once you have created the key.
2. In the sample application, create a grid properties file at /atg/commerce/custsvc/
ui/tables/order/OrderHistoryGrid.properties to override the default file. Override the columns
property with the new columns; however, ensure that the invisible columns are included so that the order
links work correctly:
invisible data columns: DBState
columns=\
/atg/commerce/custsvc/ui/tables/order/Toggle,\
/atg/commerce/custsvc/ui/tables/order/ViewLink,\
/atg/commerce/custsvc/ui/tables/order/Total,\
/atg/commerce/custsvc/ui/tables/order/ItemCount,\
/atg/commerce/custsvc/ui/tables/order/ItemSummary,\
/atg/commerce/custsvc/ui/tables/order/SubmittedDate,\
/atg/commerce/custsvc/ui/tables/order/LastModified,\
/atg/commerce/custsvc/ui/tables/order/State,\
/atg/commerce/custsvc/ui/tables/order/SelectLink,\
/atg/commerce/custsvc/ui/tables/order/DBState
3. In the sample application, create the properties file for the column at /atg/commerce/custsvc/ui/
tables/order/LastModified.properties that contains the configuration for the new column:
$class=atg.svc.agent.ui.tables.ColumnConfiguration
field=lastModified
width=5em
resourceBundle=mycompany.resources.Resources
resourceKey=lastModifiedDate
defaultSort=descending
93
isVisible=true
dataRendererPage=/atg/commerce/custsvc/ui/tables/order/
LastModifiedRendererPage
4. In the sample application, create the properties file for the content page at /atg/commerce/custsvc/ui/
tables/order/
LastModifiedRendererPage.properties:
$class=atg.web.PageFragment
URL=/panels/order/lastModifiedRenderer.jsp
servletContext=/Sample-DCS-CSR-App
5. In the sample application, create a JSP page at the location referred to by the page configuration. The JSP
renders the last modified date property from the order:
<%@ include file="/include/top.jspf"%>
<dsp: page>
<fmt: bundle basename="acme.resources.Resources">
<dsp: getvalueof var="field" param="field"/>
<dsp: getvalueof var="colIndex" param="colIndex"/>
<dsp: getvalueof var="orderItemMap" param="orderItemMap"/>
<c: choose>
<c: when test="${field == 'lastModified'}">
"lastModified": "${orderItemMap.lastModifiedDate}"
</c: when>
<c: otherwise>
</c: otherwise>
</c: choose>
</fmt: bundle>
</dsp: page>
6. Test and verify that the last modified date column is rendered in the grid.
Note: Default date formats can be modified using the webAppResources.properties file in the /WEB-INF
directory.
94
"totalNoTax": "${totalValue}",
</c: when>
...
Modifying Columns
The following steps provide information on how to add, delete or reorder columns. When working with columns,
ensure that you are performing the steps outline in the Customization Best Practices (page 42) section.
Adding a Column
1. Follow the steps above to customize column content to create the new column. However, instead of opening
an existing column configuration file, create a new properties file for the column.
2. Set the column properties as outlined above.
3. Open the properties file for the grid under /atg/commerce/custsvc/ui/tables and insert the column
using the full Nucleus path to the column configuration component in the desired location of the columns
list.
Removing a Column
1. Open the properties file for the grid under /atg/commerce/custsvc/ui/tables.
2. Delete the column identifier from the columns list.
Reordering Columns
1. Open the properties file for the grid under /atg/commerce/custsvc/ui/tables.
2. Reorder the column identifiers within the columns list.
95
5. Create a new dataRendererPage property file in the location indicated in the new column property file you
just created. This file will identify the URL page to use, as well as the context application.
Using the previous example, you would create a /atg/commerce/custsvc/ui/
tables/order/search/LastModifiedRendererPage.properties file that contained the following:
$class=atg.web.PageFragment
URL=/panels/order/search/lastModifiedRenderer.jsp
servletContext=/Sample-DCS-CSR-App
6. Create the new JSP file at the location identified above in the URL parameter.
When you create the JSP file use the isHeading parameter to determine whether to render a heading
or a data row. If rendering a heading you can display the heading title or information can be passed into
the orderSearchResultSortHeading.jsp file, which allows users to sort on this column. Note: The
sortField used must be the same as what is used in the XML file because this parameter is passed to the
search engine. For example:
<%-Last modified date renderer example for order search table
@version $Id: //application/DCS-CSR/main/sample-app/src/web-apps/SampleDCS-CSR-App/panels/order/search/lastModifiedRenderer.jsp $
@updated $DateTime: 2009/04/01 11: 29: 04 $
--%>
<%@ include file="/include/top.jspf"%>
<dsp: page>
<fmt: bundle basename="acme.resources.Resources">
<dsp: getvalueof var="field" param="field"/>
<dsp: getvalueof var="sortField" param="sortField" />
<dsp: getvalueof var="orderItemMap" param="orderItemMap"/>
<dsp: getvalueof var="isHeading" param="isHeading" />
<dsp: getvalueof var="resourceBundle" param="resourceBundle" />
96
7. Create the new table column configuration and add the new column information by creating a /atg/
commerce/custsvc/order/OrderSearchUIConfiguration.
properties file. The following example extends the default values by identifying the number of results per
97
1. Create a JSP page to render the order item detail in a new application module. If necessary, use the existing
item detail page located at /panels/order/
orderDetail.jsp as a template for the new file.
2. Open the properties file for the grid and find the itemDetailPage property. This component contains the
URL to the item detail page.
3. Create a new properties file for the item detail page component under /atg/commerce/custsvc/ui/
tables. Override the servletContext and URL properties to point to the new file.
98
Some portions of the Service Center UI use a technique that makes the rendering of pages, or portions
of pages, configurable through Nucleus components. This feature allows you to customize page content
without unpacking the Web application, modifying its JSP, and then repackaging the modified application.
Customization in this context means the addition or replacement of JSP.
Examples of customizations with Nucleus components include the Products View panel, which is accessed in /
panels/catalog/productView.jsp. The Product View panel contains the ProductInformation panel, the
ProductSku panel and the CrossSellItems panels.
Another example of customization includes the SkuProductPopup, which is accessed using the
SkuChangePopup. When the SkuChangePopup is activated, the SkuChangePanel and SkuChangeTable, as
well as the ProductInformation panel, are displayed.
You can change the SKU of CommerceItem objects in an order. The CSRCartModifierFormHandler contains
the handle method handleChangeSKUs() that uses the changeSKUsSuccessURL and changeSKUsErrorURL
properties, as well as the pre/post handler methods.
99
Customization Options
You can use personalization to control who has access to specific content. When customizing your pages,
you work with personalization assets such as rules, targeters and segments. If you are working in a multisite
environment, personalization assets can be used between multiple sites. For example, ATG Personalization uses
a Rules tab that displays and manages multiple Site Override Rules and Site Filters. Site filters can be applied to
Content Groups and targeters, allowing site-filtered searches. ATG Personalization with Segments, Targeters and
Content Groups is defined per site. Scenarios are aware on which site the scenario event has occurred.
For detailed information on personalization and using ATG Personalization, refer to the ATG Personalization
Programming Guide.
There are two general options for customizing page content.
Simple Customization This customization requires the configuration of an alternate URL in a component
property. Depending upon requirements, this customization may be all that is required for most
customization needs
Targeting Customization Targeting customization is useful when one of a number of JSPs could be rendered
in a particular situation. In this situation, the decision of which JSP to render depends on complex rules,
rules that are expected to change often, or in instances where it is necessary to modify these rules without
restarting the application.
Targeting Customizations require writing targeting XML rules that contain information such as request
attributes, product and/or order information, the current customer and the current agent, or other
information relevant to the functional area in question. Targeting rules normally target repository items;
however, in this case targeting rules target Nucleus components that identify which JSPs to render
Simple Customization
Simple customization involves writing custom JSPs and configuring Nucleus components to refer to that JSP. For
example, to replace the area of the Product View panel that displays product SKUs and allows agents to enter
quantities for each SKU, you would modify the /atg/commerce/custsvc/ui/
renderers/ProductSkuRenderer component that are located in the DCS-CSR-UI directory.
100
Because renderer components are globally scoped, you can temporarily change the page though the Dynamo
Server Admin. All renderer components exist in the Nucleus configuration path at /atg/commerce/custsvc/
ui/renderers/. For example, the SKU rendering component may be located at:
http://localhost:8080/dyn/admin/nucleus/atg/commerce/custsvc/ui/
renderers/ProductSkuRenderer/
Changing the url property of this component to point to the new JSP temporarily implements the
customization. This example points to a newProductSkus.jsp file:
# The JSP that renders the product view SKU browser area
url=/renderers/order/newProductSkus.jsp
Renderer Components
All components live in the DCS-CSR-UI directory under the Nucleus path /atg/commerce/custsvc/
ui/renderers/. There are four components for each renderer:
BaseNameRenderer
BaseNamePageData
BaseNameSourceMap
BaseNameTargeter
The BaseNameRendereridentifies the renderer and the renderer information that is used by the targeter, the
data and the source map. The renderer contains the properties that are necessary to identify the JSP in particular
Web application. The RenderInfo class creates the render information:
package atg.commerce.csr.rendering;
public class RenderInfo
{
// Some ID string
public String getId() {}
// URL to JSP
public String getUrl() {}
// WebApp name which contains the JSP referenced
// in the Url, or null for current web-app
public String getWebAppName() {}
// Values for use in constructing rules
public Map getRuleOptions() {}
// Options for use in customizing page rendering
public Map getPageOptions() {}
101
The renderer uses properties files to represent both the default and a custom product rendering page. For
example, the default product renderer might be defined in the DefaultProductRenderer.properties file:
$class=atg.commerce.csr.rendering.RenderInfo
id=default
url=/renderers/product/generic.jsp
And the custom product renderer may be defined the CustomProductRenderer.properties file:
$class=atg.commerce.csr.rendering.RenderInfo
id=default
url=/renderers/product/custom.jsp
webAppName=Custom App 2.0
The BaseNamePageData component is used by the page as a place to store parameters to the targeting rule.
For example, to use the product item that you are viewing in the rule that you are going to execute to determine
which page fragment to use for the product, you would store the product item in the PageData component.
The PageData component is a map whose keys can be referenced in the rule as pageData.key-name where
key_name is a key in the map.
The BaseNameSourceMap holds the container component of the associated targeter. For example, the source
map for a targeter may contain the following:
$class=atg.targeting.TargetingSourceMap
sourceMap=\
RuleData=/atg/commerce/custsvc/ui/renderers/ProductViewRendererRuleData
The BaseNameTargeter component is configured to target the RenderInfo configurations, using the
ProductREnderer.rules. For example the ProductViewProductRendererTargeter.properties file
might contain the following:
$class=atg.targeting.RuleBasedCollectionTargeter
collectionComponents=\
DefaultProductRenderer,\
CustomProductRenderer
# The RuleSet configured above
ruleSetService=ProductViewProductRendererRuleSet
Pages that use renderers reference them using the path and the base name, for example:
102
contextRoot=/web-app
url=/web-app/test.html
You must ensure that all other pages referenced by this renderer can access the context root. This
replaces the contents of the product information panel with whatever would be rendered by visiting
http://machine:port/web-app/test.html.
Targeting Customization
To customize the UI using the JSP targeting rules, one or more renderer component configuration must be
added to in the Dynamo component path. Each renderer component represents one variation, or one JSP, of the
UI to display.
The following example describes the creation of a custom renderer for the SKU display and input area of the
Product View panel. The following /atg/commerce/custsvc/ui/renderers components are involved in this
example customization:
ProductSkuRenderer: The default renderer for the product SKU area
ProductSkuPageData: A component that will contain data from the enclosing page, such as product or
customer information
ProductSkuSourceMap: The main component container used by the targeting rules. This component refers
to the PageData component above
ProductSkuTargeter: The targeter configuration. This component refers to the SourceMap component
above, and one or more Renderer components
To create a targeting customization:
Create a new renderer component to represent the custom JSP. The basic properties of each renderer
component should be made in the /nucleus/
component/path/CustomRenderer.properties file:
# The base class for renderer components.
103
$class=atg.commerce.csr.rendering.RenderInfo
# An ID that uniquely identifies this renderer component in the
# domain in which it is used. All renderers currently shipped by
# ATG use the value "default" as their ID.
id=custom
# The custom JSP that performs the actual content rendering
url=/file/system/path/customSkuDisplay.jsp
Create a default RuleSetService configuration. This component identifies the rules file and contains
settings for when that file is loaded. In the /nucleus/component/
path/RuleSetService.properties file, add the following:
$class=atg.targeting.RuleSetService
# Path to rules file
rulesFilePath=/file/system/path/sku.rules
# Settings that control when/if rules files are loaded:
updatesEnabled=true
rulesFileCheckSeconds=0
The values used for updatesEnabled and rulesFileCheckSeconds above are useful when testing
targeting rules because they cause the rule file to be reloaded for every request.
Note: If the default RuleSetService has been configured to always reload targeting rules, it is easier to
experiment with rules by changing the file and causing the page to be redisplayed.
Create the rules file for the RuleSetService configured in Step 2. In the /file/system/path/sku.rules
file, add the following:
<ruleset>
<accepts>
<rule op="and">
<rule op="eq">
<!-- pageData is obtained from the SourceMap component -->
<valueof bean="pageData.product.id">
<valueof constant="prod10001">
</rule>
<rule op=eq>
<!-- target (display) the custom JSP -->
<valueof target="id">
<valueof constant="custom">
</rule>
</rule>
</accepts>
</ruleset>
In the example, the sku.rules file will target the custom renderer only when the product being
displayed has a value of prod10001. Only the first targeted component is displayed because the
TargetingFirstDroplet is used, so while multiple targets may match, only the first matching components
JSP will be rendered.
Update the existing ProductSkuTargeter configuration to refer to the new Renderer component created in
Step 1, and to the RuleSetService configured in Step 2.
You may need to restart the server for the settings to take effect.
For in-depth information on working with targeters, refer to the ATG Personalization Programming Guide.
104
Creating a ProductSkuRenderer
To create a ProductSkuRenderer, modify the DCS-CSR-UI/config/atg/commerce/custsvc/ui/
renderers/ProductSkuRenderer component path. The render components that should be extended are
atg.commerce.csr.rendering.RenderInfo with atg.commerce.csr.rendering.
SkuRenderInfo.
Create new properties that describe how to render each table column. Property names can be actual SKU
property names or symbolic names such as price and status. Symbolic properties, or property names that do
not represent actual properties of the SKU, specify a JSP in the renderer property.
The ProductSkuRenderer uses the standard pageOptions property to specify form handler, URL properties
and other information. The pageOptions properties include:
pageOptions=\
actionRenderer=/renderers/order/sku/skuBrowserAction.jsp,\
giftlistActionRenderer=/renderers/gift/skuGiftlistBrowserAction.jsp,\
formHandler=/atg/commerce/custsvc/order/CartModifierFormHandler,\
successPanelStacks=cmcCatalogPS,\
errorPanelStacks=cmcCatalogPS,\
successUrlProperty=addItemToOrderSuccessURL,\
errorUrlProperty=addItemToOrderErrorURL
properties=viewItem,id,displayName,price,status,quantity
By default, the ProductSkuRenderer page uses skuItem.propertyName to display the SKU property.
The property renderer specifies optional JSP files that are used to render named cells:
renderer=\
viewItem=/renderers/order/sku/viewItem.jsp,\
price=/renderers/order/sku/skuPrice.jsp,\
status=/renderers/order/sku/inventoryStatus.jsp,\
quantity=/renderers/order/sku/quantityInput.jsp,\
id=/renderers/order/sku/sku.jsp,\
displayName=/renderers/order/sku/name.jsp
<c: choose>
<c: when test="${area == 'cell'}">
render cell content
</c: when>
<c: when test="${area == 'header'}">
render column header content
</c: when>
</c: choose>
105
Available Renderers
All renderers listed contain the four component files, the *Renderer, *PageData, *SourceMap and
*Targeter properties files.
The following renderers are available in the DCS-CSR-UI module in the /atg/commerce/custsvc/
ui/renderers directory.
Renderer
Rendering JSP
Description
CrossSellItems
/renderers/order/
crossSellItems.jsp
conetxtRoot=/DCS-CSR
/panels/customer/
customerSearch.jsp
CustomerSearch
contextRoot=/agent
CustomerSearchResults
/panels/customer/
customerSearchResults.jsp
contextRoot=/agent
CustomerSelectionPopup
/renderers/customer/
customerSelection.jsp
contextRoot=/DCS-CSR
ItemDescription
/renderers/order/
itemDescription.jsp
contextRoot=/DCS-CSR
ProductInformation
ProductQuickViewPopup
contextRoot=/DCS-CSR
/renderers/order/
productQuickView.jsp
/renderers/order/
productInformation.jsp
contextRoot=/DCS-CSR
ProductReadOnlyPopup
/renderers/order/
productReadOnly.jsp
contextRoot=/DCS-CSR
ProductSku
/renderers/order/
productSkus.jsp
contextRoot=/DCS-CSR
106
Renderer
Rendering JSP
Description
ProductSkuReadOnly
/renderers/order/
productSkus.jsp
contextRoot=/DCS-CSR
ProductViewPanel
/renderers/order/
productView.jsp
contextRoot=/DCS-CSR
QuickViewSkuTable
ReturnShippingAddress
contextRoot=/DCS-CSR
/panels/order/returns/
returnShippingAddress.jsp
/renderers/order/
productSkus.jsp
contextRoot=/DCS-CSR
ReturnsLineItem
/panels/order/returns/
returnItemsLineItem.jsp
contextRoot=/DCS-CSR
ShippingAddressTable
/renderers/order/
shippingViewPanel.jsp
contextRoot=/DCS-CSR
SkuChangePanel
/include/order/product/
skuChangePanel.jsp
contextRoot=/DCS-CSR
SkuChangeTable
/renderers/order/sku/
skuChangeAction.jsp
/renderers/order/
productSkus.jsp
contextRoot=/DCS-CSR
107
108
3. Ensure that one of the panels in the new panel stack calls the JavaScript function
atg.progress.update('someIdStringHere'), passing the ID of the panel stack. This lets the progress
bar know it needs to update itself, and indicates where the agent is in the process.
4. To add the JSP into your Web applications, modify the Nucleus configuration properties files to identify which
Web-app contains the JSP file. For example:
path=/panels/ordersummary/specialOffers.jsp
context=/my-web-app
109
110
You may modify the keyboard shortcuts that are used throughout the Service Center UI by modifying the
appropriate JavaScript files.
Modifying Shortcuts
Keyboard shortcuts are located in the following files:
Service-UI/Framework/Agent/ServiceFramework/script
/keyboardShortcutsService.js
Service-UI/Framework/Agent/ServiceFramework/script/
Agent/script/keyboardTopicsService.js
Service-UI/Agent/script/keyboardShortcutsKnowledge.js
Service-UI/Agent/script/keyboardTopicsKnowledge.js
DCS-CSR-UI/script/keyboardShortcutsCSC.js
DCS-CSR-UI/script/keyboardTopicsCSC.js
The keyboardShortcuts files are used to map keyboard shortcuts to published topics. The keyboardTopics
files are used to execute these topics and perform the specific functions.
The following is an example of a keyboard shortcut definition for the shortcut key ALT+6:
atg.keyboard.registerShortcut(
"ALT+6", {
shortcut: "ALT + 6",
name: getResource("keyboard.service.customersTab.name"),
description: getResource("keyboard.service.customersTab.description"),
area: getResource("keyboard.area.workspace"),
topic: "CustomersTab",
notify: true
});
Where:
shortcut is the shortcut key that is shown in the help window
111
Where:
showNotificationWindow determines whether the small notification window that pops up in the bottom
right part of the screen is shown when a shortcut is pressed. Each shortcut has an attribute called notify
that specifies the use of the notification window on a shortcut-by-shortcut basis. However, the use of the
notification window may be disabled if the showNotificationWindow is set to false
highlightAndFadePanels provides a visual highlight as users jump from one panel to the next using the
panel shortcuts. When this attribute is set to false, the panel highlighting will not occur
highlightAndFadePanels provides a visual highlight as users tab throughout the Service Center. When this
attribute is set to false, the screen elements will not be highlighted
112
12 Configuring Messaging
Server-Side Configuration
Before configuring messages, ensure that the exception collector servlet has been activated in the application
by inserting it in the servlet pipeline and adding the following lines to the web.xml file:
<context-param>
<param-name>exception-collecting-enabled</param-name>
<param-value>true</param-value>
</context-param>
The exception collector servlet creates messages from DropletException and ServletException objects
that occur in the request.
Message Properties
Messages have the following properties:
12 Configuring Messaging
113
If no failure summary is specified in the request, the messaging UI adds the default summary that is specified in
the message bar:
dojo.widget.byId('messageBar').addMessage({type:"warning", summary:"An
error has occurred."});
To add a message that contains bulleted details, write your JavaScript similar to the following:
dojo.widget.byId('messageBar').addMessage({type:"error", summary:"An
error has occurred.", details:[{description: "First detail"},
{description: "Second detail"}]});
114
12 Configuring Messaging
The dojoType attribute specifies the type of client-side widget to use for the input element.
Note: The dsp:input or equivalent tag must have an ID property defined for the SubmitButton auto-enabling
feature to work properly.
For detailed information on DSP tags, refer to the ATG Page Developer's Guide.
12 Configuring Messaging
115
When present in a form, the SubmitButton widget will automatically enable and disable to prevent form
submission while there are invalid contents in any of the Dojo validation widgets contained in the form. One or
more SubmitButton widgets may be used in the same form. If the SubmitButton must be placed outside of
the form that it validates, use the form attribute of the SubmitButton to specify the form to validate.
Conditional Validation
Validation may be made conditional based on the state of another element, such as a radio button.
1. Create a function to test the state of the radio button. The following example tests a Commerce Service
Center radio button:
atg.commerce.csr.rule0 = function () { return
document.getElementsByName('addressType')[0].checked; };
116
12 Configuring Messaging
<dsp:tagAttribute name="validateIf"
value="atg.commerce.csr.rule0.apply()"/>
Validation rules of the widget will be applied conditionally only when the referenced function returns true.
Conditional Requirements
A validation widget may be conditionally required based on the evaluation of an expression. As with conditional
validation, perform the following steps:
1. Create a function to test the condition.
2. Reference the function from the requiredIf attribute on the widget. The following example tests a
Commerce Service Center condition:
<dsp:tagAttribute name="requiredIf"
value="atg.commerce.csr.rule0.apply()"/>
This creates a widget that will perform required checks only when the condition applies, but will always perform
validation checks when the widget contains data.
In the above example, the widget will be considered valid only when the expression in the validIf attribute
evaluates to true.
The missingIf attribute applies a custom condition to determine whether the widget is missing a required
value.
12 Configuring Messaging
117
value="emailValidatorAlert" />
</dsp:input>
Additionally, you must have a form handler equivalent to BillingFormHandler in the example that accepts
the e-mail address as one of its inputs.
118
12 Configuring Messaging
The xmlCombinerCustomizer script sets up the rules that combine the XML definition files. For information on
this script, refer to the Data Combining (page 11) section.
The following is an example of the xmlCombinerCustomizer file:
<?xml version="1.0"?>
<!DOCTYPE combiner-customizers
PUBLIC "-//Art Technology Group, Inc.//DTD XML Combiner Customizer//EN"
'http://www.atg.com/dtds/xmlcombiner/xmlCombinerCustomizer_1.1.dtd'>
<combiner-customizers>
<combiner-customizer>
<tag-name>content-definition</tag-name>
<match-subtag>id</match-subtag>
</combiner-customizer>
<combiner-customizer>
<tag-name>id-entry</tag-name>
<match-subtag>id</match-subtag>
</combiner-customizer>
<combiner-customizer>
<tag-name>map-entry</tag-name>
<match-subtag>key</match-subtag>
</combiner-customizer>
<combiner-customizer>
<tag-name>template-definition</tag-name>
<match-subtag>id</match-subtag>
</combiner-customizer>
<combiner-customizer>
<tag-name>framework-definition</tag-name>
<match-subtag>id</match-subtag>
</combiner-customizer>
<combiner-customizer>
<tag-name>skin-definition</tag-name>
<match-subtag>id</match-subtag>
</combiner-customizer>
<combiner-customizer>
<tag-name>tab-definition</tag-name>
<match-subtag>id</match-subtag>
</combiner-customizer>
119
<combiner-customizer>
<tag-name>cell-definition</tag-name>
<match-subtag>id</match-subtag>
</combiner-customizer>
<combiner-customizer>
<tag-name>panel-stack-definition</tag-name>
<match-subtag>id</match-subtag>
</combiner-customizer>
<combiner-customizer>
<tag-name>panel-definition</tag-name>
<match-subtag>id</match-subtag>
</combiner-customizer>
<combiner-customizer>
<tag-name>id</tag-name>
<match-text>
<ignoring-outer-whitespace/>
</match-text>
</combiner-customizer>
<combiner-customizer>
<tag-name>key</tag-name>
<match-text>
<ignoring-outer-whitespace/>
</match-text>
</combiner-customizer>
</combiner-customizers>
120
The following tag libraries, which are used in Service Center, provide specialized markup tags that render
content dynamically by linking Nucleus components directly to JSPs. ATG applications support both the
standard Java Server Pages Standard Tag Library (JSTL) and the DSP tag library and provides tag converter
classes that allow you to define the conversion of form data.
For detailed information on working with tag libraries, refer to the ATG Page Developer's Guide. For information
on developing tag libraries and customized tag converters, refer to the ATG Platform Programming Guide.
Tag
Description
addAdHocFavQuery
getChildFocusTopics
getChildTopics
121
Tag
Description
getLocale
getLocaleFromSearchLanguage
getOrganizationPath
getRankedSolutions
Returns a list of hot solutions based upon the selected topics and
solution classes.
Attributes:
var
length
topics
solutionClasses
rankCategory
getSearchLanguage
getTopic
122
Tag
Description
getTopicPath
highlightFields
logicalPartitions
PDFHighlight
Highlights PDFs.
Attributes:
highlightInfo
PDFUrl
property.isPropertyVisible
retrieveDocumentFromES
123
Tag
Description
search.queryTermSpelling
Generates a Did you mean string for the search and query text
provided by the user.
Attributes:
markupAfter
markupBefore
scope
searchText
terms
textSeparator
varMarkup
var
varUnknownTerms
varUnsearchableTerms
varAlternateTermsUsed
varHasSuggestions
serialize
solution.renderProperty
solution.renderStatement
solutionHighlight
124
Tag
Description
SSUrl
Gets the Self Service URL based upon the passed parameters.
Attributes:
siteId
toTab
panelStack
fromTab
brand
locale
otherParameters
isFullPath
var
Tag
Description
cellDefinitionFindByAppId
cellDefinitionFindByCellId
cellDefinitionFindByPrimaryKey
125
Tag
Description
cellDefinitionFindBySiteId
cellDefinitionFindBySiteIdAndCellId
cellDefinitionFindByUserSiteIdAnd
CellId
contentDefinitionFindByAppId
contentDefinitionFindByContentId
contentDefinitionFindByPrimaryKey
126
Tag
Description
contentDefinitionFindBySiteId
contentDefinitionFindBySiteIdAnd
ContentId
contentDefinitionFindByUserSiteIdAnd
ContentId
frameworkDefinitionFindByFrameworkId
frameworkDefinitionFindByPrimaryKey
frameworkDefinitionFindBySiteId
127
Tag
Description
frameworkDefinitionFindBySiteIdAnd
FrameworkId
frameworkDefinitionGetSkins
frameworkDefinitionGetTabs
frameworkDefintionFindByAppId
frameworkObjectFindByPrimaryKey
frameworkObjectGetContents
128
Tag
Description
frameworkObjectGetTemplates
getCellDefinitionHome
getContentDefinitionHome
getFrameworkDefinitionHome
getFrameworkObjectHome
getPanelDefinitionHome
getPanelStackDefinitionHome
129
Tag
Description
getSkinDefinitionHome
getTabDefinitionHome
getTemplateDefinitionHome
panelDefinitionFindByPanelId
panelDefinitionFindByPrimaryKey
panelDefinitionFindBySiteId
panelDefinitionFindBySiteIdAnd
PanelId
130
Tag
Description
panelkDefinitionFindByAppId
panelStackDefinitionFindByAppId
panelStackDefinitionFindByAppId
NoSiteId
panelStackDefinitionFindByPanelStackId
panelStackDefinitionFindByPrimaryKey
panelStackDefinitionFindBySiteId
131
Tag
Description
panelStackDefinitionFindBySiteIdAnd
PanelStackId
panelStackDefinitionGetPanels
skinDefinitionFindByAppId
skinDefinitionFindByAppIdAndEnabled
skinDefinitionFindByPrimaryKey
skinDefinitionFindBySiteId
132
Tag
Description
skinDefinitionFindBySiteIdAndSkinId
skinDefinitionFindBySkinId
skinDefinitionFindByUserSiteIdAnd
PanelId
skinDefinitionFindByUserSiteIdAnd
PanelStackId
skinDefinitionFindByUserSiteIdAnd
SkinId
tabDefinitionFindByAppId
133
Tag
Description
tabDefinitionFindByPrimaryKey
tabDefinitionFindBySiteId
tabDefinitionFindBySiteIdAndTabId
tabDefinitionFindByTabId
tabDefinitionFindByUserSiteIdAnd
TabId
templateDefinitionFindByAppId
134
Tag
Description
templateDefinitionFindByPrimaryKey
templateDefinitionFindBySiteId
templateDefinitionFindBySiteIdAnd
TemplateId
templateDefinitionFindByTemplateId
templateDefinitionFindByUserSiteId
AndTemplateId
Tag
Description
frameworkPopupUrl.tag
135
Tag
Description
frameworkUrl.tag
Tag
Description
body
checkBox
column
136
Tag
Description
controlBar
deleteButton
executeOperation
expandButton
137
Tag
Description
field
filterOption
filterSelect
getDecimalFormatSymbols
getEncodedJavascriptString
138
Tag
Description
getOptionAsArray
getOptionAsBoolean
getOptionAsInteger
getOptionAsString
head
httpCacheHeader
initialSort
139
Tag
Description
insertBody
insertControlBar
insertTreeTable
Inserts an empty tree table on the page, with the global attributes
already defined.
Attributes:
actionId
columns
hasHeader
hasPaging
height
initialUrl
overflow
pageSize
position
skipRestore
statSavingMethod
treeTableBean
treeTableId
width
itemStyle
Defines a style for items within the tree table with the ability to have
alternating row styles.
Attributes:
styleName
140
Tag
Description
itemTemplate
Defines a template for items that are contained in the body of the
tree table.
Attributes:
isExpanded
key
noWrap
onDelete
onSelect
overflow
position
style
styleHover
styleSelected
moveButton
navigateButton
operationParameter
141
Tag
Description
pagingButton
refreshButton
restoreState
saveState
serviceMethod
142
Tag
Description
serviceMethodArgument
sortOption
sortSelect
Tag
Description
canEditSolution
canViewSolution
143
Tag
Description
getAccessRight
getAssignableUsers
Returns a list of User objects for each user that can execute the
task.
Attributes:
id
var
solutionTask
processId
solutionId
getProcess
getProject
getProjectTasks
getSolution
144
Tag
Description
getSolutionByVersion
getSolutionHistory
getSolutionStatus
getSolutionTasks
getUserOwningGroups
isFieldExternallyVisible
Returns a true value if the segment can see the solution field.
Attributes:
id
var
solutionField
segment
isFieldValueExternallyVisible
Returns a true value if the segment can see the solution field
value.
Attributes:
id
var
solutionFieldValue
segment
145
Tag
Description
isSolutionExternallyVisible
OrganizationIsExists
renderEmailStatement
146
Tag
Description
displayCreditCardType.tag
Displays the credit card name and renders the last four digits of the
credit card number.
getCurrencyCode.tag
getProduct.tag
inventoryStatus.tag
priceRange.tag
renderer.tag
Tag
Description
siteIcon.tag
skuPrice.tag
Returns the appropriate SKU price based upon the agents currency
code and price lists.
skuPriceDisplay.tag
Displays the appropriate SKU price from the current price and sales
price lists.
147
148
Index
static, 4, 9, 23
CSS, 4, 4
(see also static content)
adding, 42
A
action menu, 49
creating, 54
navaction, 51
ATG Personalization, 100
ATG Ticketing, 3
C
cell, 4, 19
configuration object, 27
definition object, 18, 57
instance object, 30
object, 4, 5
columns, 87, 95
adding, 95
attributes, 89
content, 91
removing, 95
reordering, 95
width, 90
combiner script, 4, 4, 9, 11, 119
(see also data binding)
configuration layering, 42
and forms, 67
and grids, 85
and tables, 84
with tables and grids, 81
configuration object, 5, 25
cell, 27
content, 26
framework, 26
panel, 27
panel stack, 27
skin, 26
tab, 27
template, 26
content
configuration object, 26
definition object, 23
instance object, 29
Index
data binding, 4
deleting, 62
deleting definition objects, 32
modifying definition objects, 32
rules, 11
unmarshalling, 11
XML files and, 9
debugging mode, 43
Dojo, 44
definition homes, 11, 125
definition object, 4
adding, 32
cell, 18, 57
content, 23
deleting, 32, 62
framework, 14
modifying, 32
panel, 21, 57
panel stack, 19, 57
skin, 15
tab, 17, 57
template, 24
troubleshooting, 65
F
finder method, 11, 125
forms, 67
creating, 73
modifying, 67
pop-up page, 75
submit, 35
validation, 67, 116
framework, 4
configuration object, 25
definition object, 14
instance object, 28
object, 4, 11, 12
object current state, 25
schema, 9
G
global context area, 5, 45
rendering, 52
grids, 81
column attributes, 89
column layout, 87
column width, 90
149
columns, modifying, 95
extending configuration, 85
modifiable components, 81
I
ID object, 10
instance object, 5, 28
cell, 30
content, 29
framework, 29
panel, 31
panel stack, 30
panel target, 31
skin, 29
tab, 29
template, 29
J
JavaScript, 4, 4, 61
(see also static content)
adding, 42
JSP, 4, 24, 41
layout definition, 4
targeting rules, 103
K
keyboard shortcuts, 111
global, 112
L
layout, 4, 14
and navcontent, 48
basic structure, 18
create new, 57
global context area, 52
in cell definition, 57
of framework objects, 24
page, 57
with cells and templates, 17
look-and-feel, 4, 14, 15
M
map object, 10
messages, 113
rendering, 113
modules, 3
N
navigation, 4, 5, 14, 17
O
objects, 4
150
cell, 4
cell configuration, 27
cell definition, 18, 57
cell instance, 30
configuration, 5, 25
content, 4
content configuration, 26
content definition, 23
content instance, 29
definition, 4
definition troubleshooting, 65
framework, 4, 11, 12
framework configuration, 26
framework definition, 14
framework instance, 29
hover, 97
ID entry, 10
instance, 5, 28
map entry, 10
panel, 4
panel configuration, 27
panel definition, 21
panel instance, 31
panel stack, 4
panel stack configuration, 27
panel stack definition, 19, 57, 57
panel stack instance, 30
panel target, 31
skin, 4
skin configuration, 26
skin definition, 15
skin instance, 29
tab, 4
tab configuration, 27
tab definition, 17, 57
tab instance, 29
template, 4
template configuration, 26
template definition, 24
template instance, 29
Oracle ATG Web Commerce Search, 3
Oracle ATG Web Commerce Service Center, 3
Oracle ATG Web Knowledge Manager, 3
Oracle ATG Web Knowledge Manager Self Service, 3
P
page, 17
create new, 57
defining regions of
, 21
defining with templates, 24
pop-up, 75
rendering, 99
Index
page fragments, 68
extending default, 69
forms, 68
tables and grids, 90
panel, 4
adding, 62
configuration object, 27
definition object, 21, 57
instance object, 31
object, 4
panel stack, 4, 17, 18
configuration object, 27
definition object, 19, 57
instance object, 30
object, 4
panel target instance object, 31
personalization, 100
pop-up window, 49
priority property, 10
R
renderers, 99, 106
column content, 91
components, 101
target, 100
rendering, 5
global context area, 52
rules, 100
target customization, 103
instance object, 29
object, 4, 5
tables, 81
extending configuration, 84
modifiable components, 81
template, 4, 21, 24
configuration object, 26
instance object, 29
U
unmarshalling (see data binding)
URL, 33
alternate, 100
forwarding, 36
parameters, 36
utilities panel, 5
V
validation, 115
conditional, 116
field, 117
widgets, 115
with forms, 67, 73
with pop-up page, 75
W
workspace, 5
X
xml-combine (see data binding)
schema, 12
elements, 9
search function, 48
skin, 4, 14
configuration object, 26
definition object, 15
instance object, 29
object, 4
state, 12
default framework, 4
in-memory, 28
of a particular user, 5
transient, 5, 28
static content, 4, 9, 23
linking, 23
T
tab, 4, 14
action, 61
change current, 33
configuation object, 27
definition object, 17, 57, 57
Index
151
152
Index