Customization Guide
Customization Guide
Fulfillment Solution
Customization Guide
Release 8.0
January 2008
Copyright Notice
Copyright 1999 - 2008
Sterling Commerce, Inc. ALL RIGHTS RESERVED
STERLING COMMERCE SOFTWARE
***TRADE SECRET NOTICE***
THE STERLING COMMERCE SOFTWARE DESCRIBED BY THIS DOCUMENTATION ("STERLING COMMERCE
SOFTWARE") IS THE CONFIDENTIAL AND TRADE SECRET PROPERTY OF STERLING COMMERCE, INC., ITS
AFFILIATED COMPANIES OR ITS OR THEIR LICENSORS, AND IS PROVIDED UNDER THE TERMS OF A
LICENSE AGREEMENT. NO DUPLICATION OR DISCLOSURE WITHOUT PRIOR WRITTEN PERMISSION.
RESTRICTED RIGHTS.
This documentation, the Sterling Commerce Software it describes, and the information and know-how
they contain constitute the proprietary, confidential and valuable trade secret information of Sterling
Commerce, Inc., its affiliated companies or its or their licensors, and may not be used for any
unauthorized purpose, or disclosed to others without the prior written permission of the applicable
Sterling Commerce entity. This documentation and the Sterling Commerce Software that it describes
have been provided pursuant to a license agreement that contains prohibitions against and/or
restrictions on their copying, modification and use. Duplication, in whole or in part, if and when
permitted, shall bear this notice and the Sterling Commerce, Inc. copyright notice.
U.S. GOVERNMENT RESTRICTED RIGHTS. This documentation and the Sterling Commerce Software it
describes are "commercial items" as defined in 48 C.F.R. 2.101. As and when provided to any agency or
instrumentality of the U.S. Government or to a U.S. Government prime contractor or a subcontractor at
any tier ("Government Licensee"), the terms and conditions of the customary Sterling Commerce
commercial license agreement are imposed on Government Licensees per 48 C.F.R. 12.212 or 227.7202
through 227.7202-4, as applicable, or through 48 C.F.R. 52.244-6.
These terms of use shall be governed by the laws of the State of Ohio, USA, without regard to its conflict
of laws provisions. If you are accessing the Sterling Commerce Software under an executed agreement,
then nothing in these terms and conditions supersedes or modifies the executed agreement
7
Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 or subparagraphs (C)(1)
and (2) of the Commercial Computer Software - Restricted Rights at 48 CFR 52.227-19, as applicable.
Contractor / manufacturer of the JGo Software is Northwoods Software Corporation, 142 Main St.,
Nashua, NH 03060.
MYSQL SOFTWARE
The Sterling Commerce Software is distributed on the same storage media as the MySQL Software
(Copyright 1995-2002 MySQL AB) ("MySQL Software"). Before installing the MySQL Software, the
terms and conditions of the MySQL license must be accepted.
A copy of the MySQL license is provided at <install_dir>/mysql/MySQL_License.txt. This license only
applies to the MySQL Software and does not apply to the Sterling Commerce Software, or any other
Third Party Licensor Software.
THE APACHE SOFTWARE FOUNDATION SOFTWARE
The Sterling Commerce Software is also distributed with or on the same storage media
as the following software products (or components thereof): Ant, Antinstaller, Axis, Apache Commons
Lang, Apache Jakarta Commons Collections, Apache Jakarta Commons Pool, Apache Jakarta ORO,
Xerces version 2.7, Apache Log4J, Apache SOAP, and Apache Xalan 2.7.0 (collectively, "Apache 2.0
Software"). Apache 2.0 Software is free software which is distributed under the terms of the Apache
License Version 2.0. A copy of License Version 2.0 is found in the following directory files for the
individual pieces of the Apache 2.0 Software:
<install_dir>/ant/Ant_License.txt,
<install_dir>/jar/antInstaller/0_8/antinstaller_License.txt
<install_dir>/jar/commons_pool/1_2/Commons_License.txt
<install_dir>/jar/jakarta_oro/2_0_8/JakartaOro_License.txt
<install_dir>/jar/log4j/1_2_11/LOG4J_License.txt
<install_dir>/Xalan_License.txt
<install_dir>/jar/soap/2_3_1/Apache_SOAP_License.txt
<install_dir>/jar/commons_collections/2_1/Commons_License.txt
<install_dir>/jar/commons_lang/2_1/Commons_Lang_License.txt
Unless otherwise stated in a specific directory, the Apache 2.0 Software was not modified. Neither the
Sterling Commerce Software, modifications, if any, to Apache 2.0 Software, nor other Third Party Code is
a Derivative Work or a Contribution as defined in License Version 2.0. License Version 2.0 applies only to
the Apache 2.0 Software which is the subject of the specific directory file and does not apply to the
Sterling Commerce Software or to any other Third Party Software.
Rico Software
The Sterling Commerce Software is also distributed with or on the same storage media as the Rico.js
software (Copyright 2005 Sabre Airline Solutions) ("Rico Software"). Rico Software is free software
which is distributed under the terms of the Apache License Version 2.0. A copy of License Version 2.0 is
found <install_dir>/3rdParty/rico license.doc.
The Rico Software was not modified. Neither the Sterling Commerce Software, modifications, if any, to
the Rico Software, nor other Third Party Code is a Derivative Work or a Contribution as defined in License
Version 2.0. License Version 2.0 applies only to the Rico Software which is the subject of the specific
directory file and does not apply to the Sterling Commerce Software or to any other Third Party
Software. License Version 2.0 includes the following provision:
"Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of
TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
solely responsible for determining the appropriateness of using or redistributing the Work and assume
any risks associated with Your exercise of permissions under this License."
8 Customization Guide
SUN MICROSYSTEMS
The Sterling Commerce Software is distributed with or on the same storage media as the following
software products (or components thereof): Sun Activation Framework, Sun JSSE, Sun JNet, and Sun
JavaMail (collectively, "Sun Software"). Sun Software is free software which is distributed under the
terms of the Sun Microsystems, Inc. Binary Code License Agreement ("BCLA"). A copy of the specific
BCLA is found in the following directory files for the individual pieces of the Sun Software:
SUN JSSE and JNET JARS - <install_dir>/noapp/lib
SUN JavaMail - <install_dir>/jar/javamail/1_3_2
The licenses relating to the following Sun products are included in the directory files located at:
SUN COMM JAR - <install_dir>/ repository/eardata/platform/war/yfscommon
SUN ACTIVATION JAR - <install_dir>/jar/jaf/1_0_2
The Sterling Commerce Software is also distributed with or on the same storage media as the
Web-app_2_3.dtd software (Copyright 2007 Sun Microsystems, Inc.) ("Web-App Software").
Web-App Software is free software which is distributed under the terms of the Common Development
and Distribution License ("CDDL"). A copy of the CDDL is found in
<install_dir>/repository/eardata/platform/war/WEB-INF/web_app_licence.txt
The source code for the Web-App Software may be found at:
<install_dir>/repository/eardata/platform/war/WEB-INF/web-app+2_3.dtd.
Such licenses only apply to the Sun product which is the subject of such directory and does not apply to
the Sterling Commerce Software or to any other Third Party Software.
W3C Software
The Sterling Commerce Software is distributed on the same storage media as the W3C Software to which
the following notice applies:
W3C XML Schema
Copyright 1994-2007 World Wide Web Consortium, (Massachusetts Institute of Technology, European
Research Consortium for Informatics and Mathematics, Keio University). All Rights Reserved. This work is
distributed under the W3C Software License [1] in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
WARRANTY DISCLAIMER
This documentation and the Sterling Commerce Software which it describes are licensed either "AS IS"
or with a limited warranty, as set forth in the Sterling Commerce license agreement. Other than any
limited warranties provided, NO OTHER WARRANTY IS EXPRESSED AND NONE SHALL BE IMPLIED,
INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR USE OR FOR A PARTICULAR
PURPOSE. The applicable Sterling Commerce entity reserves the right to revise this publication from time
to time and to make changes in the content hereof without the obligation to notify any person or entity
of such revisions or changes.
The Third Party Software is provided "AS IS" WITHOUT ANY WARRANTY AND ANY EXPRESSED OR
IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. FURTHER, IF YOU
ARE LOCATED OR ACCESSING THIS SOFTWARE IN THE UNITED STATES, ANY EXPRESS OR IMPLIED
WARRANTY REGARDING TITLE OR NON-INFRINGEMENT ARE DISCLAIMED.
Without limiting the foregoing, the ICE Software, IEEMU Software, and JBoss Software, are all distributed
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
9
10 Customization Guide
Contents
Preface
Intended Audience .......................................................................................31
Structure ....................................................................................................31
Sterling Multi-Channel Fulfillment Solution Documentation.................................33
Conventions ................................................................................................35
1 Introduction
1.1 Sterling Multi-Channel Fulfillment Solution Extensibility ...........................37
1.2 Sterling Multi-Channel Fulfillment Solution Consoles User Interface ...........38
1.3 Sterling Multi-Channel Fulfillment Solution Configurator User Interface ......39
1.4 Sterling Multi-Channel Fulfillment Solution Mobile User Interface ..............40
1.5 The Sterling Multi-Channel Fulfillment Solution Database .........................41
1.6 Sterling Multi-Channel Fulfillment Solution Transactions ..........................41
2 Getting Started
2.1 Before You Begin ...............................................................................43
2.2 Understanding the Development Environment ........................................43
2.3 Preparing a Development Environment on WebLogic ...............................44
2.4 Preparing a Development Environment on WebSphere ............................48
2.5 Preparing the Development Environment on JBoss..................................51
2.6 Configuring the UI Cache Refresh Actions .............................................54
2.7 Developing and Testing in the Development Environment ........................55
2.7.1 Testing UI Customizations ..............................................................55
2.8 Using the Sterling Multi-Channel Fulfillment Solution with Microsoft COM+ .56
11
2.8.1 Creating a Sterling Multi-Channel Fulfillment Solution COM+ Application
on Windows................................................................................. 56
2.8.2 Adding Components to a COM+ Application...................................... 57
2.8.3 Configuring the Sterling Multi-Channel Fulfillment Solution COM+ Service
58
2.8.4 Creating a Client Proxy ................................................................. 59
2.8.5 Installing a Client Proxy ................................................................ 59
12 Customization Guide
3.8.4 Customizing a List View .................................................................88
3.8.4.1 Customizing a Regular List View .................................................88
3.8.4.2 Customizing an Advanced List View ............................................89
3.8.4.3 Changing the Maximum Number of Records Displayed...................91
3.8.5 Customizing a Detail View ..............................................................91
3.8.5.1 Blocking the Reason Code Pop-up from Order Detail screen ...........93
3.8.6 Customizing JSP Files ....................................................................94
3.8.7 JSP Files Used by the Sterling Multi-Channel Fulfillment Solution .........95
3.8.7.1 UI View Across Document Type ..................................................97
3.8.7.1.1 Using the common_fields.jsp ................................................98
3.8.7.1.2 Screen Refreshing ...............................................................99
3.8.7.1.3 Other Common Field Features/Notes .................................... 100
3.8.8 Creating Inner Panels for a Detail View .......................................... 103
3.8.9 Incorporating Your View across the Application................................ 105
3.9 Customizing the Home Page .............................................................. 106
3.10 Creating a Custom Business Entity ..................................................... 106
3.11 Using Extended Database Columns ..................................................... 107
3.12 Using the Override Entity Key Attribute ............................................... 108
3.13 Posting Data for Editable Lists............................................................ 109
3.14 Retaining Unsaved Data in an Editable List .......................................... 110
3.15 Adding a Lookup .............................................................................. 118
3.16 Creating a User-Sortable Table .......................................................... 120
3.17 Adding Graphs and Pie Charts ............................................................ 121
3.18 Customizing the Menu Structure......................................................... 122
3.18.1 Localizing the Menu Structure ....................................................... 123
3.19 Customizing Screen Navigation .......................................................... 123
3.19.1 Disabling Direct Navigation to Detail Screens .................................. 124
3.20 Developing Custom Event Handlers .................................................... 125
3.20.1 Control-Level Event Handler ......................................................... 125
3.20.2 Screen-Level Event Handler .......................................................... 126
3.21 Working with Document Types ........................................................... 127
3.22 Working with Document Types and Demand Records ............................ 129
3.23 Configuring Actions and Enabling Custom Transactions.......................... 130
3.24 XML Binding .................................................................................... 132
3.24.1 XML Data Binding Syntax ............................................................. 133
13
3.24.2 Special XML Binding Considerations ...............................................134
3.24.3 XML Binding for Multiple Element Names ........................................135
3.25 API Input ........................................................................................135
3.26 Available Dynamic Attribute Namespaces.............................................138
3.27 Posting Data to an API ......................................................................140
3.27.1 Data Types.................................................................................140
3.27.1.1 Abstract Data Type Mappings ...................................................141
3.27.1.2 Abstract Data Type Definitions .................................................141
3.27.1.3 Data Type Determination.........................................................142
3.27.1.4 Data Type Validation...............................................................142
3.27.1.5 Customizing the Data Types Files .............................................142
3.28 Displaying Credit Card Number in a New Screen ...................................143
3.28.1 Displaying Multiple Credit Card Numbers ........................................145
14 Customization Guide
5.4 Adding a Menu Entry ........................................................................ 170
5.5 Creating a Template HTML ................................................................ 172
5.6 Creating JSP Files............................................................................. 173
5.6.1 Understanding the Structure of a JSP File ....................................... 173
5.6.2 JSP File Name and Directory Guidelines .......................................... 174
5.7 Passing Data Between Screens........................................................... 175
5.8 Error Handling ................................................................................. 175
15
6.3.11.2 Tracing the Sterling Rich Client Application within Eclipse.............195
6.3.12 Fetching Images from the Server ..................................................195
6.3.13 Security Handling ........................................................................195
6.3.13.1 Selective SSL Calls .................................................................196
6.3.14 Output Template .........................................................................197
6.3.15 Commands .................................................................................197
6.3.16 Log Files ....................................................................................197
6.3.16.1 Clearing Data Cache ...............................................................199
6.3.17 Table Filtering.............................................................................199
6.3.17.1 Clearing the Sort Order in a Table.............................................199
6.3.18 Scheduling Jobs ..........................................................................200
6.3.18.1 Scheduling a Generic Job.........................................................200
6.3.18.2 Scheduling an Alert-Related Job ...............................................201
6.3.19 Low Resolution Display.................................................................202
6.3.20 Logging in to a Sterling Rich Client Application Using VM Arguments ..203
6.3.21 Supervisory Overrides..................................................................204
6.3.21.1 Using the Pop-Up Method ........................................................204
6.3.21.2 Starting a Supervisory Transaction ...........................................205
6.3.22 Running the Sterling Rich Client Application in POS Mode..................206
6.4 Extensibility Capability Summary........................................................207
6.5 Setting Up the Development Environment............................................208
6.5.1 Installing Prerequisite Software Components...................................209
6.5.1.1 Sterling RCP Tools ..................................................................210
6.5.2 Creating and Configuring Locations ................................................213
6.5.3 Creating a Plug-in Project .............................................................214
6.5.4 Running the Sterling RCP Plugin Wizard..........................................217
6.5.5 Launching the Sterling Rich Client Application in Eclipse....................221
6.6 Customizing the Sterling Rich Client Application....................................224
6.6.1 Localizing and Theming Sterling Rich Client Application ....................225
6.6.1.1 Localizing a Sterling Rich Client Application ................................225
6.6.1.2 Theming a Sterling Rich Client Application .................................225
6.6.2 Extending the Sterling Rich Client Application..................................225
6.6.2.1 Modifying Existing Screens ......................................................226
6.6.2.2 Modifying Existing Wizards ......................................................226
6.6.2.3 Creating and Adding New Screens ............................................227
16 Customization Guide
6.7 Modifying Existing Screens ................................................................ 227
6.7.1 Starting the Sterling RCP Extensibility Tool ..................................... 227
6.7.2 Customizing the User Interface ..................................................... 228
6.7.3 Synchronizing Differences ............................................................ 228
6.7.4 Building and Deploying Extensions................................................. 228
6.7.5 Validating or Capturing Data During API or Service Calls................... 228
6.8 Modifying the Existing Wizards ........................................................... 229
6.8.1 Creating an Extended Wizard Definition.......................................... 232
6.8.2 Registering the Wizard Extension File ............................................. 234
6.8.3 Creating the Wizard Entity............................................................ 234
6.8.4 Modifying the Wizard Extension Behavior........................................ 235
6.8.5 Building and Deploying Extensions................................................. 236
6.9 Creating New Screens....................................................................... 236
6.9.1 Creating a Rich Client Platform Composite ...................................... 237
6.9.1.1 Creating a Rich Client Platform Composite Using the Sterling RCP
Search List Composite Wizard .................................................. 237
6.9.1.2 Creating a Rich Client Platform Composite Using the Sterling RCP
Composite Wizard .................................................................. 247
6.9.2 Designing a Rich Client Platform Composite .................................... 249
6.9.2.1 Creating the Search Criteria Panel ............................................ 251
6.9.2.1.1 Adding Controls to the cmpSearchCriteria Composite ............. 252
6.9.2.2 Creating the Search Results Panel ............................................ 255
6.9.3 Displaying Paginated Results ........................................................ 257
6.9.4 Creating Tables........................................................................... 260
6.9.4.1 Creating Standard Tables ........................................................ 260
6.9.4.2 Adding Columns to the Standard Table...................................... 260
6.9.4.3 Creating Editable Tables.......................................................... 261
6.9.5 Naming Controls ......................................................................... 262
6.9.5.1 Creating a Binding Object ........................................................ 262
6.9.5.2 Naming a Control ................................................................... 262
6.9.6 Binding Controls.......................................................................... 263
6.9.6.1 Binding Classes...................................................................... 263
6.9.6.2 XML Bindings for Different Controls........................................... 264
6.9.6.2.1 Source Binding.................................................................. 265
6.9.6.2.2 Target Binding .................................................................. 267
6.9.6.2.3 Checked Binding ............................................................... 268
17
6.9.6.2.4 Unchecked Binding ............................................................269
6.9.6.2.5 List Binding ......................................................................269
6.9.6.2.6 Code Binding ....................................................................270
6.9.6.2.7 Description Binding............................................................270
6.9.6.2.8 Attribute Binding ...............................................................271
6.9.6.2.9 Key Binding ......................................................................272
6.9.6.3 Setting Bindings for Different Controls.......................................273
6.9.6.3.1 Binding Labels ..................................................................274
6.9.6.3.2 Binding Text Boxes ............................................................276
6.9.6.3.3 Binding StyledText Components ..........................................278
6.9.6.3.4 Binding Combo Boxes ........................................................279
6.9.6.3.5 Binding List Boxes .............................................................282
6.9.6.3.6 Binding Checkboxes...........................................................284
6.9.6.3.7 Binding Radio Buttons ........................................................285
6.9.6.3.8 Binding Links ....................................................................287
6.9.6.3.9 Binding Tables ..................................................................288
6.9.7 Localizing Controls.......................................................................302
6.9.8 Theming Controls ........................................................................303
6.9.9 Calling APIs and Services .............................................................303
6.9.9.1 Calling the Same API/Service Multiple Times ..............................304
6.9.9.2 Calling Multiple APIs/Services ..................................................306
6.9.10 Adding New Screens to a Sterling Rich Client application ..................307
6.10 Adding New Screens to a Sterling Rich Client Application .......................308
6.10.1 Using Pop-up Screens ..................................................................308
6.10.2 Using Menu ................................................................................309
6.10.3 Using Editor................................................................................310
6.11 Creating New Wizards .......................................................................314
6.11.1 Creating a Wizard Definition .........................................................315
6.11.1.1 Opening the Sterling RCP Wizard Editor .....................................315
6.11.1.2 Adding a Wizard Rule ..............................................................316
6.11.1.3 Adding a Wizard Page .............................................................317
6.11.1.4 Adding a Sub-task ..................................................................318
6.11.1.5 Adding a Wizard Transition ......................................................319
6.11.2 Creating Wizard Components ........................................................320
6.11.2.1 Creating a Wizard...................................................................320
18 Customization Guide
6.11.2.1.1 Creating Wizard Class ........................................................ 320
6.11.2.1.2 Creating Wizard Behavior Class ........................................... 324
6.11.2.2 Creating a Wizard Page ........................................................... 327
6.11.2.2.1 Creating Wizard Page Class ................................................ 327
6.11.2.2.2 Creating Wizard Page Behavior Class ................................... 331
6.11.2.3 Creating a Wizard Rule............................................................ 333
6.11.2.4 Registering Commands File...................................................... 337
6.12 Adding New Wizards to a Sterling Rich Client Application ....................... 337
6.12.1 Using Pop-up Screens .................................................................. 337
6.12.2 Using Menu ................................................................................338
6.12.3 Using Editor ............................................................................... 339
6.13 Creating Related Tasks ..................................................................... 343
6.13.1 Extending the YRCRelatedTasks Extension Point .............................. 344
6.13.2 Extending the YRCRelatedTaskCategories Extension Point ................. 347
6.13.3 Extending the YRCRelatedTaskGroups Extension Point...................... 349
6.13.4 Extending the YRCRelatedTasksDisplayer Extension Point ................. 350
6.13.5 Extending the YRCRelatedTasksExtensionContributor Extension Point . 352
6.14 Creating Commands ......................................................................... 354
6.14.1 Defining Namespaces................................................................... 357
6.14.2 Overriding Commands ................................................................. 359
6.15 Defining and Overriding Hot Keys ....................................................... 359
6.15.1 Defining Hot Keys ....................................................................... 359
6.15.1.1 Defining a Command .............................................................. 360
6.15.1.2 Defining a Key Binding ............................................................ 361
6.15.1.3 Defining an Action .................................................................. 363
6.15.2 Overriding Hot Keys .................................................................... 363
6.15.2.1 Disabling Related Task Hot Keys............................................... 365
6.16 Template Merging ............................................................................ 366
6.17 Adding New Related Tasks and Hiding Existing Related Tasks ................. 367
6.17.1 Adding New Related Tasks............................................................ 367
6.17.2 Hiding Existing Related Tasks........................................................ 368
6.18 Registering and Using the Shared Tasks .............................................. 368
6.18.1 Registering Shared Tasks ............................................................. 368
6.18.2 Using Shared Tasks ..................................................................... 371
6.19 Theming the Sterling Rich Client Application ........................................ 372
19
6.19.1 Theming Controls ........................................................................375
6.20 Adding or Removing Menus ..............................................................376
6.21 Setting the Extension Model...............................................................376
6.22 Configuring SSL in the Sterling RCP ....................................................377
6.22.1 Adding the Hostname Verifier........................................................377
6.23 Configuring SSO in a Sterling Rich Client Application .............................378
6.24 Using the Sterling RCP Extensibility Tool..............................................381
6.24.1 Customizing Screens....................................................................381
6.24.1.1 Starting the Rich Client Platform Extensibility Tool ......................382
6.24.1.1.1 Loading Extension File........................................................382
6.24.1.2 Viewing Screen Information .....................................................384
6.24.1.3 Viewing Control Information ....................................................386
6.24.1.4 Adding New Fields ..................................................................387
6.24.1.4.1 Adding a Label ..................................................................388
6.24.1.4.2 Adding a Button ................................................................396
6.24.1.4.3 Adding a Checkbox ............................................................401
6.24.1.4.4 Adding a Radio Button .......................................................405
6.24.1.4.5 Adding a Text Box .............................................................407
6.24.1.4.6 Adding a Styled Text..........................................................411
6.24.1.4.7 Adding a Combo Box..........................................................413
6.24.1.4.8 Adding a List Box ..............................................................417
6.24.1.4.9 Adding a Standard Or Advanced Table Column ......................419
6.24.1.4.10 Adding a Link....................................................................425
6.24.1.4.11 Adding a Composite ...........................................................428
6.24.1.4.12 Adding a Group .................................................................429
6.24.1.4.13 Adding an External Panel ....................................................431
6.24.1.5 Moving Fields and Table Columns .............................................434
6.24.1.5.1 Moving a Field...................................................................434
6.24.1.5.2 Moving Table Columns .......................................................435
6.24.1.6 Adding Related Tasks..............................................................437
6.24.1.7 Creating Extension Behavior ....................................................442
6.24.1.8 Configuring Hot Keys ..............................................................443
6.24.1.9 Resolving Hot Key Conflicts......................................................445
6.24.1.10 Modifying or Deleting Newly Added Fields ..................................447
6.24.1.10.1 Modifying a Newly Added Label ...........................................447
20 Customization Guide
6.24.1.10.2 Modifying a Newly Added Button ......................................... 454
6.24.1.10.3 Modifying a Newly Added Checkbox ..................................... 456
6.24.1.10.4 Modifying a Newly Added Radio Button................................. 457
6.24.1.10.5 Modifying a Newly Added Text Box ...................................... 459
6.24.1.10.6 Modifying a Newly Added Styled Text ................................... 462
6.24.1.10.7 Modifying a Newly Added Combo Box ................................... 464
6.24.1.10.8 Modifying a Newly Added List Box........................................ 466
6.24.1.10.9 Modifying a Newly Added Table Column................................ 468
6.24.1.10.10 Modifying a Newly Added Link ............................................. 470
6.24.1.10.11 Modifying a Newly Added Composite .................................... 472
6.24.1.10.12 Modifying a Newly Added Group .......................................... 474
6.24.1.11 Modifying or Deleting an Existing Field ...................................... 476
6.24.1.11.1 Modifying an Existing Label, Composite, or Group .................. 476
6.24.1.11.2 Modifying an Existing Button, Checkbox, Radio Button, List Box,
or Link ............................................................................. 478
6.24.1.11.3 Modifying an Existing Text Box ............................................ 480
6.24.1.11.4 Modifying an Existing Styled text ......................................... 482
6.24.1.11.5 Modifying an Existing Table Column ..................................... 483
6.24.1.11.6 Modifying an Existing Combo Box ........................................ 485
6.24.1.12 Synchronizing Differences ....................................................... 487
6.24.1.12.1 Synchronizing Bundle Entries .............................................. 487
6.24.1.12.2 Synchronizing Templates.................................................... 490
6.24.1.12.3 Synchronizing Theme Files ................................................. 491
6.24.1.12.4 Synchronizing Extension Behavior ....................................... 492
6.24.1.12.5 Synchronizing Related Tasks............................................... 495
6.24.1.13 Showing Hidden and Disabled Fields ......................................... 496
6.24.1.14 Adding Secure APIs ................................................................ 497
6.24.1.15 Viewing Shared Tasks ............................................................. 500
6.25 Building and Deploying RCP Extensions ............................................... 503
6.25.1 Building RCP Extensions ............................................................... 504
6.25.2 Deploying RCP Extensions ............................................................ 506
21
7 Extending the Sterling Multi-Channel Fulfillment Solution
Database
7.1 Guidelines for Extending the Sterling Multi-Channel Fulfillment Solution
Database ........................................................................................507
7.1.1 Guidelines for Adding Columns to a Standard Table..........................508
7.1.2 Guidelines for Adding Non-Unique Indices to a Standard Table ..........509
7.1.3 Guidelines for Adding Foreign Key Elements to a Standard Table .......510
7.1.4 Guidelines for Adding Text Search Index Elements to a Standard Table....
510
7.2 Extending the Sterling Multi-Channel Fulfillment Solution Database Schema ..
510
7.2.1 Adding a Column to a Standard Table ............................................511
7.2.2 Adding Unique Tag Identifiers or Descriptors to a Standard Table.......514
7.2.2.1 Extending Tables When Adding Unique Tag Identifiers .................515
7.2.2.2 Extending Tables When Adding Unique Tag Descriptors ...............516
7.2.3 Adding Non-Unique Indices to a Standard Table ..............................516
7.2.4 Adding Foreign Key Elements to a Standard Table ...........................518
7.2.5 Adding Text Search Indices to a Standard Table ..............................520
7.2.6 Creating Custom and Hang-off Tables ............................................521
7.2.6.1 Steps to create a custom table .................................................523
7.2.6.2 Steps to create a hang-off table ...............................................529
7.2.6.2.1 Purging Data from Hang-Off Tables......................................535
7.3 Generating Audit References for Entities ..............................................536
7.4 Extending API Templates...................................................................538
7.4.1 Including Extended Attributes in the API Template ...........................538
7.4.2 Including Custom and Hang-Off Entities in the API Template .............539
7.4.3 Configuring Services for Custom and Hang-off APIs..........................542
7.5 Custom Code Requirements to Avoid Deadlocks ...................................544
8 Programming Transactions
8.1 Services..........................................................................................547
8.1.1 Method of Invocation ...................................................................548
8.1.2 The Business Function Library .......................................................549
8.1.3 Message Size ..............................................................................550
8.1.4 Exception Handling ......................................................................551
22 Customization Guide
8.2 APIs ............................................................................................... 551
8.2.1 API Behavior .............................................................................. 551
8.2.2 Types of APIs ............................................................................. 552
8.2.3 Date-Time Handling..................................................................... 554
8.2.3.1 Specifying Time Zones ............................................................ 555
8.2.3.2 Using Date-Time Syntax.......................................................... 555
8.2.4 API Input XML Files ..................................................................... 557
8.2.5 Forming Queries in the Input XML of List APIs ................................. 559
8.2.6 Sorting Through OrderBy Element in the Input XML of List APIs ......... 561
8.2.7 Support for CreateTS and ModifyTS in Input and Output XML Files ..... 562
8.2.8 API Output XML Files ................................................................... 562
8.2.9 Output XML Templates................................................................. 563
8.2.10 Extending an Output XML Template ............................................... 564
8.2.11 Best Practices for Creating Custom Output XML Templates................ 565
8.2.12 Customizing an Output Template................................................... 569
8.2.13 Defining and Deploying a Static Template ....................................... 569
8.2.14 Defining and Deploying a Dynamic Template................................... 571
8.2.15 Understanding the Output XML Templates ...................................... 572
8.2.15.1 API Templates ....................................................................... 572
8.2.15.2 Event Templates .................................................................... 573
8.2.16 DTD and XSD Generator............................................................... 574
8.2.17 Defining Complex Queries ............................................................ 578
8.3 Time Triggered Transactions .............................................................. 580
8.3.1 Extending Standard Transactions................................................... 581
8.3.2 Using User Exits to Extend Standard Transactions............................ 581
8.3.2.1 Implementing and Deploying User Exits .................................... 582
8.3.2.2 Guidelines for Usage of User Exits ............................................ 582
8.3.3 Using Event Handlers to Extend Standard Transactions .................... 583
8.3.4 Configuring Events ...................................................................... 583
8.3.4.1 E-Mail Message Event Handler.................................................. 584
8.3.4.2 E-Mail Templates.................................................................... 584
8.3.5 Alert Console Event Handler ......................................................... 585
8.3.6 Exception Alert Templates ............................................................ 585
8.3.7 Publish Event Handler .................................................................. 587
8.3.8 Execute Event Handler ................................................................. 587
23
8.3.9 Java Extension ............................................................................587
8.3.10 Database Extension Using Stored Procedures ..................................587
8.3.11 HTTP Extension ...........................................................................588
8.3.12 COM Extension............................................................................589
8.3.13 Event Chaining............................................................................589
8.4 Customizing Condition Builder Fields ...................................................591
8.4.1 Adding Custom Attributes by Process Type .....................................591
8.4.2 Adding Custom Attributes during Condition Definition .......................594
8.4.3 Providing Condition Properties in Dynamic Condition ........................596
8.4.4 Providing Condition Cases for an Advanced XML Condition ................597
8.4.5 Creating and Modifying Advanced XML Conditions ............................598
8.4.5.1 What is Greex? ......................................................................598
8.4.5.2 What is Greex Syntax? ............................................................598
8.4.5.3 Writing Custom Greex Functions...............................................601
8.4.5.4 Localizing the Greex Syntax .....................................................603
8.4.5.5 Logging Information for the Greex Rule .....................................603
8.4.5.6 Creating an Advanced XML Condition using the Sterling Greex Editor..
603
8.4.5.6.1 Installing Prerequisite Software Components .........................604
8.4.5.6.2 Creating a Java Project ......................................................606
8.4.5.6.3 Running the Greex Model Wizard .........................................607
8.4.5.6.4 Creating a New Advanced XML Condition ..............................609
8.4.5.6.5 Validating an Advanced XML Condition .................................618
8.4.5.6.6 Loading Advanced XML Conditions into the Database..............619
8.4.5.6.7 Importing Advanced XML Conditions From the Database .........623
8.4.5.7 Modifying an Advanced XML Condition.......................................626
8.5 Dynamic Configuration Using Variables................................................626
8.6 Creating Custom Transactions............................................................628
8.7 Creating Extended APIs.....................................................................629
8.7.1 Implementing the Error Sequence User Exit ....................................631
8.7.2 Implementing the YIFExceptionGroupFinder Interface ......................631
8.7.3 Exception Handling in Extended APIs .............................................632
8.8 Creating Custom Time-Triggered Transactions......................................632
8.8.1 Creating Custom Non Task-Based Time-Triggered Transactions .........634
8.8.2 Creating Custom Task-Based Time-Triggered Transactions................634
24 Customization Guide
8.9 External Transaction Coordination ...................................................... 636
8.10 Invoking APIs and Services ............................................................... 639
8.10.1 Invoking APIs from the Client Environment ..................................... 639
8.10.2 Invoking Services and APIs........................................................... 641
8.11 Transactional Data Security ............................................................... 644
8.11.1 User Access Control ..................................................................... 645
8.11.2 Single Sign On ............................................................................ 645
8.11.3 Data Encryption .......................................................................... 645
8.11.4 Encryption Logic in the Sterling Multi-Channel Fulfillment Solution ..... 645
8.11.5 Disabling Encryption and Decryption .............................................. 647
8.11.6 Choosing a Deployment Strategy................................................... 647
8.11.7 Encryption Usage in the Sterling Multi-Channel Fulfillment Solution .... 648
8.11.8 Encrypting Credit Card Numbers ................................................... 649
8.11.9 Encrypting Properties................................................................... 650
25
B.3 Workbench ......................................................................................672
B.4 Plugin Manifest Editor .......................................................................673
B.4.1 Overview ...................................................................................673
B.4.2 Dependencies .............................................................................673
B.4.3 Runtime .....................................................................................673
B.4.4 Extensions .................................................................................673
B.4.5 Extension Points..........................................................................673
B.4.6 Build .........................................................................................674
B.4.7 Manifest.mf ................................................................................674
B.4.8 Plugin.xml ..................................................................................674
B.4.9 Build.properties...........................................................................674
B.5 YRCPluginAutoLoader Extension Point .................................................674
B.6 Creating New Actions........................................................................675
B.7 Registering a Plugin ..........................................................................678
B.8 Registering Plugin Files .....................................................................678
B.8.1 Registering Bundle File.................................................................679
B.8.2 Registering Theme File.................................................................680
B.8.3 Registering Configuration File........................................................680
B.8.4 Registering Commands File...........................................................681
B.8.5 Registering Extension File.............................................................682
B.9 Validating Controls ...........................................................................682
B.10 Custom Data Formatting ...................................................................683
B.11 Siblings...........................................................................................686
B.12 RCP Utilities.....................................................................................687
B.12.1 Viewing Screen Models.................................................................687
B.12.1.1 Saving Models as Templates ....................................................688
26 Customization Guide
C.2.3 Conventions for Naming JSP Files and Directories ............................ 699
C.2.4 Conventions for Naming Controls .................................................. 700
C.2.5 Internationalization ..................................................................... 701
C.2.6 Validating Your HTML and CCS Files ............................................... 701
C.3 CSS Theme File Reference................................................................. 701
C.4 JSP Functions .................................................................................. 706
C.4.1 changeSessionLocale ................................................................... 706
C.4.2 equals ....................................................................................... 707
C.4.3 getCheckBoxOptions.................................................................... 707
C.4.4 getColor..................................................................................... 708
C.4.5 getComboOptions........................................................................ 708
C.4.6 getComboText ............................................................................ 709
C.4.7 getDateOrTimePart...................................................................... 710
C.4.8 getDateValue.............................................................................. 711
C.4.9 getDBString ............................................................................... 712
C.4.10 getDetailHrefOptions ................................................................... 712
C.4.11 getDetailHrefOptions (with additional parameter) ............................ 714
C.4.12 getDoubleFromLocalizedString ...................................................... 716
C.4.13 getElement................................................................................. 717
C.4.14 getImageOptions ........................................................................ 718
C.4.15 getLocale ................................................................................... 719
C.4.16 getLocalizedStringFromDouble ...................................................... 719
C.4.17 getLocalizedStringFromInt ............................................................ 720
C.4.18 getLoopingElementList ................................................................. 721
C.4.19 getNumericValue......................................................................... 722
C.4.20 getParameter ............................................................................. 723
C.4.21 getRadioOptions.......................................................................... 725
C.4.22 getRequestDOM .......................................................................... 726
C.4.23 getSearchCriteriaValueWithDefaulting ............................................ 727
C.4.24 getTextAreaOptions ..................................................................... 728
C.4.25 getTextOptions ........................................................................... 728
C.4.26 getUITableSize ........................................................................... 730
C.4.27 getValue .................................................................................... 730
C.4.28 getValue - Overloaded ................................................................. 731
C.4.29 goToDetailView ........................................................................... 731
27
C.4.30 isModificationAllowed ...................................................................732
C.4.31 isPopupWindow ...........................................................................733
C.4.32 isTrue ........................................................................................734
C.4.33 isVoid ........................................................................................735
C.4.34 resolveValue...............................................................................735
C.4.35 showEncryptedCreditCardNo .........................................................736
C.4.36 userHasOverridePermissions .........................................................736
C.4.37 yfsGetCheckBoxOptions ...............................................................736
C.4.38 yfsGetComboOptions ...................................................................737
C.4.39 yfsGetImageOptions ....................................................................738
C.4.40 yfsGetTemplateRowOptions ..........................................................739
C.4.41 yfsGetTextAreaOptions.................................................................741
C.4.42 yfsGetTextOptions .......................................................................742
C.5 JSP Tag Library ................................................................................743
C.5.1 callApi .......................................................................................743
C.5.2 callAPI (Alternative Method) .........................................................744
C.5.3 getXMLValue...............................................................................746
C.5.4 getXMLValueI18NDB ....................................................................747
C.5.5 hasXMLNode...............................................................................747
C.5.6 i18n ..........................................................................................748
C.5.7 i18ndb .......................................................................................749
C.5.8 loopOptions ................................................................................750
C.5.9 loopXML .....................................................................................751
C.5.10 makeXMLInput............................................................................753
C.5.11 makeXMLKey ..............................................................................754
C.6 JavaScript Functions .........................................................................754
C.6.1 callLookup ..................................................................................756
C.6.2 doCheckAll .................................................................................757
C.6.3 doCheckFirstLevel .......................................................................758
C.6.4 expandCollapseDetails .................................................................759
C.6.5 getAttributeNameFromBinding ......................................................762
C.6.6 getCurrentSearchViewId...............................................................762
C.6.7 getCurrentViewId ........................................................................763
C.6.8 getObjectByAttrName ..................................................................764
C.6.9 getParentObject ..........................................................................765
28 Customization Guide
C.6.10 goToURL .................................................................................... 766
C.6.11 ignoreChangeNames.................................................................... 766
C.6.12 invokeCalendar ........................................................................... 767
C.6.13 invokeTimeLookup ...................................................................... 768
C.6.14 showDetailFor............................................................................. 769
C.6.15 showDetailForViewGroupId ........................................................... 771
C.6.16 showHelp ................................................................................... 772
C.6.17 showPopupDetailFor .................................................................... 773
C.6.18 validateControlValues .................................................................. 775
C.6.19 yfcAllowSingleSelection ................................................................ 776
C.6.20 yfcBodyOnLoad ........................................................................... 777
C.6.21 yfcChangeDetailView ................................................................... 778
C.6.22 yfcChangeListView ...................................................................... 778
C.6.23 yfcCheckAllToSingleAPI ................................................................ 779
C.6.24 yfcDisplayOnlySelectedLines ......................................................... 780
C.6.25 yfcDoNotPromptForChanges ......................................................... 782
C.6.26 yfcDoNotPromptForChangesForActions ........................................... 783
C.6.27 yfcGetCurrentStyleSheet .............................................................. 784
C.6.28 yfcGetSaveSearchHandle ............................................................. 784
C.6.29 yfcGetSearchHandle .................................................................... 785
C.6.30 yfcHasControlChanged ................................................................. 786
C.6.31 yfcMultiSelectToSingleAPI............................................................. 787
C.6.32 yfcMultiSelectToSingleAPIOnAction ................................................ 789
C.6.33 yfcSetControlAsUnchanged ........................................................... 791
C.6.34 yfcShowDefaultDetailPopupForEntity .............................................. 792
C.6.35 yfcShowDetailPopup .................................................................... 793
C.6.36 yfcShowDetailPopupWithDynamicKey............................................. 795
C.6.37 yfcShowDetailPopupWithKeys ....................................................... 796
C.6.38 yfcShowDetailPopupWithParams.................................................... 797
C.6.39 yfcShowDetailPopupWithKeysAndParams........................................ 799
C.6.40 yfcShowListPopupWithParams ....................................................... 800
C.6.41 yfcShowSearchPopup................................................................... 802
C.6.42 yfcSpecialChangeNames............................................................... 803
C.6.43 yfcSplitLine ................................................................................ 804
C.6.44 yfcValidateMandatoryNodes .......................................................... 808
29
C.6.45 yfcFindErrorsOnPage....................................................................809
C.6.46 setRetrievedRecordCount .............................................................809
C.7 Data Type Reference ........................................................................810
Index
30 Customization Guide
Preface
Intended Audience
This manual is intended for use by those who are responsible for
customizing the Sterling Multi-Channel Fulfillment Solution.
Structure
Each chapter in this manual is organized in the same sequence in which
you navigate through the user interface. For example, a chapter first
describes how to modify the Sign In screen before it describes how to
modify screens you see at a later point. However, you do not need to
read the topics in sequential order since each topic describes a separate,
self-contained task. Each topic is organized in the following manner:
Q
Explanation of concept
Q
Description of default behavior
Q
Information about what you can and cannot modify
Q
Step-by-step procedures
31
This manual contains the following sections:
Chapter 1, "Introduction"
This chapter discusses extensibility in general terms and provides an
overview of the Sterling Service Definition Framework and Sterling
Presentation Framework.
32 Customization Guide
Chapter 8, "Programming Transactions"
This chapter explains how to invoke Sterling Multi-Channel Fulfillment
Solution and extended APIs and how to program user exits and event
handlers.
33
Q
Sterling Multi-Channel Fulfillment Solution System Management
Guide
Q
Sterling Multi-Channel Fulfillment Solution Localization Guide
Q
Sterling Multi-Channel Fulfillment Solution Customization Guide
Q
Sterling Multi-Channel Fulfillment Solution Integration Guide
Q
Sterling Selling and Fulfillment Suite Integration Guide
Q
Sterling Multi-Channel Fulfillment Solution Product Concepts
Q
Sterling Warehouse Management System Concepts Guide
Q
Sterling Multi-Channel Fulfillment Solution Platform Configuration
Guide
Q
Sterling Distributed Order Management Configuration Guide
Q
Sterling Supply Collaboration Configuration Guide
Q
Sterling Global Inventory Visibility Configuration Guide
Q
Sterling Product Management Configuration Guide
Q
Sterling Logistics Management Configuration Guide
Q
Sterling Reverse Logistics Configuration Guide
Q
Sterling Warehouse Management System Configuration Guide
Q
Sterling Multi-Channel Fulfillment Solution Platform User Guide
Q
Sterling Distributed Order Management User Guide
Q
Sterling Supply Collaboration User Guide
Q
Sterling Global Inventory Visibility User Guide
Q
Sterling Logistics Management User Guide
Q
Sterling Reverse Logistics User Guide
Q
Sterling Warehouse Management System User Guide
Q
Sterling Multi-Channel Fulfillment Solution Mobile Application User
Guide
Q
Sterling Multi-Channel Fulfillment Solution Analytics Guide
Q
Sterling Multi-Channel Fulfillment Solution Javadocs
34 Customization Guide
Q
Sterling Multi-Channel Fulfillment Solution Glossary
Q
Sterling Parcel Carrier Adapter Guide
Conventions
The following conventions may be used in this manual:
Convention Meaning
... Ellipsis represents information that has been
omitted.
<> Angle brackets indicate user-supplied input.
35
Convention Meaning
<YFS_HOME> For releases 7.3, 7.5, and 7.5 SP1, this is the
user-supplied location of the Sterling Supply Chain
Applications installation directory.
For releases 7.7, 7.9, and 7.11, this is the
user-supplied location of the <YANTRA_
HOME>/Runtime directory.
For release 8.0, the <YANTRA_HOME>/Runtime
directory is no longer used and this is the same
location as <INSTALL_DIR>.
<YFS_HOME_OLD> This is the <YANTRA_HOME>/Runtime directory of
previously installed releases. This is only applicable
for Releases 7.7, 7.9, and 7.11.
<ANALYTICS_HOME> User-supplied location of the Sterling
Multi-Channel Fulfillment Solution Analytics
installation directory.
Note: This convention is used only in the
Sterling Multi-Channel Fulfillment Solution Analytics
Guide.
<COGNOS_HOME> User-supplied location of the Cognos installation
directory.
Note: This convention is used only in the
Sterling Multi-Channel Fulfillment Solution Analytics
Guide.
<MQ_JAVA_INSTALL_ User-supplied location of the IBM WebSphere MQ
PATH> Java components installation directory.
Note: This convention is used only in the
Sterling Multi-Channel Fulfillment Solution System
Management Guide.
<DB> Refers to the Oracle, DB2, or MSSQL
depending on the database server.
<DB_TYPE> Depending on the database used, considers the
value oracle, db2, or sqlserver.
36 Customization Guide
1
Introduction
Transactional Extensibility
The Sterling Multi-Channel Fulfillment Solution provides a Service
Definition Framework, which is an infrastructure that automates the
conversion and transportation of data between the Sterling Multi-Channel
Fulfillment Solution and third-party applications, and then converts that
data into formats readable by each system. The Service Definition
Introduction 37
Sterling Multi-Channel Fulfillment Solution Consoles User Interface
Database Extensibility
In addition to customizing the user interface and transactions, you can
extend the database to store additional attributes specific for your
business.
38 Customization Guide
Sterling Multi-Channel Fulfillment Solution Configurator User Interface
The Application Consoles UI uses HTML within Java Server Pages (JSPs).
The user interface layer accesses the exposed APIs through services
defined in the Service Definition Framework, which ensures that only
exposed APIs are used.
The UI layer of the Service Definition Framework uses very minimal XML
manipulation. Wherever significant manipulation of XML output becomes
necessary, changes to the APIs provide a more UI friendly output.
Figure 11 shows the technical architecture of the Application Consoles
User Interface.
Introduction 39
Sterling Multi-Channel Fulfillment Solution Mobile User Interface
40 Customization Guide
Sterling Multi-Channel Fulfillment Solution Transactions
Introduction 41
Sterling Multi-Channel Fulfillment Solution Transactions
Q
Event handlers to route the data published by the Sterling
Multi-Channel Fulfillment Solution to the transport services layer
Q
Time-triggered transactions that monitor and run tasks as needed
The Service Definition Framework provides error checking through the
log4j utility, which writes both trace and debug information to a log file.
In addition, you can extend the Sterling Multi-Channel Fulfillment
Solution by creating the following types of custom code:
Q
Extended (custom) APIs
Q
User exits that override the default business algorithm
Q
User exits that extend the business algorithm used by APIs and
time-triggered transactions
Q
Custom time-triggered transactions
42 Customization Guide
2
Getting Started
Getting Started 43
Preparing a Development Environment on WebLogic
44 Customization Guide
Preparing a Development Environment on WebLogic
Getting Started 45
Preparing a Development Environment on WebLogic
2. Start your WebLogic server and open the WebLogic system console.
The system console can be accessed using a URL similar to the
following:
http://<hostname or ip-address>:<port number of your WebLogic
Server>/console
46 Customization Guide
Preparing a Development Environment on WebLogic
Getting Started 47
Preparing a Development Environment on WebSphere
48 Customization Guide
Preparing a Development Environment on WebSphere
Getting Started 49
Preparing a Development Environment on WebSphere
For example:
Q
If you are extending your database, build and deploy the
entities.jar and copy the jar to the <WAS_
HOME>/AppServer/profiles/<PROFILE_
NAME>/installedApps/<CELL_NAME>/<APP_NAME> directory.
Q
If you are extending UI resources, build and deploy the
resources.jar, and copy the jar to the <WAS_
HOME>/AppServer/profiles/<PROFILE_
NAME>/installedApps/<CELL_NAME>/<APP_NAME> directory.
5. Copy your customized files (for example, localization literal files,
JSPs), to the appropriate <WAS_
HOME>/AppServer/profiles/<PROFILE_
NAME>/installedApps/<CELL_NAME>/<APP_
NAME>/yantra.war/<Module_Name> directory.
For example, if you have some customizations in the Catalog module,
add the files in the <WAS_HOME>/AppServer/profiles/<PROFILE_
NAME>/installedApps/<CELL_NAME>/<APP_NAME>/yantra.war/ycm
directory.
6. Restart the application server.
7. Test your customizations using the following standards:
50 Customization Guide
Preparing the Development Environment on JBoss
Getting Started 51
Preparing the Development Environment on JBoss
directory for testing. JBoss identifies the changes and redeploys the
application (Hot Deployment).
52 Customization Guide
Preparing the Development Environment on JBoss
Important:
Getting Started 53
Configuring the UI Cache Refresh Actions
54 Customization Guide
Developing and Testing in the Development Environment
2. Select the refresh cache icon that fits your needs as follows:
If you want to update one entity and its child resources - Select
the specific entity and select the Refresh Entity Cache icon
Getting Started 55
Using the Sterling Multi-Channel Fulfillment Solution with Microsoft COM+
56 Customization Guide
Using the Sterling Multi-Channel Fulfillment Solution with Microsoft COM+
identity under which the application is run. Make sure that the user
belongs to the Administrators group. Click Next and then Click Finish.
The newly created Sterling Multi-Channel Fulfillment Solution COM+
application appears under the Component Services tree.
Now you can add components to your Sterling Multi-Channel Fulfillment
Solution COM+ application.
Getting Started 57
Using the Sterling Multi-Channel Fulfillment Solution with Microsoft COM+
58 Customization Guide
Using the Sterling Multi-Channel Fulfillment Solution with Microsoft COM+
Getting Started 59
Using the Sterling Multi-Channel Fulfillment Solution with Microsoft COM+
60 Customization Guide
3
Customizing the Console JSP Interface
Q
Sterling Multi-Channel Fulfillment Solution Consoles - The standard UI
for creating, tracking, and viewing orders, item inventory, and returns
Q
Sterling Multi-Channel Fulfillment Solution Configurator - The UI for
configuring the Sterling Multi-Channel Fulfillment Solution. For
additional configuration information, see Chapter 4, "Customizing the
Configurator Swing Interface".
Compare JSPs
As part of the Sterling Multi-Channel Fulfillment Solution extensibility,
you can extend JSP files of the current release.
When Sterling Commerce releases service packs or major releases and,
in some cases, a user interface hot fix, you need to complete a JSP
comparison and reconciliation. During the JSP comparison process you
must compare the following files:
1. The original JSP shipped with your original Sterling Multi-Channel
Fulfillment Solution product version
2. The extended JSP for the same JSP as Step 1
3. The same Sterling Multi-Channel Fulfillment Solution JSP shipped as
part of the new release.
In order to facilitate the reconciliation process, Sterling Commerce
recommends that you consider purchasing a difference tool capable of
performing a three-way comparison. For example, an inexpensive tool is
Araxis. Please note that Sterling Commerce does not resell this difference
tool, nor do we warranty or guarantee it. It is merely provided as an
example of an inexpensive tool. You are advised to do your own research
on three-way comparison tools and choose the one appropriate for your
needs.
62 Customization Guide
Before You Begin
Build in Usability
Any new views you develop should look and behave like the product
views, so before you begin developing, gain an understanding of how the
default views behave. For more information on the basic product look
and feel, see Introducing the Screen Layout and Behavior on page 74.
64 Customization Guide
Defining Centralized Themes
Q
Sapphire (default)
Q
Earth
Q
Jade
A theme is defined centrally through CSS and XML files, depending on
which application uses it. This means you should not hard-code colors
and fonts of the user interface controls to individual screens. Instead,
use the directions provided in this guide. Each theme is used throughout
the Application Consoles and Configurator. Ideally when defining themes,
you should create the same theme for both applications in order to
ensure a consistent user experience.
2. Edit your new XML file to define the values you want to use for colors
and fonts for each Color Name and Font Name element you want to
display within the Sterling Multi-Channel Fulfillment Solution
Configurator and within any bar or pie charts.
Note: The fonts defined in the new theme XML must exist
on the system you are using.
66 Customization Guide
Customizing the Sign In Screen
login.jsp
(extensible)
68 Customization Guide
Customizing the Sign In Screen
This displays the Sign In screen in the specified locale. After you log
in, the application opens in the users default locale.
Q
If you want to launch the Sterling Multi-Channel Fulfillment Solution
and open a specific view, log in as a Sterling Multi-Channel Fulfillment
Solution user, and open the view by using the following syntax
(illustrates opening the default order search view):
/yantra/console/start.jsp?UserId=<LoginID>&Password=<PassPhrase>
&Redirect=/console/order.search
In either case, if login fails, the browser opens the Sterling Multi-Channel
Fulfillment Solution Sign In screen, which prompts the user to enter
Login ID and Password.
70 Customization Guide
Adding Corporate Logos
When a user logs into the Sterling Multi-Channel Fulfillment Solution, the
getMenuHierarchyForUser() API is called and the output is stored in the
session object. This reduces any overhead for building the menu for
each screen, and it enables the Menu Bar to be configurable at the user
level, (for information on configuring the Menu, see Customizing the
Menu Structure on page 122).
72 Customization Guide
Adding Corporate Logos
When displaying the About Box, the application reads the version number
based on predetermined logic. It is strongly advised that you retain the
logic of displaying the version number when customizing the logo.
If you have purchased any Packaged Composite Applications (PCA) from
Sterling Commerce, the version number of that product also appears in
the About Box.
If you want to add corporate branding information to the About Box, you
can customize the logo displayed.
to <INSTALL_
DIR>/repository/eardata/yantra/war/extn/console/about.jsp.
2. Write your own HTML in your new about.jsp page.
3. Change your copy of the menubar.jsp file so that the onclick event
of the <img> tag calls your new about.jsp file.
74 Customization Guide
Introducing the Screen Layout and Behavior
Q
Search view
Q
List view
Q
Detail view
For detailed descriptions of these views, see Introducing the Types of
Screens on page 77, which describes them in detail.
Menu
List View
Search View or Detail View
4 pop-up
Window
Search List 2
View View
Detail
View
76 Customization Guide
Introducing the Types of Screens
Q
Purchase Order Console
Q
Return Console
Q
System Management Console
Q
Template Console
These business-related entities can be broken down into more granular
details. For example, Order Management can be broken down to more
granular entities, like order, shipment, and container. You can also create
your own entities.
The Resource Configurator enables you to customize and create entities
that suit your business needs. Figure 36 shows how entities appear in
the Resource Configurator. The hierarchical order is based on the default
order of navigation.
Each entity has a default search view, list view, and detail view. A default
view is determined by the ordering of these views within the Resource
Configurator.
For example, if the Order entity has four search views, the default search
view is determined as the one with the lowest resource sequence number
among the four search views.
78 Customization Guide
Introducing the Types of Screens
Under each entity resource, you can configure one detail API and one list
API. The detail API configured is automatically called when a detail view
of that entity is opened. The list API is called when a list view of that
entity is opened.
You can prevent this default API from being called for a specific view by
selecting the Ignore Default API parameter in the resource configuration
screen.
For more information about resource sequencing, see the Sterling
Multi-Channel Fulfillment Solution Platform Configuration Guide.
80 Customization Guide
Introducing the Types of Screens
82 Customization Guide
Introducing the Types of Screens
Q
JSP pageanchor page defined by the view ID within the Resource
Configurator.
Q
Save Actionone or more. See Section 3.7.5, "up toTypes of Actions"
on page 84.
84 Customization Guide
Customizing Views
2. Configure your JSP to detect the specified attribute in the output XML
of the API and store that attribute in a specified custom attribute of
the HTML.
3. On the client side, write an onLoad function that searches for the
specified custom attribute and then uses the showDetailFor()
JavaScript function to switch to the screen you want.
86 Customization Guide
Customizing Views
Q
Ensures a standard look and feel
Q
Ensures proper execution of application logic
5. From the Resource Configurator, navigate to your new view. Enter the
relative path to your JSP file in the JSP field. For example:
/extn/om/order/search/order_search_bystatus.jsp
6. If you want your new search view to be the default view, resequence
the new view so that the sequence number is a lower number than
that of the original view.
7. Edit your JSP file as needed. See Customizing JSP Files on page 94.
8. Select the refresh cache icon that fits your needs as follows:
If you want to update one entity and its child resources - Select
the specific entity and select the Refresh Entity Cache icon.
If you want to update all resources - Select the Refresh Cache
icon.
9. Log into the Sterling Multi-Channel Fulfillment Solution again to test
your changes.
88 Customization Guide
Customizing Views
3. From the Resource Configurator, navigate to the view ID and copy it,
including its sub-resources when prompted.
4. Copy the JSP file for the original view into the <INSTALL_
DIR>/repository/eardata/yantra/war/extn/<PathOfOriginalJSP>
/ directory.
5. From the Resource Configurator, navigate to your new view. Enter the
relative path to your JSP file in the JSP field. For example:
/extn/om/order/list/order_list_concise.jsp
6. If you want your new search view to be the default view, resequence
the new view such that the sequence number is a lower number than
that of the original view.
7. Edit your JSP file as needed. See Customizing JSP Files on page 94.
8. Select the refresh cache icon that fits your needs as follows:
If you want to update one entity and its child resources - Select
the specific entity and select the Refresh Entity Cache icon.
If you want to update all resources - Select the Refresh Cache
icon.
9. Log into the Sterling Multi-Channel Fulfillment Solution again to test
your changes.
Table 32 Controls
Control Function
Textbox getTextOptions
Select dropdown getComboOptions
Radio button getRadioOptions
Check Box getCheckBoxOptions
Hidden Inputs getTextOptions
90 Customization Guide
Customizing Views
3. From the Resource Configurator, navigate to the view ID and copy it,
including its sub-resources, when prompted.
4. Copy the JSP file for the original view into the <INSTALL_
DIR>/repository/eardata/yantra/war/extn/<PathOfOriginalJSP>
/ directory.
5. If the original view uses an anchor page and you want to customize
it, use the Resource Configurator to navigate to your new view. Enter
the relative path of your JSP file into the JSP field.
6. Edit the anchor page JSP file as needed. See Customizing JSP Files
on page 94.
7. For each inner panel you must customize, perform the following
steps:
a. Copy the JSP file for the original inner panel into the <INSTALL_
DIR>/repository/eardata/yantra/war/extn/<PathOfOriginalJ
SP>/ directory.
b. From the Resource Configurator, navigate to your new inner
panel. Enter the relative path to your JSP file in the JSP field. For
example:
/extn/om/order/detail/order_detail_header.jsp
c. Edit your inner panel JSP file as needed. See Customizing JSP
Files on page 94.
92 Customization Guide
Customizing Views
8. If you want your new detail view to be the default view, resequence
the new view so that the sequence number is a lower number than
that of the original view.
9. In order to make all links point appropriately to your new view, follow
the steps in Incorporating Your View across the Application on
page 105.
10. Select the refresh cache icon that fits your needs as follows:
If you want to update one entity and its child resources - Select
the specific entity and select the Refresh Entity Cache icon.
If you want to update all resources - Select the Refresh Cache
icon.
11. Log into the Sterling Multi-Channel Fulfillment Solution again to test
your changes.
94 Customization Guide
Customizing Views
Q
Text areas
Q
Tables
Q
Graphs
<script language="javascript"
src="/yantra/console/scripts/modificationreason.js"></script>
</td>
<td class="tablecolumnheader"><yfc:i18n>Order_#</yfc:i18n></td>
<td class="tablecolumnheader"><yfc:i18n>Status</yfc:i18n></td>
<td class="tablecolumnheader"><yfc:i18n>Enterprise</yfc:i18n></td>
<td class="tablecolumnheader"><yfc:i18n>Buyer</yfc:i18n></td>
<td class="tablecolumnheader"><yfc:i18n>Order_Date</yfc:i18n></td>
<td class="tablecolumnheader"><yfc:i18n>Total_Amount</yfc:i18n></td>
</tr>
</thead>
<tbody>
<yfc:loopXML binding="xml:/OrderList/@Order" id="Order">
<tr>
<yfc:makeXMLInput name="orderKey">
<yfc:makeXMLKey binding="xml:/Order/@OrderHeaderKey"
value="xml:/Order/@OrderHeaderKey" />
</yfc:makeXMLInput>
<td class="checkboxcolumn">
<input type="checkbox" value='<%=getParameter("orderKey")%>'
name="EntityKey"/>
</td>
<td class="tablecolumn">
<a href="javascript:showDetailFor('<%=getParameter("orderKey")%>');">
<yfc:getXMLValue binding="xml:/Order/@OrderNo"/>
</a>
</td>
<td class="tablecolumn">
<% if (isVoid(getValue("Order", "xml:/Order/@Status"))) { %>
[<yfc:i18n>Draft</yfc:i18n>]
<% } else { %>
<yfc:getXMLValue binding="xml:/Order/@Status"/>
<% } %>
<% if (equals("Y", getValue("Order",
"xml:/Order/@HoldFlag"))) { %>
<img class="icon"
onmouseover="this.style.cursor='default'"
<%=getImageOptions(YFSUIBackendConsts.HELD_ORDER, "This_order_is_held")%>/>
<% } %>
</td>
<td class="tablecolumn"><yfc:getXMLValue
binding="xml:/Order/@EnterpriseCode"/></td>
<td class="tablecolumn"><yfc:getXMLValue
binding="xml:/Order/@BuyerOrganizationCode"/></td>
<td class="tablecolumn"
sortValue="<%=getDateValue("xml:/Order/@OrderDate")%>"><yfc:getXMLValue
binding="xml:/Order/@OrderDate"/></td>
96 Customization Guide
Customizing Views
<td class="numerictablecolumn"
sortValue="<%=getNumericValue("xml:/Order/PriceInfo/@TotalAmount")%>">
<%=displayAmount(getValue("Order",
"xml:/Order/PriceInfo/@TotalAmount"), (YFCElement)
request.getAttribute("CurrencyList"), getValue("Order",
"xml:/Order/@RulesetKey"), getValue("Order",
"xml:/Order/PriceInfo/@Currency"))%>
</td>
</tr>
</yfc:loopXML>
</tbody>
</table>
This example shows include files at the top. In order to access most of
the common public JSP functions in the Sterling Presentation Framework,
most JSP files only require a reference to the <INSTALL_
DIR>/repository/eardata/platform/war/yfsjspcommon/yfsutil.jspf
file, as in the following example of an include statement:
<%@include file="/yfsjspcommon/yfsutil.jspf"%>
Q
Enterprise Code
Q
Node (only for WMS screens where node is a primary important field)
98 Customization Guide
Customizing Views
Note: Any API called for fetching data for fields within
the common_fields.jsp is done by the common JSP itself.
There is no need to define resources in your screens for
these APIs. For example, if you are showing the enterprise
code field using the common JSP, there is no need to
define the getOrganizationList() API within your
screen's resources.
3. In the JSP of your screen, call the getStatusList() API using the
callAPI tag lib immediately after the common_fields.jsp is included.
Note: You can refresh the entire screen using any of the
common fields (document type, enterprise code, or node).
There is a corresponding dynamic binding that must be
specified for each:
(xml:CommonFields:/CommonFields/@DocumentType,
xml:CommonFields:/CommonFields/@EnterpriseCode,
xml:CommonFields:/CommonFields/@Node) respectively
field, then the field appears as a combo box. If there are more then
21 records to display, then the field appears as a protected text box
with a lookup icon next to it. In this case, the only way to change the
value of the field is through the lookup. The reason for this behavior
is so that the "screen refreshing" feature can work even when there
are too many records to show in a combo box.
Q
If a user logged into the console is a node user, the node field
appears as a protected input that cannot be modified. Otherwise, the
node field displays all of the current logged-in organizations owned
nodes.
Screen Example
The following example shows how this common JSP would be used within
a search screen where two fields on the search screen need to be
refreshed whenever the enterprise code field changes.
In the JSP of all entry point screens, the common_fields.jsp is included:
<tr>
<td class="searchlabel"><yfc:i18n>field1</yfc:i18n></td>
</tr>
<tr>
<td nowrap="true" class="searchcriteriacell">
<select class="combobox" name="xml:/OrderRelease/@Field1QryType">
<yfc:loopOptions
binding="xml:/QueryTypeList/StringQueryTypes/@QueryType" name="QueryTypeDesc"
value="QueryType" selected="xml:/OrderRelease/@Field1QryType "/>
</select>
<input type="text" class="unprotectedinput"
<%=getTextOptions("xml:/OrderRelease/@Field1")%> />
</td>
</tr>
<CommonCode CodeType="UNIT_OF_MEASURE"
CallingOrganizationCode="xml:CommonFields:/CommonFields/@EnterpriseCode"/>
</Input>
<Template>
<CommonCodeList>
<CommonCode CodeValue="" CodeShortDescription=""/>
</CommonCodeList>
</Template>
</API>
</APIList>
</View>
<jsp:param name="AllowedModValue"
value='<%=getModificationAllowedValue("ShipToAddress",
"xml:/OrderRelease/AllowedModifications")%>'/>
</jsp:include>
</td>
</tr>
<tr>
<td colspan="2" >
<jsp:include page="/yfc/innerpanel.jsp" flush="true" >
<jsp:param name="CurrentInnerPanelID" value="I04"/>
</jsp:include>
</td>
</tr>
</table>
Q
Search view - Section 3.8.3, "Customizing a Search View".
Q
List view - Customizing a List View on page 88. After following the
database extensibility rules, add the field to the output template
configured for the API through the Resource Configurator.
Q
Detail view - Customizing a Detail View on page 91. After following
the database extensibility rules, add the field to the output template
configured for the API through the Resource Configurator.
<yfc:makeXMLKey binding="xml:/OrderLineDetail/@OrderLineKey"
value="xml:/OrderLine/@OrderLineKey"/>
<yfc:makeXMLKey binding="xml:/OrderLineDetail/@OrderHeaderKey"
value="xml:/Order/@OrderHeaderKey"/>
</yfc:makeXMLInput>
<td class="checkboxcolumn" >
<input type="checkbox" value='<%=getParameter("orderLineKey")%>'
name="chkEntityKey" />
</td>
This code creates a new entity key for the order line and associates this
key to a checkbox named chkEntityKey. This name can then be specified
in the action definition for any action appearing on the order lines inner
panel, for example, the View Details action.
Note that this attribute frequently is used in conjunction with the
Selection Key Name attribute that also can be defined for an action.
placed within each row of the html table. Since they are hidden inputs,
they are always posted to the API. Therefore, if the user does not change
any of the attributes of a specific record in one row, only the key
attributes are passed to the API. Some APIs consider this to be invalid
input.
A Sterling Presentation Framework JavaScript function can be used to
verify that records for which no change has been made are not posted to
the API. The yfcSpecialChangeNames() function should be called when
the page is unloaded.
For example, the following JSP code achieves this:
<script language=jscript>
window.document.body.attachEvent("onunload", processSaveRecordsForNotes)
</script>
In this example, the ID of the HTML table in the corresponding JSP is set
to the literal Notes. The second parameter, true, must be passed only if
the ID Notes consists of a new blank row. The parameter should be set
to false if you want to modify an existing row.
order_detail_instructions.jsp
order_detail_instructions_anchor.jsp
<%@include file="/yfsjspcommon/yfsutil.jspf"%>
<%@include file="/console/jsp/order.jspf" %>
For the merge logic to work properly, the following parameters have to
B be passed to identify the elements and attribute on which to perform
the merge. Please refer to Table 34.
The highlighted code indicates the changes that ensures that the data is
retained after an API exception:
<%@include file="/yfsjspcommon/yfsutil.jspf"%>
<%@ include file="/console/jsp/modificationutils.jspf" %>
<%@ include file="/yfsjspcommon/editable_util_lines.jspf" %> C
<%@ page import="com.yantra.yfs.ui.backend.*" %>
value='<%=getParameter("InstructionKey")%>' name="chkEntityKey"/>
<%}else { %>
<%}%>
</td>
<td class="tablecolumn">
<% String instTargetBinding =
"xml:/Order/Instructions/Instruction_" + InstructionCounter +
"/@InstructionType"; %>
<select <%if(bAppendOldValue) {
%>OldValue="<%=resolveValue("xml:OrigAPIInstruction:/Instruction/@Instruction
Type")%>" <%}%>
<%=yfsGetComboOptions(instTargetBinding, "xml:/Instruction/@InstructionType",
"xml:/Order/AllowedModifications")%>>
<yfc:loopOptions
binding="xml:InstructionTypeList:/CommonCodeList/@CommonCode"
name="CodeShortDescription" value="CodeValue"
selected="xml:/Instruction/@InstructionType" isLocalized="Y"
targetBinding="<%=instTargetBinding%>"/>
</select>
</td>
<td class="tablecolumn">
<table class="view" cellspacing="0" cellpadding="0">
<tr>
<td>
< textarea rows="3" cols="100
<%if(bAppendOldValue) {
G %>OldValue="<%=resolveValue("xml:OrigAPIInstruction:/Instruction/@Instruction
Text")%>" <%}%>
<%=yfsGetTextAreaOptions("xml:/Order/Instructions/Instruction_" +
InstructionCounter + "/@InstructionText","xml:/Instruction/@InstructionText",
"xml:/Order/AllowedModifications")%>><yfc:getXMLValue
binding="xml:/Instruction/@InstructionText"/></textarea>
</td>
</tr>
<tr>
<td>
<img align="absmiddle"
<%=getImageOptions(YFSUIBackendConsts.INSTRUCTION_URL, "Instruction_URL")%>/>
<input type="text" <%if(bAppendOldValue) {
%>OldValue="<%=resolveValue("xml:OrigAPIInstruction:/Instruction/@Instruction
URL")%>" <%}%>
<%=yfsGetTextOptions("xml:/Order/Instructions/Instruction_" +
InstructionCounter + "/@InstructionURL",
"xml:/Instruction/@InstructionURL","xml:/Order/AllowedModifications")%>/>
<input type="button" class="button"
value="GO" onclick="javascript:goToURL('xml:/Order/Instructions/Instruction_
<%=InstructionCounter%>/@InstructionURL');"/>
</td>
<td>
<input type="hidden"
<%=getTextOptions("xml:/Order/Instructions/Instruction_" + InstructionCounter
+ "/@InstructionDetailKey", "xml:/Instruction/@InstructionDetailKey")%>/>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</td>
</tr>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</td>
</tr>
<% } %>
</yfc:loopXML>
</tbody>
<tfoot>
<%if
(isModificationAllowed("xml:/@AddInstruction","xml:/Order/AllowedModifications
")) {%>
<tr>
<td nowrap="true" colspan="3">
<jsp:include page="/common/editabletbl.jsp" flush="true">
I <jsp:param name="ReloadOnAddLine" value="Y"/>
</jsp:include>
</td>
</tr>
<%}%>
</tfoot>
</table>
D JSP code has been added to ensure that the deletion of a row is
handled properly.
Hidden inputs have been added for user operation and number of rows
E
to add.
A map of the unique keys of the original repeating XML elements has
F been added.
The OldValue attribute of each editable field is set to the value of the
G original API output using the map previously created. This ensures the
value modified by the user is posted to the save API.
A new row is created in the editable table for each repeating XML
H element that does not contain a unique key attribute. This indicates
that the row has not yet been saved in the database and was entered
by the user before the API exception occurred.
To add a row dynamically when the user clicks on the plus icon under
the table, the /common/editabletbl.jsp file is included next. Pass "Y" for
I the ReloadOnaddLine attributes to this JSP. Each time a new row is
added, the screen refreshes. Before these code changes, the new rows
are added dynamically without refreshing the screen.
Data Lookup
Calendar Lookup
And in the lookup list view, call the following function to populate the
field from which the pop-up was invoked:
function setItemLookupValue(sItemID,sProductClass,sUOM)
{
var Obj = window.dialogArguments
if(Obj != null)
{
Obj.field1.value = sItemID;
Obj.field2.value = sProductClass;
Obj.field3.value = sUOM;
}
window.close();
}
Use Lookup icons only with modifiable fields. When you incorporate a
particular type of Lookup on field, place the appropriate icon directly to
the right of the Lookup.
</td>
<td class="tablecolumnheader"><yfc:i18n>Order_#</yfc:i18n></td>
<td class="tablecolumnheader"><yfc:i18n>Enterprise</yfc:i18n></td>
<td class="tablecolumnheader"><yfc:i18n>Buyer</yfc:i18n></td>
<td class="tablecolumnheader"><yfc:i18n>Order_Date</yfc:i18n></td>
</tr>
</thead>
<tbody>
<yfc:loopXML binding="xml:/OrderList/@Order" id="Order">
<tr>
<yfc:makeXMLInput name="orderKey">
<yfc:makeXMLKey binding="xml:/Order/@OrderHeaderKey"
value="xml:/Order/@OrderHeaderKey" />
</yfc:makeXMLInput>
<td class="checkboxcolumn">
<input type="checkbox" value='<%=getParameter("orderKey")%>'
name="EntityKey"/>
</td>
<td class="tablecolumn"><a
href="javascript:showDetailFor('<%=getParameter("orderKey")%>');">
<yfc:getXMLValue binding="xml:/Order/@OrderNo"/></a>
</td>
<td class="tablecolumn"><yfc:getXMLValue
binding="xml:/Order/@EnterpriseCode"/></td>
<td class="tablecolumn"><yfc:getXMLValue
binding="xml:/Order/@BuyerOrganizationCode"/></td>
<td class="tablecolumn"
sortValue="<%=getDateValue("xml:/Order/@OrderDate")%>"><yfc:getXMLValue
binding="xml:/Order/@OrderDate"/></td>
</tr>
</yfc:loopXML>
</tbody>
</table>
future version, you should perform your own evaluation of which charting
tool to use. The Sterling Presentation Framework does not provide a
chart-rendering API.
The way this entity key is passed to the order line detail screen differs for
the hyperlink and action routes. For the hyperlink, this key is passed to
the getDetailHrefOptions() function in the following manner:
<a <%=getDetailHrefOptions("L03", getParameter("orderLineKey"), "")%>>
<yfc:getXMLValue binding="xml:/OrderLine/@PrimeLineNo"/></a>
This causes the myFunc() function to run when the HTML is loaded. Note
that the body of the myFunc function must exist within the <INSTALL_
DIR>/repository/eardata/yantra/war/extn/scripts/om.js file.
The Sterling Presentation Framework calls the Save action for a detail
view when the Save icon is clicked. If you want to plug in your own
custom event handler for this event, configure the action to call your
JavaScript function. The function needs to be present in the <INSTALL_
DIR>/repository/eardata/yantra/war/extn/scripts/extn.js file.
The Sterling Presentation Framework invokes the list view when the
Search icon is clicked in a search view. If you want to plug in your own
custom event handler for this event, attach your JavaScript function to
the onclick event of the object returned by the yfcGetSearchHandle()
JavaScript API when the page is loaded. The example below shows how
to do this:
<script language=jscript src="/yantra/extn/scripts/om.js">
</script>
<script language=jscript>
//Get the handle to search button.
var oObj = yfcGetSearchHandle();
literals that appear on the screen if they are specific to your document
type.
b. Change the view group IDs for any Icons, Actions, Links and
JavaScript functions that call the views. The view group ID should
be changed to the new entity prefix and the view group ID that
already exists.
3. Modify the description of the new entity resource to the description of
your new document type. For all the sub-resources also, make
appropriate modifications to the descriptions and create entries for
these newly created resource keys in the <INSTALL_
DIR>/resources/extn/extnbundle.properties file, and in the
corresponding properties files for each locale.
4. Update the Sterling Multi-Channel Fulfillment Solution runtime. For
more information about updating the Sterling Multi-Channel
Fulfillment Solution runtime, see the Sterling Multi-Channel
Fulfillment Solution Installation Guide.
5. Modify the Document Type for the new resources of resource type
entity to the new Document Type.
6. Update the Related Entities Resources under the newly created entity
resources to point to the newly created resources.
7. In order to make all links point appropriately to your new view, follow
the steps in Incorporating Your View across the Application on
page 105.
8. In Alert Console, if an alert is raised for an order when you are
viewing the alert details you can click on the order and view the
details. If you want that link to also point to the main detail view of
your document type, you must customize the Alert Details view.
To customize the Alert Details view:
a. Create a new Link ID under the new detail view of Alerts.
b. Point the new Link ID to go to the newly created view of your new
document type.
c. Customize the JSP of the new Alert detail view to call the
getDetailHrefOptions() JSP utility function with a Link ID
parameter of the new document type.
d. Change the sequence of the new Alert detail view so that the new
view becomes the default Alert detail view. For details, see the
Sterling Multi-Channel Fulfillment Solution Platform Configuration
Guide.
e. In order to make all links point appropriately to your new view,
follow the steps in Incorporating Your View across the
Application on page 105.
f. In order to retrieve the Document Type of the specific order
number, configure the Alert detail view to call another API (after
the exception detail API) to retrieve the order details. Configure
the API to ignore exceptions. The API is called for all exceptions
with the order number as a parameter, but the API throws an
error if the order number is void. Since the API is configured to
ignore the exception, it is not reported to the user.
</tr>
<tr>
<td nowrap="true" class="searchcriteriacell" >
<input type="text" class="unprotectedinput"
<%=getTextOptions("xml:/Item/PrimaryInformation/@ShortDescription") %> />
</td>
</tr>
After the JSP functions and JSP tags are resolved, the HTML is formed as
follows:
<tr>
<td class="searchlabel" >Short Description</td>
</tr>
<tr>
<td nowrap="true" class="searchcriteriacell" >
<input type="text" class="unprotectedinput"
name="xml:/Item/PrimaryInformation/@ShortDescription" value=""/>
</td>
</tr>
Note that this example does not show all of the custom attributes
returned by the JSP functions. It only shows the ones relevant to this
topic.
In another example, the user enters Telephone in the input box. When
the data is posted to the server, the Sterling Presentation Framework
forms the following XML document based on the name and the value of
the input box.
<Item>
<PrimaryInformation ShortDescription="Telephone"/>
</Item>
This makes the OrderLineCounter JSP variable available for use inside of
the input XML bindings. For example:
<input type="text" <%=yfsGetTextOptions("xml:/Order/OrderLines/OrderLine_" +
OrderLineCounter + "/@ShipNode", "xml:/OrderLine/@ShipNode",
"xml:/OrderLine/AllowedModifications")%>/>
perform updates in the user interface is through APIs. Making sure the
right input is passed to these APIs is an important task for user interface
customizations.
The Sterling Multi-Channel Fulfillment Solution provides various
mechanisms for passing input to APIs through the user interface. Which
mechanisms you should use, and in what combination, depends on the
type of screen and type of API being called.
This section describes the features and advantages of the following
mechanisms for passing data to APIs:
Q
Input namespace
Q
Entity key
Q
Dynamic attributes
Input Namespace
In many cases, data from fields on the UI must be passed directly to the
API. A simple example is any detail screen with editable input fields.
These fields must be passed to a save API in order to update the entered
data in the application's database. This save API takes a specific XML
structure as input. The fields on the detail screen should have XML
binding that matches the input to the API.
In the Resource Configurator, the Input Namespace field in the action
resource should be set appropriately to verify that the correct data from
the console is passed to the save API. See the Sterling Multi-Channel
Fulfillment Solution Platform Configuration Guide.
Since all of the input fields on the screen have XML bindings for the input
to the same API, they all have the same XML root element name in the
binding. This root element name of the XML bindings is known as the
namespace of that input field. Therefore, when that save action is
invoked on the user interface, an XML is formed from all of the input
fields containing the namespace specified for that action in the Resource
Configurator. This XML is then passed to the API configured under that
save action. For more information on XML binding, see XML Binding on
page 132.
Another place where input namespace is frequently used is for user
interface screens that have search criteria. The search criteria is passed
to list APIs to fetch the data based on the search criteria entered. All the
search criteria fields should have XML binding matching the input to the
list API. The root element name of this XML is the namespace that should
be specified for the list view that is shown when the user runs the
search.
Entity Key
Frequently detail screens have API calling actions that only require the
primary key of the current entity to be passed as the input. When a
detail view is brought up in the user interface, there is always at least
one entity key passed to the detail view. This entity key consists of an
XML structure containing the attributes that uniquely identify that entity.
For example, the entity key of the order entity always contains an
attribute for order header key. This entity key is automatically passed to
the detail API of that entity. When this type of action is configured on a
detail view, no other steps are required to ensure the right input is
passed to the API.
Dynamic Attributes
Sometimes the input expected to be passed to an API is not available
through an input namespace or entity key. In these cases, using dynamic
attributes may be applicable. All API resources configured in the
Resource Configurator have an input field whose purpose is to provide
the ability to specify dynamic attributes. The value for this field should be
a valid XML structure using elements and attributes. The XML structure
specified here must match the exact input XML structure accepted by the
called API.
One of the most common examples of using dynamic attributes is when a
specific inner panel that must call multiple APIs to retrieve all the data
that it needs to display. For example, an inner panel of a detail view of
the order entity might require calling the getOrderDetails() (the
standard detail API), and the getCommonCodeList() API to retrieve data
for some combo box on the screen. Since common codes are stored at
the rule set level, it is mandatory to make sure the correct rule set for
that order is passed as input to the getCommonCodeList() API. The
getOrderDetails() API, given the correct output template, returns the
rule set key for the order. This rule set key can be passed to the
getCommonCodeList() API by referring to the output of the
getOrderDetails() API as a dynamic attribute in the input XML of the
getCommonCodeList()API.
Notice that the value of the RulesetKey attribute is set to an XML binding
that refers to the output of the getOrderDetails() function. The exact
same rules of XML binding that apply when binding inputs inside of a JSP
also apply when using dynamic attributes. This example also shows
another way dynamic attributes can be used. The CodeType attribute is
also specified in the input field in the API resource definition. Here, the
value of the attribute is simply set to the static value "ORDER_TYPE".
This attribute and value are always passed to this API when it is called.
Non-changing input values can be specified in this way.
Another possible value that you can use for a dynamic attribute for an
API defined under a detail view is any attribute of the current entity key
XML. This is useful when the input to pass to an API does not have the
same XML structure of the entity key XML that has been formed in the
detail screen. The XML for the current entity is available in a special
namespace called SelectionKeyName.
The different mechanisms for specifying API input can be combined. For
example, it may be necessary to pass the entity key and some dynamic
attribute to an API configured under a detail view action. Since passing
the entity key happens automatically, you can still specify an Input under
that API with the correct XML structure. Note that the XML structure of
the key should match the XML structure of the input field. There are
other special namespaces available for use in dynamic attributes. For
more information, see Available Dynamic Attribute Namespaces on
page 138.
is used to navigate to the detail screen. This key is known as the current
selected entity key. A detail view uses this key to call the detail API for
that entity. For more details on this namespace, see API Input on
page 135.
Note that typically this code immediately follows the include statements
located at the beginning of a JSP.
ZeroAllowed="true">
<XMLTypeType="QUANTITY"/>
</DataType>
2. Add an XML root node in the same way it appears in the <INSTALL_
DIR>/repository/xapi/template/merged/resource/yfsdatatypema
p.xml file.
3. Add any attributes that need to be mapped in the
yfsdatatypemap.xml file.
Note: You cannot resize the Date input fields within the
Sterling Multi-Channel Fulfillment Solution Consoles across
the board even if your date format is larger than the
default date format used by the Sterling Multi-Channel
Fulfillment Solution.
display credit card number, use the following rules to ensure that this
security is maintained:
Q
CurrentUser namespace contains the attribute ShowCreditCardInfo
under the User node. This attribute is true if the current login user
does have permission to see the credit card number and false if the
current login user does not have the necessary permissions.
Q
APIs that return credit card number normally return the encrypted
credit card number. These APIs also return a DisplayCreditCardNo
attribute that contains the last four digits of the credit card.
Q
Use the DisplayCreditCardNo attribute in conjunction with the
showEncryptedCreditCardNo() JSP function to initially show the
credit card number as asterisks (*) followed by the last four digits.
See showEncryptedCreditCardNo on page 736.
Q
Form a hyperlink on the credit card number that displays only if the
logged in user has permission to see decrypted credit card numbers.
For example,
<% if (userHasDecryptedCreditCardPermissions()) {%>
<yfc:makeXMLInput name="encryptedCCNoKey">
<yfc:makeXMLKey
binding="xml:/GetDecryptedCreditCardNumber/@EncryptedCCNo"
value="xml:/PaymentMethod/@CreditCardNo"/>
</yfc:makeXMLInput>
<td class="protectedtext">
<a
<%=getDetailHrefOptions(decryptedCreditCardLink,
getParameter("encryptedCCNoKey"),"")%>>
<%=showEncryptedCreditCardNo(resolveValue("xml:/PaymentMeth
od/@DisplayCreditCardNo"))%>
</a>
</td>
<% } else { %>
<td class="protectedtext">
<%=showEncryptedCreditCardNo(resolveValue("xml:/PaymentMeth
od/@DisplayCreditCardNo"))%>
<yfc:getXMLValue
binding="xml:/PaymentMethod/@DisplayCreditCardNo"/>
</td>
<% } %>
Q
Then create a pop-up window that opens when the hyperlink is
clicked.
Q
Call getDecryptedCreditCardNumber() in the pop-up window to
decrypt the credit card, passing the DisplayFlag attribute as true if
the current login user has permissions and false if the current login
user does not have permissions.
Q
Use the output of getDecryptedCreditCardNumber() to display the
decrypted credit card number on the screen.
When you configure the getDecryptedCreditCardNumber() API for your
screen through the Sterling Multi-Channel Fulfillment Solution
Configurator, you must specify a dynamic input so that the DisplayFlag
attribute is passed to the API, based on current user's permissions. Here
is an example of how you could specify the Input field in the Sterling
Multi-Channel Fulfillment Solution Configurator:
<GetDecryptedCreditCardNumber
DisplayFlag="xml:CurrentUser:/User/@ShowCreditCardInfo"
EncryptedCCNo="xml:/Order/PaymentMethods/PaymentMethod/@CreditCardNo"/>
Note: You need Net Beans 3.2 IDE to extend search and
detail screens in the Configurator.
Q
jgo.jar
Q
platui.jar
Q
ycmui.jar
Q
yifui.jar
Q
xercesImpl.jar
You need to do this in order to compile the Java file.
7. Add the package name to the top of the form. Put the appropriate
class name in the code (should be the same Java class that you
originally copied as the file name created in step 5).
The copied Java class must extend the original.
8. Set the Variables Modifier option in Net Beans to public. The default
value is private. This option can usually be found in Tools > Options
> Form Objects > Expert Tab.
9. Remove super.init() from the init() function.
10. At the end of the init() function, add the following line:
checkVars();
11. Make the necessary changes to the new form. To set the properties of
the new controls, see Table 41, "XML Binding". Only the following
changes are permitted:
Q
Rearranging any components on the user interface
Q
Hiding any non-mandatory components
Q
Adding any buttons and labels
Q
Adding any text fields and checkboxes
12. Compile the .java file, create a JAR file named yfsextn.jar that
contains only the .class file, and put it in the <INSTALL_
DIR>/repository/eardata/yantra/war/extn/yfscommon/ directory.
13. Enter the name of the newly added yfsextn.jar file in the
<INSTALL_DIR>/repository/eardata/platform/war/yfscommon/
jarlist.txt.
Q
Ellipse
Q
Rectangle
Q
RoundRectangle
Q
Diamond
Q
TriangleUp
Q
TriangleDown
Q
TriangleLeft
Q
TriangleRight
Q
Marker
For Color and Selected Color, specify any hex code or standard
color name.
Q
Mobile device screens use separate architecture for search and list
views. If you need search view and list views functionality, model
them as detail views.
Q
Mobile device screens can have only one detail view. Each detail view
can contain only one inner panel.
Q
A mobile device inner panel cannot have any actions or icons.
The APIs return the data that needs to be displayed. For information
about using APIs, see Chapter 8, "Programming Transactions". For
information on functions specific to mobile devices that are used within
the JSP files, see Appendix D, "Mobile User Interface Extensibility
Reference".
Customizing the mobile device user interface is accomplished using the
Sterling Multi-Channel Fulfillment Solution Configurator user interface.
For more information about this UI, see the Sterling Multi-Channel
Fulfillment Solution Platform Configuration Guide.
Build in Usability
Any new views you develop should look and behave like the product
views, so before you begin developing, gain an understanding of how the
default views behave. For more information on the basic product look
and feel, see Introducing the Screen Layout and Behavior on page 74.
Q
When the maximum allowed size for a given field is violated by a
user, (for example, when a user enters 20 hidden fields), the
following error message is displayed: "An error was encountered
while running this program: Invalid procedure call or argument".
Q
Draw a layout of each screen. For example, creating inventory
screens requires an inventory inquiry screen and an inventory detail
screen.
Screen 1: Screen 2:
Inventory Inquiry Screen Inventory Detail Screen
Note the use of fixed width font while drawing the screen layouts. The
buttons are not counted while considering the 8-row limit.
Screen 1: Screen 2:
Inventory Inquiry Screen Inventory Detail Screen
Choosing this Menu option eventually invokes the JSP defined in the
inner panel associated with this entity.
For example, in the rfinventory UI entity, the
/extn/rf/wms/inventory/fmInventory.jsp file relative to the
Sterling Multi-Channel Fulfillment Solution base URL is invoked.
ity> directory. The name <uientity> refers to the screen entity resource
that needs to be created for a mobile transaction.
For standard HTML tags of Sterling Multi-Channel Fulfillment Solution,
see Appendix C, "Console JSP Interface Extensibility Reference".
For standard Sterling Multi-Channel Fulfillment Solution mobile UI screen
tags, see Appendix D, "Mobile User Interface Extensibility Reference"
Section 1
Q
Extracts values from the pageContext or Session.
Q
Performs setAttribute for some of the input bindings.
Section 2
Q
Calls an API using callAPI.
Q
Processes logic for the API output.
Section 3
Q
Sends Form or Forward Page
Q
Sends Error
This chapter provides a brief glimpse into the Sterling Rich Client
Platform and explains how to use the Sterling RCP Extensibility Tool to
customize the Sterling Rich Client application user interfaces (UIs).
Q
Sterling Multi-Channel Fulfillment Solution-related resource files
Q
JAR files
These files are shipped as part of the standard default configuration. You
can, however, create new files or copy the existing files and modify them.
6.2.1 Benefits
The benefits of using the Sterling RCP are:
Q
Rich User Experience
High responsiveness during information retrieval. This does not
work in a "page-at-a-time" paradigm of Hyper Text Markup
Language (HTML).
Ability to validate client side data, if needed.
Highly interactive and graphical user interface.
Provides visibility to multiple pages on the screen without
refreshing any page.
Ability to locally store data in memory.
Batch server operations.
Ability to interact with other Desktop applications such as e-mail
and spreadsheets.
Q
Lower Total Cost of Ownership (TCO)
Ability to automatically update the Sterling Rich Client applications
to remote clients based on the server-side update information.
Q
Supervisory Overrides
Q
Running the Sterling Rich Client Application in POS Mode
Binding data classes for different controls. For more information about
XML binding classes, see Section 6.9.6.1, "Binding Classes".
group. You can also define a category, which can contain multiple tasks
from multiple groups. For example, if you are viewing the details of an
order, then all the related tasks for this operation such as Cancel Order,
Add Order Line, and so forth are displayed in the Related Tasks view
under the Order group. You can provide the implementation for
displaying these related tasks on the screen. You can also provide the
implementation for opening extensible related tasks in the Sterling
Multi-Channel Fulfillment Solution-provided editor or in your own custom
editor. For creating the related tasks you need to extend the following
extension points:
Q
YRCRelatedTasks extension point
Q
YRCRelatedTaskCategories extension point
Q
YRCRelatedTaskGroups extension point
Q
YRCRelatedTasksDisplayer extension point
Q
YRCRelatedTasksExtensionContributor extension point
For more information about adding new related tasks and hiding existing
related tasks, see Section 6.17, "Adding New Related Tasks and Hiding
Existing Related Tasks".
For the wizard entity from where the wizard definition starts, the Starting
property should be set to "true". For the wizard entity at which the
wizard definition ends, the isLast property should be set to "true".
You can add transition lines to transfer the control from one wizard entity
to another wizard entity based on the output values of the wizard rule.
The transitions originating from a wizard page can have only one target.
Transitions starting from a wizard rule can have multiple targets based
on the rule output. The output of a wizard rule is compared with the
transition values defined for a rule. Based on this value, control is
transferred to the appropriate wizard entity.
All the new wizard definitions are created in the <Plug-in_id>_<wizard_
name>.ycml file.
Consider, for example, that you have a wizard definition for the following
wizard flow:
In this case, the wizard starts from the wizard rule (Rule1). From the
wizard rule (Rule1), the wizard transitions either to a wizard page
(Page1) or a sub-task (Task1) based on the output values of the wizard
rule (Rule1).
Depending on the transition of the wizard from the wizard rule (Rule1),
the wizard ends at two different wizard pages (Page2 or Page3). For the
wizard entity from where the wizard definition started, the start property
must be set to "true". For the wizard entity at which the wizard definition
ends, the isLast property must be set to "true".
The Sterling RCP supports three types of wizard entities:
Q
A wizard rule (Rule1) contains a wizard rule identifier (ID),
implementation class (Impl), namespace definition for the rule
(Namespace), and the list of output values, one of which is the output
of the wizard rule.
Q
A sub-task (SubTask) contains a sub-task identifier (ID),
implementation class (Impl), namespace definition for the sub-task
(Namespace), and the flags isLast and Starting, to indicate whether
the sub-task is the starting entity or the last entity in the wizard flow.
Q
A wizard page (Page1) contains a wizard page identifier (ID) and
implementation class (Impl).
value of the wizard rule for which the transition occurs. The source
contains the identifier of the wizard entity from where the transition
starts. The target contains the identifier of the wizard entity at which
the transition ends.
For example, in the wizard flow illustrated earlier, two transitions start
from a wizard rule (Rule1). These two transitions end at two different
wizard entities, such as wizard page (Page1) and sub-task (SubTask),
based on the output value returned by the wizard rule (Rule1).
om a wizard page. The wizard transition that starts from the wizard page contains a wizard transition identifier (id), source wizard entity (source), and target wizard entity (target). The source contains the identifier of the wizard entity from where the transition starts. The target contains the identifier of the wizard entity at which the transition ends.
For example, in the wizard flow illustrated earlier, the transition starts
from a wizard page (Page1) and ends in a wizard page (Page3).
Q
Transition from a wizard pageYou can have only a single transition
from a wizard page. The wizard transition that starts from a wizard
page contains a wizard transition identifier (ID), source wizard entity
(source), and target wizard entity (target). The source contains the
identifier of the wizard entity from where the transition starts. The
target contains the identifier of the wizard entity at which the
transition ends.
For example, in the wizard flow illustrated earlier, the transition starts
from a wizard page (Page1) and ends in a wizard page (Page3).
Q
Transition from a sub-taskYou can have only a single transition from
a sub-task. A wizard transition that starts from a sub-task contains a
wizard transition identifier (ID), source wizard entity (source), and
target wizard entity (target). The source contains the identifier of the
wizard entity from where the transition starts. The target contains the
identifier of the wizard entity at which the transition ends.
For example, in the wizard flow illustrated earlier, the transition starts
from a sub-task (SubTask) and ends in a wizard page (Page2).
For more information about launching the Sterling Rich Client application
in Eclipse, see Section 6.5.5, "Launching the Sterling Rich Client
Application in Eclipse".
5. Run the EXE file of the appropriate Sterling Rich Client application.
Note: Make sure that the name of all sample output XML
files stored in the prototype directory are same as the
command name for which they are used. For example, if
the command name is getOrderDetails, the sample output
XML file used for this command must be named as
getOrderDetails.xml.
For more information about launching the Sterling Rich Client application
in Eclipse, see Section 6.5.5, "Launching the Sterling Rich Client
Application in Eclipse".
1. Locate the *.ini file of the Sterling Rich Client application stored in
the <INSTALL_DIR>/repository/rcpdrop/<OPERATING_
SYSTEM>/<PCA_DIR>/ directory to add the appropriate VM arguments.
For example, to trace the Sterling COM PCA, locate the <INSTALL_
DIR>/repository/rcpdrop/<OPERATING_SYSTEM>/com/com.ini file.
2. Edit the *.ini file, add the following parameter to the list of VM
arguments:
-vmargs
-Ddebugfile=C:/debug.log
where debugfile property refers to the directory in which the log file
is created.
3. Run the EXE file of the appropriate Sterling Rich Client application.
4. After you successfully log in to the application, the application window
displays. To start or stop tracing the application, press Ctrl+F2.
where debugfile property refers to the directory in which the log file is
created.
For more information about launching the Sterling Rich Client application
in Eclipse, see Section 6.5.5, "Launching the Sterling Rich Client
Application in Eclipse".
Note: You can fetch images from the server only for
labels and table columns.
You can add your own custom verification logic by extending the
YRCHostNameVerifier extension point. For more information about adding
the hostname verifier, see Section 6.22.1, "Adding the Hostname
Verifier".
To connect to the server using the HTTPS protocol, specify the protocol
as HTTPS and also specify the port number for the HTTPS connection in
the configuration file. For more information about configuring the
connection settings for HTTPS connection, see the Sterling Multi-Channel
Fulfillment Solution Installation Guide.
an SSL. To know the commands that use the changeOrder API with
the CreditCardNo attribute, search for the commands and specify the
names of such commands at the command level.
You must define the names of all APIs and commands that you want to
call securely in the secureapis.xml file. You can add these secure APIs
to the secureapis.xml file using the Sterling RCP Extensibility Tool. For
more information about adding the secure APIs using the Sterling RCP
Extensibility Tool, see Section 6.24.1.14, "Adding Secure APIs".
To configure selective SSL calls for APIs, in the locations.ycfg file,
specify the HttpsPortNumber additional attribute in the Config element.
For more information about configuration settings for making selective
SSL calls for some APIs, see the Sterling Multi-Channel Fulfillment
Solution Installation Guide.
6.3.15 Commands
The Sterling RCP has modeled API calls as commands. Commands are
defined to call APIs or services to retrieve data in the desired format.
Whenever you call an API, specify the name of the command associated
with the API. The Sterling RCP supports the creation of commands at a
form level. You can also override commands if necessary. This is useful
when you want to call a custom API for a particular form. For more
information about creating commands, see Section 6.14, "Creating
Commands".
Q
Eclipse log fileWhenever you run a Sterling Rich Client application,
the Eclipse automatically creates a log file. This log file contains
high-level error messages and/or warnings logged by Eclipse.
Using the osgi.instance.area.default property, you can configure
the location to store this log file in the <INSTALL_
DIR>/repository/rcpdrop/<OPERATING_SYSTEM>/<PCA_
DIR>/configuration/config.ini file. By default, this log file is
stored in the @user.home/<application_workspace> directory. The
Sterling RCP does not allow you to rename the log file.
For example, if you run the Sterling COM PCA, the config.ini file is
stored in the <INSTALL_DIR>/repository/rcpdrop/<OPERATING_
SYSTEM>/COM/configuration directory.
In the config.ini file, the osgi.instance.area.default property is
set to:
[email protected]/comworkspace
Note: You can set the idle time (in minutes) for the job
by providing the VM arguments. For example:
-Dideltime=3
By default, idle time is set to 5 minutes.
Q
scheduleIntervalInMinutes (int)Contains the time interval (in
minutes) after which you need to reschedule the job.
2. Create a new job. This job must extend the YRCJob class. The YRCJob
class accepts the following arguments as input:
Q
name (String)Contains the name of the job.
Q
YRCJobData (Object)Job data object, which contains the
configuration of the job.
3. Override the execute() method to write the code to perform the
appropriate operation when the job is scheduled.
4. Register the job you created with the Sterling RCP using the
registerJob (YRCJob job) method.
You can register such alert-related jobs with the Sterling RCP , which in
turn schedules the jobs at the desired interval.
To create and register an alert-related job:
1. Create a new object of the YRCJobData class. This class accepts the
following arguments as input:
Q
proceedEvenIfIdle (Boolean)A boolean flag that indicates
whether the job has to run even if the application is idle.
Note: You can set the idle time (in minutes) for the job
by providing the VM arguments. For example:
-Dideltime=3
By default, idle time is set to 5 minutes.
Q
scheduleIntervalInMinutes (int)Contains the time interval (in
minutes) after which the job must be rescheduled.
2. Register the job you created with the Sterling RCP using the
registerAlertJob() method. This method accepts the following
parameters:
Q
IYRCAlertPopUpHandlerThis interface provides visibility to alert
details when you click the alert message hyperlink. This is an
optional parameter. If this parameter is passed as "null", the alert
message displays as a label instead of a hyperlink.
Q
YRCJobDataJob data object that contains the job configuration.
If you set the screen resolution to less than or equal to 800 X 600 pixels
and relaunch the application, the left panel (Navigator and Tasks panel)
will not visible and the menu items are placed in the menu bar. The font
size in the theme entries defined for a particular screen also reduces by
one point. Figure 63 depicts one of the Sterling RCP PCA applications
that displays on a screen whose system resolution is set to less than or
equal to 800 X 600 pixels.
Q
You can pass "location" as a VM argument to log in to a Sterling Rich
Client application. For example, if you want to log in to a Sterling Rich
Client application using "DEFAULT" as the location, pass the following
VM argument:
-Dlocation=DEFAULT
Q
You can pass "userid" and "password" as VM arguments to log in to a
Sterling Rich Client application. For example, to log in to a Sterling
Rich Client application using "storeop" as the user ID and "admin" as
the password, pass the following VM arguments:
-Duserid=storeop
-Dpassword=admin
Q
Adding or Removing MenusYou can add or remove menus from the
Sterling Rich Client screens by defining a new resource in the
resources of the Sterling Multi-Channel Fulfillment Solution. For more
information about adding or removing menus, see Section 6.20,
"Adding or Removing Menus".
Q
Creating and Adding New ScreensYou can create new Sterling Rich
Client screens for a Sterling Rich Client application. You can also add
the newly created Rich Client screens to a Sterling Rich Client
application. For more information about creating and adding new
screens, see Section 6.6.2.3, "Creating and Adding New Screens".
Q
Adding New Related Tasks and Hiding Existing Related TasksYou can
add new related tasks and hide existing related tasks from the
Sterling Rich Client applications. For more information about adding
and hiding related tasks, see Section 6.13, "Creating Related Tasks".
Q
Modifying Existing ScreensYou can modify existing screens of a Rich
Client application using the Sterling RCP Extensibility Tool. For
information about modifying existing screens, see Section 6.7,
"Modifying Existing Screens".
Q
Modifying Existing WizardsYou can modify the existing wizards of a
Rich Client application. For more information about modifying the
existing wizards, see Section 6.6.2.2, "Modifying Existing Wizards".
Q
LocalizingYou can localize the Rich Client application for different
languages based on the users locale. The user can localize the
Sterling Rich Client application by defining locale-specific entries and
translating the text. For more information about localizing the
Sterling Rich Client application, see Section 6.6, "Customizing the
Sterling Rich Client Application".
Q
ThemingYou can customize the Rich Client application by using
custom themes. You can change the font type and color scheme for
controls, graphical text, messages, and so forth. For more
information about theming, see Section 6.19, "Theming the Sterling
Rich Client Application".
Q
Installing Prerequisite Software Components
Q
Creating and Configuring Locations
Q
Creating a Plug-in Project
Q
Running the Sterling RCP Plugin Wizard
Q
Launching the Sterling Rich Client Application in Eclipse
Q
Sterling RCP Command XML EditorThe Sterling RCP Command XML
Editor provides a way to conveniently edit the <Plug-in_id>_
commands.ycml file. The Commands XML file is used to create or
modify commands and namespaces.
Q
Sterling RCP Config XML EditorThe Sterling RCP Config XML Editor
tool provides a way to conveniently edit the locations.ycfg file. The
locations.ycfg file contains configuration information for the
Sterling Rich Client applications. A location configuration and server
configuration must be defined to connect the Sterling Rich Client
application to the server.
Q
Sterling RCP Theme EditorThe Sterling RCP Theme Editor tool
provides a convenient way to edit the <Plug-in_id>_<theme
name>.ythm file. The theme file is used to define theme entries for a
particular theme.
Q
Sterling RCP Wizard EditorSterling RCP Wizard Editor tool is used to
conveniently edit the <Plug-in_id>_commands.ycml for creating or
modifying the wizard definition. The wizard definition specifies the
flow of a wizard.
Q
Sterling RCP UI WizardsThe Sterling RCP UI Editor is a plug-in that
includes several development time database utilities for the Sterling
Rich Client application. The Sterling RCP UI Editor provides various
wizards for creating these utilities, such as:
<INSTALL_DIR>/rcp/<PCA_DIR>/rcpclient/
Here, <PCA_NAME> refers to the PCA installation directory.
For example, if you want to customize the Sterling COM PCA, unzip
the <INSTALL_DIR>/rcp/COM/rcpclient/com.zip file to any
directory.
After you extract all files, copy the content of the Sterling Rich Client
Applications plug-in folder to the <ECLIPSE_HOME>/plugins folder.
For example, if you want to customize the Sterling COM PCA, copy
the: <TEMP_UNZIP_DIR>/plugins/com.yantra.pca.ycd.rcp_
<version> to the <ECLIPSE_HOME>/plugins folder.
where <TEMP_UNZIP_DIR> is the name of the directory where you
have extracted the com.zip files. <ECLIPSE_HOME> refers to the
directory where you have installed Eclipse SDK.
3. Expand the plug-in project that you created. For more information
about creating a plug-in project, see Section 6.5.3, "Creating a
Plug-in Project".
4. Right-click the source folder where you want to store the Sterling RCP
extension plug-in Java file and select New > Other from the pop-up
menu. The New window displays.
5. From the list of wizards, select Sterling RCP Wizards > Sterling RCP
Plugin.
6. Click Next. The New Plugin to Sterling RCP UI window displays.
7. Click Finish.
After you run the Sterling RCP Plugin wizard on top of a plug-in project,
the Sterling RCP performs the following tasks:
Q
Loads the dependent plug-ins. The dependent plug-ins are the
plug-ins whose extension points are extended by another plug-in to
extend the functionality provided by the Eclipse platform.
Q
Implements the YRCPluginAutoLoader extension point. The
YRCPluginAutoLoader extension point is provided by the Sterling RCP,
which defines the order in which plug-ins need to be loaded. The
YRCPluginAutoLoader extension point automatically loads the classes
within a plug-in during startup in the specified order. All classes that
need to be automatically loaded are sorted in ascending order and
loaded one at a time. For more information about the
YRCPluginAutoLoader extension point, see Appendix B.5,
"YRCPluginAutoLoader Extension Point".
Q
Creates the plug-in Java file. The plug-in Java file is stored in the
folder you specified. This file is used to register the plug-in you
created and the Sterling RCP-specific resource files.
Q
Creates the following Sterling RCP-specific resource files:
Sterling RCP-specific
Resource Files
9. From the list of plug-ins, expand Workspace Plug-ins and select the
plug-in project that you created.
10. Expand Target Platform. Select the Sterling Rich Client application
plug-in that you want to customize.
13. Click Validate plug-in Set. If you have correctly performed all steps,
the Plug-in Validation window displays the message "No problems
were detected in the selected set of plug-ins."
14. Click OK.
15. Select Configuration tab and check the "Clear the configuration area
before launching" box. This clears the cached configuration data
saved by Eclipse.
16. Click Apply.
17. Click Run. The Sterling Rich Client application that you selected in
Step 6 now runs.
Q
Modifying Existing Screens
Q
Modifying Existing Wizards
Q
Creating and Adding New Screens
Based on the transition value, the system transfers the control to the
appropriate wizard page or rule. The sub-task is used to perform a
separate sub-task within the wizard flow. For example, you can add a
sub-task to the wizard flow. That sub-task can be a separate wizard
within the existing wizard. For more information about modifying an
existing wizard, see Section 6.8, "Modifying the Existing Wizards".
}
}
Q
postCommand(YRCApiContext apiContext)To ensure the receipt of
notification upon completion of an API or Service call, override the
postCommand(YRCApiContext apiContext) method in the behavior
class. Using postCommand() method you can store the API or Service
call output and use it at later point in time for incorporating
customizations on the screen. For example:
public void postCommand(YRCApiContext apiContext) {
System.out.println("Finished api call:"+apiContext.getApiName());
}
In this wizard flow, the wizard starts from a wizard page (Page1) and
transitions to a wizard rule (Rule1). The wizard rule (Rule1) computes
some values and returns these values, based on which the control is
transferred to two different wizard pages (Page2 and Page3). For Value1,
the wizard transitions from Rule1 to Page2, and for Value2, the wizard
transitions from Rule1 to Page3.
The sample <Plug-in_id>_<wizard_name>.ycml XML for the existing
wizard definition is as follows:
<forms>
<form Id="com.yantra.pca.ycd.rcp.alert.wizard.YCDAlertWizard">
<namespaces>
<namespace type="input" name="Rule" templateName="getRule"/>
<namespaces>
<Wizard>
<WizardEntities>
<WizardEntity id="Page1">
impl="java:com.yantra.yfc.rcp.wizard.pages.AlertWizPage1"
type="PAGE" xPos="340" yPos="200" start="true">
</WizardEntity>
<WizardEntity id="Rule1">
impl="java:com.yantra.yfc.rcp.wizard.rules.AlertWizRule1"
type="RULE" xPos="40" yPos="200">
<Namespace name="Rule"/>
<Output value="value1"/>
<Output value="value2"/>
</WizardEntity>
<WizardEntity id="Page2">
impl="java:com.yantra.yfc.rcp.wizard.pages.AlertWizPage2"
type="PAGE" xPos="140" yPos="200" last="true">
</WizardEntity>
<WizardEntity id="Page3">
impl="java:com.yantra.yfc.rcp.wizard.pages.AlertWizPage3"
type="PAGE" xPos="140" yPos="200" last="true">
</WizardEntity>
</WizardEntities>
<WizardTransitions>
<WizardTransition id="Trxn1" source="Page1" target="Rule1"/>
<WizardTransition id="Trxn2" source="Rule1">
<Output target="Page2" value="value1">
</WizardTransition>
<WizardTransition id="Trxn2" source="Rule1">
<Output target="Page3" value="value2">
</WizardTransition>
<WizardTransitions>
<Wizard>
</form>
</forms>
To extend the existing wizard flow, for Value1, replace the existing
transition from Rule1 to Page2 with the transition from Rule1 to
SubTask1 as shown below:
4. Right-click the newly created *.ywx file and select Open With > Text
Editor from the pop-up menu.
5. Create the Wizards root element.
6. In the applicationId attribute, specify the application identifier of
the Sterling Rich Client application whose wizard you want to extend.
For more information about the application IDs of a Sterling Rich
Client application, see the corresponding Sterling Rich Client
application documentation.
7. Create the Wizard element under the Wizards root element.
8. In the id attribute, specify the form identifier of the wizard you are
extending.
9. Create the WizardEntities element under the Wizard element.
10. Create the required new wizard entities, such as wizard rule, wizard
page, or sub-task under the WizardEntities element. For example,
create a new sub-task (SubTask1).
11. Create and override the required wizard transitions under the
WizardEntities element. For example, override the existing transition,
Trxn2, with Value1 for transition from Rule1 to SubTask1.
12. Close the Wizard element.
The id attribute of the wizard entity contains the form identifier of the
wizard that you extended. For the new sub-task (SubTask1), a new
WizardEntity element in the WizardEntities element is created.
In the existing wizard definition, the Trxn2 with value1 defines the
transition from Rule1 to Page2. In the new wizard definition, override this
transition with the new target, which is SubTask1.
Q
If you are adding a new wizard rule, you must create the
implementation Java class for the wizard rule. For more information
about creating a new wizard rule, see Section 6.11.2.3, "Creating a
Wizard Rule".
Q
If you are adding a sub-task, the implementation class specified in
the Impl property of the sub-task should point to a separate subtask
that can be run independently as a task.
Q
If you are adding a new sub-task, return an instance of the new
sub-task in the createChildWizard(String wizardPageFormId,
Composite pnlRoot, YRCWizardContext wizardContext) method of the
wizard extension behavior class.
A sub-task can be a wizard that can either be inserted between two
wizard entities or the last entity in the wizard flow. If a sub-task is
inserted between two wizard entities, the sub-task should display the
Next button for navigation to the next wizard entity. If the sub-task
is the last entity in the wizard flow, the sub-task should display the
Finish button to end the wizard. This information must be passed to
the context object (YRCWizardContext). A context object is used to
control the flow of data between the parent wizard and the sub-task,
and contains the input to the sub-task. If there is an output to the
sub-task, it can be set in context and passed back to the parent
wizard. Because the context object utility methods display the
For more information about creating wizard extension behavior class, see
Section 6.24.1.7, "Creating Extension Behavior".
To call your own API or service instead of the Sterling RCP-specific API or
service, see Section 6.9.9, "Calling APIs and Services".
To create an RCP composite using the Sterling RCP Search List Composite
wizard:
1. Start the Eclipse SDK.
2. In the navigator view, expand the plug-in project that you created
when setting up the development environment. For more information
about creating a plug-in project, see Section 6.5.3, "Creating a
Plug-in Project".
3. To store or create the sample search and list screen, right-click on the
folder.
4. Select New > Other... from the pop-up menu. The New window
displays.
5. From the list of wizards, select Sterling RCP Wizards > Sterling RCP
Search List Composite.
6. Click Next. The Search List Screen Preferences window displays.
9. Select the XML attributes from the input XML, based on which the
search screen is created. The search screen contains fields based on
which the search operation is performed. The screen fields are
created based on the selected attributes. The Element List panel
displays the hierarchy of elements and their attributes for the
specified input XML file. The Available Attribute panel displays the list
of attributes corresponding to the element selected in the Element
List panel.
11. Configure the Search screen fields selected in the previous page.
Specify the Name, Widget Type, Data Type, Theme, Span, and Input
Binding to use on each individual control. You can change the physical
ordering of the Search screen controls by clicking the Move Up or
Move Down button. This screen also provides visibility to the Search
screen fields.
12. Click Next. The XML Attribute Selection window displays. Figure
illustrates XML Attribute Selection window.
13. Select the XML attributes from the input XML. Based on these XML
attribute values, the fields in the List screen gets populated. The list
screen has a table and all attributes displays in the appropriate
columns. The Element List panel displays the hierarchy of elements
and their attributes for the specified output template. The Available
Attribute panel displays a list of attributes corresponding to the
element selected in the Element List panel.
14. Click Next. The List Screen Fields window displays.
15. Configure the List screen fields selected in the previous page. In List
Screen Title, enter the title of the List screen. Specify the
AttributeBinding, ColumnBinding, ColumnHeader, and width to use on
each field. You can change the physical ordering of the List screen
controls by clicking the Move Up or Move Down button.
16. Click Next. The Select Template window displays.
17. From the Generator Template combo box, select the template. Based
on the template, the Search List screen is created. Each template
supports certain configurable attributes. The template is inbuilt with
the default layout colspan, width, columnheader, and so forth. To
change the configurable attribute, click Configure.
18. Click Finish. The system automatically creates the composite java file
such as NewSearchListPanel.java and behavior java file such as
NewSearchListPanelBehavior.java in the specified source folder.
These files are stored under the specified package.
7. Click Finish. The system creates a composite file and behavior file in
the specified source folder. These files are stored in the package that
you specified. Figure 66 illustrates a typical folder structure that has
both Java files stored under the package name.
Search
Criteria
Panel
Search
Results
Panel
You can divide the Search and List screen into the following panels:
Q
Search Criteria panelThis panel contains controls that are used to
get input from the user. This may include text boxes, combo boxes,
radio buttons, checkboxes, and so forth. When you click the search
button, the appropriate API is called with contents in the controls as
input to the API. The API output is displayed in the Search Results
panel.
For more information about creating the search criteria panel, see
Section 6.9.2.1, "Creating the Search Criteria Panel".
Q
Search Results panelThis panel displays the search results. If the
results returns multiple items, you can show the items in a table.
Otherwise, you can display data using suitable controls.
For more information about creating the search results panel, see
Section 6.9.2.2, "Creating the Search Results Panel".
12. Select Composite and place it in the pnlRoot composite. The Name
pop-up window displays.
13. Enter the name for the Composite. For example, cmpSearchCriteria.
14. From the Properties view, select the GridLayout value from the
drop-down list for the layout property.
15. Right-click the cmpSearchCriteria composite, and select the
Customize Layout... from the pop-up menu. The Customize Layout
pop-up window displays.
17. Select the Component tab. In the Fill panel, click to fill the excess
horizontal space.
18. In the Grab Excess panel, click to grab the excess horizontal
space.
19. Now add various controls to the cmpSearchCriteria composite. For
more information about adding controls to the cmpSearchCriteria
composite, see Section 6.9.2.1.1, "Adding Controls to the
cmpSearchCriteria Composite".
20. Bind the controls to display the required data. For more information
about binding controls, see Section 6.9.6, "Binding Controls".
11. In the Fill panel, click to fill the excess horizontal space and click
.
12. From SWT Controls, select Label and place it after the txtOrderNo
text box. The Name pop-up window displays.
13. Enter the name for the Label. For example, lblStatus.
14. In the Properties view, enter the text property value as Status.
15. Right-click the lblStatus label and select Customize Layout... from the
pop-up menu. The Customize Layout pop-up window displays as
shown in Figure 68.
16. Select the Component tab. In the Fill panel, click to fill the excess
horizontal space and click .
17. From SWT Controls, select Combo and place it after the lblStatus
label. The Name pop-up window displays.
18. Enter the name for the Combo. For example, cmbStatus.
24. In the Properties view, enter the text property value as Across
Enterprise.
25. Select the Component tab. In the Fill panel, click to fill the excess
horizontal space. Click .
26. From SWT Controls, select Button and place it after the
chkAcrossEnterprise checkbox. The Name pop-up window displays.
27. Enter the name of the Button. For example, btnSearch.
28. In the Properties view, enter the text property value as Search.
29. Right-click the btnSearch button and select Customize Layout... from
the pop-up menu. The Customize Layout pop-up window displays as
shown in Figure 68.
30. Select the Component tab. In the Alignment panel, click to right
align the btnSearch button.
31. In the Grab Excess panel, click to grab the excess horizontal
space.
32. From SWT Containers, select Group and place it after the btnSearch
command button. The Name pop-up window displays.
33. Enter the name of the Group. For example, grpPaymentType.
34. In the Properties view, select the GridLayout value from the
drop-down list for the layout property.
35. Enter the text property value as Payment Type.
39. From SWT Containers, select RadioButton and place it inside the
grpPaymentType group. The Name pop-up window displays.
40. Enter the name for the RadioButton. For example, rdbtnCheck.
41. In the Properties view, enter the text property value as Check.
42. Add another radio button and enter the name for the RadioButton.
For example, rdbtnCreditCard.
43. In the Properties view, enter the text property value as Credit Card.
11. Bind the table and table columns with the required data. For more
information about binding tables, see Section 6.9.6.3.9, "Binding
Tables".
Q
NEXTPAGE
By default, the GENERIC pagination strategy is used to get the paginated
results.
For more information about the getPage API and various pagination
strategies, see the Sterling Multi-Channel Fulfillment Solution Javadocs.
Page Size
To configure the page size for displaying the paginated data, set the
yfc.ui.ListPageSize property in the <INSTALL_
DIR>/properties/customer_overrides.properties file. For additional
information about modifying properties and the customer_
overrides.properties file, see the Sterling Multi-Channel Fulfillment
Solution Installation Guide.
You can also set this property during application initialization by calling
the setpageSize() of the YRCPaginationData class.
YRCPaginatedData
Return an instance of the YRCPaginationData class with the following
parameters:
Q
paginationStrategy(int)The pagination strategy that you want to
use to get the paginated results.
Q
resultsTable(Table)The name of the table in which you want to
display the paginated results.
YRCPaginationException
Return an instance of the YRCPaginationException class to throw an
exception to indicate that a particular pagination strategy does not
support this feature. The exception is thrown when the system attempts
to call the getPage API, and either the pagination is not supported for
that particular screen or composite, or the pagination data is null.
IYRCPageNavigator
To get a handle for the various navigation operations for paginated
results, call the getPageNavigator() method available in the behavior
class. This method returns the IYRCPageNavigator interface, which can
be used to handle the following navigation options for the paginated
result set:
Q
Next PageTo navigate to the next page in the paginated result set,
use the showNextPage() method of the YRCPaginationNavigator class.
Pass the pagination data to this method.
Q
Previous PageTo navigate to the previous page in the paginated
result set, use the showPreviousPage() method of the
YRCPaginationNavigator class. Pass the pagination data to this
method.
Q
Goto PageTo navigate to a particular page in the paginated result
set, use the gotoPage() method of the YRCPaginationNavigator class.
Pass the pagination data and the page number to this method.
Server-Side Sorting
You can perform server-side sorting for a table by calling the
performSort() method of the IYRCPageNavigator interface. Pass the
pagination data to this method.
You can also perform server-side sorting for a table by right-clicking the
Table colum and selecting Sort from the pop-up menu.
Note: To get the pop-up menu for server side sorting, you
must call the setServerSortBinding() mehod of the
YRCTblClmBindingData class and pass the XPath of the
attribute (on which you want perform the sort operation)
to the method.
The Sterling RCP supports the following cell editors that are defined in
YRCInternalConstants class:
Q
YRCInternalConstants.YRCComboBoxCellEditor
Q
YRCInternalConstants.YRCTextCellEditor
Q
YRCInternalConstants.YRCCheckBoxCellEditor
3. Create a cell editor and associate with a column. This column acts as
an editable cell. For example:
editors[columnIndex1] = YRCConstants.YRC_COMBO_BOX_CELL_EDITOR;
editors[columnIndex2] = YRCConstants.YRC_TEXT_BOX_CELL_EDITOR;
4. After creating all cell editors, set the CellTypes for the table with the
cell editor array as the input argument. For example:
tableBindingData.setCellTypes(editors);
5. Bind the table and table columns with the required data. For more
information about binding an editable table, see Section , "Binding an
Editable Table".
where YRCTextBindingData is the class to set bindings for the text box
and oData is the binding object.
oData.setName("txtOrderNo");
If the binding object for a control such as composite or group does not
exist, or if you want to name a control without creating the binding
object, you can directly set the name for that control using the setData()
method. For example,
grpSearchCriteria.setData(YRCConstants.YRC_CONTROL_NAME, "grpSearchCriteria");
Q
YRCLabelBindingData class for binding labels.
Q
YRCTextBindingData class for binding text boxes.
Q
YRCStyledTextBindingData class for binding styledtext components.
Q
YRCComboBindingData class for binding combo boxes.
Q
YRCListBindingData class for binding list boxes.
Q
YRCButtonBindingData class for binding checkboxes and radio
buttons.
Q
YRCLinkBindingData class for binding links.
Q
YRCTableBindingData class for binding tables.
Q
YRCTblClmBindingData class for binding table columns.
Q
Combo Box and List BoxFor combo boxes and list boxes, set the
following bindings:
Q
Source Binding
Q
Target Binding
Q
List Binding
Q
Code Binding
Q
Description Binding
Q
TableFor Tables, set the following bindings:
Q
Source Binding
Q
Target Binding
Q
Table ColumnFor Table columns, set the Attribute Binding.
If you want to get the value of the OrderNo attribute from the XML model
and display in a text box, set the source binding for the text box as:
txtBindingData.setSourceBinding("OrderDetails:OrderList/Order/@OrderNo")
</OrderList>
If you want to set the value entered in the text box for the OrderNo
attribute in the XML model, set the target binding for the text box as:
txtBindingData.setTargetBinding("OrderDetails:OrderList/Order/@OrderNo")
If you want to set the value entered in the text box for the OrderNo
attribute in the XML models, set the target binding for the text box as:
txtBindingData.setTargetBinding("OrderListDetails:OrderList/@OrderNo;OrderListDe
tails:OrderList/Order/@OrderNo;OrderLineDetails:OrderLine/OrderLineList/Order/@O
rderNo")
When you check a box, the system sets the string value specified in the
Checked binding as the attribute value in the XML model.
For example, consider the following XML model:
<OrderList>
<Order OrderNo="Y001" Status="Accepted"
IsAccrossEnterprise="Y" FromHistory="N"/>
</OrderList>
btnBindingData.setCheckedBinding("Y")
btnBindingData.setUnCheckedBinding("N")
where Status is the attribute whose value is picked from the XML model
based on the value of the StatusDesc attribute, which is specified in the
Section 6.9.6.2.7, "Description Binding".
Q
Set the key binding for the table column as:
item_description
Q
Specify the key binding as: item_description
The bundle file contains the following <key>=<value> pair bundle entry
for the above specified key:
item_description= The item ordered is : {0}
where YRCLabelBindingData is the class to set bindings for the label and
lblBindingData is the binding object.
lblBindingData.setSourceBinding("OrderDetails:Order/@OrderNo");
For more information about key binding, see Section 6.9.6.2.9, "Key
Binding".
5. (Optional) If you want to display an image for this label, set the
server image configuration for the label to display the image from the
server. For example:
lblBindingData.setServerImageConfiguration(YRCConstants.IMAGE_SMALL);
where YRCTextBindingData is the class to set bindings for the text box
and txtBindingData is the binding object.
For more information about key binding, see Section 6.9.6.2.9, "Key
Binding".
5. Set the target binding for the text box. For example:
txtBindingData.setTargetBinding("OrderListDetails:OrderList/Order/@OrderNo")
;
4. (Optional) Set the key binding for the styledtext component. For
example:
txtBindingData.setKey("order_details");
For more information about key binding, see Section 6.9.6.2.9, "Key
Binding".
5. Set the target binding for the styledtext component. For example:
styledTextBindingData.setTargetBinding("OrderListDetails:OrderList/Order/@Or
derNo");
To set bindings for a combo box, create a binding object for the combo
box.
3. Set the list binding for the combo box. For example:
cmbBindingData.setListBinding("OrderListDetails:OrderList/Order");
7. Set the binding data for the combo box by associating the binding
object with the key. For example:
cmbCommonCode.setData(YRCConstants.YRC_COMBO_BINDING_
DEFINATION,cmbBindingData);
where YRCListBindingData is the class to set bindings for the list box
and lstBindingData is a binding object.
3. Set the list binding for the list box. For example:
lstBindingData.setListBinding("OrderListDetails:OrderList/Order");
7. Set the binding data for the list box by associating the binding object
with the key. For example:
lstCommonCode.setData(YRCConstants.YRC_LIST_BINDING_
DEFINITION,lstBindingData);
When getting the IsAcrossEnterprise field value from the input XML
model, the string "Y" is compared with the IsAcrossEnterprise field
value in the input XML model. If the value matches, the checkbox is
automatically checked. When setting the field value in the target XML
model, the string "Y" is set as the value for IsAcrossEnterprise field
when you check the box.
For more information about checked binding, see Section 6.9.6.2.3,
"Checked Binding".
5. Set the unchecked binding for the checkbox. For example:
chkBindingData.setUnCheckedBinding("N");
When getting the IsAcrossEnterprise field value from the input XML
model, the string "N" is compared with the IsAcrossEnterprise field
value in the input XML model. If the value matches, the checkbox is
automatically unchecked. When setting the field value in the target
XML model, the string "N" is set as the value for
IsAcrossEnterprise field when you uncheck the box.
For more information about unchecked binding, see
Section 6.9.6.2.4, "Unchecked Binding".
6. Set the binding data for the checkbox by associating the binding
object to the key. For example:
chkAcrossEnterprice.setData(YRCConstants.YRC_BUTTON_BINDING_
DEFINATION,chkBindingData);
value "S001" is compared with the value of that field in the input XML
model. If the value matches, then the radio button corresponding to
that field is automatically selected. When setting the value in the
target XML model, the value "S001" is set as the value for that field
in the target XML model when you select the radio button
corresponding to that field.
For more information about checked binding, see Section 6.9.6.2.3,
"Checked Binding".
5. Set the binding data for the radio button by associating the binding
object to the key. For example:
rdOpen.setData(YRCConstants.YRC_BUTTON_BINDING_DEFINATION,rdBindingData);
where YRCLinkBindingData is the class to set bindings for the link and
linkBindingData is the binding object.
linkBindingData.setSourceBinding("OrderDetails:Order/@Binding");
For more information about key binding, see Section 6.9.6.2.9, "Key
Binding".
7. Set the title of the table column. For example:
clmBindingData[0].setColumnBinding("item_id");
8. Set the server image configuration for the column to display the
image from the server. For example,
clmBindingData[0].setServerImageConfiguration(YRCConstants.IMAGE_SMALL);
tblBindingData.setKeyNavigationRequired(true);
13. To sort a table, set the SortReqd attribute value to "true". For
example:
tblBindingData.setSortRequired(true);
14. To filter the table based on some value, set the FilterReqd attribute
value to "true". For example:
tblBindingData.setFilterRequired(true);
15. Set the source binding for the column. For example:
tblBindingData.setSourceBinding("Results:/OrderLineList/OrderLine");
In the getLinkTheme() method, add the logic to set themes for links
in a column. This method returns the name of the link theme. If it
returns null it is assumed that a link is not required.
In the linkSelected() method, add the logic to perform the required
operation, when the link on the table column cell gets selected.
In the getFontTheme() method, add the logic for setting different font
types for the table column cells based on some condition. For
example, you may want to set different font type for non-editable
cells that displays data for the status field and different font type for
editable cells that displays data for the amount field. This method
returns the name of the font theme. If it returns null, the default font
theme is applied.
21. After setting the binding properties for the YRCTableBindingData
object, set the binding data for the table by associating the binding
object to the key. For example:
tblSearchResult.setData(YRCConstants.YRC_TABLE_BINDING_DEFINATION,
tblBindingData);
}
protected int allowModifiedValue(String property, String value, Element element)
{
return 0;
}
protected String getModifiedValue(String property, String value, Element
element) {
return value;
}});
In the allowModify() method, add the logic to check whether you want to
allow modifications in an editable cell of a table column. For example,
you may want to allow modifications for an editable cell, which displays
data for the discount field. This method returns a boolean value, "true"
or "false". If the method returns a "false" value, it indicates that
modifications are not allowed for that cell.
In the allowModifiedValue() method, add the logic for adding further
validation constraints to check whether the new value entered is valid or
not. This method returns an integer value. If it returns "0", then the
existing value is not replaced with the new value.
In the getModifiedValue() method, add the logic to set the modified value
for a cell of a table column that you are currently editing. You can use
this method to update some other property based on the current one or
to change the format of the property.
Note: Make sure that you write the code for binding
extended tables in the extension behavior class that you
created. In the extension behavior class, override the
getExtendedTableBindingData() method. In this method
create and return the extended table binding object. For
example:
YRCExtendedTableBindingData extntblBindingData = new
YRCExtendedTableBindingData("tableSearch");
// Create and get the advanced column binding map for the
extended table.
HashMap advclmBindingData = getTableColumnBindingData
("tableSearch");
extntblBindingData.setTableColumnBindingsMap
("advclmBindingData");
.
. //Set Bindings for Extended Table and Advanced Columns
.
return extntblBindingData;
where tableSearch is the name of the extended table.
2. Set the attribute binding for the advanced column. For example:
advclmBindingData.setAttributeBinding("ItemID");
3. (Optional) Set multiple attribute binding for the advanced column. For
example:
advclmBindingData.setAttributeBinding("ItemID;Code");
For more information about key binding, see Section 6.9.6.2.9, "Key
Binding".
5. Set the server image configuration for the advanced column to
display the image from the server. For example,
advclmBindingData.setServerImageConfiguration(YRCConstants.IMAGE_SMALL);
12. (Optional) To filter an extended table based on some value, set the
FilterReqd attribute value to "true". For example:
extntblBindingData.setFilterRequired(true);
13. Set the source binding for the table. For example:
extntblBindingData.setSourceBinding("Results:/OrderLineList/OrderLine");
In the getLinkTheme() method, add the logic to set themes for links
in a column. This method returns the name of the link theme. If it
returns null it is assumed that a link is not required.
In the linkSelected() method, add the logic to perform the required
operation, when you click the link in the advanced column cell.
lblCustAdd.setText("Customer_Address");
5. Set the input XML document that is passed to an API or service. For
example:
context.setInputXml(getTargetModel("Order").getOwnerDocument());
where InitialData is the key and 1 is the value for this key. The
value of the key is used to uniquely identify the context. This step is
mandatory, if you are calling the same API multiple times. For more
information about calling same API multiple times, see
Section 6.9.9.1, "Calling the Same API/Service Multiple Times".
7. Call the API or service. For example,
callApi(context);
8. After the API or service call is complete, the Sterling RCP calls the
handleApiCompletion() method of behavior class to validate the
output and process it. Therefore, you can write the API completion
logic in this method. For example:
public void handleApiCompletion (YRCApiContext context) {
if(context.getInvokeAPIStatus() < 0) {
// Add logic for the failure condition
}
else {
if(YRCPlatformUI.equals(context.getApiName(),"getOrderList")) {
setOrderList(context); }
}
}
2. Set the same command name for each context. For example,
context1.setApiName("getOrderList");
context2.setApiName("getOrderList");
context3.setApiName("getOrderList");
where InitialData is the key and 1,2,and 3 are the values for this
key based on the each context. The value of the key is used to
uniquely identify each context.
6. Call the API for each context.
callApi(context1);
callApi(context2);
callApi(context3);
if(YRCPLatformUI.equals(context.getUserData("InitialData"),"1")) {
//Add your own logic for validating and processing the //output at each API
level.
}
else if(YRCPLatformUI.equals(context.getUserData("InitialData"),"2")) {
//Add your own logic for validating and processing the //output at each API
level.
}
else if(YRCPLatformUi.equals(context.getUserData("InitialData"),"3")) {
//Add your own logic for validating and processing the //output at each API
level.
}
3. To call multiple APIs, set the command names for the commands that
you created in the <Plug-in id>_commands.ycml file. For example:
context.setApiNames(new
String[]{"getOrderStatusList","getShipNodeList","getCommonCodeList"});
Note: When adding the new button, make sure that you
check the "Validation Required?" box.
The class that invokes the newly created screen must be created by
extending the YRCAction class. In the YRCAction class, the execute()
method invokes the action configured by you when you click on a menu
item. In the execute() method you can write a code to open the new
screen either in a pop-up window or an editor. For more information
about opening a screen using a pop-up windows, see Section 6.10.1,
"Using Pop-up Screens". For information on how to open a screen in an
editor, see Section 6.10.3, "Using Editor".
For more information about defining resources, see the Sterling
Multi-Channel Fulfillment Solution Platform Configuration Guide.
13. In icon, browse to the path of the icon that you want to associate
with this editor.
14. In class, to specify the implementation class, do any of the following:
Q
Click Browse. The Select Type pop-up window displays. Select the
class that extends the YRCEditorPart class.
Q
Click on the class: hyperlink. The Java Attribute Editor window
displays.
15. Open the newly created editor class in the Java Editor.
16. In the createPartControl() method create and return the instance of
the new screen that you created. For example,
public void createPartControl(Composite parent) {
ViewOrderDetails screen = new ViewOrderDetails(parent, SWT.NONE);
return screen;
}
17. To open the new screen in the specified editor using the menu item,
define a new resource in the resources for the new menu item. For
more information about opening new screens using menu, see
Section 6.10.2, "Using Menu".
18. In the execute() method of the action set that you associated with
the menu item in the previous step do the following:
Q
create a new input element to pass to the YRCEditorInput object.
Q
create a new input object to pass to the YRCEditorInput object, if
required.
Q
create a new YRCEditorInput object. Pass the input element and
the input object that you created (if required). Also pass the array
of strings, which contains the attribute of the input element, and
the related task.
Q
Open the editor that you created for the new screen by passing
the Id of the editor to the YRCPlatformUI.openEditor() method.
Note: Make sure that the editor identifier that you pass to
the YRCPlatformUI.openEditor() method is same as
specified in Step 12.
For example,
Element inputElement = YRCXmlUtils.createFromString("<Order
OrderNo=\"YCD001\" />").getDocumentElement();
Object inputObject = new String("");
YRCEditorInput editorInput = new YRCEditorInput(inputElement, inputObject,
new String[]{"OrderNo"}, "YCD_TASK_QUICK_ACCESS");
YRCPlatformUI.openEditor("com.yantra.qa.editors.QAEdito", editorInput);
Note: Before you can start creating wizards, you must set
up the development environment. For more information
about setting up development environment, see
Section 6.5, "Setting Up the Development Environment".
Q
Creating a Wizard Definition
Q
Creating Wizard Components
Note: You can use only those Greex rules whose return
type is either string or boolean.
5. Click Finish. The system creates the new wizard class in the folder or
package selected by you.
6. Open the newly created wizard class in the Java Editor.
7. Right-click in the editor window, select Source > Override/Implement
Methods... option from the pop-up menu. The Override/Implement
Methods window displays.
8. Select getFormId(), getHelpId(), and createBehavior() methods from
the list of methods provided in the YRCWizard class and click OK.
9. Create the field FORM_ID and specify the identifier of the wizard in
this field. For example,
public static final String FORM_ID =
"com.yantra.pca.ycd.rcp.wizard.NewWizard";
10. In the wizard class constructor initialize the wizard by calling the
initializeWizard() method. For example,
public NewWizard(String wizardId, Composite parent, Object wizardInput, int
style) {
super(wizardId, parent, wizardInput, style);
initializeWizard();
}
5. Click Finish. The system creates the new wizard behavior class in the
folder or package selected by you.
6. Open the newly created wizard behavior class in the Java Editor.
7. Right-click in the editor window, select Source > Override/Implement
Methods... option from the pop-up menu. The Override/Implement
Methods window displays.
8. Select initPage(String) method from the list of methods provided in
the YRCWizardBehavior class and click OK.
9. In the initPage(String) method, write the code for performing wizard
page specific operations. For example, setting the model, calling API
or service, and so forth.
5. Click Finish. The system creates the new wizard page class in the
folder or package selected by you.
6. Open the wizard page java class in the java editor and design the UI
to take the inputs from the user as per the requirements. For more
information about designing a RCP composite, see Section 6.9.2,
"Designing a Rich Client Platform Composite".
7. In the getFormId() method return the unique FORM_ID of this wizard
page.
For more information about creating wizard page behavior class, see
Section 6.11.2.2.2, "Creating Wizard Page Behavior Class".
5. Click Finish. The system creates the new wizard page behavior class
in the folder or package selected by you.
6. In the initPage(String) method, write the code for performing wizard
page specific operations. For example, setting the model, calling API
or service, and so forth.
2. From the menu bar, select Window > Show View > Navigator. The
plug-in project is displayed in the Navigator view.
3. In the navigator window, expand the plug-in project that you created
when setting up the development environment. For more information
about creating a plug-in project, see Section 6.5.3, "Creating a
Plug-in Project".
4. To store the wizard rule class, right-click on a folder or package and
select New > Class from the pop-up menu. The New Java Class
window displays.
5. Click Finish. The system creates the new wizard rule class in the
folder or package selected by you.
6. In the execute(HashMap namespaceModelMap) method, write the
logic for computing the output value using the model that is passed in
the namespaceModelMap parameter and return the output value of
the rule. This method is called when the wizard flow needs the output
value of this rule. Wizard flow is based on the output of this rule, as
defined in the wizard definition. The HashMap contains a list of all
namespaces and the corresponding models. These namespaces are
defined in the <Plug-in_Id>_<wizard_name>.ycml file. For more
information about defining namespaces, see Section 6.14.1, "Defining
Namespaces".
Note: When adding the new button, make sure that you
check the "Validation Required?" box.
The class that invokes the newly created wizard must be created by
extending the YRCAction class. In the YRCAction class, the execute()
method invokes the action configured by you when you click on a menu
item. In the execute() method you can write a code to open the new
wizard either in a pop-up window or an editor. For more information
13. In icon, browse to the path of the icon that you want to associate
with this editor.
14. In class, to specify the implementation class, do any of the following:
Q
Click Browse. The Select Type pop-up window displays. Select the
class that extends the YRCEditorPart class.
Q
Click on the class: hyperlink. The Java Attribute Editor window
displays.
15. Open the newly created editor class in the Java Editor.
16. In the createPartControl() method create and return the instance of
the new wizard that you created. For example,
public Composite createPartControl(Composite parent, String task) {
Object WizardInput = YRCXmlUtils.createfromString("<WizardInput/>");
NewWizard wizard = new NewWizard(NewWizard.FORM_ID, parent, WizardInput,
SWT.NONE);
wizard.start();
return wizard;
}
17. To open the new wizard in the specified editor using the menu item,
define a new resource in the Sterling Multi-Channel Fulfillment
Solution Resources for the new menu item. For more information
about opening new wizards using menu, see Section 6.12.2, "Using
Menu".
18. In the execute() method of the action set that you associated with
the menu item in the previous step do the following:
Q
create a new input element to pass to the YRCEditorInput object.
Q
create a new input object to pass to the YRCEditorInput object, if
required.
Q
create a new YRCEditorInput object. Pass the input element and
the input object that you created (if required). Also pass the array
of strings, which contains the attribute of the input element, and
the related task.
Q
Open the editor that you created for the new screen by passing
the Id of the editor to the YRCPlatformUI.openEditor() method.
Note: Make sure that the editor identifier that you pass to
the YRCPlatformUI.openEditor() method is same as
specified in Step 12.
For example,
Element inputElement = YRCXmlUtils.createFromString("<Order
OrderNo=\"YCD001\" />").getDocumentElement();
Object inputObject = new String("");
YRCEditorInput editorInput = new YRCEditorInput(inputElement,
inputObject, new String[]{"OrderNo"}, "YCD_TASK_QUICK_ACCESS");
YRCPlatformUI.openEditor("com.yantra.qa.editors.QAEdito", editorInput);
Q
Group InformationTo display a new related task, you can either use
an existing group or create a new group.
To get the category and the group information for adding the new
related task to a existing task:
1. In the Sterling Rich Client application, navigate to the task you want
to extend.
2. Through the Sterling RCP Extensibility Tool, view the screen
information. The category and group information is displayed in the
Q
Right-click on plugin.xml file, and select Open With > Plug-in
Manifest Editor.
4. Select the Extensions tab.
5. Click Add. From the New Extension window, select
com.yantra.yfc.rcp.YRCRelatedTaskCategories extension point from
the list.
6. Click Finish.
7. Select the com.yantra.yfc.rcp.YRCRelatedTaskCategories extension
point. The Extension Details panel displays.
8. In the Extension Details panel, enter the properties of the
YRCRelatedTaskCategories extension point.
9. To create a new categories extension element, right-click on
com.yantra.yfc.rcp.YRCRelatedTaskCategories extension and select
New > categories. The categories extension element gets created.
10. Select the categories extension element. The Extension Element
Details panel displays.
11. In the Extension Element Details panel, enter the properties of the
categories extension element.
12. To create a new category extension element, right-click on categories
extension element that you created in the previous step and select
New > category. The category extension element gets created. You
can create multiple category elements under the categories extension
element.
13. In the Extension Details panel, enter the properties of the category
extension element.
14. To create a new tasks extension element, right-click on category
extension element that you created and select New > tasks. The
tasks extension element gets created.
15. Select the tasks extension element. The Extension Element Details
panel displays.
16. In the Extension Element Details panel, enter the properties of the
tasks extension element.
17. To create a new task extension element, right-click on tasks
extension that you created in the previous step and select New >
task. The task extension element gets created. You can create
multiple task elements under the tasks extension element. You can
associate multiple related tasks to the same category.
18. In the Extension Details panel, enter the properties of the task
extension element.
19. In id, enter the id of the related task that you want to have in this
particular category. These categories are defined by extending the
YRCRelatedTaskCategories extension point. For more information
about extending the YRCRelatedTaskCategories extension point, see
Section 6.13.2, "Extending the YRCRelatedTaskCategories Extension
Point".
Q
Click Browse. The Select Type pop-up window displays. Select the
class that implements the
com.yantra.yfc.rcp.IYRCRelatedTasksDisplayer interface. The
specified class must return the list of all the related tasks that you
want to display in a panel as ArrayList.
Q
Click on the class* hyperlink. The Java Attribute Editor window
displays.
Enter the name of the class that implements the
com.yantra.yfc.rcp.IYRCRelatedTasksDisplayer interface.
Click Finish. The new class gets automatically created.
11. In editorId, specify the Id of the editor in which the extensible related
tasks need to be opened. You can use the Sterling RCP-provided
editor or your own custom editor to open the related task. For one
relatedTasksExtensionContributor elements, you can specify only one
editor Id.
12. To specify the implementation class, do any of the following
Q
Click Browse. The Select Type pop-up window displays. Select the
class that implements the
com.yantra.yfc.rcp.IYRCRelatedTasksExtensionContributor
interface.
Q
Click on the class* hyperlink. The Java Attribute Editor window
displays.
Enter the name of the class, that implements the
com.yantra.yfc.rcp.IYRCRelatedTasksExtensionContributor
interface.
Click Finish. The new class gets automatically created.
13. Override the createPartControl(Composite parent, YRCEditorInput
editorInput, YRCRelatedTask currentTask) and return the panel to
open the current editor. For example,
public Composite createPartControl(Composite parent, YRCEditorInput
editorInput, YRCRelatedTask currentTask) {
YCDAlertScreen NewScreen = new YCDAlertScreen(parent, SWT.NONE);
return NewScreen;
}
The following code is from a typical *.ycml file that is used to create
commands:
<forms>
<form Id = "com.yantra.order.capture.ui.screens.OrderSearchandList">
<commands>
<command Name="getOrderDetails"
APIName="getOrderDetails"
APIType="API"
outputNamespace="OrderDetails"
inputNamespace=""
URL="LOCAL"
prototype="true"
version=""/>
<command Name = "getOrderList"
APIName = "getOrderList"
APIType="API"
outputNamespace="OrderList"
inputNamespace=""
URL=""
prototype=""
version=""/>
</commands>
</form>
</forms>
Every plug-in must invoke the command files during plug-in initialization
to register its own set of commands. For more information about
registering a commands file, see Appendix B.8.4, "Registering
Commands File".
The following code is from a typical *.ycml file that is used to define
namespaces:
<forms>
<form Id = "com.yantra.order.capture.ui.screens.OrderSearchandList">
<commands>
<command Name="getOrderDetails"
APIName="getOrderDetails"
APIType="API"
Namespace="OrderDetails"
URL=""
prototype=""
version=""/>
</commands>
<namespaces>
<namespace name="OrderDetails"
type="output"
templateName="getOrderDetails"/>
<namespace name="OrderList"
type="output"
templateName="getOrderList"/>
</namespaces>
</form>
</forms>
Q
Defining an Action
13. Set the context for the hot key either as local or global. In a local
context, you can use the hot key for a specific screen in the
application. In a global context, you can use the hot key for any
screen in the application.
Q
If you want to set the context of the hot key as local, in
contextId, enter the identifier of the form used to identify the screen.
To retrieve information for a specific screen, in a Sterling Rich
Client application, navigate to the screen for which you are
defining the new hot keys. Using the Sterling RCP Extensibility
Tool, you can view the screen information. For more information
about viewing screen information, see Section 6.24.1.2, "Viewing
Screen Information".
Q
If you want to set the context of the hot key as global, in
contextId, enter the global context identifier of the Sterling RCP.
This context identifier is defined in the plugin.xml file of Sterling
RCP plug-in, for example, com.yantra.rcp.contexts.global.
14. In commandId, enter the identifier of the command that you defined.
For information about defining commands, see Section 6.15.1.1,
"Defining a Command".
15. Click to save the changes.
After defining the command, key binding, and action, the structure of the
plugin.xml file of the plug-in project is shown in Figure 613.
Defining Command
Defining Action
13. Set the context for the hot key. You can either set the context as local
or global. Local context means that the hot key can be used only for
a particular screen in the application. Global context means that the
hot key can be used for any screen in the application.
Q
If you want to set the context of the hot key as localIn
contextId, enter the identifier of the form that is used to identify the
screen. To get the information about a particular screen:
Note: You can disable the hot key for a particular related
task by changing the hot key configurations using the
Sterling RCP Extensibility Tool. For more information about
configuring hot keys, see Section 6.24.1.8, "Configuring
Hot Keys".
For APIs or services for which no form identifier is specified, the output
templates are stored in the following folder of the Sterling RCP plug-in:
<INSTALL_
DIR>/repository/xapi/template/merged/template/<Plug-in_
id>/namespaces
You can create new output templates and store them in the following
folder of the Sterling RCP plug-in:
<INSTALL_DIR>/repository/xapi/template/merged/<Plug-in_
id>/<form_id>/namespaces/extn
As an example, let us consider the following getOrderLineDetails
output template:
<OrderLine>
<OrderLineList>
<Order OrderNo="Y00102495" ItemID="MOUSE"/>
</OrderLineList>
</OrderLine>
Q
YRCRelatedTaskCategories
Q
YRCRelatedTaskGroups
Q
YRCRelatedTasksDisplayer
Q
YRCRelatedTasksExtensionContributor
For more information about creating related tasks, see Section 6.13,
"Creating Related Tasks".
13. Open the newly created editor class in the Java Editor and implement
the abstract methods of the YRCSharedTask class.
After getting the required information invoke the shared task by calling
the launchSharedTask(String taskId, Element input) method. For
example:
YRCPlatformUI.launchSharedTask("com.yantra.rcp.SharedTask1",input);
8. Create the Font element under ThemeEntry and set the its attributes.
For Font element attribute list, see Table 616.
10. Create the ForegroundColor element under ThemeEntry and set the
its attributes. For ForegroundColor element attribute list, see
Table 617.
11. Create the Image element under the ThemeEntry element, if
applicable.
12. In the Path attribute, specify the path of the image you want to
display.
The sample theme entries from the *.ythm file is given below:
<Theme id="jade">
<ThemeEntry Name="Label">
<Font Name="Tahoma" Height="9" Style="NORMAL"/>
<ForegroundColor Red="0" Green="0" Blue="0"/>
<BackgroundColor Red="245" Green="245" Blue="245"/>
</ThemeEntry>
<ThemeEntry Name="Text">
<Font Name="Tahoma" Height="8" Style="NORMAL"/>
<ForegroundColor Red="0" Green="0" Blue="0"/>
<BackgroundColor Red="255" Green="255" Blue="255"/>
</ThemeEntry>
<ThemeEntry Name="Table">
<Font Name="Tahoma" Height="8" Style="NORMAL"/>
<BackgroundColor Red="245" Green="245" Blue="245"/>
<ForegroundColor Red="0" Green="0" Blue="0"/>
</ThemeEntry>
<ThemeEntry Name="ErrorColor">
<Font Name="Tahoma" Height="10" Style="BOLD"/>
<ForegroundColor Red="255" Green="0" Blue="0"/>
<BackgroundColor Red="245" Green="245" Blue="245"/>
</ThemeEntry>
<ThemeEntry Name="ErrorIcon">
<Image Path="/icons/error.gif"/>
</ThemeEntry>
<ThemeEntry Name="HeaderLogo">
<Image Path="/icons/yantra_header.jpg"/>
</ThemeEntry>
</Theme>
2. Set the binding data for the control by associating the binding object
with the key. For example,
lblDate.setData(YRCConstants.YRC_CONTROL_CUSTOMTYPE,"MyLabel");
where lblDate is the reference variable name of the label, which you
specified in the visual editor, YRCConstants.YRC_CONTROL_
CUSTOMTYPE is the key used for identifying the custom theme entry,
and MyLabel is the name of the ThemeEntry element in the theme
file.
Note: All the new namespaces that you define must start
with "Extn_".
After creating new commands and namespaces for a screen, call an API
or service. After API or service call completes, call the
setExtensionModel() method to populate the newly added fields on the
screen. You must pass the namespace of the model and the target
element as arguments to the setExtensionModel() method.
15. Edit the Sterling Rich Client applications *.ini file and add the
following VM arguments:
-vmargs
-Dssomode=Y
Server-Side Setting
1. Open the <INSTALL_
DIR>/repository/eardata/platform/descriptors/weblogic/WAR/W
EB-INF/web.xml file and search for the <servlet-name> tag.
2. Inside the RcpSSOServlet <servlet-name> tag, add the following init
parameter entry:
<init-param>
<param-name>rcpssomanager</param-name>
<param-value>com.yantra.SsoManager</param-value>
</init-param>
Q
Adding Related Tasks
Q
Creating Extension Behavior
Q
Configuring Hot Keys
Q
Resolving Hot Key Conflicts
Q
Modifying or Deleting an Existing Field
Q
Modifying or Deleting Newly Added Fields
Q
Synchronizing Differences
Q
Showing Hidden and Disabled Fields
Q
Adding Secure APIs
Q
Viewing Shared Tasks
1. Start the RCP Extensibility Tool. For more information about starting
this tool, see Section 6.24.1.1, "Starting the Rich Client Platform
Extensibility Tool".
2. Click . The Screen Information window displays.
3. Select the commands tab to view all the commands that are being
used by the screen.
4. Select the Namespaces tab to view the list of namespaces that are
used by the screen. You can also view the XML model of the output
template associated with the a namespace in the right hand side
panel.
5. Select the Related Tasks tab to view the list of category ids in which
this current active task is interested in. You can also view the list of
group ids along with their group sequence number associated with
the related tasks of the current active task.
Q
Adding a Radio Button
Q
Adding a Text Box
Q
Adding a Styled Text
Q
Adding a Combo Box
Q
Adding a List Box
Q
Adding a Standard Or Advanced Table Column
Q
Adding a Link
Q
Adding a Composite
Q
Adding a Group
Q
Adding an External Panel
3. Click Finish to add the new label with the default layout data, theme,
and null binding attributes.
4. Click Next to specify the data layout options.
5. Click Finish to add the new label with the default theme and null
binding attributes.
6. Click Next to specify the binding options.
7. Click Finish to add the new label with the default theme binding.
8. Click Next to specify the theme binding.
9. Click Finish.
10. Click to save the changes made to the extension file.
11. If you have specified the default value, source binding, or theme
entry for the label, you must synchronize the resource files. For more
Note: You can place the button either in the row layout
container or grid layout container. However, the row layout
container does not have the layout data. Therefore, if you
place the button in the row layout container, the Layout
Setup Page does not display.
4. Click Finish to add the new button with the default layout data,
theme, and empty hot key binding.
5. Click Next to specify the layout data options. For field value
descriptions, see Table 621.
6. Click Finish to add the new button with the default theme and empty
hot key binding.
7. Click Next to specify the theme binding. For field value descriptions,
see Table 623.
8. Click Next to specify the hot key binding.
Note: If you enter and save the hot key binding, you
cannot modify it.
9. Click Finish.
If you have specified the hot key binding, the Restart Application
pop-up window displays and prompts you to save the extension files
and restart the application to view the changes.
Note: When adding the new button, make sure that you
check the Validation Required? box.
Note: You can place the checkbox either in the row layout
container or grid layout container. However, the row layout
container does not have the layout data. Therefore, if you
place the checkbox in the row layout container, the Layout
Setup Page does not display.
3. Click Finish to add the new checkbox with the default layout data,
theme, and null binding attributes.
4. Click Next to specify the layout data options. For field value
descriptions, see Table 621.
5. Click Finish to add the new checkbox with the default theme and null
binding attributes.
6. Click Next to specify the binding options.
7. Click Finish to add the new checkbox with the default theme binding.
8. Click Next to specify the theme binding. For field value descriptions,
see Table 623.
9. Click Finish.
Note: You can place the radio button either in the row
layout container or grid layout container. However, the row
layout container does not have the layout data. Therefore,
if you place the radio button in the row layout container,
the Layout Setup Page does not display.
3. Click Finish to add the new radio button with the default layout data,
theme, and null binding attributes.
4. Click Next to specify the layout data options. For field value
descriptions, see Table 621.
5. Click Finish to add the new radio button with the default theme and
null binding attributes.
6. Click Next to specify the binding options. For field value descriptions,
see Table 626.
7. Click Finish to add the new radio button with the default theme
binding.
8. Click Next to specify the theme binding. For field value descriptions,
see Table 623.
9. Click Finish.
10. Click to save the changes made to the extension file.
11. If you have specified the default value, bindings, or theme entry for
the radio button, you must synchronize the resource files. For more
information about synchronizing resource files, see Section 6.24.1.12,
"Synchronizing Differences".
3. Click Finish to add the text box with the default layout data, theme,
and null binding attributes.
4. Click Next to specify the layout data options. For field value
descriptions, see Table 621.
5. Click Finish to add the text box with the default theme and null
binding attributes.
6. Click Next to specify the binding options. For field value descriptions,
see Table 626.
7. Click Finish to add the text box with the default theme binding.
8. Click Next to specify the theme binding. For field value descriptions,
see Table 623.
9. Click Finish.
10. Click to save the changes made to the extension file.
11. If you have specified the default value, bindings, or theme entry for
the text box, you must synchronize the resource files. For more
information about synchronizing resource files, see Section 6.24.1.12,
"Synchronizing Differences".
3. Click Finish to add the new styled text with the default layout data,
theme, and null binding attributes.
4. Click Next to specify the layout data options. For field value
descriptions, see Table 621.
5. Click Finish to add the styled text with the default theme and null
binding attributes.
6. Click Next to specify the binding options. For field value descriptions,
see Table 626.
7. Click Finish to add the styled text with the default theme binding.
8. Click Next to specify the theme binding. For field value descriptions, see
Table 623.
9. Click Finish.
For more information about starting this tool, see Section 6.24.1.1,
"Starting the Rich Client Platform Extensibility Tool".
2. Click . Do any of the following to add a combo box:
Q
Select the control where you want to add the combo box and click
once.
Q
Select the composite or group where you want to add the combo
box and click once.
The Add Combo Box window displays. For field value descriptions, see
Table 627.
3. Click Finish to add the new combo box with the default layout data,
theme, and null binding attributes.
4. Click Next to specify the layout data options. For field value
descriptions, see Table 621.
5. Click Finish to add the new combo box with the default theme and
null binding attributes.
6. Click Next to specify the binding options.
Table 628 Add Combo Box, Binding Options Page, Data Binding
Field Description
Source Binding Enter the XML path to populate the new field, if
applicable.
Table 628 Add Combo Box, Binding Options Page, Data Binding
Field Description
Code Binding Enter the XML path to send the value of an attribute to
the API for the new field.
7. Click Finish to add the new combo box with the default theme
binding.
8. Click Next to specify the theme binding. For field value descriptions, see
Table 623.
9. Click Finish.
Q
Select the control where you want to add the list box and click
once.
Q
Select the composite or group where you want to add the list box
and click once.
The Add List Box window displays. For field value descriptions, see
Table 627.
3. Click Finish to add the list box with the default layout data, theme,
and null binding attributes.
4. Click Next to specify the layout data options. For field value
descriptions, see Table 621.
5. Click Finish to add the list box with the default theme and null binding
attributes.
6. Click Next to specify the binding options. For field value descriptions,
see Table 628.
7. Click Finish to add the list box with the default theme binding.
8. Click Next to specify the theme binding. For field value descriptions,
see Table 623.
9. Click Finish.
10. Click to save the changes made to the extension file.
11. If you have specified the default value, bindings, or theme entry for
the list box, you must synchronize the resource files. For more
information about synchronizing resource files, see Section 6.24.1.12,
"Synchronizing Differences".
3. Click Finish to add the new column with the default column layout
data, theme, and null binding attributes.
4. Click Next to specify the column layout options.
5. Click Finish to add the column with the default theme and null binding
attributes.
6. Click Next to specify the binding options.
7. Click Finish to add the new column with the default theme binding.
8. Click Next to specify the theme binding.
9. Click Finish.
Note: You can place the link either in the row layout
container or grid layout container. However, the row layout
container does not have the layout data. Therefore, if you
place the link in the row layout container, the Layout Setup
Page does not display.
3. Click Finish to add the new link with the default layout data, theme,
null binding attributes, and empty hot key binding.
4. Click Next to specify the layout data options. For field value
descriptions, see Table 621.
5. Click Finish to add the link with the default theme, null binding
attributes, and empty hot key binding.
6. Click Next to specify the binding options. For field value descriptions,
see Table 624.
7. Click Finish to add the link with the default theme binding and empty
hot key binding.
8. Click Next to specify the theme binding. For field value descriptions,
see Table 623.
9. Click Finish to add the link with the empty hot key binding.
10. Click Next to specify hot key binding. For field value descriptions, see
Table 625.
11. Click Finish.
If you have specified the hot key binding, the Restart Application
pop-up window displays and prompts you to save the extension file
and restart the application to view the changes.
3. Click Finish to add the composite with the default layout data.
4. Click Next to specify the layout data options. For field value
descriptions, see Table 621.
Q
Select the control where you want to add the group and click
once.
Q
Select the composite or group where you want to add the group
and click once.
The Add Group window displays. For field value descriptions, see
Table 620.
3. Click Finish to add the group with the default layout data.
4. Click Next to specify the layout data options. For field value
descriptions, see Table 621.
5. Click Finish.
6. Click to save the changes made to the extension file.
7. If you have specified the default value for the new group, you must
synchronize the resource files. For more information about
3. Click Finish to add the group with the default layout data.
4. Click Next to specify the layout data options. For field value
descriptions, see Table 621.
5. Click Finish.
6. Click to save the changes made to the extension file.
7. Open the external panels class in the Java Editor.
8. In the class, create the constructor as following:
public RCPDRIBindingPanel1(Composite parent, int style, YRCExtentionBehavior
behavior) {
}
To move a field:
1. Start the Sterling RCP Extensibility Tool.
For more information about starting this tool, see Section 6.24.1.1,
"Starting the Rich Client Platform Extensibility Tool".
2. Click . Select the field you want to move.
3. Click the target field where you want to move the selected field. The
Move Field window displays.
4. Click Finish.
3. Click the target table column where you want to move the selected
table column. The Move Table Column window displays.
4. Click Finish and reopen the screen to view the changes made to the
table.
Prior to adding a new related task, you must be aware of the following
information:
Q
Category InformationWhen a new related task is associated with
the active task running in the current editor, you must know the
categories in which the active task is included so that the new related
task can be displayed under the Related Tasks view.
Q
Group InformationTo display a new related task, you can either use
an existing group or create a new group.
To add a new related task:
1. Start the Sterling RCP Extensibility Tool.
For more information about starting this tool, see Section 6.24.1.1,
"Starting the Rich Client Platform Extensibility Tool".
2. Navigate to the task you want to extend in the Sterling Rich Client
application.
3. Click and click once on the form. The Add Related Task
window displays.
5. Click Finish to view the newly added related task in the Related Task
view.
6. Synchronize the resource files for the changes you made to the new
related task. For more information about synchronizing resource files,
see Section 6.24.1.12, "Synchronizing Differences".
3. Click Finish. The label updates with the layout data, binding
attributes, and theme.
4. Click Next to modify the layout data options.
5. Click Finish. The label is updated with the binding attributes and
theme.
6. Click Next to modify the binding options. For field value descriptions,
see Table 622.
7. Click Finish. The label is updated with the theme binding.
8. Click Next to modify the theme binding.
9. Click Finish.
10. Click to save the changes made to the extension file.
11. If you have specified the default value, bindings, or theme entry for
the checkbox, you must synchronize the resource files. For more
4. Click Next to modify the layout data options. For field value
descriptions, see Table 641.
5. Click Finish. The checkbox is updated with the binding attributes and
theme binding.
6. Click Next to modify the binding options. For field value descriptions,
see Table 626.
7. Click Finish. The checkbox is updated with the theme binding.
8. Click Next to modify the theme binding. For field value descriptions,
see Table 642.
9. Click Finish.
10. Click to save the changes made to the extension file.
11. If you have specified the default value, bindings, or theme entry for
the checkbox, you must synchronize the resource files. For more
information about synchronizing resource files, see Section 6.24.1.12,
"Synchronizing Differences".
3. Click Finish. The radio button is updated with the layout data, binding
attributes, and theme binding.
4. Click Next to modify the layout data options. For field value
descriptions, see Table 641.
5. Click Finish. The radio button is updated with the binding attributes
and theme binding.
6. Click Next to modify the binding options. For field value descriptions,
see Table 626.
7. Click Finish. The newly added radio button is updated with the
existing theme.
8. Click Next to modify the theme binding. For field value descriptions,
see Table 642.
9. Click Finish.
10. Click to save the changes made to the extension file.
11. If you have specified the default value, bindings, or theme entry for
the radio button, you must synchronize the resource files. For more
information about synchronizing resource files, see Section 6.24.1.12,
"Synchronizing Differences".
3. Click Finish. The text box is updated with the layout data, binding
attributes, and theme binding.
4. Click Next to modify the layout data options. For field value
descriptions, see Table 641.
5. Click Finish. The text box is updated with the binding attributes and
theme binding.
6. Click Next to modify the binding options. For field value descriptions,
see Table 626.
7. Click Finish. The text box is edited with the theme binding.
8. Click Next to modify the theme binding. For field value descriptions,
see Table 642.
9. Click Finish.
10. Click to save the changes made to the extension file.
11. If you have specified the default value, bindings, or theme entry for
the text box, you must synchronize the resource files. For more
information about synchronizing resource files, see Section 6.24.1.12,
"Synchronizing Differences".
For more information about starting this tool, see Section 6.24.1.1,
"Starting the Rich Client Platform Extensibility Tool".
2. Select a newly added styled text and click once. The Edit New Styled
Text window displays. For field value descriptions, see Table 644.
3. Click Finish. The styled text is updated with the layout data, binding
attributes, and theme binding.
4. Click Next to modify the layout data options. For field value
descriptions, see Table 641.
5. Click Finish. The styled text is updated with the binding attributes and
theme binding.
6. Click Next to modify the binding options. For field value descriptions,
see Table 626.
7. Click Finish. The styled text is updated with the theme binding.
8. Click Next to modify the theme binding. For field value descriptions,
see Table 642.
9. Click Finish.
10. Click to save the changes made to the extension file.
11. If you have specified the default value, bindings, or theme entry for
the styled text, you must synchronize the resource files. For more
information about synchronizing resource files, see Section 6.24.1.12,
"Synchronizing Differences".
For more information about starting this tool, see Section 6.24.1.1,
"Starting the Rich Client Platform Extensibility Tool".
2. Select a newly added combo box and click once. The Edit New Combo
Box window displays. For field value descriptions, see Table 644.
3. Click Finish. The combo box is updated with the layout data, binding
attributes, and theme binding.
4. Click Next to modify the layout data options. For field value
descriptions, see Table 641.
5. Click Finish. The combo box is updated with the binding attributes
and theme binding.
6. Click Next to modify the binding options. For field value descriptions,
see Table 628.
7. Click Finish. The combo box is updated with the theme binding.
8. Click Next to modify the theme binding. For field value descriptions,
see Table 642.
9. Click Finish.
10. Click to save the changes made to the extension file.
11. If you have specified the default value, bindings, or theme entry for
the combo box, you must synchronize the resource files. For more
information about synchronizing resource files, see Section 6.24.1.12,
"Synchronizing Differences".
3. Click Finish. The list box is updated with the layout data, binding
attributes, and theme binding.
4. Click Next to modify the layout data options. For field value
descriptions, see Table 641.
5. Click Finish. The list box is updated with the binding attributes and
theme binding.
6. Click Next to modify the binding options. For field value descriptions,
see Table 628.
7. Click Finish. The list box is updated with the theme binding.
8. Click Next to modify the theme binding. For field value descriptions,
see Table 642.
9. Click Finish.
3. Click Finish to add the new column with the default column layout
data, theme, and null binding attributes.
4. Click Next to specify the column layout options. For field value
descriptions, see Table 630.
5. Click Finish. The table column is updated with the binding attributes
and theme binding.
6. Click Next to modify the binding options. For field value descriptions,
see Table 631.
7. Click Finish. The table column is updated with the theme binding.
8. Click Next to modify the theme binding. For field value descriptions,
see Table 642.
9. Click Finish.
3. Click Finish. The link is updated with the layout data, binding
attributes, and theme binding.
4. Click Next to modify the layout data options. For field value
descriptions, see Table 641.
5. Click Finish. The link is updated with the binding attributes and theme
binding.
6. Click Next to modify the binding options. For field value descriptions,
see Table 628.
For more information about starting this tool, see Section 6.24.1.1,
"Starting the Rich Client Platform Extensibility Tool".
2. Select a newly added composite and click once. The Edit New
Composite window displays.
3. Click Finish. The newly added composite is edited with the existing
layout data.
4. Click Next to modify the layout data options. For field value
descriptions, see Table 641.
5. Click Finish.
For more information about starting this tool, see Section 6.24.1.1,
"Starting the Rich Client Platform Extensibility Tool".
2. Click to show hidden and disabled fields, if applicable.
3. Select an existing field and click once. The Edit Existing Field window
displays.
4. Click Next to modify the layout data options. For field value
descriptions, see Table 641.
5. Click Next to modify the theme binding. For field value descriptions,
see Table 642.
6. Click Finish.
7. Click to save the changes made to the extension file.
8. If you have specified the theme entry for the field, you must
synchronize the resource files. For more information about
synchronizing resource files, see Section 6.24.1.12, "Synchronizing
Differences".
4. Click Next to modify the layout data options. For field value
descriptions, see Table 641.
5. Click Next to modify the theme binding. For field value descriptions,
see Table 642.
6. Click Finish.
7. Click to save the changes made to the extension file.
8. If you have specified the default theme entry for the field, you must
synchronize the resource files. For more information about
synchronizing resource files, see Section 6.24.1.12, "Synchronizing
Differences".
4. Click Next to modify the layout data options. For field value
descriptions, see Table 641.
5. Click Next to modify the theme binding. For field value descriptions,
see Table 642.
6. Click Finish.
7. Click to save the changes made to the extension file.
8. If you have specified the default value, bindings, or theme entry for
the field, you must synchronize the resource files. For more
information about synchronizing resource files, see Section 6.24.1.12,
"Synchronizing Differences".
4. Click Next to modify the layout data options. For field value
descriptions, see Table 641.
5. Click Next to modify the theme binding. For field value descriptions,
see Table 642.
6. Click Finish.
7. Click to save the changes made to the extension file.
8. If you have specified the default value, bindings, or theme entry for
the field, you must synchronize the resource files. For more
information about synchronizing resource files, see Section 6.24.1.12,
"Synchronizing Differences".
For more information about starting this tool, see Section 6.24.1.1,
"Starting the Rich Client Platform Extensibility Tool".
2. Click to show hidden and disabled fields, if applicable.
3. Select an existing column in the table and click once. The Edit
Existing Field window displays.
4. Click Next to modify the column layout options. For field value
descriptions, see Table 630.
5. Click Next to modify the theme binding. For field value descriptions,
see Table 632.
6. Click Finish.
7. Click to save the changes made to the extension file.
8. If you have specified the theme entry for the table column, you must
synchronize the resource files. For more information about
synchronizing resource files, see Section 6.24.1.12, "Synchronizing
Differences".
4. Click Next to modify the layout data options. For field value
descriptions, see Table 641.
5. Click Next to modify the theme binding. For field value descriptions,
see Table 642.
6. Click Finish.
7. Click to save the changes made to the extension file.
8. If you have specified the theme entry for the field, you must
synchronize the resource files. For more information about
synchronizing resource files, see Section 6.24.1.12, "Synchronizing
Differences".
4. Click Save.
5. Click Close.
3. Click Save All. The Choose File for Saving Diffs pop-up window
displays. For field value descriptions, see Table 654.
4. Click Close.
3. Click Save All. The Choose File for Saving Diffs pop-up window
displays. For field value descriptions, see Table 654.
4. Click Close.
Q
Normal Extension Behavior (YRCExtensionBehavior)The system
creates this behavior when you create an extension behavior for
extending a Sterling Rich Client screen that is not a wizard. When
synchronizing a normal extension behavior, specify the name of the
implementation class (extends YRCExtensionBehavior). You can add
the logic to call an API or service or set the extension model in the
init() method of the YRCExtensionBehavior class.
Q
Wizard Extension Behavior (YRCWizardExtensionBehavior)The
system creates this behavior when you create an extension behavior
for extending a Sterling Rich Client screen that is a wizard. When
synchronizing the wizard extension behavior, specify the name of the
implementation class (extends YRCWizardExtensionBehavior). You
can add the wizard-specific logic to call an API or service or set the
extension model in the initPage (String pageId) method of the
YRCWizardExtensionBehavior class.
To synchronize extension behavior:
1. Start the Sterling RCP Extensibility Tool.
For more information about starting this tool, see Section 6.24.1.1,
"Starting the Rich Client Platform Extensibility Tool".
2. Click . The Synchronize pop-up window displays. Select the Extn
Behavior tab.
3. Click Save All. The Choose File for Saving Diffs pop-up window
displays. For field value descriptions, see Table 654.
4. Click Close. The extension behavior class is created in the package
that you specified.
5. To retrieve the appropriate data for this newly added field or
advanced column, write the code to call the required API or service,
set the extension model, and setting the bindings for an advanced
column in the newly created extension behavior class.
Calling APIs or Services
After synchronizing the extension behavior for a newly added field,
you may want to retrieve data to populate the new field by calling an
API or service. For more information about calling APIs or services,
see Section 6.9.9, "Calling APIs and Services".
3. Click Save All. The Choose File for Saving Diffs pop-up window
displays. For field value descriptions, see Table 654.
4. Click Close.
For more information about starting this tool, see Section 6.24.1.1,
"Starting the Rich Client Platform Extensibility Tool".
2. Click . The hidden and disabled fields display on the screen.
Q
Name of the shared task
Q
A brief description of the shared task
Q
Template of the input XML model
Q
Template of the output XML model
To view the shared task details:
1. Start the RCP Extensibility Tool.
For more information about starting this tool, see Section 6.24.1.1,
"Starting the Rich Client Platform Extensibility Tool".
2. Click and click once on the screen. The Shared Tasks
window displays.
Q
Deploying RCP Extensions
Q
You can add columns either before or after the installation of the
Sterling Multi-Channel Fulfillment Solution.
Q
For all columns added to a Sterling Multi-Channel Fulfillment Solution
table, you must provide a default value that is relevant to the
database framework.
Q
You cannot use nullable columns for the following fields:
Primary Key Attributes
Entity Relationships
Hence, in the entity XML, Nullable="true" is allowed for all columns
except the ones noted above.
Q
You cannot add columns with a data type of Long.
Q
When using components of the Sterling Multi-Channel Fulfillment
Solution (such as events and user exits) that read in a map or publish
a map (such as the GetOrderNoUE user exit), extended fields in the
maps are prefixed with Extn_.
Q
Adding Text Search Indices to a Standard Table
Q
Creating Custom and Hang-off Tables
3. Create a new Attribute tag for each column you want to add to the
table.
4. Manually add the columns to the database. You can also use the
database verification tool dbverify for generating scripts to add
columns to your database.
For example, if you work in the metal industry, you may want to use a
custom tag identifier named Steel which has both Mill and Grade
attributes. Since these are not supplied by default in the Sterling
Multi-Channel Fulfillment Solution, you must extend the set of tables
listed below to include the Steel tag identifier column in each table.
3. Create a new Index tag for each index you want to add to the
column.
4. Extend the corresponding API templates to include the non-unique
indices by following the instructions in Section 7.4, "Extending API
Templates".
5. Build and Deploy your extensions by following the steps mentioned in
Chapter 9, "Building and Deploying Extensions".
<ForeignKeys>
<ForeignKey ParentTableName="YFS_PERSON_INFO"
XMLName="YFSName1" >
<Attribute ColumnName="REQUIRED"
ParentColumnName="PERSON_INFO_KEY" />
</ForeignKey>
<ForeignKey ParentTableName="YFS_PERSON_INFO"
XMLName="YFSName2" >
<Attribute ColumnName="REQUIRED"
ParentColumnName="PERSON_INFO_KEY" />
</ForeignKey>
.
.
</ForeignKeys>
.
.
</Entity>
</Entities>
</DBSchema>
3. Create a new ForeignKey tag for each foreign key relationship you
want to add.
4. Multiple foreign key elements can be related to the same parent
table.
5. Extend the corresponding API templates to include the foreign key
elements by following the instructions in Section 7.4, "Extending API
Templates".
6. Build and Deploy your extensions by following the steps mentioned in
Chapter 9, "Building and Deploying Extensions".
.
<TSIndices>
<TSIndex Name="REQUIRED" >
<Column Name="USERNAME" />
</TSIndex>
.
.
</TSIndices>
.
.
</Entity>
</Entities>
</DBSchema>
3. Create a new TSIndex tag for each text search index you want to add
to the column.
4. Build and Deploy your extensions by following the steps mentioned in
Chapter 9, "Building and Deploying Extensions".
Q
Javadocs are not created for the APIs created by the infrastructure to
support custom and hang-off tables.
Q
XSD generation and validation is not done for custom or hang-off
tables.
Q
Every custom or hang-off entity must have a primary key.
Q
Every custom or hang-off entity must have the following columns
described in Table 75:
<ForeignKey ParentTableName="PARENT_ORDER_LINE"
XMLName="PARENTName1" >
<Attribute ColumnName="CUSTOM_ORDER_KEY" ParentColumnName="PARENT_
COLUMN_KEY" />
.
.
</ForeignKey>
.
.
</ForeignKeys>
<!-- AuditReferences -->
<AuditReferences>
<Reference ColumnName="TABLE_KEY" />
.
.
</AuditReferences>
</Entity>
</Entities>
</DBSchema>
.
</Indices>
<!-- Relationship -->
<Parent ParentTableName="YFS_ORDER_LINE" XMLName="YFSOrderLine" >
<Attribute ColumnName="CUSTOM_ORDER_KEY"
ParentColumnName="ORDER_LINE_KEY" />
.
.
</Parent>
<ForeignKeys>
<ForeignKey ParentTableName="PARENT_ORDER_LINE"
XMLName="PARENTName1" >
<Attribute ColumnName="CUSTOM_ORDER_KEY"
ParentColumnName="PARENT_COLUMN_KEY" />
.
.
</ForeignKey>
.
.
</ForeignKeys>
<!-- AuditReferences -->
<AuditReferences>
<Reference ColumnName="TABLE_KEY" />
.
.
</AuditReferences>
</Entity>
</Entities>
</DBSchema>
2. Create a new Reference tag for each audit reference you want to
add.
3. The hang-off of an order table audits can be viewed with the
associated order audits.
For example, the audit entries for AAOrderLine which is an hang-off
of YFS_ORDER_HEADER table can be viewed with the Order Audit
Details screen as shown below:
For more information on the field details of the order audits, see the
Sterling Distributed Order Management User Guide.
4. The audits for custom tables and hang-off tables not related to the
Sterling Multi-Channel Fulfillment Solution order entities are stored in
YFS_AUDIT table and can be obtained using getAuditList API.
5. Build and Deploy your extensions by following the steps mentioned in
Chapter 9, "Building and Deploying Extensions".
.
</Item>
After extending the Item header, the getItemDetails() API can output
the following XML:
<?xml version="1.0" encoding="UTF-8"?>
<Item .. Item attributes >
<PrimaryInformation .... PrimaryInformation attributes />
<Extn ExtnAltQty="200408201034469490" ..... extnded attributes />
<YFSPersonInfo .... PersonInfoKey="200408201034469490" ..... />
<ItemServiceSkillList .. ItemServiceSkillList attributes/>
<ItemAliasList ... ItemAliasList attributes />
.
.
</Item>
2. Once the command is run, the sample XML files are placed in the
<INSTALL_DIR>/extn/sampleXML directory as <TABLE_NAME>_
sample.xml.
For example, consider HF_Order_Header is an hang-off of YFS_
Order_Header table. The generated HF_Order_Header_sample.xml is
as follows:
<HFOrderHeader Createprogid=" " Description=" " DocumentType=" "
EnterpriseKey=" "OrderHeaderKey=" " OrderName=" " OrderNo=" " .... >
</HFOrderHeader>
3. A sample XML for including the above attributes in a standard API can
be generated by passing the YFS table that has relationship with the
hang-off table you are interested.
For example, assume HF_Order_Header is a hang-off table with a
relationship to the YFS_Order_Header table. The XML template
generated by the tool when TABLE_NAME=YFS_Order_Header is
passed:
<Order>
<OrderLines>
<OrderLine ........>
<Extn extended attributes >
<HFOrderHeaderList>
<HFOrderHeader Createprogid=" " Description=" " ......... >
</HFOrderHeader>
</HFOrderHeaderList>
</Extn>
</OrderLine>
</OrderLines>
</Order>
You can prune this sample XML to include your custom attributes in
an API template, such as getOrderDetails output template.
However, you cannot modify any of the YFS elements or attributes.
<HFOrderHeaderList Reset="true">
<HFOrderHeader>
</HFOrderHeader>
</HFOrderHeaderList>
</Extn>
</OrderLine>
</OrderLines>
</Order>
For including custom APIs you can create a service definition as shown in
the figure. The configuration fields are explained in Table 79.
You can read uncommitted data from any list API by enabling the
ReadUnCommitted attribute to Y in its input XML. As a result the locking
scenario is circumvented in DB2 database.
This behavior is different from Oracle, hence if you are writing custom
code on DB2 you should understand this behavior to avoid lock
escalations.
8.1 Services
In the Sterling Multi-Channel Fulfillment Solution terminology, a service
is core business logic component that is stateless and does not contain
presentation logic. Each service (either provided out-of-the-box by the
Sterling Multi-Channel Fulfillment Solution or those that are custom
created using the Sterling Service Definition Framework) represents a
logical unit of processing that can be independently performed without
any loss of data integrity and within one transaction boundary. Using the
Sterling Service Definition Framework, one or more services can be
aggregated into larger composite services which can in turn be used to
create other services. This provides a way to build small reusable
components that can be linked together to provide complex business
processing.
Synchronously invoked
These services can perform all their processing and return the result in a
single call, on demand.
Asynchronous
These services automatically perform all their processing whenever
triggered by a message from an external system or from within the
Sterling Multi-Channel Fulfillment Solution. The trigger could be in the
form of a file, a database record or a message in a message queue
depending upon the mode of integration. These services do not return
any value and are purely used for background processing such as
sending out emails or automatically receiving updates from or sending
updates to an external system.
In general, asynchronous services provide a lower cost to performance
ratio than synchronous services and should be preferred wherever
possible. However, asynchronous services queue up and process
messages in the order they are received. The time to process a certain
transaction after it's been queued can vary widely depending upon peaks
in your processing cycle and a host of other factors. Therefore, they are
not suitable for certain specific scenarios where an SLA (service level
agreement) requires that a transaction has to be processed within a
specified short time frame. However, these scenarios are rare for most
businesses and business processes and asynchronous processing is
efficient enough for the majority of transactions at a significantly lower
cost while still providing a high service level.
8.2 APIs
You can use both standard APIs that are supplied by the Sterling
Multi-Channel Fulfillment Solution and any extended (custom) APIs that
you have created. The Sterling Multi-Channel Fulfillment Solution provide
standard APIs to handle the most common business scenarios. For
example, there are APIs that create an order, allocate an order, and
report shipment confirmation. Standard APIs can be invoked directly or
aggregated into more complex services.
All APIs (whether standard or extended) have the same signature with
respect to input parameters and return values. This signature is of the
form
org.w3c.dom.Document APIName(YFSEnvironment env, org.w3c.dom.Document input);
In order for custom APIs to access custom values, the API should
implement the com.yantra.interop.japi.YIFCustomApi interface. If
entered, these name/value pairs are passed to the Custom API as a
Properties object. See the Sterling Multi-Channel Fulfillment Solution
Javadocs for more information about the
com.yantra.interop.japi.YIFCustomApi interface.
Select APIs
Typically prefixed with get, select APIs return one record for an entity
(for example, the getOrderDetails() API returns the details of one
order). They do not update the database.
Since select APIs return only one record, they require unique key
attributes to be passed in the input XML. If a unique key attribute is not
passed in the input XML, the API uses blanks for those attributes in the
criteria to select the record. There can be more than one unique key
combination, and in that combination you must pass any one of the
multiple combinations.
For example, an order is uniquely identified either by the
OrderHeaderKey key attribute or by a combination of the OrderNo and
EnterpriseCode attributes. So, when calling the getOrderDetails()
API, you must pass either the OrderHeaderKey attribute or the
combination of the OrderNo, EnterpriseCode and DocumentType key
attributes. If you pass only OrderNo, the API returns the order that
matches OrderNo and has a blank enterprise code. In order to identify
the unique key combinations for each API, see the Sterling Multi-Channel
Fulfillment Solution Javadocs.
However, getOrderDetails() API uses a select for update on YFS_
ORDER_HEADER so that its internal processes such as user exits, events,
etc., have a lock on the order elements while the thread working on it is
active. This enables to maintain a transaction cache until the final
commit. Hence, you need to avoid using nested transactions to overcome
the locking mechanism by performing:
1. Commit or rollback only once for all event of the order. Keep in mind,
that all the events are set to rollback if one of them fails.
2. Select the order for each event and process. Also keep in mind, that
if age of the orders having multiple events are higher it could have an
impact on the performance.
List APIs
Typically prefixed with get, list APIs return a list of records for an entity
that match the criteria specified through the input XML, for example, the
getOrderList() API returns a list of orders. For more information about
specifying the search criteria, see Section 8.2.5, "Forming Queries in the
Input XML of List APIs" on page 559. If any attribute in the input XML
has a blank value, it is ignored. List APIs do not update the database.
You can also get the paginated data from a list API by calling the getPage
API and passing the list API as the input to the getPage API. For more
information about the getPage API, see the Sterling Multi-Channel
Fulfillment Solution Javadocs.
Update APIs
Update APIs insert new records into the database. They also modify or
delete existing records in the database. Update APIs that modify or
delete existing records use the same logic as select APIs to identify which
record to update. If no record is found, update APIs throw an exception.
Date-Time Syntax
YYYY-MM-DDTHH:MI:SS+HH:MM
Values in bold are placeholders for literals. For example, the format for
March 5, 2003, 11:30:59 p.m. is 2003-03-05T23:30:59.
Syntax Parameters
YYYY - Required. Four-digit year. Used in both date-time and date fields.
MM - Required. Two-digit month. Used in both date-time and date fields.
DD - Required. Two-digit day of the month. Used in both date-time and
date fields.
T - Required. The literal value T, which separates the date and time
component. Used only in date-time fields.
HH - Required. Two-digit hour of the day. For example, 11 p.m. is
displayed as 23:00:00. Used only in date-time fields.
MI - Required. Two-digit minutes of the hour. For example, 59 minutes is
displayed as 00:59:00. Used only in date-time fields.
SS - Required. Two-digit seconds of the minute. For example, 21 seconds
is displayed as 00:00:21. Used only in date-time fields.
+HH:MI - Optional. Two-digit hours and minutes, separated by a colon
(":"). Indicates how many hours from UTC, using - to indicate earlier
than UTC and + to indicate later than UTC. If this value is not passed in
input, the time zone of the Sterling Multi-Channel Fulfillment Solution are
assumed.
<Entities>
<Entity TableName="YFS_ORDER_LINE">
<Attributes>
<Attribute ColumnName="EXTN_ACME_LINE_TYPE" DecimalDigits="" Default
Value="' '" Size="10" Type="CHAR" XMLGroup="Extn"
XMLName="ExtnAcmeLineType"/>
</Attributes>
</Entity>
</Entities>
</DBSchema>
To form queries:
1. Edit the custom input XML of any list API, and append QryType to any
attribute you want to query on. Any attribute that is not appended
with QryType can also be queried on, using the default query type
value EQ, as shown for ShipNode in Example 82.
2. For attributes appended with QryType, specify a query type value
from Table 83. This is case sensitive.
3. Specify the values that are applicable to your search criteria.
The values for the QryType attributes vary depending on the datatype of
the field. Table 83 lists the supported query type values for each
datatype.
Table 83 Query Type Values Used by List APIs
Field DataType Supported Query Type Values
Char/VarChar2 Q
EQ - Equal to
Q
FLIKE - Starts with
Q
LIKE - Contains
Q
GT - Greater than
Q
LT - Less than
Number Q
BETWEEN - Range of values
Q
EQ - Equal to
Q
GE - Greater than or equal to
Q
GT - Greater than
Q
LE - Less than or equal to
Q
LT - Less than
Q
NE - Not equal to
Date Q
DATERANGE - Range of dates
Q
EQ - Equals
Q
GE - Greater than or equal to
Q
GT - Greater than
Q
LE - Less than or equal to
Q
LT - Less than
Q
NE - Not equal to
Date-Time Q
BETWEEN - Range of dates
Q
EQ - Equals
Q
GE - Greater than or equal to
Q
GT - Greater than
Q
LE - Less than or equal to
Q
LT - Less than
Q
NE - Not equal to
To form queries:
Edit the custom input XML of any list API, and add the OrderBy element.
Add the Attribute child element and in the Name attribute specify the
name of the field based on which you want to sort the results. You can
also perform nested sorting using the OrderBy element as shown in
Example 84.
By default, the results are sorted in the Ascending order. If you want to
sort the results in descending order add the Desc attribute to the
Attribute element and set it to Y.
Example 85 shows a fragment of the input XML that returns a list of
organizations and results are sorted by the OrganizationName attribute
in the descending order.
to a subset of the output XML. You can modify this file to incorporate
a subset of the attributes and elements from the output XML.
Document Types
If you use a variety of business-related document types such as orders,
planned orders, purchase orders, and returns, you can use custom
templates that enable an API to return the values that pertain to each
unique document type.
For example, you can use one template with the getOrderDetails() API
to return information about Planned Orders and another template for the
getOrderDetails() API to return different information about Orders.
Q
Dynamic templates
Static templates provide the ability to add new elements but not remove
any of the defaults. A static template is pervasive, as it is picked up by
default by an API whenever that API is invoked.
Dynamic templates provide the ability to add new elements and remove
any of the default elements from the standard template. A dynamic
template is an instance, as it is picked up only for a specific API call, such
as when configured to do so during user interface extensibility.
A comparison of the differences between the two types of template
mechanisms is summarized in Table 84.
Choose which of these mechanisms best fits your business needs and
adhere to it.
Remember that when you define a dynamic template, all possible values
are returned. In order to return the smallest amount of data for an
element, when you are pruning away elements you dont need, you need
to include its parent with at least one of its attributes.
If you leave an element blank or include unwanted attributes in the
parent element all values are returned, as illustrated in Example 86.
In Example 88, the dynamic template has been trimmed down, keeping
in mind the following guidelines:
Q
The structure of the custom output template mirrors the structure of
the standard output template.
Q
Excess elements (regarding kits, schedules, addresses, and so forth)
are pruned away.
Q
Parent elements are populated with one attribute in order to suppress
excess detail. For example, specifying the OrderNo attribute for the
Order element suppresses all of the other Order attributes.
elements in the standard output template plus any new ones you add.
For example, you may need to add UI fields for any database columns
you have added. Note that if you use this function, you cannot remove
any elements that exist in the standard template.
Note: You may add any elements you wish, but you
cannot remove any of the elements present in the
standard output template.
3. Call the API as typical and it automatically picks up the custom output
template from the directory containing the custom templates.
The default input and output XMLs that can act as a base for your custom
XML are located in the <INSTALL_DIR>/xapidocs/xmlstruct/ directory.
Also note that the DTDOccurrence and REQUIRED data provided for the
standard tables are inferred from the base file in the xmlstruct directory
and do not need to be supplied. If they are provided, the existing
information is overridden by any new information present in the custom
Therefore, when the tool is run these base XML files serve as a default to
your custom XML files, which need only contain the changes made by
you such as the extended elements and attributes. This allows future
upgrades to safely modify the XML files in the xmlstruct directory.
Re-running the XSD generation tool automatically picks up these
updates.
The appropriate XML file in the xmlstruct directory associated with your
custom XML is identified by the file name. Your custom XML may start
with an optional prefix followed by an under-score and the base file
name. For example, a custom XML file named Custom_File_YFS_
getOrderDetails_input.xml refers to the YFS_getOrderDetails_
input.xml file in the xmlstruct directory.
However, the naming convention is optional. For example, you can also
name your custom XML sampleCustomApi.xml but no base file is used.
In this case, the tool outputs an informational message to indicate that
no base XML is found.
Note: If you want to use our base XML file for conversion,
the naming convention of your custom XML must be
suffixed appropriately. For example, Custom_File_YFS_
getOrderDetails_input.xml would use the base file
named YFS_getOrderDetails_input.xml.
getItemList API. All the attributes in the API are interpreted with an
implied And along with the complex query operator.
Apply the following rules when including complex queries:
Q
You can define only one ComplexQuery under a single element.
For example, you cannot have two ComplexQuery operator under
an Item element.
Q
You cannot add a single complex query against two different
tables. For example, in getShipmentList API you cannot use
ChainedFromOrderHeaderKey and ShipmentLineNo in the same
query, since the former belongs to YFS_ORDER_LINE table and the
latter is an attribute of the YFS_SHIPMENT_LINE table.
Q
The attribute with no value is not considered in the complex
query, like Attribute="".
Q
There can be only one element under the ComplexQuery namely,
And or Or.
Q
And or Or elements can have one or many child elements as
required.
Q
And or Or elements can have other And or Or expression elements
as child elements.
This example can be interpreted as the following logical expression:
(OrganizationCode="DEFAULT" AND ItemGroupCode="PS" ) AND
((PricingQuantityStrategy="IQTY") OR ( ( UnitOfMeasure =
"EACH" OR UnitOfMeasure="HR" ) AND ( ManufacturerName =
"STERLING") ))
Thus by following the above example you can include complex queries to
achieve desired results from your database using the above mentioned
APIs.
Q
Business process transactions - responsible for processing day-to-day
transactions
Q
Monitors - watch and send alerts for processing delays and exceptions
Q
Purges - clear out data that may be discarded after having been
processed
For information on using the time-triggered transactions provided by the
Sterling Multi-Channel Fulfillment Solution, see the Sterling Multi-Channel
Fulfillment Solution Platform Configuration Guide. For information on
creating custom time-triggered transactions, see Section 8.2, "APIs" on
page 551.
For detailed descriptions of each user exit, see the following packages in
:
Q
com.yantra.ycm.japi.ue
Q
com.yantra.ycp.japi.ue
Q
com.yantra.ydm.japi.ue
Q
com.yantra.yfs.japi.ue
However, APIs that do not modify the data (like select APIs) can be
invoked in the user exits. For example, you can call
getOrderDetails() API from a user exit.
If you want to specify the path, use the relative path from
<INSTALL_DIR>. For example, if your template is in the <INSTALL_
DIR>/repository/xapi/template/merged/email/ directory,
specify template/merged/email/<custom_email_template>.xsl.
If you want to specify the file name, ensure that your
CLASSPATH contains the path to the template. For example, if you
save the template to the template/merged/email/ directory,
your CLASSPATH must contain <INSTALL_
DIR>/repository/xapi/template/merged/email/.
Note that using the <INSTALL_
DIR>/repository/xapi/template/merged/email/<file_name>.mlt file
with Actions to accomplish the same purpose has been deprecated as of
Release 5.0. Use the E-mail node and an XSL file instead.
For example, use the tag |#YFS_OrderNo| to have the actual order
number appear in its place (if OrderNo is published as a part of the data
buffer). Any of the data elements published in the data buffer can be
used in the template.
For the exception console, there are two templates. One template is used
for determining the DETAIL_DESCRIPTION field of the YFS_INBOX table.
The other template is used for determining the LIST_DESCRIPTION field
of the YFS_INBOX table. The templates are merged with the data
published (by an event) and the resulting string is populated to the
corresponding field.
A service can be configured to post data using the HTTP protocol. For
details, see the Sterling Multi-Channel Fulfillment Solution Platform
Configuration Guide.
The function signature that you must expose through C++ is:
STDMETHODIMP COMActionImpl::doAction(BSTR sTranID, BSTR sActionCode, BSTR
sKeyData, long DataType, BSTR sData, BSTR Node, long *RetVal)
The class name must be configured as the Java object on the Action
Configuration screen in the Sterling Multi-Channel Fulfillment Solution
transaction configuration. For more information, see the Sterling
Multi-Channel Fulfillment Solution Platform Configuration Guide.
All the parameters for the handleEvent() function are input parameters,
with values inserted by the Sterling Multi-Channel Fulfillment Solution.
The last parameter in this function is the parms parameter, which is an
array of String constants. The values of these string constants are the
values of the string constants specified after the class name during the
action configuration in the Sterling Multi-Channel Fulfillment Solution.
3. Once the name is entered, the rest of the condition can be built in the
same way as the pre-defined attributes. For more information on how
to create a condition using pre-defined attributes, see the Sterling
Multi-Channel Fulfillment Solution Platform Configuration Guide.
The custom attributes created during condition definition can be used
as part of the service definition framework or in pipeline definitions
for creating events or conditions.
You can add or modify existing cases defined for a decision table-based
advanced XML condition. You can modify the different attributes of a
condition case. After you modify a condition case and click the Save
button, the new values of the attribute reflects in both Advanced XML
and Source View screen.
The default return value defined for a decision table-based advanced XML
condition displays as a hyperlink on the Advanced XML screen. If none of
the condition cases are satisfied, the Greex engine returns the default
value. Click the hyperlink to edit the default return value and specify the
new default return value for the advanced XML condition. The pop-up
screen displays the old value. You can also enter new values. The new
value reflects in the Advanced XML screen as well as in the Source View
screen when you click the Save button in the pop-up screen.
<If>
<Condition name="isWebOrder?">
<Group op="and">
<Expression>fn:!equals(@orderType,"WEB")</Expression>
<Expression>fn:equals(address::@ZipCode, "01876")</Expression>
</Group>
</Condition>
<Return>
<Value output="<Order type="Web"
discount="5"/>"/>
</Return>
</If>
<Else>
<Return>
<Value output="<Order type="Catalog"
discount="2"/>"/>
</Return>
</Else>
LibraryFunctionFactory.getInstance().registerFunction(new
MyCustomLibrary());
3. Create a jar for the custom library that you created in Step 1 and add
it to the application server classpath.
4. Load the custom library to the LibraryFunctionFactory of Greex by
creating a custom Greex initializer servlet (such as
MyCustomGreexInitializer), which can be a normal servlet. To load
this function with Greex framework, specify the name of the servlet in
the <INSTALL_
DIR>/repository/eardata/platform/descriptors/weblogic/WAR/W
EB-INF/web.xml file. For example, if your servlet class is
com.servlet.MyCustomGreexInitializer, add the following entry in the
web.xml file:
<servlet>
<servlet-name>MyCustomGreexInitializer</servlet-name>
<servlet-class>com.servlet.MyCustomGreexInitializer</servlet-class>
<load-on-startup>4</load-on-startup>
</servlet>
5. Copy the custom jar that you created in Step 3 to the following
locations:
Q
<INSTALL_DIR>/jar/sscap
Q
<INSTALL_DIR>/repository/eardata/platform/war/yfscommon
Q
<INSTALL_
DIR>/othertools/com.yantra.yfc.other.tools.zip/com.yantr
a.ide.rcptools.core_1.1.0/lib
Q
Sterling Greex plug-in
Install the Sterling Other Tools plug-in that Sterling Commerce
supports. For more information about the Sterling Greex plug-ins
version, see the Sterling Multi-Channel Fulfillment Solution
Installation Guide.
This plug-in is shipped along with the Sterling Multi-Channel
Fulfillment Solution that can be found at:
<INSTALL_DIR>/othertools
2. From the menu bar, select Window > Show View > Navigator. The
java project displays in the Navigator view.
3. Expand the java project that you created. For more information about
creating a java project, see Section 8.4.5.6.2, "Creating a Java
Project".
4. Right-click on the folder where you want to store the *.greex file and
select New > Other from the pop-up menu. The New window
displays.
5. From the list of wizards, select Sterling RCP Wizards > Sterling RCP
Greex Model.
6. Click Next. The New window displays.
11. Click Finish. The *.greex file is created in the specified folder.
</Condition>
<Return>
<Value output="<Order TaxExemptFlag="N"/>"/>
</Return>
</If>
<Else>
<If>
<Condition name="TaxExempted?">
<Group op="and">
<Expression>fn:equals(@OriginalTotalAmout, "1000")</Expression>
<Expression>fn:intGreater(@orderLine,"5")</Expression>
</Group>
</Condition>
<Return>
<Value output="<Order discount="10"
TaxExemptFlag="Y"/>"/>
</Return>
</If>
<Else>
<Return>
<Value output="<Order discount="20"
TaxExemptFlag="N"/>"/>
</Return>
</Else>
</Else>
</GreexRule>
From the menu bar, select Window > Show View > Other.... From the
list of views under Basic, select Properties.
6. Under the Greex Rule root element, create a new IF ELSE construct
element, as needed. Right-click on the Greex Rule root element and
select New Child > If/Else from the pop-up menu. You can create any
level of nesting of IF and ELSE constructs.
7. Select the If/Else element. In the Properties view, enter the name of
the If element in the Name property.
8. Under the If/Else element, create a new Condition child element.
Right-click on the If/Else element and select New Child > Condition
from the pop-up menu.
9. Select the Condition element. In the Properties view, enter the name
of the Condition element in the Name property.
10. As every condition must return a value, under the If/Else element,
create a new Return element and specify the appropriate return value
for the associated condition. Right-click on the If/Else element and
select New Child > Return from the pop-up menu.
11. Right-click on the Return element and select New Child > Value from
the pop-up menu. The Enter the value pop-up window displays.
12. Enter the value that you want to return if the IF condition satisfies.
13. Select the Return element. In the Properties view, in the Default
property, specify the default value (if necessary) that you want to
17. (Optional) Select the Group element. In the Properties view, specify
the operation that you want to perform on the set of expressions in
the Op property. The valid values are: "or" and "and".
If you specify the Op property as "or", a condition is satisfied if any of
the expressions specified in the group is "true".
If you specify the Op property as "and", a condition is satisfied only if
all expressions specified in the group is "true".
4. Select the root element Greex Rule and in the Properties view, enter
the values for various attributes. Table 814 describes various
attributes of the root element Greex Rule.
In the Properties view, you can view various properties of the
selected element. To open the Properties View, from the menu bar,
select Window > Show View > Other.... From the list of views under
Basic, select Properties.
6. Select the If element and in the Properties view, enter the name of
the If element in the Name property.
7. Under the If element, create a new Condition child element.
Right-click on the If element and select New Child > Condition from
the pop-up menu.
8. Select the Condition element and in the Properties view, enter the
name of the Condition element in the Name property.
For a decision table based Greex rule, you can define an array of
constant values in the Value element. The multiple values are
separated using the "|" operator. For example, 5|7|3.
13. Under the Condition element, create a new Expression element to
specify the expression(s) that you want to evaluate for the condition
to be satisfied. Right-click on the Condition element and select New
Child > Expression from the pop-up menu. The Edit Expression
pop-up window displays.
14. In Expression, enter the expression that you want to evaluate. You
can make function calls in the expression by prefixing the function
name with "fn:". You can also pass functions to other functions.
For a decision table based Greex rule, you can define an array of
constant values for a particular XML attribute in the Expression
element. The multiple values are separated using the "|" operator. For
example, fn:equals(@orderType, "WEB|STORE|CALLCENTER").
16. (Optional) Select the Group element and in the Properties view,
specify the operation that you want to perform on the set of
expressions in the "op" property. The valid values are: "or" and "and".
If you specify the Op property as "or" then a condition gets satisfied if
any of the expressions specified in the group evaluates to true.
If you specify the Op property as "and" then a condition gets satisfied
only if all of the expressions specified in the group evaluates to true.
17. Click Save.
3. Expand the Greex rule that appears in the Greex editor panel. Click
on a node from the tree. All child leaves of the node are listed. The
Document Root element contains the Greex Rule root element.
4. Select the Greex Rule root element and right-click. Select Validate
Greex Rule from the pop-up menu.
If the Greex rule that you created uses correct syntax and structure,
the message "Greex rule validation succeeded" displays. Otherwise,
the system displays an appropriate error message.
Table 815 Select the Process Type and Owner Key Window
Field Description
Process Type Key Select the key of the appropriate process type
from the drop-down list.
Owner Key Select the key of the appropriate owner from the
drop-down list.
6. Click Finish.
5. Click Finish. The selected *.greex files are imported into the java
project.
6. Open the *.greex files using the Sterling Greex editor and modify the
advanced XML condition or Greex rule as needed.
7. Reload the modified *.greex files into the database. For more
information about reloading the advanced XML conditions into the
database, see Section 8.4.5.6.6, "Loading Advanced XML Conditions
into the Database".
In the e-mail component, where you can specify, the email server,
subject, listener port, and From addresses. The dynamic
configuration can also be used for specifying the email protocol.
Actions
* In call HTTP extension and Execute Program.
Agent criteria details
* JMS Queue Name, Initial Context Factory, QCF Lookup and
Provider URL.
Q
Printer Devices, Print Documents, and Print Components
Q
Purge Criterias log file name
Q
In the Sterling Multi-Channel Fulfillment Solution System
Management console:
You can use variables to specify installation rules such as e-mail
server name, server IP address, server listener port, and e-mail
protocol.
You can provide variables for the JMS monitoring configuration
fields, which include: WebLogic Provider URL, WebSphere Channel
name, host name, port number and queue manager name.
For the fields identified above, you can configure the values as
${VARIABLE_NAME} in <INSTALL_DIR>/properties/customer_
overrides.properties file. It is stored in the database as is and at
runtime when the variables are used, a lookup is performed in the
customer_overrides.properties file to decipher the value. Since, the
values for these variables are fetched from the customer_
overrides.properties file, they are specific to a particular JVM.
For additional information about modifying properties and the customer_
overrides.properties file, see the Sterling Multi-Channel Fulfillment
Solution Installation Guide.
For example, if you want to set the File IO Receivers directory structure
to a common variable say ffbase, then the incoming directory should be
set to ${ffbase}/incoming. The variable ffbase must be defined in the
file as:
ffbase=C:/FileIODir/Receiver
This ${ffbase}/incoming value is stored in the database, and when
processing the file adapter, the variable is resolved to
C:/FileIODir/Receiver/incoming.
The following conditions are assumed for the usage of this variable:
Q
All the variables when referenced must be in the following format:
${variable_name}
Q
All variables should be properly formed. If a variable is not found, no
substitution takes place.
Q
Variables must not contain the } character.
Q
Variables must not begin or end with a whitespace character.
Q
Templates do not support variables for filenames since they are
always resolved within the classpath.
When connecting the nodes within a service, keep in mind the API
node connection properties as listed in Table 819:
If your transaction is Task Queue based, it is suggested that you use the
infrastructure provided specifically to write task-based transactions. This
infrastructure automatically determines work for your custom agent from
the Task Queue, thus reducing the amount of design and development
required for your transaction.
All the custom agents written to the Sterling Multi-Channel Fulfillment
Solution specification are subclassed from the
com.yantra.ycp.japi.util.YCPBaseAgent class, which has two
abstract functions. When you implement these functions, they provide
the processing capabilities of a time-triggered transaction.
Q
public startTimer(String timerName);
Q
public endTimer(String timerName);
The logging and timing utility functions available are similar to the ones
provided by the com.yantra.ycp.japi.util.YCPBaseAgent class. The
signature of the executeTask() function is public Document
executeTask(YFSEnvironment oEnv, Document inXML);Env is a
pre-created instance of a YFSEnvironment object that can be passed to
APIs and InXML is the org.w3c.dom.Document object, which contains the
custom task XML. The custom task XML also contains a TransactionFilters
Node, which contains all the parameters passed to the task-based
custom time-triggered transaction. This node is below the root node of
the input XML. For example, see an example for a task-based custom
time-triggered transaction.
<?xml version="1.0" encoding="UTF-8"?>
<TaskQueue TaskQKey="" TransactionKey="" DataKey="" DataType="" AvailableDate=""
Lockid="" Createts="" Createprogid="" Createuserid=""
Modifyts="" Modifyprogid="" Modifyuserid="" >
<TransactionFilters AgentName="" TransactionKey=""
CurrentThread="" NumRecordsToBuffer="" TotalThreads=""/>
</TaskQueue>
try
{
Driver aDriver =
(Driver)Class.forName("oracle.jdbc.OracleDriver").newInstance();
String url = "jdbc:oracle:thin:@127.0.0.1:1521:qotree2";
Connection conn = DriverManager.getConnection(url, "Scott",
"Tiger");
conn.setAutoCommit(false);
String sql = "insert into TxnTest (key) values ('" + key + "')";
Statement stmt = conn.createStatement();
stmt.executeUpdate(sql);
oEnv.setTxnObject("YDBconn", conn);
}
catch (Exception e)
{
System.out.println ("Caught Exception :\n" + e);
}
}
public Document doSomething(YFSEnvironment env, Document doc) throws
Exception
{
System.out.println("Executing doSomething method...........");
writeToDB ("doSomething", env);
return doc;
}
}
Calling(YFSEnvironment)env.getTxnObject(ID)enables these
methods to obtain the handle to the external transaction object that
was previously registered by the
(YFSEnvironment)env.setTxnObject(String ID, Object txnObj).
Note the ID is the same in both the getTxnObject call and the
setTxnObject call.
The following is an example of the YFSTTxnCoordinatorUE user exit
interface implementation.
try
{
Connection ydbConn = (Connection)oEnv.getTxnObject("YDBconn");
ydbConn.rollback();
}
catch (Exception e)
{
System.out.println ("Caught Exception :\n" + e);
}
Q
ydmbe.jar
Q
ycsbe.jar
Q
ycpbe.jar
Q
ycmbe.jar
Q
sscapiconsbe.jar
Q
wmsbe.jar
Q
vasbe.jar
Q
sscapshared.jar
Q
xapi.jar
Q
log4j-1.2.12.jar
Q
yfcbe.jar
Q
xercesImpl.jar
Q
xml-apis.jar
When running on WebSphere in EJB or HTTP mode, the client CLASSPATH
must contain the following files of the Sterling Multi-Channel Fulfillment
Solution in <WAS_HOME>/AppClient/properties directory:
Q
xapi.jar
Q
log4j-1.2.12.jar
Q
yfcbe.jar
Q
xercesImpl.jar
Q
xml-apis.jar
When running on the WebLogic application server in EJB mode, the client
CLASSPATH should have the weblogic.jar WebLogic file.
When running on IBM JDK 1.5.* prefix the xercesImpl.jar,
xml-apis.jar, and xalan.jar files to bootclasspath. For example, in
UNIX the classpath is prefixed as follows:
-Xbootclasspath/p:<INSTALL_
DIR>/jdk/jre/lib/endorsed/xercesImpl.jar:<INSTALL_
DIR>/repository/eardata/yantra/war/yfscommon/xml-apis.jar:<INS
TALL_DIR>/jdk/jre/lib/endorsed/xalan.jar
API and service transactions that are outbound from the Sterling
Multi-Channel Fulfillment Solution can be configured through the Service
Builder, as described in the Sterling Multi-Channel Fulfillment Solution
Platform Configuration Guide.
API and service transactions that are inbound to the Sterling
Multi-Channel Fulfillment Solution can be invoked through the following
protocols:
Q
EJB
Q
HTTP and HTTPS
Q
LOCAL
Q
Web Services
Q
COM+
EJB
Use EJB for server-side execution of the code. Java call. All the methods
in the Sterling Multi-Channel Fulfillment Solution take a YFSEnvironment
and a document, and return a document. Since EJBs are designed to be
called remotely, each of these documents is serialized on one end and
unserialized on the other. However, the Sterling Multi-Channel Fulfillment
Solution uses an EJB, where each API takes two string parameters and
returns a string. Thereby, forcing any document implementation to
serialize and unserialize using a standard well-defined interface.
For example, a new EJB is created with method signatures like:
String createOrder(String env, String inputXML) throws
YFSException, RemoteException;
HTTP
Use HTTP for server side execution of code. Java call.
LOCAL
Use Local for client side execution of code. COM or Java call.
Web Services
Use Web Services for client side execution of code. COM or Java call.
COM+
Use COM for client side execution of VB or C++ code. COM or Java call.
Using COM requires setting up your server and runtime clients as
described in Using the Sterling Multi-Channel Fulfillment Solution with
Microsoft COM+ on page 56.
No Encryption or Decryption
If you operate in a secure and trusted environment which is protected
physically and electronically and you do not display credit card numbers
on the Sterling Multi-Channel Fulfillment Solution Consoles, you may
choose not to implement any encryption logic. Credit Card numbers are
be encrypted in this case and are stored in clear text. This is not a
recommended option except in the following scenarios:
Q
Your business does not accept, process, or store credit card numbers
or other sensitive information.
Q
The Sterling Multi-Channel Fulfillment Solution passes the externally
encrypted credit card numbers. All encryption and decryption is
handled externally.
No Decryption
If your business requires the Sterling Multi-Channel Fulfillment Solution
to store credit card numbers, but you never want the Sterling
Q
getEncryptedCreditCardNumber() - returns an encrypted credit card
number
Q
getEncryptedString() - accepts a string passed to it and returns the
string encrypted
Q
getDecryptedCreditCardNumber() - returns the credit card number
that had been encrypted using the getEncryptedCreditCardNumber()
API
Q
getDecryptedString() - accepts an encrypted string and returns the
string decrypted
To encrypt properties
When encrypting properties, you need to:
1. Append the property you want to encrypt with ".encrypted".
2. Ensure that the yfs.propertyencrypter.class property is
accessible through the CLASSPATH environment variable
After you are satisfied with all of the extensions you have made to the
Sterling Multi-Channel Fulfillment Solution (such as customizing the UI
and database, creating custom code and files, and so forth), make sure
that you build and deploy the new extensions. You should re-build and
deploy the Sterling Multi-Channel Fulfillment Solution Enterprise Archive
(EAR) with all the Java files, resource files, JSP files, custom classes, and
so forth, that you created or modified.
This section explains the following:
Q
Building Extensions
Q
Deploying Extensions
Q
Building and Deploying Enterprise-level Extensions
Q
To incorporate your JSP or JS file modifications, re-build the Sterling
Multi-Channel Fulfillment Solution EAR.
Note: Make sure that all the extended JSP and JS files are
stored in the <INSTALL_
DIR>/repository/eardata/yantra/war directory, if they
are not already there.
Q
-l for shared libraries
Q
-p for properties files
Q
-r for resource properties files
Q
-d for database JAR or ZIP files
<filelist> refers to the path to your custom file.
For example, if you want to install your custom JAR file to the Agent
and Integration Servers dynamic classpath run the install3rdparty
command with following arguments:
./install3rdParty.sh weblogic 10 -j <Path_to_your_custom_
JAR> -targetJVM AGENT
Q
Deploying Enterprise-level Extensions
Q
/template/<TEMPLATE_SPECIFIC_FOLDER>for storing the
extended template files
Where, <TEMPLATE_SPECIFIC_FOLDER> refers to the directory that
contains the specific templates. For example:
apifor storing the API-specific templates
emailfor storing E-mail-specific templates
eventfor storing Event-specific templates
userexitfor storing UE-specific templates
In addition to templates, you can put JAR files, resource files, entity
extensions, and customized webpages in the JAR file by creating the
required folder in the root of the JAR file. For example,
Q
/jarsfor storing the required JAR files
Q
/uijarsfor storing the UI-specific JAR files
Q
/entityfor storing the extended entity XMLs
Q
/webpagesfor storing the customized webpages
Q
/resourcesfor storing the modified resource files
3. After creating the JAR file, deploy the new JAR file by running the
InstallExtensions.sh (or InstallExtensions.cmd on Windows)
utility from the <INSTALL_DIR>/bin directory. For example:
./InstallExtensions.sh <filename>
Here, <filename> refers to the path to the JAR file you created in
Step 2.
Note: Make sure that all of the extended JSP and JS files
are stored in the <INSTALL_
DIR>/repository/eardata/yantra/war directory, if they
are not already there.
./deployer.sh -t entitydeployer
Note: You can use the plus (+) and ampersand (&) signs
only in the ItemID field.
Q
All instruction fields (for example, gift wrapping)
Q
All text fields (for example, reasons and comments)
XML-Based APIs
The following table lists all of the following special characters that should
follow the XML escape format.
B.3 Workbench
Workbench refers to the desktop development environment. Workbench
window contains one or more perspectives. A perspective defines the
initial set and layout of views in the Workbench window. Perspectives
contain views, editors, menus, and tool bars. You can customize a
perspective by defining a set of actions. More than one Workbench
window can exist on the desktop at any given time.
B.4.1 Overview
The Overview section provides plugin details such as plugin identifier,
version, and so forth. It also specifies the class that is called when the
user runs a plugin.
B.4.2 Dependencies
The Dependencies section provides a list of dependant plugins required
by the plugin to compile its code. If a plugin is using the extension points
of some other plugins, then the plugin must list those plugins as
dependant plugins.
B.4.3 Runtime
The Runtime section provides a list of libraries in which the plugin code is
packaged. For example, sop.jar. The class loader searches these libraries
during runtime to load the plugins classes. You can set the librarys type,
visibility, and content in the runtime section.
B.4.4 Extensions
The Extensions section describes the functionality that a plugin
contributes to the Eclipse platform by extending other plugins extension
points. The extension declaration must adhere to the schema defined by
the extension point it extends. You can add new menus and menu items
along with toolbar by extending the org.eclipse.ui.actionSets extension
point.
B.4.6 Build
The Build section provides a list of libraries that are required at the
runtime. It also lists the source folder where these libraries are located.
You can select the folders and/or files you want to include in the source
build and binary build.
B.4.7 Manifest.mf
The manifest.mf file contains a list of plugins that are loaded
dynamically. The Bundle-Activator entry specifies the name of the plugin.
For example, com.yantra.yfc.rcp.
B.4.8 Plugin.xml
The plugin.xml file contains all information that is required to run a
plugin. The plugin.xml file is used for defining Eclipse extension points,
and other dependent plugins extension points. However, if you are not
using any extension points, you can exclude this file.
B.4.9 Build.properties
The build.properties file contains all files and directories that are
required by a plugin at the runtime.
11. In the Extension Details panel, enter the properties of the actionSet
extension element.
12. In the visible, select "true" from the drop-down menu to make the
actions defined in this action set visible.
13. To create a new action extension element, right-click on actionSet
extension element and select New > action. The action extension
element gets created.
14. Select the action extension element. The Extension Element Details
panel displays.
15. In id*, enter a unique identifier for the action. This action identifier
corresponds to the identifier of the action that gets invoked when you
click on a menu item or related task. This action identifier also
corresponds to the action identifier specified in the URL field, which is
defined within a resource.
16. In class, to specify the implementation class, do any of the following:
Q
Click Browse. The Select Type pop-up window displays. Select the
class that extends the YRCAction class or YRCRelatedTaskAction
class.
Q
Click on the class* hyperlink. The Java Attribute Editor window
displays.
In Source Folder, the name of the source folder that you
selected to store the action class automatically displays. You
can also browse to the folder that you want to specify as the
source folder.
In Package, the name of the package that you selected to
store the action class automatically displays. This helps you to
easily manage your directory structure.
18. Depending on the action class that you are extending, write the code
to perform the required operation in the inherited abstract execute()
method. For example,
Q
If you are extending the YRCAction class then write the code for
performing the required operation in the execute() method. The
execute() method internally checks if the action can be run or not.
This check criteria depends on the following criteria:
Whether or not the current editor has errors.
Whether or not the current editor has been modified.
Therefore, following methods must be overridden in the class
which is extending the YRCAction class:
checkForErrors()This method is used to check if the current
editor has errors or not. If you want to skip this check, then
return false.
checkForModifications()This method is used to check if the
current editor has been modified or not. If you want to skip
this check, then return false.
Q
If you are extending theYRCRelatedTaskAction class then write the
code for performing the required operation in the executeTask()
method.
public TestPlugin() {
super();
plugin=this;
try {
YRCPlatformUI.registerPlugin(ID, this);
} catch (Exception ex) {
YRCPlatformUI.trace(ex);
}
}
}
Sterling Rich Client application. You can register all resource files
together within the plugin constructor.
A sample code that can be used to register a plugin and all its resource
files is as follows:
public class TestPlugin extends AbstractUIPlugin {
public TestPlugin() {
super();
plugin=this;
try {
YRCPlatformUI.registerPlugin(ID, this);
YRCPlatformUI.registerConfiguration("com.mycompany.test.rcp_
config", ID);
YRCPlatformUI.registerBundle("com.mycompany.test.rcp_bundle",
ID);
YRCPlatformUI.registerCommands("com.mycompany.test.rcp_
commands", ID);
YRCPlatformUI.registerExtensions("com.mycompany.test.rcp_
extn", ID);
YRCPlatformUI.registerTheme("com.mycompany.test.rcp_sapphire",
ID);
} catch (Exception ex) {
YRCPlatformUI.trace(ex);
}
}
YRCPlatformUI.registerBundle("com.yantra.pca.ycd_bundle", ID)
where com.yantra.pca.ycd_bundle is the name of the bundle file
without ".properties" extension. ID is a unique identifier of the plugin
that registers this bundle file.
Example B1 In the Phone Number field, the user enters the number as
6175677890 and presses the Tab key. You want to format this number
and display as 617-567-7890.
To display the formatted value, you must associate the formatted logic
with the Phone Number field. You can perform custom formatting for a
field by extending the YRCDataFormatter extension point.
Q
Right-click on plugin.xml file and select Open With > Plug-in
Manifest Editor.
4. Select the Extensions tab.
5. Click Add. From the New Extension window, select
com.yantra.yfc.rcp.YRCDataFormatter extension point from the list.
6. Click Finish.
7. Select the com.yantra.yfc.rcp.YRCDataFormatter extension point. The
Extension Details panel displays.
8. In the Extension Details panel, enter the properties of the
com.yantra.yfc.rcp.YRCDataFormatter extension point.
9. In ID, enter a unique identifier for the
com.yantra.yfc.rcp.YRCDataFormatter extension point. This is a
mandatory field.
10. To create a new dataFormatter extension element, right-click on
com.yantra.yfc.rcp.YRCDataFormatter and select New >
dataFormatter. The dataFormatter extension element is created.
11. Select the dataFormatter extension element. The Extension Element
Details panel displays.
12. In the Extension Details panel, enter the properties of the
dataFormatter extension element.
13. In attributeBinding*, enter the name of the XPath attribute whose
value you want to custom format. For example, the attribute binding
mentioned in Example B1 can be set as DayPhone.
14. In class, specify the implementation class by doing any of the
following:
Q
Click Browse. The Select Type pop-up window displays. Select the
implementation class that contains the formatting logic for the
field.
Q
Click on the class* hyperlink. The Java Attribute Editor window
displays.
In Source Folder, the name of the source folder that you
selected to store the implementation class displays. You can
also browse to the folder that you want to specify as the
source folder.
If you want to perform some custom validation on the field value, you
can write your own logic to validate the value. For example, in the
B.11 Siblings
Siblings are the first level children of the parent. For example, let us
consider the following scenario:
Here, the siblings of the OrderNo label are text box (Y001), button
(Search), and Group2, which are the first level children of Group1.
Similarly, the sibling of ItemID label is the text box (SKU-1001).
In the formId field, the identifier of the form displays, which is used to
identify the screen.
The left-hand side panel displays a list of models used in the screen as a
tree structure with root being the form identifier of the screen. After you
select a specific model, you can view a list of elements and attributes
defined in the model on the right-hand side panel. If a screen contains
embedded screens in it, then you can view a list of models used for each
screen.
This chapter contains the following resources for your reference while
developing the user interface:
Q
User Interface Style Reference
Q
Programming Standards
Q
JSP Functions
Q
JSP Tag Library
Q
JavaScript Functions
Q
Data Type Reference
Also, as when doing any sort of programming, see Appendix A, "Special
Characters Reference".
Example
om/orderline/search/orderline_search_bydate.jsp
control through the HTML object or DOM hierarchy. If you want to name
a control, ensure that the name is unique within each page.
C.2.5 Internationalization
The Sterling Presentation Framework provides the ability to write an
internationalized application. To enable this, it provides the following
features that can be customized to be locale-specific:
Q
i18n JSP tag for literals
Q
Graphics and images
Q
Client-side error messages
Q
Date and number validations
Q
Themes (which includes fonts that support language character sets)
C.4.1 changeSessionLocale
While locale is configured at the user level, you can also dynamically
switch to a specific locale by using the changeSessionLocale JSP function.
Syntax
void changeSessionLocale(String localecode)
Input Parameters
localecode - Locale you want to switch to.
C.4.2 equals
The equals JSP function is a cover over Java's equal function that handles
objects that are null, contain zero, or more white spaces. In such
situations, the two objects are considered equal.
Syntax
boolean equals(Object obj1, Object obj2)
Input Parameters
obj1, obj2 - Required. The two objects that must be compared.
Example
This example shows how this function makes string comparisons.
<% String sAvailable="";
if(equals(resolveValue("xml:/InventoryInformation/Item/@TrackedEverywhere"),"N")
)
sAvailable=getI18N("Available") + ": " + getI18N("INFINITE");
else
sAvailable=getI18N("Available") + ": "
+resolveValue("xml:/InventoryInformation/Item/@AvailableToSell");
%>
C.4.3 getCheckBoxOptions
This JSP function is a standard function to XML bind checkboxes when
modification rules need not be considered.
Syntax
String getCheckBoxOptions(String name)
String getCheckBoxOptions(String name,String a_checked, String a_
value)
Input Parameters
name - Required. Value of the name attribute for the checkbox input.
Can be a binding or a literal.
JSP Usage
<input type="checkbox"
<%=getCheckBoxOptions("xml:Order:/Order/Addlinfo/@Country" ,"IND",
"xml:Order:/Order/Addlinfo/@Country" )%></yfc:i18n>India</yfc:i18n></input>
Resultant HTML
<input type="checkbox" name="xml:Order:/OrderAddlinfo/@Country"
value="IND">India</input>
C.4.4 getColor
This JSP function returns the HTML color in hexidecimal code based on
the specific color object.
Syntax
public String getColor(java.awt.Color color)
Input Parameters
color - Required. Color object.
C.4.5 getComboOptions
This JSP function provides a standard function to XML bind combo boxes
when modification rules do not need to be considered.
Syntax
String getComboOptions(String name)
String getComboOptions(String name, String value)
Input Parameters
name - Required. Path in the target XML to which the value in the input
text is sent when the form is posted. Through the Sterling Presentation
Framework, the target XML is then passed to the appropriate API.
value - Required. Specifies the value to be selected in the combobox.
Can be a binding or a literal.
JSP Usage
This example shows how to render the enterprise code combobox in the
Order Entry screen. The API is used in conjunction with the loopOptions
JSP tag.
<select class="combobox" onChange="updateCurrentView()"
<%=getComboOptions("xml:/Order/@EnterpriseCode",enterpriseCode)%>>
<yfc:loopOptions binding="xml:/OrganizationList/@Organization"
name="OrganizationCode"
value="OrganizationCode" selected="xml:/Order/@EnterpriseCode"/>
</select>
C.4.6 getComboText
This JSP function provides a standard function to get description from a
list of values.
Syntax
String getComboText(String binding, String name, String value, String
selected)
String getComboText(String binding, String name, String value, String
selected,boolean localized)
Input Parameters
binding - Required. Binding string that points to the repeating element
in the API output. The repeating element must be one fixed with the at
character ("@").
name - Required. Path in the target XML to which the value in the input
text is sent when the form is posted. Through the Sterling Presentation
Framework, the target XML is then passed to the appropriate API.
value - Required. Specifies the value to be selected in the combobox.
Can be a binding or a literal.
JSP Usage
This example shows how to render the enterprise code combobox in the
Order Entry screen. The API is used in conjunction with the loopOptions
JSP tag.
<%=getComboText("xml:TaxNameList:/CommonCodeList/@CommonCode","CodeShortDescript
ion","CodeValue","xml:/HeaderTax/@TaxName",true)%>
C.4.7 getDateOrTimePart
This JSP function returns a string representing the date or time portion of
a timestamp value.
Syntax
String getDateOrTimePart(String type, String value);
Input Parameters
type - Required. Specifies whether to display the date or time. Pass
YFCDATE to return the date portion of the timestamp. Pass YFCTIME to
return the time portion of the timestamp.
value - Required. String containing a timestamp value in the current
login users locales timestamp format.
Output Parameters
A string representing the date or time portion of the timestamp attribute.
Example
This example uses the getDateOrTimePart() function to return the date
portion of the attribute referred to in the
xml:/OrderRelease/@HasDerivedParent binding.
getDateOrTimePart("YFCDATE",
resolveValue("xml:DeliveryPlan:/DeliveryPlan/@DeliveryPlanDate));
C.4.8 getDateValue
This JSP function retrieves the date from an XML in XML format, and not
in the format of current locale. This is typically used for storing a custom
sortValue attribute in a column for sorting a table.
Syntax
String getDateValue(String bindingStr);
Input Parameters
bindingStr - Required. Binding string that must be resolved into a date
string.
Output Parameters
Date string (YYYYMMDDHH24MISS structure), with the following values:
YYYY - Required. Four-digit display of year (for example, 2002).
MM - Required. Two-digit display of month (for example, 05 for May).
DD - Required. Two-digit display of date (for example, 05 for 5th).
HH24 - Required. Two-digit display of hour on a 24-hour scale (for
example, 16 for 4 PM).
MI - Required. Two-digit display of minutes.
SS - Required. Two-digit display of seconds.
Example
This example shows how the getDateValue() function stores the date in
this format for subsequent client-side sorting by the user on the list of
alerts for an order.
<table class="table" editable="false" width="100%" cellspacing="0">
<thead>
<tr>
<td class="tablecolumnheader"><yfc:i18n>Alert_ID</yfc:i18n></td>
<td class="tablecolumnheader"><yfc:i18n>Raised_On</yfc:i18n></td>
</tr>
</thead>
<tbody>
<yfc:loopXML binding="xml:/InboxList/@Inbox" id="Inbox">
<tr>
<td class="tablecolumn">
<yfc:getXMLValue binding="xml:/Inbox/@InboxKey"/>
</td>
<td class="tablecolumn"
sortValue="<%=getDateValue("xml:Inbox:/Inbox/@GeneratedOn")%>">
<yfc:getXMLValue binding="xml:/Inbox/@GeneratedOn"/>
</td>
</tr>
</yfc:loopXML>
</tbody>
</table>
C.4.9 getDBString
This JSP function returns a string representing the localized version of
the input string. The input to this method should be a data string that
has been translated in the YFS_LOCALIZED_STRINGS table.
Syntax
String getDBString(String inString)
Input Parameters
inString - Required. The string to be translated. This string should be
translated in the YFS_LOCALIZED_STRINGS table.
Example
This example shows how to display the translated version of the
Description attribute of the singleDocType element.
<%=getDBString(singleDocType.getAttribute("Description"))%>
C.4.10 getDetailHrefOptions
This JSP function is typically used to form a link in an inner panel that
opens another detail view. A link is modeled as a resource of type Link.
The resource can point to any other detail view, and you can configure
this through the resource configurator. Use this function inside an <a>
tag. This function can be used only in an inner panel (and therefore only
in a detail view).
Syntax
String getDetailHrefOptions(String linkIdSuffix, String entityKey, String
extraParams)
Input Parameters
linkIdSuffix - Required. Link ID suffix. A resource of type Link is named
as <current inner panel's Resource ID><suffix>. For instance, if the
current inner panel's Resource ID is YOMD010I01, a link ID is
YOMD010I01L01 and the suffix is L01. Pass only the suffix L01.
entityKey - Required. Key (formed through the makeXMLInput JSP tag)
that must be passed on to the view that is invoked by selecting this link.
extraParams - Required. String containing extra parameters that are
appended to the URL that is formed for the <a href> tag. The String
should start with an ampersand ("&") and should contain name-value
pairs in the <name>=<value> format. Restrict the use of this parameter
only to cases where it is absolutely necessary because there is a size
limit of what can be passed in a URL. Typically, each view should only
take the key and retrieve other details from an API based on that key.
Output Parameters
A string containing href="" and onclick="" attributes must be plugged
into a <a> tag in HTML.
The resource of type link is not permission controlled. However, the view
to which a link points is permission controlled. Still, since this function is
called inside an <a> tag, the link is formed regardless of whether or not
the user has permissions for the view to which the link points. If the user
selects the link, the view that is displayed gives an Access Denied
message.
Example
This example shows how the getDetailHrefOptions() function forms a
hyperlink to the Alert Detail view from a list of alerts for an order.
<table class="table" editable="false" width="100%" cellspacing="0">
<thead>
<tr>
<td sortable="no" class="checkboxheader">
<input type="checkbox" name="checkbox" value="checkbox"
onclick="doCheckAll(this);"/>
</td>
<td class="tablecolumnheader"><yfc:i18n>Alert_ID</yfc:i18n></td>
</tr>
</thead>
<tbody>
<yfc:loopXML binding="xml:/InboxList/@Inbox" id="Inbox">
<tr>
<yfc:makeXMLInput name="inboxKey">
<yfc:makeXMLKey binding="xml:/Inbox/@InboxKey"
value="xml:/Inbox/@InboxKey"/>
</yfc:makeXMLInput>
<td>
<input type="checkbox" value='<%=getParameter("inboxKey")%>'
name="EntityKey"/>
</td>
<td class="tablecolumn">
<a <%=getDetailHrefOptions("L01",
getParameter("inboxKey"),"")%> >
<yfc:getXMLValue binding="xml:/Inbox/@InboxKey"/>
</a>
</td>
</tr>
</yfc:loopXML>
</tbody>
</table>
Syntax
getDetailHrefOptions(String linkIdSuffix, String conditionalLinkId, String
entityKey, String extraParams)
Input Parameters
linkIdSuffix - Required. Link ID suffix. A resource of type Link is named
as <current inner panel's Resource ID><suffix>. For instance, if the
current inner panel's Resource ID is YOMD010I01, a link ID is
YOMD010I01L01 and the suffix is L01. Pass only the suffix L01.
conditionalLinkId - Required. Portion of the suffix of the link ID. Used
to conditionally link to different views.
entityKey - Required. Key (formed through the makeXMLInput JSP tag)
that must be passed on to the view that is invoked by selecting this link.
extraParams - Required. String containing extra parameters that are
appended to the URL that is formed for the <a href> tag. The string
should start with an ampersand (&) and contain name value pairs in the
syntax <name>=<value>. Because there is a size limit on what can be
passed in a URL, use this parameter only when absolutely necessary.
Typically, each view should only take the key and retrieve other details
from an API based on that key.
Output Parameters
A string containing href="" and onclick="" attributes that must be
plugged into a <a> tag in HTML.
The resource of type link is not permission controlled. However, the view
to which a link points is permission controlled. Still since this function is
called inside an <a> tag, the link is formed regardless of whether or not
the user has permissions for the view to which the link points. If the user
selects the link, the view that is displayed gives an Access Denied
message.
Example
This function is useful when a specific hyperlink on a screen must link
across document types. For example, a list of shipments on a Delivery
Plan screen could be shipments for different document types (order and
purchase order shipments). The detail view that must be shown for the
two types of shipments is different. The document type of the shipment
can be used as the conditionalLinkId.
<a <%=getDetailHrefOptions("L01", getValue("Shipment",
"xml:/Shipment/@DocumentType"), getParameter("shipmentKey"), "")%>>
<yfc:getXMLValue binding="xml:/Shipment/@ShipmentNo"/>
</a>
This example shows the call to the getValue() function returns the
document type of the shipment that is used as the conditionalLinkId. For
this example to work, the inner panel using this JSP should have to link
resources defined with the following properties:
Link 1: ID="YDMD100I02L010001" View ID="YOMD330"
Link 2: ID="YDMD100I02L010005" View ID="YOMD7330"
getDoubleFromLocalizedString -
C.4.12 getDoubleFromLocalizedString
This JSP function returns a double value that is represented in a string
containing the number in the format used by a particular locale.
This function does the reverse of the getLocalizedStringFromDouble()
function. See getLocalizedStringFromDouble on page 719.
Syntax
double getDoubleFromLocalizedString(YFCLocale aLocale, String sVal)
Input Parameters
aLocale - Required. The YFCLocale object for which you want the
number formatted for a specific locale.
sVal - Required. The string containing the formatted representation of
the number.
Output Parameters
A double containing the unformatted number.
JSP Usage
This example shows how the string variable containing a formatted
double called sTotalInternalUnassignedDemand is compared to zero by
first converting it into the double value.
<% if ((getDoubleFromLocalizedString(getLocale(),
sTotalInternalUnassignedDemand)) > 0) {%>
<table border="1" style="border-color:Black" cellspacing="2" cellpadding="2"
bgcolor="<yfc:getXMLValue
binding="xml:/InventoryInformation/Item/InventoryTotals/Demands/@Total
InternalUnassignedDemand" />">
<tr>
<td style="height:10px;width:15px"></td>
</tr>
</table>
<%}%>
C.4.13 getElement
This JSP function gets the YFCElement object that resides in a specific
namespace. You can use this function to obtain a handle to the
YFCElement and subsequently manipulate the XML in the YFCElement
object.
YFCElement is a part of the Sterling Multi-Channel Fulfillment Solution
DOM utility package. To see the APIs available in this package, refer to
the Sterling Multi-Channel Fulfillment Solution Javadocs.
Syntax
YFCElement getElement(String nameSpace)
Input Parameters
nameSpace - Required. Namespace that contains the YFCElement needs
to be returned.
Output Parameters
YFCElement - Required. YFCElement object that resides in the
namespace provided.
Example
This example shows how the Return detail view controls whether the
active or inactive state of the Schedule operation uses this function.
The Schedule operation is not valid for draft orders.
The getOrderDetail() API returns DraftOrderFlag attribute in the XML.
This flag is Y when the order is draft order, and N otherwise.
This must be converted into another flag that is opposite in meaning. As
a result, use an attribute called ConfirmedFlag, which is N when the
order is a draft order and Y when the order is no longer a draft order.
<%
YFCElement elem=getElement("Order");
if (elem != null) {
//Flip the draft order flag into confirmed flag.
elem.setAttribute("ConfirmedFlag",
!isTrue("xml:/Order/@DraftOrderFlag"));
}
%>
C.4.14 getImageOptions
This is the JSP function used for building an image tag in HTML.
A Java constants file keeps the image path and icon centralized. If the
path starts with /yantra/console/icons, the image file is first searched
for inside /webpages/extn/icons/sscapiconsbe.jar (or the localized
icons JAR file) and then inside the /webpages/yfscommon/
sscapiconsbe.jar (or the localized icons JAR file). The path to be
specified is the path of the image file inside the JAR file.
If the path does not start with /yantra/console/icons, it retrieves the
file from the location specified in the EAR file. It is strongly advised that
you place your images under the /console/icons/ directory in the
custom icons JAR file (sscapiconsbe.jar).
The path to be specified is the path of the image file inside the JAR file.
If you want to use an image that may be hidden based on modification
rule considerations, use the yfsgetImageOptions() function. See
yfsGetImageOptions on page 738.
Syntax
getImageOptions(imgfilewithpath, alt)
Input Parameters
imgfilewithpath - Required. Full path to the file of the image.
alt - Required. String to use as the alt attribute for the image. This string
is displayed when the image cannot be rendered on screen.
JSP Usage
<img class="lookupicon" name="search"
<%=getImageOptions(/yantra/console/icons/shipnode.gif Search_for_
Organization) %> />
C.4.15 getLocale
This JSP function returns a YFCLocale object that represents the locale of
the user logged into the Sterling Multi-Channel Fulfillment Solution.
Syntax
YFCLocale getLocale()
Input Parameters
None.
Output Parameters
The YFCLocale object that represents the locale of the logged in user.
JSP Usage
This example shows how the getLocale function can be used in
conjunction with the getDoubleFromLocalizedString function. See
getDoubleFromLocalizedString on page 716.
<% if ((getDoubleFromLocalizedString(getLocale(),
sTotalInternalUnassignedDemand)) > 0) {%>
<table border="1" style="border-color:Black" cellspacing="2" cellpadding="2"
bgcolor="<yfc:getXMLValue
binding="xml:/InventoryInformation/Item/InventoryTotals/Demands/@TotalInter
nalUnassignedDemand" />">
<tr>
<td style="height:10px;width:15px"></td>
</tr>
</table>
<%}%>
C.4.16 getLocalizedStringFromDouble
This JSP function returns a representation of a string value and displays
it in the correct format for a specific locale.
The Sterling Multi-Channel Fulfillment Solution always displays numeric
data in the format specific to the locale of the logged in user. If you have
a decimal value that you need to display to the user that is not formatted
in any locale, use this function to get a string representing the correctly
formatted representation of the decimal value.
Syntax
String getLocalizedStringFromDouble(YFCLocale aLocale, double aDblVal)
Input Parameters
aLocale - Required. The YFCLocale object for which you want the
number formatted for a specific locale.
aDblVal - Required. The number (which can include decimals) you want
formatted for a specific locale.
Output Parameters
A string containing the correctly formatted representation of the number.
JSP Usage
This example shows how to get the localized format of the number
2500.75. If the locale used is en_US, then the sBalance variable is
25,00.75.
String sBalance = getLocalizedStringFromDouble(locale, 2500.75);
C.4.17 getLocalizedStringFromInt
This JSP function returns a representation of an integer value and
displays it in the correct format for a specific locale.
The Sterling Multi-Channel Fulfillment Solution always displays numeric
data in the format specific to the locale of the logged in user. If you have
a decimal value that you need to display to the user that is not formatted
in any locale, use this function to get a string representing the correctly
formatted representation of the integer value.
Syntax
String getLocalizedStringFromInt(YFCLocale aLocale, int intVal)
Input Parameters
aLocale - Required. The YFCLocale object for which you want the
number formatted for a specific locale.
intVal - Required. The integer you want formatted for a specific locale.
Output Parameters
A string containing the correctly formatted representation of the number.
JSP Usage
This example shows to display an integer variable called quantity within
a <td> tag.
<td class="protectednumber">
<%=getLocalizedStringFromInt(getLocale(), quantity)%>
</td>
C.4.18 getLoopingElementList
This JSP function can be used as an alternative to the loopXML JSP tag.
See loopXML on page 751.
If your application servers only supports up to JSP specification version
1.1, and you need to include another JSP (using jsp:include) within the
loop, use this function.
Syntax
ArrayList getLoopingElementList(String binding)
Input Parameters
binding - Required. The XML binding to the element within an XML that
you want to repeat.
Output Parameters
An ArrayList containing the list of elements that you can then use in a
loop.
JSP Usage
This example loops on the
xml:PromiseList:/Promise/Options/@Option element. For each
iteration of the loop, it includes the
/om/lineschedule/list/lineschedule_list_option.jsp JSP file.
Note that loop element is set into an attribute of the pageContext so that
it is be available within the included JSP.
<td colspan="6" style="border:1px ridge black">
<% ArrayList optList =
getLoopingElementList("xml:PromiseList:/Promise/Options/@Option");
for (int OptionCounter = 0; OptionCounter < optList.size(); OptionCounter++) {
<% request.setAttribute("Option",
(YFCElement)pageContext.getAttribute("Option")); %>
<jsp:include page="/om/lineschedule/list/lineschedule_list_option.jsp"
flush="true">
</jsp:include>
<% } %>
</td>
C.4.19 getNumericValue
This JSP function retrieves a number from an XML output in the original
XML format, and not in the format of current locale. This is typically used
for storing a custom sortValue attribute in a column for sorting a table.
Syntax
String getNumericValue(String bindingStr)
Input Parameters
bindingStr - Required. Binding string that must be resolved into a
number string.
Output Parameters
Number string in the Sterling Multi-Channel Fulfillment Solution XML
format, with decimals.
Example
This example shows how the getNumericValue() function is used to
store the priority in XML format for subsequent client-side sorting by user
on the list of alerts for an order.
<table class="table" editable="false" width="100%" cellspacing="0">
<thead>
<tr>
<td sortable="no" class="checkboxheader">
<input type="checkbox" name="checkbox" value="checkbox"
onclick="doCheckAll(this);"/>
</td>
<td class="tablecolumnheader"><yfc:i18n>Alert_ID</yfc:i18n></td>
<td class="tablecolumnheader"><yfc:i18n>Priority</yfc:i18n></td>
</tr>
</thead>
<tbody>
<yfc:loopXML binding="xml:/InboxList/@Inbox" id="Inbox">
<tr>
<yfc:makeXMLInput name="inboxKey">
<yfc:makeXMLKey binding="xml:/Inbox/@InboxKey"
value="xml:/Inbox/@InboxKey"/>
</yfc:makeXMLInput>
<td>
<input type="checkbox" value='<%=getParameter("inboxKey")%>'
name="EntityKey"/>
</td>
<td class="tablecolumn">
<a <%=getDetailHrefOptions("L01",
getParameter("inboxKey"),"")%> >
<yfc:getXMLValue binding="xml:/Inbox/@InboxKey"/>
</a>
</td>
<td class="tablecolumn"
sortValue="<%=getNumericValue("xml:Inbox:/Inbox/@Priority")%>"><yfc:getXMLValue
binding="xml:/Inbox/@Priority"/>
</td>
</tr>
</yfc:loopXML>
</tbody>
</table>
C.4.20 getParameter
This JSP function obtains the value of the parameter requested from the
pageContext() function and requests in the following order:
pageContext.getAttribute() -> If not found -> request.getAttribute() ->
If not found ->request.getParameter().
Syntax
String getParameter(String paramName);
Input Parameters
paramName - Required. Name of the parameter whose value is
required.
Example
This example shows how an order list view shows a hyperlinked order
number that opens the default detail view. The yfc:makeXMLInput JSP
tag uses the keys specified to prepare and stores the XML. The XML can
be extracted using the getParameter() function.
<table class="table" editable="false" width="100%" cellspacing="0">
<thead>
<tr>
<td sortable="no" class="checkboxheader">
<input type="checkbox" name="checkbox" value="checkbox"
onclick="doCheckAll(this);"/>
</td>
<td class="tablecolumnheader"><yfc:i18n>Order_#</yfc:i18n></td>
<td class="tablecolumnheader"><yfc:i18n>Enterprise</yfc:i18n></td>
</tr>
</thead>
<tbody>
<yfc:loopXML binding="xml:/OrderList/@Order" id="Order">
<tr>
<yfc:makeXMLInput name="orderKey">
<yfc:makeXMLKey binding="xml:/Order/@OrderHeaderKey"
value="xml:/Order/@OrderHeaderKey" />
</yfc:makeXMLInput>
<td class="checkboxcolumn">
<input type="checkbox" value='<%=getParameter("orderKey")%>'
name="EntityKey"/>
</td>
<td class="tablecolumn"><a
href="javascript:showDetailFor('<%=getParameter("orderKey")%>');">
<yfc:getXMLValue binding="xml:/Order/@OrderNo"/></a>
</td>
<td class="tablecolumn"><yfc:getXMLValue
binding="xml:/Order/@EnterpriseCode"/></td>
</tr>
</yfc:loopXML>
</tbody>
</table>
C.4.21 getRadioOptions
This JSP function XML binds radio buttons when modification rules do not
need to be considered.
Syntax
String getRadioOptions(String name)
String getRadioOptions(String name, String checked)
String getRadioOptions(String name, String a_checked, String a_value)
Input Parameters
name - Required. Value of the name attribute for the radio input. Can be
a binding or a literal.
checked - Required. Sets the checked attribute for the element with the
matching ID. Must be a literal.
value - Required. Value of the value attribute for the radio input. Can be
a binding or a literal.
JSP Usage
<input type="radio" <%=getRadioOptions("xml:Order:/OrderAddlinfo/@Country"
,"US", "xml:Order:/OrderAddlinfo/@Country" )%>>United States</input>
Resultant HTML
<input type="radio" name="US" value="US" CHECKED>United States</input>
C.4.22 getRequestDOM
This JSP function constructs a YFCElement containing all of the XML
elements that could be created out of the request parameters that are
available when this function is called. When a particular screen is
"posted", the input fields on the screen that are bound to XML values can
be accessed via this function. The YFCElement that is constructed
contains the following structure:
<root>
<namespace1 ... />
<namespace2 ... />
...
</root>
This function is useful when you need to access the posted XML values in
the proper XML structure for some JSP processing.
Syntax
String getRequestDOM()
Input Parameters
None.
Output Parameters
A YFCElement containing all of the XMLs that could be created out of the
request parameters that were available when this function was called.
JSP Usage
The following example shows the output of getRequestDOM if the
following input fields are posted:
<input type="hidden" name="xml:/Order/@OrderNo" value="Order0001"/>
<input type="hidden" name="xml:/Order/@OrderType" value="Customer"/>
<input type="hidden" name="xml:/User/@UserName" value="user01"/>
C.4.23 getSearchCriteriaValueWithDefaulting
This JSP function handles the situation where you want to use a default
value in the search criteria fields. This special function is required
because it is necessary to distinguish between when the user has come
to a screen initially versus when a saved search has been loaded and this
attribute has specifically been saved as "blank" in the saved search. In
that this type of saved search is being loaded into the search view, then
the defaulting should not take place.
Syntax
String getSearchCriteriaValueWithDefaulting(String binding, String
defaultBinding)
Input Parameters
binding - Required. The target XML binding of the search criteria field
that needs to have its value defaulted accordingly.
defaultBinding - Required. The XML binding (or static value) from
where the default value should come from when the user is navigating to
that search screen for the first time.
Output Parameters
A string containing the value that is displayed in that search criteria field.
JSP Usage
This example shows how an "enterprise code" combo box on an order
search screen can be defaulted to the primary enterprise code of the
logged in user's organization.
<td class="<%=inputTdClass%>" nowrap="true">
<select class="combobox" <%=getComboOptions(enterpriseCodeBinding)%>>
<yfc:loopOptions
binding="xml:CommonEnterpriseList:/OrganizationList/@Organization"
name="OrganizationCode"
value="OrganizationCode"
selected='<%=getSearchCriteriaValueWithDefaulting("xml:/Order/@EnterpriseCode",
"xml:CurrentOrganization:/Organization/@PrimaryEnterpriseKey")%>'/>
</select>
</td>
C.4.24 getTextAreaOptions
This JSP function XML binds a text area when modification rules do not
need to be considered.
Syntax
getTextAreaOptions(String name)
Input Parameters
name - Required. Value of the name attribute for the Text Area Box input.
Can be a binding or a literal.
JSP Usage
<=%getTexAreaOptions("xml:/Order/Instructions/Instruction/@InstructionText")%>
C.4.25 getTextOptions
This JSP function XML binds text input fields when modification rules do
not need to be considered.
Syntax
String getTextOptions(String name)
String getTextOptions(String name, String value)
String getTextOptions(String name, String value, String defaultValue)
Inserting this function enables setting the value of a text input when it is
displayed and setting the path and attribute in an XML to where the
value should go when the form is posted.
If the value and default value are not given, the default value is blanks
and value defaults to name.
Input Parameters
name - Required. Path in the target XML to which the value in the input
text is sent when the form is posted. The target XML is then passed to
the appropriate API through the Sterling Service Definition Framework.
value - Required. Specifies what to display as the input text. Can be a
binding or a literal. Default is name.
Example
This example results in a input text that displays the value of a bound
attribute and sets the value of a bound attribute when the form is
posted. This is the XML referenced by the bindings:
<Order>
<addlInfo Country="US"></addlInfo>
</Order>
JSP Usage
<input type="text" <%=getTextOptions("xml:Order:/OrderAddlinfo/@Country"
,"xml:Order:/OrderAddlinfo/@Country", "USA")%> />
HTML Results
When the value binding is found:
<input type="text" name=" xml:Order:/OrderAddlinfo/@Country " value="US"
Datatype='' size="10" Decimal='' OldValue="United States"/>
Example
Inserting a Text Box.
<input type="text" class="unprotectedinput"
<%=getTextOptions("xml:/Order/OrderLines/OrderLine_" + OrderLineCounter +
"/@ShipNode", "xml:/OrderLine/@ShipNode")%>/>
C.4.26 getUITableSize
This JSP function returns the UI width of the attribute passed as input.
This can be used to set the column width of tables within your screens to
achieve consistent sizing of the columns throughout the application. The
width that is used comes from the data type definition of the attribute.
See the extending datatypes.
Syntax
getUITableSize(String binding)
Parameters
Path to the current attribute in XML.
Note: this should be used in the style attribute of all <td> tags within
all <thead> tags of list tables.
JSP Usage
style="width:<%=getUITableSize("xml:/Order/@OrderDate")%>"
C.4.27 getValue
This JSP function gets the value of the binding string provided from the
XML namespace provided.
Syntax
String getValue(String xmlName,String binding)
Input Parameters
xmlName - Required. Namespace of the XML. Even if the binding string
contains the namespace, this must be provided.
binding - Required. Binding string.
Example
This example explains how the supply type is extracted from the output
of the API in the Inventory Adjustment screen.
<%
String
supplyType=getValue("Item","xml:/Item/Supplies/InventorySupply/@SupplyType");
%>
Syntax
String getValue(YFCElement element, String binding)
Input Parameters
element - Required. YFCElement from which the attribute must be
extracted.
binding - Required. Binding string.
Example
This example shows how the supply type could be extracted from the
output of the API in the Inventory Adjustment screen.
<%
YFCElement elem=getParameter("Item");
String
supplyType=getValue(elem,"xml:/Item/Supplies/InventorySupply/@SupplyType");
%>
C.4.29 goToDetailView
This JSP function can be used to conditionally display different detail
views based on the logic specified within a JSP page. This function can
only be used in conjunction with detail views that have been defined as
"redirector views". This function is useful when you need to conditionally
navigation to a different detail view based on some logic (possibly
determined by the output of an API call). In the JSP anchor page of a
redirector view, use this function to ultimately navigate to the detail view
that is shown to the user.
Syntax
void goToDetailView(HttpServletResponseresponse, String viewGroupId)
Input Parameters
response - Required. The response object. Pass the "response" object as
is from your redirector JSP.
viewGroupId - Required. The view group ID that is shown to the end
user.
Output Parameters
None.
JSP Usage
This example shows the complete JSP that is the anchor page of the
shipment detail redirector view. If the shipment that is displayed is a
shipment for a provided service, then a different detail view is displayed.
Note that the output of the getShipmentDetails() API is used to
determine which view should be displayed.
<%@include file="/yfsjspcommon/yfsutil.jspf"%>
<%
String sViewGrp = "YOMD710";
if (isTrue("xml:/Shipment/@IsProvidedService")) {
sViewGrp = "YOMD333";
}
goToDetailView(response, sViewGrp);
%>
C.4.30 isModificationAllowed
This JSP function is used to determine if modification is permitted for a
certain attribute for the current entity.
Syntax
boolean isModificationAllowed(String name, String allowModBinding)
Input Parameters
name - Required. Path in the target XML attribute. If this attribute is
modifiable for the current entitys status, the function returns true. If it is
not modifiable, the function returns false.
JSP Usage
This example shows how the table footer containing the dynamic add
rows feature can be included in a page based on whether or not add rows
is permitted for the current order.
<%if
(isModificationAllowed("xml:/@AddInstruction","xml:/Order/AllowedModifications")
) {%>
<tr>
<td nowrap="true" colspan="3">
<jsp:include page="/common/editabletbl.jsp" >
</jsp:include>
</td>
</tr>
<%}%>
C.4.31 isPopupWindow
This JSP function determines whether or not the current window is
displayed in a pop-up window. Use this function when the logic in your
screen must differ when it appears in a pop-up window.
Syntax
isPopupWindow()
Input Parameters
None.
Output Parameters
A boolean indicating whether or not the current window is displayed in a
pop-up window.
JSP Usage
In this example, the selected value that appears in the combobox is
different depending on whether this screen is being shown within a
pop-up window.
C.4.32 isTrue
This JSP function returns true if the attribute specified in the input
parameter has a value of Y, or true. Otherwise, it returns false. It is not
case sensitive.
Syntax
boolean isTrue(String bindingStr);
Input Parameters
bindingStr - Required. Binding string that specifies which attribute to
evaluate.
Output Parameters
A boolean indicating if the attribute being evaluated has a value of Y or
true.
Example
This example uses the isTrue() function to find out the value of the
attribute referred to in the xml:/OrderRelease/@HasDerivedParent
binding.
boolean isAgainstOrder=isTrue("xml:/OrderRelease/@HasDerivedParent");
C.4.33 isVoid
This JSP function determines whether the object passed is null or
contains only white spaces.
Syntax
boolean isVoid(Object obj)
Input Parameters
obj - Required. Object that must be checked for null or white spaces.
Example
This example shows how this function is used to check if a specific
attribute is void.
<% if (!isVoid(getParameter("ShowShipNode"))) {%>
<tr>
<td class="detaillabel" ><yfc:i18n>Ship_Node</yfc:i18n></td>
<td class="protectedtext"><yfc:getXMLValue
binding="xml:/InventoryInformation/Item/@ShipNode"
name="InventoryInformation"></yfc:getXMLValue></td>
</tr>
<%}%>
C.4.34 resolveValue
This JSP function gets the value of the binding string provided from the
YFCElement provided.
Syntax
String resolveValue(String binding)
Input Parameters
binding - Required. Binding string. Binding string can contain the
namespace.
Example
This example shows how this function is used to resolve the value
pointed to by a binding string.
<%
String reqshipdate=resolveValue("xml:OrderEntry:/Order/@ReqShipDate");
%>
C.4.35 showEncryptedCreditCardNo
This JSP function returns a value to the display that represents an
encrypted credit card number.
Syntax
showEncryptedCreditCardNo(String CreditCardNo)
Input Parameters
CreditCardNo - Required. String containing the last four digits of a
credit card number.
Example
<%=showEncryptedCreditCardNo(resolveValue("xml:/PaymentMethod/@Disp
layCreditCardNo"))%>
C.4.36 userHasOverridePermissions
This JSP function determines whether or not the current login user has
permission to override the modifications rules configuration.
Syntax
boolean userHasOverridePermissions()
C.4.37 yfsGetCheckBoxOptions
This JSP function XML binds checkboxes when modification rules need to
be considered.
Syntax
String yfsGetCheckBoxOptions(String name,String a_checked, String a_
value, String allowModBinding)
Input Parameters
name - Required. Path in the target XML to which the value in the input
text is sent when the form is posted. Through the Sterling Service
JSP Usage
<input class="checkbox" type="checkbox"
<%=yfsGetCheckBoxOptions("xml:/Order/@ChargeActualFreightFlag","xml:/Order/@Char
geActualFreightFlag","Y","xml:/ Order/AllowedModifications")%>/>
C.4.38 yfsGetComboOptions
This JSP function XML binds combo boxes when modification rules need
to be considered.
Syntax
String yfsGetComboOptions(String name, String allowModBinding)
String yfsGetComboOptions(String name, String value, String
allowModBinding)
Input Parameters
name - Required. Path in the target XML to which the value in the input
text is sent when the form is posted. Through the Sterling Service
Definition Framework, the target XML is then passed to the appropriate
API.
value - Required. Specifies what to display as the input text. Can be a
binding or a literal.
allowModBinding - Required. Binding string that points to a set of
elements containing modification types that are permitted for the current
status.
JSP Usage
<select <% if (isVoid(modifyView)) {%> <%=getProtectedComboOptions()%> <%}%>
<%=yfsGetComboOptions("xml:/Order/@ScacAndServiceKey",
"xml:/Order/AllowedModifications")%>>
<yfc:loopOptions binding="xml:/ScacAndServiceList/@ScacAndService"
name="ScacAndServiceDesc"
value="ScacAndServiceKey" selected="xml:/Order/@ScacAndServiceKey"/>
</select>
C.4.39 yfsGetImageOptions
This JSP function builds an image tag in HTML. The image may be
hidden, based on whether the modification of the XML attribute passed
as a parameter is permitted or not, unlike the getImageOptions()
function. See getImageOptions on page 718.
A Java constants file keeps the image path and icon centralized. If the
path starts with /yantra/console/icons, the image file is first searched
for inside /webpages/extn/icons/sscapiconsbe.jar (or the localized
icons JAR file) and then inside the
/webpages/yfscommon/sscapiconsbe.jar (or the localized icons JAR
file). The path to be specified is the path of the image file inside the JAR
file.
If the path does not start with /yantra/console/icons, it picks up the
file from the location in the EAR file. It is strongly advised that you place
your images under /console/icons in the custom icons JAR file
(sscapiconsbe.jar).
The path to be specified is the path of the image file inside the JAR file.
Syntax
String yfsGetImageOptions(String src, String alt, String name, String
allowModBinding)
Parameters
src - Required. Image file name, including the path, within the icons JAR
file.
alt - Required. Tooltip to use for the image.
name - Required. Path in the target XML attribute. This function shows
the image only when modification of this attribute is permitted based on
the status of the current entity.
allowModBinding - Required. Binding string that points to a set of
elements containing modification types that are permitted for the current
order status.
JSP Usage
<img class="lookupicon" name="search" onclick="invokeCalendar(this);return
false" <%=yfsGetImageOptions(YFSUIBackendConsts.DATE_LOOKUP_ICON, "Calendar",
"xml:/Order/@ReqShipDate", "xml:/Order/AllowedModifications")%>/>
C.4.40 yfsGetTemplateRowOptions
This JSP function XML binds input fields when the field appears within an
editable tables template row. The template row appears when the plus
icon ("+") is selected in an editable table.
Syntax
String yfsGetTemplateRowOptions(String name, String allowModBinding,
String modType, String controlType)
Input Parameters
name - Required. Value of the name attribute for the input. Can be a
binding or a literal.
allowModBinding - Required. Binding string that resolves to a list of
elements containing all modification types permitted for the current
status of the entity.
modType - Required. Modification type associated with the current
control.
controlType - Required. Type of control. Can be a textbox, checkbox or
textarea.
JSP Usage
<input type="text" <%=yfsGetTemplateRowOptions("xml:/Order/OrderLines/OrderLine_
/Item/@ItemID", "xml:/Order/AllowedModifications", "ADD_LINE", "text")%>/>
Example
This example shows how this function is used to store a template row in
the list of order lines for an order in the Order detail view.
<tfoot>
<tr style='display:none' TemplateRow="true">
<td class="checkboxcolumn">
<input type="hidden"
<%=getTextOptions("xml:/Order/OrderLines/OrderLine_/@Action", "", "CREATE")%>
/>
</td>
<td class="tablecolumn"> </td>
<td class="tablecolumn"> </td>
<td class="tablecolumn" nowrap="true">
<input type="text"
<%=yfsGetTemplateRowOptions("xml:/Order/OrderLines/OrderLine_/Item/@ItemID",
"xml:/Order/AllowedModifications", "ADD_LINE", "text")%>/>
<img class="lookupicon"
onclick="templateRowCallItemLookup(this,'ItemID','ProductClass','UnitOfMeasure',
'item')" <%=getImageOptions(YFSUIBackendConsts.LOOKUP_ICON, "Search_for_
Item")%>/>
</td>
<td class="tablecolumn">
<select
<%=yfsGetTemplateRowOptions("xml:/Order/OrderLines/OrderLine_
/Item/@ProductClass", "xml:/Order/AllowedModifications", "ADD_LINE",
"combo")%>>
<yfc:loopOptions
binding="xml:ProductClassList:/CommonCodeList/@CommonCode" name="CodeValue"
value="CodeValue"
selected="xml:/Order/OrderLine/Item/@ProductClass"/>
</select>
</td>
<td class="tablecolumn">
<select
<%=yfsGetTemplateRowOptions("xml:/Order/OrderLines/OrderLine_
/Item/@UnitOfMeasure", "xml:/Order/AllowedModifications", "ADD_LINE",
"combo")%>>
<yfc:loopOptions
binding="xml:UnitOfMeasureList:/CommonCodeList/@CommonCode" name="CodeValue"
value="CodeValue"
selected="xml:/Order/OrderLine/Item/@UnitOfMeasure"/>
</select>
</td>
<td class="tablecolumn"> </td>
C.4.41 yfsGetTextAreaOptions
This JSP function XML binds text areas when modification rules need to
be considered.
Syntax
String yfsGetTextAreaOptions(String name, String a_value, String
allowModBinding)
String yfsGetTextAreaOptions(String name, String allowModBinding)
Parameters
name - Required. Path in the target XML to which the value in the input
text is sent when the form is posted. Through the Sterling Service
Definition Framework, the target XML is then passed to the appropriate
API.
value - Required. Specifies what to display as the input text. Can be a
binding or a literal.
allowModBinding - Required. Binding string that points to a set of
elements containing modification types that are permitted for the current
status.
JSP Usage
<textarea class="unprotectedtextareainput" rows="3" cols="100"
<%=yfsGetTextAreaOptions("xml:/Order/Instructions/Instruction_" +
InstructionCounter + "/@InstructionText","xml:/Instruction/@InstructionText",
"xml:/Order/AllowedModifications")%>><yfc:getXMLValue
binding="xml:/Instruction/@InstructionText"/></textarea>
C.4.42 yfsGetTextOptions
This JSP function XML binds text input fields when modification rules
need to be considered.
Syntax
String yfsGetTextOptions(String name, String allowModBinding)
String yfsGetTextOptions(String name, String value, String
allowModBinding)
String yfsGetTextOptions(String name, String value, String defaultValue,
String allowModBinding)
Input Parameters
name - Required. Path in the target XML to which the value in the input
text is sent when the form is posted. Through the Sterling Service
Definition Framework, the target XML is then passed to the appropriate
API.
value - Required. Specifies what to display as the input text. Can be a
binding or a literal.
defaultValue - Required. This can be a binding or a literal that is
defaulted to in the case that the value binding returns nothing.
allowModBinding - Required. This is a binding string that points to a
set of elements containing modification types that are permitted for the
current status.
JSP Usage
<input type="text" <%=yfsGetTextOptions("xml:/Order/@ReqShipDate",
"xml:/Order/AllowedModifications")%>/>
C.5.1 callApi
The callApi JSP tag calls an API from within the JSP file. In most cases, it
is not necessary to make an API call from inside a JSP file. However,
Attributes
apiID - Required. Postfix of the resource ID of the API to be called.
When an API resource is configured through the Resource Configurator, a
postfix must be supplied for the resource ID. This is the postfix value
that must be used.
Body
None.
Example
In this example, the callAPI is used to retrieve additional attributes about
an item using the getItemDetails() API defined in the API resource
containing the API in the ID. Note that the API input or template is not
specified anywhere in the JSP. This is configured in the API resource
definition just like every other API.
<yfc:loopXML binding="xml:/OrderLineStatusList/@OrderStatus" id="OrderStatus">
<tr>
<yfc:makeXMLInput name="orderLineKey">
<yfc:makeXMLKey binding="xml:/OrderLineDetail/@OrderLineKey"
value="xml:/OrderStatus/OrderLine/@OrderLineKey"/>
<yfc:callAPI apiID='AP1'/>
< ... >
</tr>
After the callApi JSP tag is used in the JSP, the output is available in the
corresponding output namespace.
Attributes
apiName - Optional. The name of the API that is called. When using this
alternative method of callAPI either apiName or serviceName is required.
serviceName - Optional. The name of the service (from Sterling Service
Definition Framework) that is called. Calling a service does not support
passing templates. When using this alternative method of callAPI, either
serviceName or apiName is required.
inputElement - Required when using this alternative method. A
YFCElement representing the input element that is to be passed to the
API.
templateElement - Conditionally required. A YFCElement representing
the output template expected for the API. When using this alternative
method, if the apiName attribute is used, then templateElement is
required. If serviceName is used, then templateElement is ignored.
outputNamespace - Optional. The namespace under which the output
of the API is placed.
The output of the API is saved in this namespace. Namespace is optional,
but if it is not specified, it is defaulted to the root node name of the XML
under consideration. Therefore, while referring to the output of the API,
even if namespace is not specified here, it can be assumed to be the
same as the root node name of the output.
A namespace is a tag that can be used to identify a specific XML. The
Sterling Presentation Framework enables you to call multiple APIs and
store the outputs in different namespaces. In your JSP or in the input to
an API, you can refer to values from any namespace that is available at
that point.
inputNamespace - Optional. The input namespace is used to
dynamically resolve additional input to the API. For more information
about input namespace see Section 3.25, "API Input" on page 135.
Body
None.
Example
The following example shows how the getOrderDetails() API can be
called from within a JSP without defining an API resource in the Resource
Configurator. Note how the input and template elements are formed in
the JSP before the callAPI tag is used. After the callAPI tag call, the
output of the getOrderDetails() API is available in the
RelatedFromOrderDetails namespace that can be used later on within
the JSP.
<%
YFCDocument inputDoc = YFCDocument.parse("<Order
OrderHeaderKey=\"xml:/Document/@RelatedFromOrderHeaderKey\"/>");
YFCDocument templateDoc = YFCDocument.parse("<Order EnterpriseCode=\"\"
OrderHeaderKey=\"\" OrderNo=\"\"
Status=\"\" BuyerOrganizationCode=\"\" SellerOrganizationCode=\"\"
OrderDate=\"\" RulesetKey=\"\" HoldFlag=\"\" DocumentType=\"\"
isHistory=\"\"/>");
%>
<yfc:callAPI apiName='getOrderDetails'
inputElement='<%=inputDoc.getDocumentElement()%>'
templateElement='<%=templateDoc.getDocumentElement()%>'
outputNamespace='RelatedFromOrderDetails'/>
C.5.3 getXMLValue
The getXMLValue JSP tag returns the value of an XML attribute specific to
an XML binding.
Attributes
name - Optional. String containing the namespace of the XML from
which a value must be obtained. If this parameter is not used, the value
is picked up from the binding. For example, if you specify
xml:/Menu/@MenuDescription as the binding, the value for name
defaults to Menu. Or in another example, if you specify
xml:/mymenu:/Menu/@MenuDescription as the binding, the name
defaults to mymenu.
binding - Required. String containing the XML path that points to the
attribute of the requested value.
Body
None.
Example
<td class="protectedtext"><yfc:getXMLValue binding="xml:/Category/@CategoryID"
name="Category" /></td>
C.5.4 getXMLValueI18NDB
The getXMLValueI18NDB JSP tag returns the localized value of an XML
attribute specific to an XML binding based on the users locale.
Attributes
name - Optional. String containing the namespace of the XML from
which a value must be obtained. If this parameter is not used, the value
is picked up from the binding. For example, if you specify
xml:/Menu/@MenuDescription as the binding, the value for name
defaults to Menu. Or in another example, if you specify
xml:/mymenu:/Menu/@MenuDescription as the binding, the name
defaults to mymenu.
binding - Required. String containing the XML path that points to the
attribute of the requested value.
Body
None.
Example
<td class="protectedtext"><yfc:getXMLValueI18NDB
binding="xml:/Category/@Description" name="Category" /></td>
C.5.5 hasXMLNode
The hasXMLNode JSP tag is used to determine if a specific XML element
or attribute is returned by the API.
Attributes
binding - Required. String containing the XML path of the element or
attribute to seek. If the binding string contains an attribute, this tag does
not permit its body to be processed if the attribute is void, even if the
element exists.
Body
Can contain HTML that is written only if the hasXMLNode evaluates to
true.
Example
This example shows how a kit icon is shown for those lines belonging to
an order release that contain kits.
<td class="tablecolumn" nowrap="true">
<yfc:hasXMLNode binding="xml:/OrderLine/KitLines/KitLine">
<a <%=getDetailHrefOptions("L03",
getParameter("orderLineKey"), "")%>>
<img class="columnicon"
<%=getImageOptions(YFSUIBackendConsts.KIT_COMPONENTS_COLUMN, "Kit_
Components")%>>
</a>
</yfc:hasXMLNode>
</td>
This example shows how a parent kit line icon is shown for those lines that have
a parent kit line.
<yfc:hasXMLNode binding="xml:/OrderLine/@OrigOrderLineKey">
<a <%=getDetailHrefOptions("L05", getParameter("origOrderLineKey"), "")%>>
<img class="columnicon" <%=getImageOptions(YFSUIBackendConsts.DERIVED_
ORDERLINES_COLUMN, "Kit_Parent_Line")%>>
</a>
</yfc:hasXMLNode>
C.5.6 i18n
The i18n JSP tag retrieves the localized description of the key from the
resource bundles. Use this for all literals in the HTML.
Attributes
None.
Body
Key that must be resolved into the localized string. For more information
on how the system uses locale-specific resource bundles, see the Sterling
Multi-Channel Fulfillment Solution Localization Guide.
Example
This example shows how query types (is, starts with, contains) are
shown in a select tag from the output of an API.
<tr>
<td class="searchlabel" ><yfc:i18n>Product_Class</yfc:i18n></td>
</tr>
C.5.7 i18ndb
The i18ndb JSP tag retrieves the localized description of the value from
the YFS_LOCALIZED_STRING table based on the users locale. Use this to
get the localized database descriptions in the HTML.
Attributes
None.
Body
Key that must be resolved into the localized string. For more information
on how the system uses locale-specific resource bundles, see the Sterling
Multi-Channel Fulfillment Solution Localization Guide.
Example
This example shows how query types (is, starts with, contains) are
shown in a select tag from the output of an API.
<tr>
<td>
<yfc:i18ndb><%=resolveValue("xml:/Shipment/Status/@StatusName")%>
</yfc:i18ndb>
</td>
</tr>
C.5.8 loopOptions
The loopOptions JSP tag builds the options belonging to the HTML select
tag.
Attributes
binding - Required. Binding string that points to the repeating element
in the API output. The repeating element must be one fixed with the at
character ("@").
name - Optional. Attribute name within the binding element to be used
for the description visible to the user in the option tag. If not passed,
defaults to name, which means that the Sterling Multi-Channel
Fulfillment Solution searches for an attribute called name.
value - Optional. Attribute name within the binding element to be used
for the value attribute of the option tag. If not passed, it defaults to
value, which means that the Sterling Multi-Channel Fulfillment Solution
searches for an attribute called value.
selected - Optional. Binding string that must be evaluated and set as
the default selected value. This is matched with the value attribute, not
the description attribute. Defaults to blanks, for example, space (" ").
isLocalized - Optional. If passed as "Y" it obtains the localized
description to be displayed based on the users locale from the YFS_
LOCALIZED_STRINGS table.
targetBinding - Optional. If the target binding of the select is different
than the source binding, you must specify the target binding as input
when using loopOptions. This ensures that data entered by the end user
is not be lost even when an exception is generated in the API.
Body
None.
Examples
This example shows how query types (is, starts with, contains) are
shown in a select tag from the output of an API.
<td nowrap="true" class="searchcriteriacell" >
<select name="xml:/Item/@ItemIDQryType" class="combobox" >
<yfc:loopOptions
binding="xml:/QueryTypeList/StringQueryTypes/@QueryType"
name="QueryTypeDesc" value="QueryType"
selected="xml:/Item/@ItemIDQryType"/>
</select>
<input type="text" class="unprotectedinput"
<%=getTextOptions("xml:/Item/@ItemID") %> />
</td>
C.5.9 loopXML
The loopXML JSP tag loops through a specific repeating element in a
source XML.
Attributes
binding - Required. Path to the element through which you want to loop
within the source XML. The repeating element must be one fixed with the
at character ("@").
name - Optional. Name of the source XML. If this parameter is not used,
the value is picked up from the binding. For example, if you specify
xml:/Menu/@MenuDescription as the binding, the value for name
defaults to Menu. Or in another example, if you specify
xml:/mymenu:/Menu/@MenuDescription as the binding, the name
defaults to mymenu.
id - Optional. Name of the created YFCElement that holds the element
resolved from the binding. If not specified, the Element NodeName
pointed to by the binding parameter is used. For example, if the binding
is xml:/ItemList/@Item and is not passed, the value for id defaults to
Item.
Body
Can contain HTML that is written for each iteration in the loop.
Example
This example shows how the loopXML JSP tag is used to display the list
of items in item lookup.
<tbody>
<yfc:loopXML name="ItemList" binding="xml:/ItemList/@Item" id="item">
<tr>
<td class="tablecolumn">
<img class="icon"
onclick="setItemLookupValue('<%=resolveValue("xml:item:/Item/@ItemID")%>','<%=re
solveValue("xml:item:/Item/Prim
aryInformation/@DefaultProductClass")%>','<%=resolveValue("xml:item:/Item/@UnitO
fMeasure")%>')" value="<%=resolveValue("xml:item:/Item/@ItemID")%>"
<%=getImageOptions(YFSUIBackendConsts.GO_ICON,"Click_to_select")%> />
</td>
<td class="tablecolumn"><yfc:getXMLValue name="item"
binding="xml:/Item/@ItemID"/></td>
<td class="tablecolumn"><yfc:getXMLValue name="item"
binding="xml:/Item/PrimaryInformation/@DefaultProductClass"/></td>
<td class="tablecolumn"><yfc:getXMLValue name="item"
binding="xml:/Item/@UnitOfMeasure"/></td>
<td class="tablecolumn"><yfc:getXMLValue name="item"
binding="xml:/Item/PrimaryInformation/@ShortDescription"/></td>
<td class="tablecolumn"><yfc:getXMLValue name="item"
binding="xml:/Item/PrimaryInformation/@MasterCatalogID"/></td>
<td class="tablecolumn"><yfc:getXMLValue name="item"
binding="xml:/Item/@OrganizationCode"/></td>
</tr>
</yfc:loopXML>
</tbody>
C.5.10 makeXMLInput
The makeXMLInput JSP tag is used in conjunction with makeXMLKey to
form a hidden key that is used to pass data from list to detail screens.
Attributes
name - Required. The name of the hidden input HTML tag that gets
formed as a result of this JSP tag.
Body
Can contain multiple makeXMLKey JSP tags. The output of the makeXMLKey
JSP tags are concatenated into a single hidden input.
Example
This example shows how this JSP tag is used in conjunction with the
makeXMLKey JSP tag to form a hidden input to pass inventory key data
from the Inventory list view to the Inventory detail view.
<tbody>
<yfc:loopXML name="InventoryList"
binding="xml:/InventoryList/@InventoryItem" id="InventoryItem"
keyName="InventoryItemKey" >
<tr>
<yfc:makeXMLInput name="inventoryItemKey">
<yfc:makeXMLKey binding="xml:/InventoryItem/@ItemID"
value="xml:/InventoryItem/@ItemID" />
<yfc:makeXMLKey binding="xml:/InventoryItem/@UnitOfMeasure"
value="xml:/InventoryItem/@UnitOfMeasure" />
<yfc:makeXMLKey binding="xml:/InventoryItem/@ProductClass"
value="xml:/InventoryItem/@ProductClass" />
<yfc:makeXMLKey binding="xml:/InventoryItem/@OrganizationCode"
value="xml:InventoryList:/InventoryList/@OrganizationCode" />
</yfc:makeXMLInput>
<td class="checkboxcolumn">
<input type="checkbox" value='<%=getParameter("inventoryItemKey")%>'
name="EntityKey"/>
</td>
<td class="tablecolumn">
<a
href="javascript:showDetailFor('<%=getParameter("inventoryItemKey")%>');"><yfc:g
etXMLValue name="InventoryItem" binding="xml:/InventoryItem/@ItemID"/></a>
</td>
<td class="tablecolumn"><yfc:getXMLValue name="InventoryItem"
binding="xml:/InventoryItem/@ProductClass"/></td>
<td class="tablecolumn"><yfc:getXMLValue name="InventoryItem"
binding="xml:/InventoryItem/@UnitOfMeasure"/></td>
<td class="tablecolumn"><yfc:getXMLValue name="InventoryItem"
binding="xml:/InventoryItem/Item/PrimaryInformation/@Description"/></td>
</tr>
</yfc:loopXML>
</tbody>
C.5.11 makeXMLKey
The makeXMLKey JSP tag is used in conjunction with makeXMLInput to
form a hidden key that is used to pass data from list to detail screens.
Attributes
binding - Required. The binding string that must be resolved and stored
in the hidden input to be passed on to the detail screen.
Body
None.
Example
Refer to the example in makeXMLInput on page 753.
functions usually perform some specific action for some specific screen
and are not required to be used during your UI extensions.
In addition, if you require additional logic for your screen for which the
Sterling Multi-Channel Fulfillment Solution UI infrastructure does not
provide JavaScript functions, you can write and use your own as needed.
Lookup
callLookup - see page 756. Uses [GET]
invokeCalendar - see page 767. Uses [GET]
yfcShowSearchPopup - see page 802. Uses [GET]
Control Name
ignoreChangeNames - see page 766
yfcDoNotPromptForChanges - see page 782
yfcDoNotPromptForChangesForActions - see page 783
yfcHasControlChanged - see page 786
yfcSetControlAsUnchanged - see page 791
yfcSpecialChangeNames - see page 803
Event Handler
validateControlValues - see page 775
yfcBodyOnLoad - see page 777
yfcGetSaveSearchHandle - see page 784
yfcGetSearchHandle - see page 785
yfcValidateMandatoryNodes - see page 808
Show Detail
showDetailFor - see page 769. Uses [GET]
showPopupDetailFor - see page 773. Uses [GET]
yfcChangeDetailView - see page 778. Uses [POST]
yfcShowDefaultDetailPopupForEntity - see page 792. Uses [GET]
yfcShowDetailPopupWithDynamicKey - see page 795
yfcShowDetailPopupWithKeys - see page 796. Uses [GET]
yfcShowDetailPopupWithParams - see page 797
Other
doCheckAll - see page 757
doCheckFirstLevel on page 758
expandCollapseDetails - see page 759
getAttributeNameFromBinding - see page 762
getCurrentSearchViewId on page 762
getCurrentViewId - see page 763
getObjectByAttrName - see page 764
goToURL - see page 766
showHelp - see page 772. Uses [GET]
yfcAllowSingleSelection - see page 776
yfcDisplayOnlySelectedLines - see page 780
setRetrievedRecordCount - see page 809
C.6.1 callLookup
This JavaScript function displays a lookup screen that enables the user to
search for and select a record to use in the current screen. For example,
an organization lookup on the order entry screen enables the user to
select a buyer organization. Typically, you should attach this function to
the onclick event of an image within your JSP page.
Syntax
callLookup(obj,entityname,extraParams)
Input Parameters
entityname - Optional. Entity to search for in the lookup screen. If not
passed, defaults to the name of the current entity.
obj - Required. Handle to the image being selected.
extraParams - Optional. Passes extra parameters to the lookup screen.
The format of the parameter is name/value pairs in URL format. If
passed, the parameters are passed to the lookup screen.
Output Parameters
None.
Example
This example shows how to show an organization lookup that defaults
the display of the seller role in the buyer Role field on the lookup:
<img class="lookupicon"
onclick="callLookup(this,'organization','xml:/Organization/OrgRoleList/OrgRole/@
RoleKey=BUYER')" name="search" <%=getImageOptions(YFSUIBackendConsts.LOOKUP_
ICON, "Search_for_Buyer") %> />
C.6.2 doCheckAll
This JavaScript function toggles the state of all the checkboxes in a table,
using the following assumptions:
Q
The table must have separate head and body sections.
Q
Checkboxes within the body section must have the same column
index as the specified checkbox object. Cells containing multiple
checkboxes are all toggled.
Syntax
doCheckAll(obj)
Input Parameters
obj - Optional. Handle to the checkbox object (in HTML object hierarchy)
on a table header. If the object is not passed, the function just returns.
Return Values
None.
Example
This example shows how an order list view showing order number and
enterprise would handle the check all and uncheck all option in the table
header row.
<table class="table" editable="false" width="100%" cellspacing="0">
<thead>
<tr>
<td sortable="no" class="checkboxheader">
C.6.3 doCheckFirstLevel
This JavaScript function is used on the onclick event of a checkbox in
the table column header. The function checks or unchecks all checkboxes
in the first level of checkboxes in the table. This function is very similar
to the doCheckAll JavaScript function, except that doCheckAll checks or
unchecks all checkboxes within the specified HTML table.
Use this function for HTML tables the require this "(un)check all"
functionality and also have one or more unrelated checkboxes inside the
table that should not be affected by the selection checkboxes.
Syntax
doCheckFirstLevel(obj)
Input Parameters
obj - Optional. Handle to the checkbox object (in HTML object hierarchy)
on a table header. If the object is not passed, the function does nothing.
Output Parameters
None.
Example
This example shows the table header definition for a list of items
containing a checkbox where the user can select one or more items in
the table. The header row of the table contains a checkbox. When this
checkbox is selected, all of the first level check boxes within the HTML
table are checked or unchecked.
<table class="table" cellspacing="0" width="100%">
<thead>
<tr>
<td class="checkboxheader" sortable="no" style="width:10px">
<input type="checkbox" value="checkbox" name="checkbox"
onclick="doCheckFirstLevel(this);"/>
</td>
<td class="tablecolumnheader"
style="width:30px"><yfc:i18n>Options</yfc:i18n></td>
<td class="tablecolumnheader"
style="width:<%=getUITableSize("xml:AdditionalServiceItem:/OrderLine/AdditionalS
erviceItems/Item/@ItemID")%>"><yfc:i18n>Item_ID</yfc:i18n></td>
<td class="tablecolumnheader"
style="width:<%=getUITableSize("xml:AdditionalServiceItem:/OrderLine/AdditionalS
erviceItems/Item/@UnitOfMeasure")%>"><yfc:i18n>UOM</yfc:i18n></td>
<td class="tablecolumnheader"
style="width:<%=getUITableSize("xml:AdditionalServiceItem:/OrderLine/AdditionalS
erviceItems/Item/PrimaryInformation/@Description")%>"><yfc:i18n>Item_
Description</yfc:i18n></td>
<td class="tablecolumnheader"
style="width:<%=getUITableSize("xml:AdditionalServiceItem:/OrderLine/AdditionalS
erviceItems/Item/@Price")%>"><yfc:i18n>Price</yfc:i18n></td>
</tr>
</thead>
C.6.4 expandCollapseDetails
This JavaScript function toggles the display state of the specified tags
that have expanded and collapsed views.
Syntax
expandCollapseDetails(div_id, expandAlt, collapseAlt, expandgif,
collapsegif)
Input Parameters
div_id - Required. Identifier of the object to expand or collapse.
expandAlt - Required. Tooltip to show for expanding a selection. This
tooltip shows when the object is in a collapsed state.
collapseAlt - Required. Tooltip to show for collapsing a selection.
Available when the object is an expanded state.
expandgif - Required. Image to show when the selection is in a
collapsed state.
collapsegif - Required. Image to show when the selection is in an
expanded state.
Return Value
None.
Example
This example shows how the expandCollapseDetails() function can be
used in a table to hide some advanced information that the user can
retrieve by selecting a special icon at line level. The example shows how
payment collection details, such as credit card number, can be viewed by
selecting the plus (+) icon. The example also shows div, which enables
you to specify whether to hide or show information. By default, the div is
hidden (display:none).
<tbody>
<yfc:loopXML
binding="xml:/Order/ChargeTransactionDetails/@ChargeTransactionDetail"
id="ChargeTransactionDetail">
<%request.setAttribute("ChargeTransactionDetail",
(YFCElement)pageContext.getAttribute("ChargeTransactionDetail"));%>
<yfc:makeXMLInput name="InvoiceKey">
<yfc:makeXMLKey binding="xml:/GetOrderInvoiceDetails/@InvoiceKey"
value="xml:/ChargeTransactionDetail/@OrderInvoiceKey" />
</yfc:makeXMLInput>
<tr>
<td class="tablecolumn"
sortValue="<%=getDateValue("xml:ChargeTransactionDetail:/ChargeTransactionDetail
/@Createts")%>">
<yfc:getXMLValue
binding="xml:/ChargeTransactionDetail/@Createts"/>
</td>
<td class="tablecolumn">
<yfc:getXMLValue
binding="xml:/ChargeTransactionDetail/@ChargeType"/>
<% if
(equals("AUTHORIZATION",getValue("ChargeTransactionDetail","xml:/ChargeTransacti
onDetail/@ChargeType")) ||
equals("CHARGE",getValue("ChargeTransactionDetail","xml:/ChargeTransactionDetail
/@ChargeType"))) {%>
<% String divToDisplay="yfsPaymentInfo_" +
ChargeTransactionDetailCounter; %>
<img
onclick="expandCollapseDetails('<%=divToDisplay%>','<%=getI18N("Click_To_See_
Payment_Info")%>','<%=getI18N("Click_To_Hide_Payment_
Info")%>','<%=YFSUIBackendConsts.FOLDER_
COLLAPSE%>','<%=YFSUIBackendConsts.FOLDER_EXPAND%>')" style="cursor:hand"
<%=getImageOptions(YFSUIBackendConsts.FOLDER,"Click_To_See_Payment_Info")%> />
<div id=<%=divToDisplay%>
style="display:none;padding-top:5px">
<table width="100%" class="view">
<tr>
<td height="100%">
<jsp:include page="/om/Orderdetail/order_
detail_paymenttype_collections.jsp">
<jsp:param name="PrePathId"
value="ChargeTransactionDetail"/>
<jsp:param name="ShowAdditionalParams"
value="Y"/>
<jsp:param
name="DecryptedCreditCardLink" value="L02"/>
</jsp:include>
</td>
</tr>
</table>
</div>
<%}%>
</td>
<td class="numerictablecolumn"
sortValue="<%=getNumericValue("xml:ChargeTransactionDetail:/ChargeTransactionDet
ail/@CreditAmount")%>">
<yfc:getXMLValue
binding="xml:/ChargeTransactionDetail/@CreditAmount"/>
</td>
</tr>
</yfc:loopXML>
</tbody>
C.6.5 getAttributeNameFromBinding
This JavaScript function parses the binding string passed as input and
returns the attribute from the string.
Syntax
getAttributeNameFromBinding(str)
Input Parameters
str - Optional. String containing the binding string. If not passed, the
function returns null.
Return Value
Attribute portion of the binding string.
C.6.6 getCurrentSearchViewId
This JavaScript function retrieves the Resource ID of the current search
view. This function can be used only for search views. To get the
Resource ID of the current detail view, use the getCurrentViewId
JavaScript function on the detail view JSP page. See "getCurrentViewId"
on page 763.
Syntax
getCurrentSearchViewId()
Input Parameters
None.
Return Value
Resource ID of the current search view.
Example
This example shows how to refresh the current search view when a value
is selected from a combo box by obtaining the current View ID.
<select class="combobox" onChange="changeSearchView(getCurrentSearchViewId())"
<%=getComboOptions(documentTypeBinding)%>>
<yfc:loopOptions
binding="xml:CommonDocumentTypeList:/DocumentParamsList/@DocumentParams"
name="Description"
value="DocumentType" selected="<%=selectedDocumentType%>"/>
</select>
C.6.7 getCurrentViewId
This JavaScript function retrieves the Resource ID of the current detail
view.
Syntax
getCurrentViewId()
Input Parameters
None.
Return Value
Resource ID of the current detail view.
Example
This example shows how to refresh the current view by obtaining the
current View ID.
<td class="detaillabel" ><yfc:i18n>Horizon_End_Date</yfc:i18n></td>
<td class="protectedtext" nowrap="true">
<input type="text" class="dateinput" onkeydown="return checkKeyPress(event)"
<%=getTextOptions("xml:/InventoryInformation/Item/@EndDate","xml:/InventoryInfor
mation/Item/@EndDate","")%> />
<img class="lookupicon" onclick="invokeCalendar(this);return false"
<%=getImageOptions(YFSUIBackendConsts.DATE_LOOKUP_ICON,"View_Calendar")%> />
<input type="button" class="button" value="GO"
onclick="if(validateControlValues())changeDetailView(getCurrentViewId())"/>
</td>
C.6.8 getObjectByAttrName
This JavaScript function returns the object that is bound to the specified
attribute.
Binding is achieved through the use of a JSP function such as
getTextOptions or getComboOptions. For more information on binding
JSP functions, see yfsGetTextOptions on page 742 or
yfsGetComboOptions on page 737.
Once a field is bound, the name attribute of that field contains the
binding XML path. This JavaScript function searches for all input and
combo boxes and text areas within the specified HTML tag, and matches
the attribute portion of the name attribute. The first match is returned.
The attribute portion is separated from the rest of the name attribute by
the at (@) separator. For example, if the name is
xml:/Order/@ChargeNameKey, the attribute portion is ChargeNameKey.
Syntax
getObjectByAttrName(obj, attributeName)
Input Parameters
obj - Required. Handle to the HTML object under which the search is to
be conducted.
attributeName - Optional. Attribute name for search to be conducted
under the object specified. If not passed, the function returns null.
Return Value
Handle to the object that is bound to the attribute specified. If no such
object is found, null is returned.
Example
This example shows how to enable and disable the charge name field on
line taxes, based on the checking of a checkbox.
function setAsPriceCharge(thisCheckbox) {
var checkboxName=thisCheckbox.name
var trNode=getParentObject(thisCheckbox, "TR");
var sel=getObjectByAttrName(trNode, "ChargeNameKey");
if (sel != null) {
if (thisCheckbox.checked) {
sel.disabled=true;
sel.value="";
} else {
sel.disabled=false;
}
}
}
C.6.9 getParentObject
This JavaScript function gets the first occurrence of the tag specified in
the HTML ancestry of the passed object.
Syntax
getParentObject(obj, tag)
Input Parameters
obj - Required. Handle to an object in HTML object hierarchy.
tag - Optional. String containing the name of the ancestor node used in
a search. If not passed, the function returns null.
Return Values
The first occurrence of the tag specified in the HTML ancestry of the
passed object.
Example
This example shows how to code a client-side deletion to run when the
user selects a Delete icon in a table row. In this example, element refers
to the object that the user selects.
function deleteRow(element) {
var row=getParentObject(element, "TR");
oTable=getParentObject(row, "TABLE");
row.parentNode.deleteRow(row.rowIndex - 1);
fireRowsChanged(oTable);
return false;
C.6.10 goToURL
This JavaScript function opens a specified URL in a new window.
Syntax
goToURL(URLInput)
Input Parameters
URLInputObj - Optional. Name of the input tag that contains the URL
specified by the user. If not passed, the function just returns.
Return Value
None.
Example
This example shows how the goToUrl() function opens the order
instruction screen in a new window.
<td>
<input type="text"
<%=yfsGetTextOptions("xml:/Order/Instructions/Instruction_" + InstructionCounter
+ "/@InstructionURL",
"xml:/Instruction/@InstructionURL","xml:/Order/AllowedModifications")%>/>
<input type="button" class="button" value="GO"
onclick="javascript:goToURL('xml:/Order/Instructions/Instruction_
<%=InstructionCounter%>/@InstructionURL');"/>
</td>
C.6.11 ignoreChangeNames
Whenever any detail view is posted, the Sterling Presentation Framework
checks for data changed through the screen controls. For controls that
have no changes, the name attribute is changed to "old" + [current
name]. By doing this, the data in these controls does not make it to the
APIs. This results in improved performance, since unchanged data does
not need to be updated. However, some APIs are designed to work in
replace mode. They take a complete snapshot of information (including
unchanged part) and replace the all of it in the database. For such APIs,
all data from the screen must be passed as input.
To achieve this, this function can be called in the onload event. This
function sets a custom property in the window object. When the screen is
posted, the Sterling Presentation Framework checks for this custom
property. If the property is set, the automatic name changing does not
happen.
The Sterling Presentation Framework helps the user remember to save
data they have input. When a user has changed some data and begins to
navigate away from a page, the Sterling Presentation Framework detects
the changed data and prompts the user to save their work. This function
does not change the behavior of this feature in any way. It simply makes
sure that the name property of the controls that have no changes are
retained. In this way, this function differs from
yfcDoNotPromptForChanges(). See yfcDoNotPromptForChanges on
page 782.
Syntax
ignoreChangeNames()
Input Parameters
None.
Return Value
None.
Example
The example attaches this function to the onload event.
<script language="javascript">
window.attachEvent("onload", IgnoreChangeNames);
</script>
C.6.12 invokeCalendar
This JavaScript function invokes the calendar lookup. This function
assumes that the previous object to the one passed (in the DOM
hierarchy of the HTML) is the one that must be populated with the date
selected in the lookup.
Syntax
invokeCalendar(obj)
Input Parameters
obj - Required. Handle to the image object that was selected to invoke
the calendar.
Output Parameters
None.
Example
This example shows how the Calendar Lookup is invoked from the
Horizon End Date field in the Inventory detail view.
<td class="detaillabel" ><yfc:i18n>Horizon_End_Date</yfc:i18n></td>
<td class="protectedtext" nowrap="true">
<input type="text" class="dateinput" onkeydown="return
checkKeyPress(event)"
<%=getTextOptions("xml:/InventoryInformation/Item/@EndDate","xml:/InventoryInfor
mation/Item/@EndDate","")%> />
<img class="lookupicon" onclick="invokeCalendar(this);return false"
<%=getImageOptions(YFSUIBackendConsts.DATE_LOOKUP_ICON,"View_Calendar")%> />
<input type="button" class="button" value="GO"
onclick="if(validateControlValues())changeDetailView(getCurrentViewId())"/>
</td>
C.6.13 invokeTimeLookup
This JavaScript function invokes the time lookup. The function assumes
that the previous object to the one passed (in the DOM hierarchy of the
HTML) is the one that must be populated with the date selected in the
lookup.
Syntax
invokeTimeLookup(obj)
Input Parameters
obj - handle to the image object that was clicked to invoke the calendar.
Output Parameters
None.
Example
This example shows how the time lookup is used in a date and time
search criteria field.
<tr>
<td nowrap="true">
<input class="dateinput" type="text"
<%=getTextOptions("xml:/Shipment/@FromExpectedShipmentDate_YFCDATE")%>/>
<img class="lookupicon" name="search" onclick="invokeCalendar(this);return
false" <%=getImageOptions(YFSUIBackendConsts.DATE_LOOKUP_ICON, "Calendar") %> />
<input class="dateinput" type="text"
<%=getTextOptions("xml:/Shipment/@FromExpectedShipmentDate_YFCTIME")%>/>
<img class="lookupicon" name="search"
onclick="invokeTimeLookup(this);return false"
<%=getImageOptions(YFSUIBackendConsts.TIME_LOOKUP_ICON, "Time_Lookup") %> />
<yfc:i18n>To</yfc:i18n>
</td>
</tr>
<tr>
<td>
<input class="dateinput" type="text"
<%=getTextOptions("xml:/Shipment/@ToExpectedShipmentDate_YFCDATE")%>/>
<img class="lookupicon" name="search" onclick="invokeCalendar(this);return
false" <%=getImageOptions(YFSUIBackendConsts.DATE_LOOKUP_ICON, "Calendar") %> />
<input class="dateinput" type="text"
<%=getTextOptions("xml:/Shipment/@ToExpectedShipmentDate_YFCTIME")%>/>
<img class="lookupicon" name="search"
onclick="invokeTimeLookup(this);return false"
<%=getImageOptions(YFSUIBackendConsts.TIME_LOOKUP_ICON, "Time_Lookup") %>/>
</td>
</tr>
C.6.14 showDetailFor
This JavaScript function changes the current page to show the default
view of the current entity. The resulting screen opens in the same
browser window, not in a new window. You typically use the
showDetailFor() function to move from the list view to the detail view.
Then after the detail view opens, this function is not used, because
Syntax
showDetailFor(entityKey)
Input Parameters
entityKey - Required. String containing a URL-encoded XML that
contains the key attributes required by the detail view.
Output Parameters
None.
Example
This example shows an Order list view that contains two columns: Order
Number and Enterprise Code. Order Number is hyperlinked to open the
default detail view of Order. Notice that yfc:makeXMLInput prepares an
XML that is later used as the input parameter to the showDetailFor()
function by using the getParameter() JSP function.
<table class="table" editable="false" width="100%" cellspacing="0">
<thead>
<tr>
<td sortable="no" class="checkboxheader">
<input type="checkbox" name="checkbox" value="checkbox"
onclick="doCheckAll(this);"/>
</td>
<td class="tablecolumnheader"><yfc:i18n>Order_#</yfc:i18n></td>
<td class="tablecolumnheader"><yfc:i18n>Enterprise</yfc:i18n></td>
</tr>
</thead>
<tbody>
<yfc:loopXML binding="xml:/OrderList/@Order" id="Order">
<tr>
<yfc:makeXMLInput name="orderKey">
<yfc:makeXMLKey binding="xml:/Order/@OrderHeaderKey"
value="xml:/Order/@OrderHeaderKey" />
</yfc:makeXMLInput>
<td class="checkboxcolumn">
<input type="checkbox" value='<%=getParameter("orderKey")%>'
name="EntityKey"/>
</td>
<td class="tablecolumn"><a
href="javascript:showDetailFor('<%=getParameter("orderKey")%>');">
<yfc:getXMLValue binding="xml:/Order/@OrderNo"/></a>
</td>
<td class="tablecolumn"><yfc:getXMLValue
binding="xml:/Order/@EnterpriseCode"/></td>
</tr>
</yfc:loopXML>
</tbody>
</table>
C.6.15 showDetailForViewGroupId
This JavaScript function changes the current page to show the default
view of the given View Group ID (The View ID with the least Resource
Sequence number is the default view for a particular View Group Id). The
resulting screen opens in the same browser window. Use the
showDetailForViewGroupId()function to move from the list view to
the detail view. When the detail view opens, this function is not used,
because subsequent views are invoked as pop-up windows and this
function does not do that.
In the list screen, this function is used in conjunction with the
yfc:makeXMLInput JSP tag. The makeXMLInput JSP tag creates an XML
containing the key attributes. That XML must be passed to the default
detail view.
Syntax
showDetailForViewGroupId (entityname, viewGroupId, entityKey,
extraParameters)
Input Parameters
entityName - Required. Entity to search in the detail screen.
viewGroupId - Required. The view group ID shown to the user.
entityKey - Required. String containing a URL-encoded XML that
contains key attributes required by the detail view.
Output Parameters
None.
Example
<td class="tablecolumn">
<a href = "javascript:showDetailForViewGroupId
('load','YDMD200','<%=getParameter("loadKey")%>');"> <yfc:getXMLValue
binding="xml:/Load/@LoadNo"/>
</a>
</td>
C.6.16 showHelp
This JavaScript function invokes online help in a new window.
Online help can be internationalized.
Syntax
showHelp()
Input Parameters
None.
Returns
None.
Examples
The following example shows how online help is invoked when the help
icon is selected from the menu bar and it opens to the table of contents.
<img alt="<%=getI18N("Help")%>" src="<%=YFSUIBackendConsts.YANTRA_HELP%>"
onclick='showHelp();'/>
C.6.17 showPopupDetailFor
This JavaScript function shows the default view of the current entity in a
pop-up window (modal dialog). It is a blocking call. It does not return
until the modal dialog is closed.
Syntax
showPopupDetailFor(key, name, width, height, argument)
Input Parameters
key - Required. Entity key that is required by the detail view. If not
passed, the current entity's key is automatically passed to the pop-up
window.
name - Required. Pass as blank space (" "). Not used.
width - Required. Horizontal size of the pop-up window. Measured in
pixels. If passed as 0, a certain default width is used.
height - Required. Vertical size of the pop-up window. Measured in
pixels. If passed as 0, a certain default height is used.
argument - Required. Anything passed in this field is available in the
modal dialog through the window.dialogArguments attribute.
Returns
None.
Example
This example shows how the inventory audit detail is invoked from the
inventory audit list screen.
The same list screen is used in a list view, as well as in a detail pop-up
window. When you select the transaction date, if the current screen is a
pop-up window, another pop-up window is invoked with the audit details.
If the current view is list view, the audit detail screen comes up in the
same window.
<tbody>
<yfc:loopXML name="InventoryAudits"
binding="xml:/InventoryAudits/@InventoryAudit" id="InventoryAudit">
<tr>
<yfc:makeXMLInput name="inventoryAuditKey">
<yfc:makeXMLKey binding="xml:/InventoryAudit/@InventoryAuditKey"
value="xml:/InventoryAudit/@InventoryAuditKey" />
<yfc:makeXMLKey binding="xml:/InventoryAudit/@OrganizationCode"
value="xml:/InventoryAudit/@InventoryOrganizationCode" />
</yfc:makeXMLInput>
<td class="checkboxcolumn">
<input type="checkbox"
value='<%=getParameter("inventoryAuditKey")%>' name="EntityKey"/>
</td>
<td class="tablecolumn"
sortValue="<%=getDateValue("xml:/InventoryAudit/@Modifyts")%>">
<%if ( "Y".equals(request.getParameter(YFCUIBackendConsts.YFC_IN_
POPUP)) ) {%>
<a href=""
onClick="showPopupDetailFor('<%=getParameter("inventoryAuditKey")%>',
'','900','550',window.dialogArguments);return false;" >
<yfc:getXMLValue name="InventoryAudit"
binding="xml:/InventoryAudit/@Modifyts"/>
</a>
<%} else {%>
<a
href="javascript:showDetailFor('<%=getParameter("inventoryAuditKey")%>');">
<yfc:getXMLValue name="InventoryAudit"
binding="xml:/InventoryAudit/@Modifyts"/>
</a>
<%}%>
</td>
<td class="tablecolumn">
<yfc:getXMLValue name="InventoryAudit"
binding="xml:/InventoryAudit/@ItemID"/>
</td>
<td class="tablecolumn">
<yfc:getXMLValue name="InventoryAudit"
binding="xml:/InventoryAudit/@ProductClass"/>
</td>
<td class="tablecolumn">
<yfc:getXMLValue name="InventoryAudit"
binding="xml:/InventoryAudit/@UnitOfMeasure"/>
</td>
<td class="tablecolumn">
<yfc:getXMLValue name="InventoryAudit"
binding="xml:/InventoryAudit/@TransactionType"/>
</td>
<td class="tablecolumn">
<yfc:getXMLValue name="InventoryAudit"
binding="xml:/InventoryAudit/@ShipNode"/>
</td>
</tr>
</yfc:loopXML>
</tbody>
C.6.18 validateControlValues
This JavaScript function checks for client-side validation errors. When the
user enters invalid data in an input field, the Sterling Presentation
Framework flags the field as in error. When the user submits data in the
page, this function should be called to make sure that invalid data is not
posted.
Syntax
validateControlValues()
Input Parameters
None.
Return Values
true - No errors were found.
Example
This example shows how to check for errors before you submit the
current page.
<td class="detaillabel" ><yfc:i18n>Horizon_End_Date</yfc:i18n></td>
<td class="protectedtext" nowrap="true">
<input type="text" class="dateinput" onkeydown="return checkKeyPress(event)"
<%=getTextOptions("xml:/InventoryInformation/Item/@EndDate","xml:/InventoryInfor
mation/Item/@EndDate","")%> />
<img class="lookupicon" onclick="invokeCalendar(this);return false"
<%=getImageOptions(YFSUIBackendConsts.DATE_LOOKUP_ICON,"View_Calendar")%> />
<input type="button" class="button" value="GO"
onclick="if(validateControlValues())changeDetailView(getCurrentViewId())"/>
</td>
C.6.19 yfcAllowSingleSelection
Some operations can be performed on only one record at a time.
However, the user interface typically permits multiple options to be
checked before an operation is selected. Therefore, the operations that
do not support multiple selections must themselves validate that not
more than one record has been selected for processing. This function
does that validation.
Syntax
yfcAllowSingleSelection(chkName)
Input Parameters
chkName - Optional. Name of the set of checkbox controls, one of which
must be checked before an operation is performed. If the value is not
passed or is blanks, it defaults to EntityKey.
Output Parameters
true - Zero or one record was selected.
false - More than one record was selected.
Examples
Receiving intransit updates can only be done one stop at a time.
Therefore, the operation for receiving intransit updates is configured to
first call the JavaScript function yfcAllowSingleSelection() and then
to invoke the receiveIntransitUpdates() API.
This example performs an action if one, and only one, selection was
made for checkboxes that have the name set to the value passed in the
sKeyName variable.
function goToOrderLineSchedules(sSearchViewID, sKeyName, bPopup)
{
if(yfcAllowSingleSelection(sKeyName))
{
}
}
C.6.20 yfcBodyOnLoad
This JavaScript function is called whenever any page is loaded. Typically,
it is automatically called when the page is loaded. However, if your page
must do something special on the onload event, you can call this
function first and then call your own window.onload() function.
Syntax
yfcBodyOnLoad()
Input Parameters
None.
Return Value
None.
Example
This example shows how the onload event can be taken by your custom
JSP rather than let the Sterling Presentation Framework take it.
function window.onload(){
if (!yfcBodyOnLoad() && (!document.all('YFCDetailError'))) {
return;
}
C.6.21 yfcChangeDetailView
This JavaScript function switches to a specific detail view. This function
uses the POST function to switch the view.
Syntax
yfcChangeDetailView(viewID)
Input Parameters
viewID - Required. Resource ID of the detail view to which you wish to
switch.
Return Values
None.
Example
This example shows how to use the yfcChangeDetailView() function in
order charges and the taxes summary in order to refresh the page to the
current view when a combobox value is changed.
<select name="chargeType" class="combobox"
onchange="yfcChangeDetailView(getCurrentViewId());">
<option value="Overall" <%if (equals(chargeType,"Overall")) {%> selected
<%}%>><yfc:i18n>Ordered</yfc:i18n></option>
<option value="Remaining" <%if (equals(chargeType,"Remaining")) {%> selected
<%}%>><yfc:i18n>Open</yfc:i18n></option>
<option value="Invoiced" <%if (equals(chargeType,"Invoiced")) {%> selected
<%}%>><yfc:i18n>Invoiced</yfc:i18n></option>
</select>
C.6.22 yfcChangeListView
This JavaScript function switches the current view to a list view. The list
view is expected to have a pre-determined filter criteria, since this
function does not accept any additional filter criteria.
Syntax
function yfcChangeListView(entity, searchViewId,maxrecords)
Input Parameters
entity - Required. Entity to which the searchViewId belongs.
searchViewId - Required. Identifier of the search view to which you
wish to switch.
maxrecords - Optional. Maximum number of records to display in the
list view. To enhance performance, use this parameter. If this is not
passed, it defaults to the value specified in the yfs.properties file.
Output Parameters
None.
Example
The home page shows a list of alerts, up to a certain number, that has
been set as the maximum number to display. To see a complete list of all
alerts, the user can select the More Alerts operation. This operation is
configured to call the yfcChangeListView() JavaScript function.
C.6.23 yfcCheckAllToSingleAPI
Deprecated in Release 5.0 SP1. On list views that have a Check All
checkbox in the column header row, this function makes a single API call
that takes in the multiple selections. Attach this function to the onclick
event of the Check All checkbox.
This function works in conjunction with the
yfcMultiSelectToSingleAPI() JavaScript function, which was also
deprecated in Release 5.0 SP1. For more information, see
Syntax
yfcCheckAllToSingleAPI(checkAllObject)
Input Parameters
checkAllObject - Required. Handle to the Check All checkbox in the
table header.
Return Values
None.
Example
This example shows how to call this function when the Check All
checkbox is selected.
<td sortable="no" class="checkboxheader">
<input type="checkbox" name="checkbox" value="checkbox"
onclick='yfcCheckAllToSingleAPI(this)'/>
</td>
C.6.24 yfcDisplayOnlySelectedLines
This JavaScript function is for situations when the user needs to select
multiple records from a list in screen A and those records must be passed
on to screen B. In screen B, the selected records are displayed, possibly
with additional information for each record. In such cases, the logic is
that the same set of APIs that were used to build screen A could be
called to also build screen B, and on the client side, a filtration process
limits the display to only those selected in screen A.
This function requires that each row in the table that is under
consideration must have an attribute called yfcSelectionKey set to the
URL encoded XML (formed using yfc:makeXMLInput JSP tag).
Syntax
yfcDisplayOnlySelectedLines(tableId)
Input Parameters
tableId - Required. Identifier attribute of the table whose content must
be limited to that selected from the previous screen.
Output Parameters
None.
Example
The following example shows how the create order line dependency
screen limits the results in the order lines list to the specific lines that are
selected in the order detail screen. First, this function must be called in
the onload event.
<script language="javascript">
function window.onload() {
if (!yfcBodyOnLoad() && (!document.all('YFCDetailError'))) {
return;
}
yfcDisplayOnlySelectedLines("DependentLines");
}
</script>
</tr>
</yfc:loopXML>
</tbody>
</table>
C.6.25 yfcDoNotPromptForChanges
This JavaScript function turns off the automatic prompts that remind the
user to save changes to their data. By default on any screen, if a user
enters data and then starts to navigate away without saving the data,
the Sterling Presentation Framework catches this and alerts the user to
save their data.
When you call this function it sets a parameter on the window object.
This parameter is checked during the onunload event and if the
parameter is set through this function, the user is not warned.
When you call this function to turn off prompting, all data in the screen is
passed to the API during save.
This JavaScript function does not turn off the prompts that remind a user
to save changes to their data when executing inner panel actions.
If you call an API on an inner panel and do not want the user to be
prompted to save changes, you must also use either the
yfcSetControlAsUnchanged or the yfcDoNotPromptForChangesForActions
function. See yfcSetControlAsUnchanged on page 791 or
yfcDoNotPromptForChangesForActions on page 783.
Syntax
yfcDoNotPromptForChanges(value)
Input Parameters
value - Required. Determines whether or not the user should be
prompted to save any new data they have input that has not yet been
saved. Valid values are true and false. If specified as true, the user is not
prompted to save. If specified as false, the user is prompted to save the
data.
Return Value
None.
Example
This example shows how this function turns off the automatic prompts
for the manifest detail screen.
<script language="javascript">
yfcDoNotPromptForChanges(true);
</script>
C.6.26 yfcDoNotPromptForChangesForActions
This JavaScript function can be used when you want to skip the "Changes
made to the current screen will be lost" validation that is done when the
user clicks actions on an inner panel. Normally, inner panel actions in the
Sterling Multi-Channel Fulfillment Solution Consoles are not used with the
editable fields on a screen. Therefore, when the user changes an input
field and clicks an action, the warning message is displayed by default.
Call this javascript method to avoid this validation. You can call this
method for all actions on a view by calling it in your JSP in a script tag.
Alternatively, you can call this method for a specific action by calling it as
part of the javascript property of the action resource.
Syntax
yfcDoNotPromptForChangesForActions(value)
Input Parameters
value - Required. Pass 'true' to skip the "changes made" validation. Pass
'false' to turn the validation on. By default, the validation is on.
Return Value
None.
Example
This example shows how to call the
yfcDoNotPromptForChangesForActions function from a JSP to turn the
"changes made" validation off for all actions on the view:
<script language="Javascript" >
yfcDoNotPromptForChangesForActions(true);
</script>
C.6.27 yfcGetCurrentStyleSheet
This JavaScript function retrieves name of the style sheet for the current
window.
Syntax
yfcGetCurrentStyleSheet()
Input Parameters
None.
Output Parameters
currentStyleSheet - The name of the style sheet for the current
window. The full name of the style sheet is returned, including the file
extension (for example, sapphire.css).
Example
This example shows how to get the current style sheet of the window.
var currentStyleSheet = yfcGetCurrentStyleSheet();
C.6.28 yfcGetSaveSearchHandle
This JavaScript function provides a handle to the Save Search icon on the
search view. This handle then can be used for attaching events to
achieve custom behavior. To change the behavior associated with the
Search icon, see yfcGetSearchHandle on page 785.
Syntax
var oObj=yfcGetSaveSearchHandle();
Input Parameters
None.
Output Parameters
var - Handle to the Save Search icon on the search view.
Example
This example shows how to have the application perform custom
processing when the user selects the Save Search icon.
<script language="javascript">
function attachBehaviorFn()
{
...
var oObj1=yfcGetSaveSearchHandle();
var sVal1=oObj1.attachEvent("onclick",fixDerivedFromReturnSearch);
}
window.attachEvent("onload",attachBehaviourFn);
...
C.6.29 yfcGetSearchHandle
This JavaScript function provides a handle to the Search icon on a search
view. This handle then can be used for attaching events in order to
achieve custom behavior. To affect the behavior associated with the Save
Search icon, see yfcGetSaveSearchHandle on page 784.
Syntax
var oObj=yfcGetSearchHandle();
Input Parameters
None.
Output Parameters
var - Handle to the Search icon on the search view.
Example
This example shows how to have the application perform custom
processing when the user selects the Search icon.
<script language="javascript">
function attachBehaviourFn()
{
var oObj=yfcGetSearchHandle();
var sVal=oObj.attachEvent("onclick",fixDerivedFromReturnSearch);
...
}
window.attachEvent("onload",attachBehaviourFn);
...
C.6.30 yfcHasControlChanged
This JavaScript function determines if the contents of a specific control
have been modified by the user since the page loaded.
This is accomplished by comparing the current value of a specific control
with the custom attribute OldValue stored in the control when the page
is loaded.
In the case of checkboxes and radio buttons, the custom attribute is
oldchecked.
Syntax
yfcHasControlChanged(ctrl)
Input Parameters
ctrl - Required. Object in the HTML object hierarchy.
Return Values
true - Value of the specified control is different from when the page was
first loaded.
false - Value of the specified control is the same as when the page was
first loaded.
Example
This example shows how the Order Modification Reasons pop-up window
uses this function to set the Override Flag in a hidden field.
The hidden field is passed to the changeOrder() API only when a specific
field (for example, requested ship date) that is permitted to be changed
only by users with special override permissions is changed by the user.
This function detects if any of the input in the screen has changed.
function setOverrideFlag(overrideFlagBinding) {
var overrideFlagInput=document.all(overrideFlagBinding);
var docInputs=document.getElementsByTagName("input");
for (var i=0;i<docInputs.length;i++) {
var docInput=docInputs.item(i);
if (docInput.getAttribute("yfsoverride") == "true") {
if (yfcHasControlChanged(docInput)) {
overrideFlagInput.value="Y";
return;
}
}
}
var docSelects=document.getElementsByTagName("select");
for (var i=0;i<docSelects.length;i++) {
var docSelect=docSelects.item(i);
if (docSelect.getAttribute("yfsoverride") == "true") {
if (yfcHasControlChanged(docSelect)) {
overrideFlagInput.value="Y";
return;
}
}
}
}
C.6.31 yfcMultiSelectToSingleAPI
Deprecated in Release 5.0 SP1. Replaced by
yfcMultiSelectToSingleAPIOnAction on page 789.
This JavaScript function enables you to make a single API call using
multiple selections in a list. By default, when an action that calls an API
on a list screen is invoked while multiple selections have been made by
the user, the API is invoked once for each selected record. This function
enables you to configure an action that calls an API that is run only once
for all selected records. This function should be attached to the onclick
event of each of the selection checkboxes of a list screen. This function
creates hidden inputs on the list screen for the record being selected.
Assuming that the input namespace of the action has been defined
correctly, the API is called and all selected records are passed.
Syntax
yfcMultiSelectToSingleAPI(checkboxObject, counter, keyAttributeName,
keyAttributeValue, parentNodePrefix, parentNodePostfix)
Input Parameters
checkboxObject - Required. Handle to the checkbox object (in HTML
object hierarchy) on a table header.
counter - Required. Counter that uniquely identifies the row containing
the checkbox object passed in the first parameter.
keyAttributeName - Required. Name of the attribute to be passed to
the API.
keyAttributeValue - Required. Value of the attribute name specified in
the keyAttributeName parameter.
parentNodePrefix - Required. Portion of the XML binding, up to and
including the repeating XML element, to be passed to the API.
parentNodePostfix - Optional. Portion of the XML binding between the
repeating XML element of the API input up to the final element in which
the attribute specified in the keyAttributeName parameter is to be
passed. Use this parameter only when the attribute specified in the
keyAttributeName parameter is located under a child XML element of the
repeating XML element. If not passed, it is assumed that the attribute
specified in the keyAttributeName parameter is directly under the
repeating element.
Return Values
None.
Example
This example shows how an Add to Shipment action can be processed in
an Order Release list view.
In this example, the JSP code loops through a list of order releases and
places a checkbox in the first <td> tag of the row. The checkboxs
onclick event calls the yfcMultiSelectToSingleAPI() JavaScript
function, which creates the hidden inputs required for the Add to
Shipment action.
Note that the yfcMultiSelectToSingleAPI() JavaScript function is
called twice to create two hidden inputs required by the API.
<yfc:loopXML binding="xml:/OrderReleaseList/@OrderRelease" id="OrderRelease">
<tr>
<yfc:makeXMLInput name="orderReleaseKey">
<yfc:makeXMLKey
binding="xml:/OrderReleaseDetail/@OrderReleaseKey"
value="xml:/OrderRelease/@OrderReleaseKey" />
<yfc:makeXMLKey
binding="xml:/OrderReleaseDetail/@OrderHeaderKey"
value="xml:/OrderRelease/@OrderHeaderKey" />
<yfc:makeXMLKey binding="xml:/OrderReleaseDetail/@ReleaseNo"
value="xml:/OrderRelease/@ReleaseNo" />
</yfc:makeXMLInput>
<td class="checkboxcolumn"><input type="checkbox"
value='<%=getParameter("orderReleaseKey")%>' name="EntityKey"
onclick=' yfcMultiSelectToSingleAPI (this ,
"<%=OrderReleaseCounter%>", "OrderReleaseKey", "<%=getValue("OrderRelease",
"xml:/OrderRelease/@OrderReleaseKey")%>",
"xml:/Shipment/OrderReleases/OrderRelease", null);
yfcMultiSelectToSingleAPI (this , "<%=OrderReleaseCounter%>",
"OrderHeaderKey", "<%=getValue("OrderRelease",
"xml:/OrderRelease/@OrderHeaderKey")%>",
"xml:/Shipment/OrderReleases/OrderRelease", null)/>
</td>
<>
</tr>
</yfc:loopXML>
C.6.32 yfcMultiSelectToSingleAPIOnAction
This JavaScript function replaces the yfcMultiSelectToSingleAPI()
JavaScript function, which was deprecated in Release 5.0 SP1.
This function makes a single API call using multiple selections in a list. By
default, when an action that calls an API on a list screen is run while
multiple selections have been made by the user, the API runs once for
each selected record. This function enables you to configure an action
that calls an API that runs only once for all selected records.
Attach this function to the action resource. This function creates hidden
inputs on the list screen for each record that the user selects. Assuming
that the input namespace of the action has been defined correctly, the
API is called once and all selected records are passed.
Syntax
yfcMultiSelectToSingleAPIOnAction(checkBoxName, counterAttrName,
valueAttrName, keyAttributeName, parentNodePrefix, parentNodePostfix)
Input Parameters
checkBoxName - Required. Name of the checkbox object within the JSP
where the action is defined.
counterAttrName - Required. Name of the HTML attribute on the
checkbox object that contains the counter value that uniquely identifies
this row within the table. It is recommended that you always use the
string yfcMultiSelectCounter for this parameter.
valueAttrName - Required. Name of the HTML attribute on the
checkbox object that contains the value that should be set into the
attribute passed in the keyAttributeName parameter. It is recommended
that you prefix the value with the yfcMultiSelectValue string. For more
details, see the example.
keyAttributeName - Required. Name of the attribute that should be
passed to the API.
parentNodePrefix - Required. The portion of the XML binding up to and
including the repeating XML element that is to be passed as input to the
API.
parentNodePostfix - Optional. The portion of the XML binding between
the repeating XML element of the API input up to the final element in
which the attribute specified in the keyAttributeName parameter is to be
passed.
Output Parameters
None.
Example
This example shows a Create Shipment action that has been defined on a
Order Release list view. The following shows how the checkbox object is
created within the JSP:
<td class="checkboxcolumn"><input type="checkbox"
value='<%=getParameter("orderReleaseKey")%>' name="EntityKey"
yfcMultiSelectCounter='<%=OrderReleaseCounter%>'
yfcMultiSelectValue1='<%=getValue("OrderRelease",
"xml:/OrderRelease/@OrderReleaseKey")%>'
yfcMultiSelectValue2='Add'/>
</td>
Additionally, the Create Shipment action has the JavaScript field set to
the following:
yfcMultiSelectToSingleAPIOnAction('EntityKey', 'yfcMultiSelectCounter',
'yfcMultiSelectValue1', 'OrderReleaseKey',
'xml:/Shipment/OrderReleases/OrderRelease',
null);yfcMultiSelectToSingleAPIOnAction('EntityKey', 'yfcMultiSelectCounter',
'yfcMultiSelectValue2', 'AssociationAction',
'xml:/Shipment/OrderReleases/OrderRelease', null);
C.6.33 yfcSetControlAsUnchanged
This JavaScript function eliminates prompting the user to save data.
when controls are placed on an inner panel. Achieves this by setting
controls as "not changed." The something function sets the prompt
"Changes made to the data on screen will be lost" from appearing. For
more information on users changes to controls, see
ignoreChangeNames on page 766.
After configuring all controls on a page to use this function, call this
function for each control on a page before invoking an action.
If an inner panel uses an Action and has modifiable controls that take
input required for the Action, you can use this function to prevent the
"Changes made to the data on screen will be lost" message.
When using this function, you must also call the
yfcDoNotPromptForChanges() function in the JSP containing the Action.
For more information about user prompts, see
yfcDoNotPromptForChanges on page 782.
Syntax
yfcSetControlAsUnchanged (control)
Input Parameters
control - Required. Object in the HTML object hierarchy.
Return Value
None.
Example
This example shows how to call the CallSetControl() function from
Action:
<script language="javascript"> yfcDoNotPromptForChanges(true) </script>
<script language="javascript">
function CallSetControl() {
var myControl=document.all("xml:/InventoryItem/SKU/@OldSKU");
var myControl_1=document.all("xml:/InventoryItem/SKU/@NewSKU");
var myControl_2=document.all("xml:/InventoryItem/@EMailID");
yfcSetControlAsUnchanged(myControl);
yfcSetControlAsUnchanged(myControl_1);
yfcSetControlAsUnchanged(myControl_2);
return(true);
}
</script>
C.6.34 yfcShowDefaultDetailPopupForEntity
This JavaScript function shows the default detail view of an entity in a
pop-up window (modal dialog). The entity for which the view is displayed
must be specified in the yfsTargetEntity attribute of the checkbox object
whose name is passed as input. It is a blocking call. It does not return
until the modal dialog is closed.
Syntax
yfcShowDefaultDetailPopupForEntity(checkBoxName)
Input Parameters
checkBoxName Required. Name of one or more checkbox objects
with the yfsTargetEntity attribute containing the ID of the entity for which
the default detail view is to be displayed.
Return Values
None.
Example
This example shows how a view details action on an Order List screen
could use this function to bring up the default detail view of the order
entity.
C.6.35 yfcShowDetailPopup
This JavaScript function shows a specific view ID in a pop-up window,
which is modal. It is a blocking call; it does not return until the modal
dialog box is closed.
Syntax
yfcShowDetailPopup(viewID, name, width, height, argument, entity, key)
Input Parameters
viewID - Required. Resource ID of the detail view to be shown as a
pop-up window. If passed as an empty string, the pop-up window
displays the default detail view of the entity specified in the entity
parameter.
name - Required. Pass as blank space (" "). Not used.
width - Required. Horizontal size of the pop-up window. Measured in
pixels. If passed as 0, a certain default width is used.
height - Required. Vertical size of the pop-up window. Measured in
pixels. If passed as 0, a certain default height is used.
argument - Required. Anything passed in this field is available in the
modal dialog through the window.dialogArguments attribute.
entity - Optional. The entity of the detail view that is to be opened. If
not passed, defaults to the same entity of the view that is currently being
displayed.
key - Optional. Entity key that is required by the detail view. If not
passed, the key of the current entity is passed to pop-up window.
Return Values
None.
Example
This example shows how the Modification Reason Code pop-up window
displays when Save is selected on the Order Detail screen.
function enterActionModificationReason(modReasonViewID, modReasonCodeBinding,
modReasonTextBinding) {
// If the current screen has a hidden input for draft order flag
// and the value of the input is "Y", don't show the modification
// reason window.
var draftOrderInput=document.all("hiddenDraftOrderFlag");
if (draftOrderInput != null) {
if ("Y" == draftOrderInput.value) {
return (true);
}
}
if (getOKClickedAttribute() == "true") {
window.document.documentElement.setAttribute("OKClicked", "false");
return (true);
}
else {
window.document.documentElement.setAttribute("OKClicked", "false");
return (false);
}
}
C.6.36 yfcShowDetailPopupWithDynamicKey
When called with a specific object (in the HTML object hierarchy this
JavaScript function prepares a URL-encoded XML containing all the values
under the object (recursively). Only the values to be posted are
considered. The XML then is passed on to a pop-up window as a
parameter to show the specified view.
Syntax
yfcShowDetailPopupWithDynamicKey(obj, view, entity, inputNodeName,
winObj)
Input Parameters
obj - Required. Handle to the object based on which the key is
dynamically prepared. For the specific object, this function traverses up
the HTML hierarchy to find the nearest <table> tag. From that <table>
tag, this function then searches for all input and checkboxes. Based on
the binding for these controls, a URL encoded XML is formed which is
then passed as the entity key to the detail view being invoked.
viewID - Required. Resource ID of the detail view to be shown as a
pop-up window. If passed as an empty string, the default detail view of
the specified entity is shown in the pop-up window.
entity - Optional. Resource ID of the entity of the detail view to be
shown. If not passed, defaults to the current entity.
inputNodeName - Required. Root node name of the XML to be prepared
to be passed to the detail view.
winObj - Optional. Anything passed in this field becomes available in the
modal dialog through the window.dialogArguments attribute. If this
parameter is not passed, an empty object is passed to the pop-up
window.
Return Value
None.
Example
This example shows how to use this function to invoke list of order lines
that can be added to a return. The list of order lines requires an order
number to be specified, but this number is editable by the user. Hence,
C.6.37 yfcShowDetailPopupWithKeys
This JavaScript functions shows a specific view ID in a pop-up window
(modal dialog). It is a blocking call. It does not return until the modal
dialog is closed.
Use this function in situations where the default key generated by the
Sterling Presentation Framework to be passed on the detail view is not
accepted by the detail view being invoked.
Syntax
yfcShowDetailPopupWithKeys(viewID, name, width, height, argument,
keyName, entity, selectionKeyName)
Input Parameters
viewID - Required. Resource ID of the detail view to be shown as a
pop-up window. If passed as an empty string, the default detail view of
the specified entity is displayed.
name - Required. Pass as blank space (" "). Not used.
width - Required. Horizontal size of the pop-up window. Measured in
pixels. If passed as 0, a certain default width is used.
height - Required. Vertical size of the pop-up window. Measured in
pixels. If passed as 0, a certain default height is used.
argument - Optional. Passed as the argument parameter to the
showModalDialog() function that is used to show the pop-up window.
Return Value
None.
Example
This example shows how to invoke the modify address dialog from an
inner panel that specifies its own entity key.
function doModifyAddressDialogWithKeys(source, viewID, entityKeyName){
var myObject=new Object();
myObject.currentwindow=window;
myObject.currentsource=source;
if(viewID == null) {
viewID="YADD001";
}
if (entityKeyName == null) {
entityKeyName="EntityKey";
}
yfcShowDetailPopupWithKeys(viewID, "", "600", "425", myObject,
entityKeyName);
}
C.6.38 yfcShowDetailPopupWithParams
This JavaScript function invokes a specified detail view within a modal
dialog. You can pass parameters to the detail view by forming a string in
the format of name1=value1&name2=value2 and passing this string as a
parameter to this function.
This function appends the passed string to the URL that is used to invoke
the view. Thus, the passed parameters are available in the request object
to the called view.
Syntax
yfcShowDetailPopupWithParams(viewID,name,width,height,params,entity
,key, argument)
Input Parameters
viewID - Required. Resource ID of the detail view to be shown as a
pop-up window. If passed as empty string, the default detail view of the
specified entity is displayed.
name - Required. Not used. However an empty string must be passed.
width - Required. Horizontal size of the pop-up window. Measured in
pixels. If passed as 0, a certain default width is used.
height - Required. Vertical size of the pop-up window. Measured in
pixels. If passed as 0, a certain default width is used.
params - Required. String containing parameters to be passed to the
detail view being invoked. Use the syntax
"name1=value1&name2=value2". This appends the string to the URL
invoking the detail view which enables the parameters to be available to
the detail view of the requested object.
entity - Optional. Resource ID corresponding the detail view. If not
passed, defaults to the current entity.
key - Optional. Value of the key to be passed as a parameter to the
detail view. If not passed, the current view's key is passed to the detail
view being invoked.
argument - Optional. Passed as the argument parameter to the
showModalDialog() function that is used to show the pop-up window.
This then becomes available in the modal dialog through the
window.dialogArguments attribute. If this is not passed, an empty
object is passed to the modal dialog.
Return Value
None.
Example
This example shows how the notes pop-up window is displayed using this
function. The notes pop-up window detail view requires certain
parameters to be passed to it. For instance, an XML binding pointing to
attributes that control if notes are editable for the current order status or
not. To accomplish this, the following example forms a string containing
these parameters and invokes this JavaScript function.
var
extraParams="allowedBinding=xml:/Order/AllowedModification&getBinding=xml:/Order
&saveBinding=xml:/Order";
yfcShowDetailPopupWithParams('YOMD020', '', "800", "600", extraParams);
C.6.39 yfcShowDetailPopupWithKeysAndParams
This JavaScript function invokes a specified detail view within a modal
dialog. You can pass parameters to the detail view by forming a string in
the format of name1=value1&name2=value2 and passing this string as a
parameter to this function.
This function appends the passed string to the URL that is used to invoke
the view. Thus, the passed parameters are available in the request object
to the called view.
Use this function in situations where the default key generated by the
Sterling Presentation Framework to be passed on the detail view is not
accepted by the detail view being invoked.
Syntax
yfcShowDetailPopupWithKeysAndParams(viewID, name, width, height,
argument,keyName, entity, selectionKeyName, params)
Input Parameters
viewID - Required. Resource ID of the detail view to be shown as a
pop-up window. If passed as an empty string, the default detail view of
the specified entity is displayed.
name - Required. Pass as blank space (" "). Not used.
width - Required. Horizontal size of the pop-up window. Measured in
pixels. If passed as 0, a certain default width is used.
Return Value
None.
Example
This example opens a custom detail page and passes some custom
parameters to it.
yfcShowDetailPopupWithKeysAndParams('CSTOrder012','',800,600,new
Object(),'EntityKey','order','EntityKey','CustParam1=xml:/Order&CustParam2=proce
ss')
C.6.40 yfcShowListPopupWithParams
This JavaScript function shows a specified list view in a pop-up window
(modal dialog). This is a blocking call. The function does not return until
the window is closed.
Syntax
yfcShowListPopupWithParams(viewID, name, width, height, argument,
entity, params)
Input Parameters
viewID - Required. Resource ID of the list view to be shown as a pop-up
window. If passed as an empty string, the default list view of the
specified entity is displayed.
name - Required. Pass as a blank space (" "). Not used.
width - Required. Horizontal size of the pop-up window. Measured in
pixels. If passed as 0, a certain default width is used.
height - Required. Vertical size of the pop-up window. Measured in
pixels. If passed as 0, a certain default height is used.
argument - Required. Value passed as the argument parameter to
showModalDialog() function that is used to show the pop-up window.
This then becomes available in the modal dialog through the
window.dialogArguments attribute.
entity - Optional. Resource ID for the detail view being shown. If not
passed, defaults to the current entity.
params - Optional. String starting with an ampersand (&) and
containing any extra parameters based on which the search is to be
performed. The parameters passed become available to the list view
being invoked as request parameters.
Return Value
None.
Example
This example shows how an inventory audit list is invoked directly from
the Inventory Summary screen for a specified Organization, Item, UOM
and Product Class.
function showInvAuditSearch(sViewID,sItemID,sUOM,sProductClass,sOrgCode)
{
var ItemID=document.all(sItemID).value;
var UOM=document.all(sUOM).value;
var PC=document.all(sProductClass).value;
var Org=document.all(sOrgCode).value;
var entity="inventoryaudit";
var
sAddnParams="&xml:/InventoryAudit/@ItemID="+ItemID+"&xml:/InventoryAudit/@UnitOf
Measure="+UOM;
sAddnParams=sAddnParams +
"&xml:/InventoryAudit/@ProductClass="+PC+"&xml:/InventoryAudit/@OrganizationCode
="+Org;
yfcShowListPopupWithParams(sViewID,"",'900', '500','',entity,
sAddnParams);
}
C.6.41 yfcShowSearchPopup
This function invokes the specified search view in a pop-up window. This
function can be used to display lookup results.
Syntax
yfcShowSearchPopup(viewID, name, width, height, argument, entity)
Input Parameters
viewID - Required. Resource ID of the search view to be shown as a
pop-up window. If passed as an empty string, the default detail view of
the specified entity is displayed.
name - Required. Pass as a blank space (" "). Not used.
width - Required. Horizontal size of the pop-up window. Measured in
pixels. If passed as 0, a certain default width is used.
height - Required. Vertical size of the pop-up window. Measured in
pixels. If passed as 0, a certain default height is used.
argument - Required. Value passed as the argument parameter to the
showModalDialog() function that is used to show the pop-up window.
This then becomes available in the modal dialog through the
window.dialogArguments attribute.
entity - Optional. Resource ID corresponding to the entity being
searched for. If not passed, defaults to the name of the current entity.
Return Value
None.
Example
This example shows how to invoke a single field lookup. The
callLookup() function invokes a search pop-up window.
From the search pop-up window, when the user selects a row, the
setLookupValue()function is called with the selected value as a
parameter.
The setLookupValue() function populates the value in the text field and
closes the lookup search window.
function setLookupValue(sVal)
{
var Obj=window.dialogArguments
if(Obj != null)
Obj.field1.value=sVal;
window.close();
}
C.6.42 yfcSpecialChangeNames
This JavaScript function must be called when an API requires that the
entire row is passed if the key is passed.
Syntax
yfcSpecialChangeNames(id, checkOnlyBlankRow)
Input Parameters
id - Required. ID of the HTML tag under which the name changing must
be performed.
checkOnlyBlankRow - Optional. If this is passed as true, only new
blank rows (where all inputs and selects are void) are considered for
changing names. If this is passed as false, then all the existing rows
under the object whose ID is passed are considered. If not passed, the
value defaults to false.
Return Value
None.
C.6.43 yfcSplitLine
This JavaScript function splits a specific row into two rows.
Syntax
yfcSplitLine(imageNode)
Input Parameters
imageNode - Required. Object pointer to the image that is selected in
response to which this function is called.
Output Parameters
None.
Table C5 lists the attributes to use at each cell level for determining the
behavior of the newly created rows.
Example
This example shows how you can split a line on the client side during
returns inspection so that a specific receipt line can be given multiple
dispositions.
<yfc:loopXML binding="xml:/ReceiptLines/@ReceiptLine" id="ReceiptLine">
<tr>
<yfc:makeXMLInput name="receiptLineKey">
<yfc:makeXMLKey binding="xml:/ReceiptLine/@ReceiptLineKey"
value="xml:/ReceiptLine/@ReceiptLineKey"/>
</yfc:makeXMLInput>
LINE_HISTORY, "Disposition_History")%>></a>
</td>
<td class="tablecolumn" nowrap="true" ShouldCopy="false" ><yfc:getXMLValue
binding="xml:/ReceiptLine/@SerialNo"/></td>
<td class="tablecolumn" nowrap="true" ShouldCopy="false" ><yfc:getXMLValue
binding="xml:/ReceiptLine/@LotNumber"/></td>
<td class="tablecolumn" nowrap="true" ShouldCopy="false" ><yfc:getXMLValue
binding="xml:/ReceiptLine/@ShipByDate"/></td>
<td class="numerictablecolumn" nowrap="true" ShouldCopy="false"
><yfc:getXMLValue binding="xml:/ReceiptLine/@AvailableForTranQuantity"/></td>
<td class="tablecolumn" nowrap="true" ShouldCopy="false" ><yfc:getXMLValue
binding="xml:/ReceiptLine/@DispositionCode"/></td></td>
<td class="tablecolumn" ShouldCopy="false" >
<yfc:getXMLValue binding="xml:/ReceiptLine/@InspectionComments"/>
</td>
<td class="tablecolumn" nowrap="true" ShouldCopy="true" >
<img IconName="addSplitLine" src="../console/icons/add.gif"
<% if
(getNumericValue("xml:/ReceiptLine/@AvailableForTranQuantity") > 1) { %>
class="lookupicon" onclick="yfcSplitLine(this)"
<%} else {%>
style="filter:progid:DXImageTransform.Microsoft.BasicImage(grayScale=1)"
<%}%>
/>
<input type="hidden"
<%=getTextOptions("xml:/InspectOrder/ReceiptLines/FromReceiptLine_" +
ReceiptLineCounter + "/@ReceiptHeaderKey",
"xml:/ReceiptLine/@ReceiptHeaderKey")%>/>
<input type="hidden"
<%=getTextOptions("xml:/InspectOrder/ReceiptLines/FromReceiptLine_" +
ReceiptLineCounter + "/@ReceiptLineNo", "xml:/ReceiptLine/@ReceiptLineNo")%>/>
<select NewName="true" NewClassName="unprotectedinput"
NewContentEditable="true" NewResetValue="true"
class="combobox"
<%=getComboOptions("xml:/InspectOrder/ReceiptLines/FromReceiptLine_" +
ReceiptLineCounter + "/ToReceiptLines/ToReceiptLine_1/@DispositionCode")%>>
<yfc:loopOptions binding="xml:/ReturnDispositionList/@ReturnDisposition"
name="Description"
value="DispositionCode"
selected="xml:/ReceiptLine/@DispositionCode"/>
</select>
</td>
<td class="tablecolumn" nowrap="true" ShouldCopy="true" >
<input type="text" NewName="true" NewClassName="numericunprotectedinput"
NewContentEditable="true" NewResetValue="true"
class="numericunprotectedinput"
<%=getTextOptions("xml:/InspectOrder/ReceiptLines/FromReceiptLine_" +
ReceiptLineCounter + "/ToReceiptLines/ToReceiptLine_1/@Quantity", "")%>/>
</td>
<td class="tablecolumn" nowrap="true" ShouldCopy="true" >
<input type="text" NewName="true" NewClassName="unprotectedinput"
NewContentEditable="true" NewResetValue="true"
class="unprotectedinput"
<%=getTextOptions("xml:/InspectOrder/ReceiptLines/FromReceiptLine_" +
ReceiptLineCounter + "/ToReceiptLines/ToReceiptLine_1/@InspectionComments",
"")%>/>
</td>
</tr>
</yfc:loopXML>
</tbody>
C.6.44 yfcValidateMandatoryNodes
This JavaScript function validates mandatory sections of a screen. The
function parses through all the TABLE elements in a page, and for each of
the tables, looks for the presence of the yfcMandatoryMessage attribute.
If this attribute is found, the function looks into the contents of the table.
If the contents have not changed, the function alerts the message set
within the yfcMandatoryMessage attribute for the corresponding <table>
tag.
Syntax
yfcValidateMandatoryNodes()
Input Parameters
None.
Output Parameters
None.
Example
The following example shows how mandatory validation is performed
before Save in the case of return receiving. First, the Save Operation is
configured to call the yfcValidateMandatoryNodes() function.
Second, in the inner panel JSP, the following attribute is set for the table
that requires a validation check:
<table class="table" ID="ReceiveLines" width="100%" editable="true"
yfcMandatoryMessage="<yfc:i18n>Receipt_information_must_be_entered</yfc:i18n>">
C.6.45 yfcFindErrorsOnPage
This JavaScript function can be used within JSPs. This function is used to
find errors on a page. On finding an error, this function raises an
appropriate alert message.
Syntax
yfcFindErrorsOnPage()
Input Parameters
None.
Return Value
None.
Example
This example shows how to call the yfcFindErrorsOnPage() function from
a JSP. While adding a dynamic row inside a JSP, this function checks if
the JSP has any errors on a page. On finding an error, an appropriate
alert message is displayed:
function addRows(element) {
if(yfcFindErrorsOnPage())
return;
}
C.6.46 setRetrievedRecordCount
This JavaScript function can be used within JSPs created for list views. All
list view screens typically have a message next to the title of the screen
that indicates how many records were retrieved. For example, the
message displays "Retrieved 2 record(s)" when the list view shows 2
records. You can use this javascript to set the count within this message
dynamically. Typically, the UI infrastructure automatically displays the
correct message based on the output of the "List" API defined under the
entity resource for this list view.
However, in some instances the "List" API cannot be used for a specific
list view. In these cases, the list view as been set to ignore the default
list API, and instead, calls its own API either by defining a different API
under the list view resource or within its own JSP through the callAPI
taglib. In this case, the UI infrastructure cannot automatically display the
correct message.
Syntax
setRetrievedRecordCount (recordCount)
Input Parameters
recordCount - Required. The correct record count to display in the
"Retrieved X record(s)" message.
Return Value
None.
Example
This example shows how to call the setRetrievedRecordCount() function
from a JSP defined for a list view. The correct count is computed as JSP
code. Then, this result is passed to the setRetrievedRecordCount method
which is called inside a script tag:
<%
YFCElement root = (YFCElement)request.getAttribute("OrganizationList");
int countElem = countChildElements(root);
%>
<script language="javascript">
setRetrievedRecordCount(<%=countElem%>);
</script>
D.2.2 Internationalization
The Sterling Presentation Framework enables you to write an
internationalized application by providing the following features that can
be customized to be locale-specific:
Q
i18n JSP tag for literals
Q
Server-side error messages
D.3.1 addToTempQ
This mobile device JSP function adds the keyName and keyValue pair to
TempQ in order to persistence data across JSPs. The TempQ utilities store
name/value pair information on one page in the session and provide
methods for accessing them on the subsequent screens.
This function also enables support of multiple duplicate key names.
Syntax
public void addToTempQ (String keyName, String keyValue, boolean
allowDuplicates) throws Exception
public void addToTempQ (String keyName, String keyValue, Map m,
boolean allowDuplicates) throws Exception
Input Parameters
keyName - Required. Name of the key to be stored in the TempQ.
keyValue - Required. Value of the key to be stored in the TempQ.
allowDuplicates - Required. Determines whether or not duplicate
objects are allowed to be added to the TempQ.
m - Optional. Enables you to provide a map of name/value pairs in a
java.util.map.
Example
This example shows how the addToTempQ function can be used when
multiple cases have to be scanned and multiple CaseIDs have to be
stored in a TempQ.
addToTempQ("Case", "Case", caseMap, true);
D.3.2 clearTempQ
This mobile device JSP function clears the TempQ. This is the first
function to invoke before persisting any information in the TempQ. The
TempQ utilities store name/value pair information on one page in the
session and provide methods for accessing them on the subsequent
screens.
Syntax
public void clearTempQ() throws Exception
Input Parameters
None.
Example
The following example shows how this function can be used to clear the
TempQ:
clearTempQ();
D.3.3 deleteAllFromTempQ
This mobile device JSP function deletes entries from TempQ for a given
keyName. Use this after an exception to clear CaseIds stored so far.
The TempQ utilities store name/value pair information on one page in the
session and provide methods for accessing them on the subsequent
screens.
Syntax
public void deleteAllFromTempQ(String keyName) throws Exception
Input Parameters
keyName - Required. This is the key for which TempQ entries are
deleted.
Example
This example shows how the deleteAllFromTempQ function can be used
to remove all TempQ entries that correspond with the keyName
CaseScanned.
deleteAllFromTempQ("CaseScanned");
D.3.4 deleteFromTempQ
This mobile device JSP function deletes the TempQ entry for a given
keyName and keyValue pair.
The TempQ utilities store name/value pair information on one page in the
session and provide methods for accessing them on the subsequent
screens.
Syntax
public void deleteFromTempQ(String keyName, String keyValue) throws
Exception
Input Parameters
keyName - Required. Name of the key in the TempQ that requires
deletion.
keyValue - Required. Value of the key in the TempQ that requires
deletion.
Example
This example shows how the getLocale function can be used in
conjunction with the getDoubleFromLocalizedString function.
deleteFromTempQ("Case","Case");
D.3.5 getErrorXML
This mobile device JSP function returns an XML representation of error.
The mobile device interprets this XML and renders an error page.
Syntax
public String getErrorXML(String error, String errorField)
public String getErrorXML(String error, String errorField, String severity)
Input Parameters
error - Required. Error description for the error to be shown to the user.
This is usually derived by invoking the checkForError() function.
errorField - Required. Form field where the focus must be transferred to
on clearing the error page.
severity - Optional. Displays the degree of error present. Recommended
values in ascending order are: info, error, warning.
Example
The following example shows how this function can be used to get the
error XML for rendering an error message on a mobile UI screen.
errorXML=getErrorXML(errorDesc, errorfield)
D.3.6 getField
This mobile device JSP function is used in conjunction with the
getForm() function.
Syntax
public YFCElement getField(YFCDocument formDoc, String fieldName)
throws Exception
Input Parameters
formDoc - Required. Name of the YFCDocument from which the element
must be extracted.
fieldName - Required. Name of the form field for which the other
attributes need to be set.
Example
This example shows the getField function.
Consider a form with formName as formName. The following code
creates a YFCDocument from the XHTML form.
YFCDocument ydoc=getForm(formName);
Prior to setting the attributes of the form for a specific element, getField
can be called as:
YFCElement dropoffLocationElem = getField(ydoc,"lblDropoffLocation");
To set the type and subtype attributes for the dropoffLocationElem, use:
dropoffLocationElem.setAttribute("type","hidden");
dropoffLocationElem.setAttribute("subtype","Hidden");
D.3.7 getForm
This mobile device JSP function reads the XHTML form for a given form
name and returns a YFCDocument. The currentEntity name is prefixed to
the formname and .html is suffixed. It looks for the file in the <INSTALL_
DIR>/repository/xapi/template/merged/mobilescreens/ directory.
The getForm() function is always used in conjunction with the
getField() function.
Syntax
public YFCDocument getForm(String formName) throws Exception
Input Parameters
formName - Required. Name of the XHTML form.
Example
The following example shows how this function can be used to return a
YFCDocument for the form "formName".
YFCDocument ydoc=getForm()
D.3.8 getStoredElement
This mobile device JSP function returns the XML Element for all TempQ
entries. Each keyName and keyValue entry can be obtained by traversing
the Element.
Syntax
private YFCElement getStoredElement(YFCDocument ydoc, String
keyName, String keyValue) throws Exception
Input Parameters
ydoc - Required. YFCDocument representation of the XHTML form.
keyName - Required. Name of the key in the TempQ.
keyValue - Required. Value of the key in the TempQ.
Example
The following example shows the getStoredElement function.
D.3.9 getTempQ
This mobile device JSP function retrieves the TempQ document object
from Session. If a TempQ document does not exist, this function creates
one. Since the return type of this function is YFCDocument, it is used to
get a handle to the TempQ and thereafter is used to get its elements or
attributes for some of its elements.
The TempQ utilities store name/value pair information on one page in the
session and provide methods for accessing them on the subsequent
screens.
Syntax
public YFCDocument getTempQ() throws Exception
Input Parameters
None.
Example
The following example shows how this function can be used to first get
the TempQ documents and then later to get the node list for elements
with the tag name "LPN".
YFCNodeList lpnlist=()((getTempQ()), getElementsByTagName("LPN"));
D.3.10 getTempQValue
This mobile device JSP function returns the value of the TempQ for a
specific key. The TempQ utilities store name/value pair information on
one page in the session and provide methods for accessing them on the
subsequent screens.
Syntax
private String getTempQValue(String keyName) throws Exception
Input Parameters
keyName - Required. Name of the key for which the TempQ value is to
be returned.
Example
This example shows how the getTempQValue function can be used to
return the keyValue corresponding to the CaseScanned key from the
TempQ.
getTempQValue("CaseScanned");
D.3.11 replaceInTempQ
This mobile device JSP function replaces the value in TempQ for a given
key. The TempQ utilities store name/value pair information on one page
in the session and provide methods for accessing them on the
subsequent screens.
Syntax
public void replaceInTempQ(String keyName, String keyValue) throws
Exception
public void replaceInTempQ(String keyName, String keyValue, String
newKeyValue) throws Exception
public void replaceInTempQ(String keyName, String keyValue, Map m)
throws Exception
Input Parameters
keyName - Required. Name of the key in the TempQ that is being
replaced.
keyValue - Required. Value of the key in the TempQ that is being
replaced.
newKeyValue - Optional. The new value of the key in TempQ that
replaces the old value.
m - Optional. Map that should replace the existing keyValue.
Example
The following example shows how this function can be used to change
the value of RecordCount from "1" to "resultMap".
replaceInTempQ("RecordCountResult","1",resultMap);
D.3.12 resetAttribute
This mobile device JSP function removes the named attribute from
request and PageContext.
Syntax
public void resetAttribute(String name)
public void resetAttribute(String name, Object value)
Input Parameters
name - Required. The name of the request attribute that needs to be
reset.
value - Optional. The value of the request attribute that the attribute
should be reset to.
Example
This example shows how the restAttribute JSP function removes the
named attribute from request and PageContext.
resetAttribute("TaskList","");
D.3.13 sendForm
This mobile device JSP function posts an HTML form and provides focus
on a specific field on a subsequent JSP form. Three versions of syntax
enable you to customize how data should display.
Syntax
public String sendForm(String formName, String focusField) throws
Exception
public String sendForm(String formName, String focusField, boolean
sendData) throws Exception
public String sendForm(YFCDocument formDoc, String focusField,
boolean sendData) throws Exception
Input Parameters
formDoc - Required. Either formName of formDoc must be provided.
formName - Required. Either formName of formDoc must be provided.
focusField - Required. Form field where the focus must be transferred to
in the invoked JSP.
sendData - Optional. Valid values: true and false.
Example
This example shows how the sendForm function can be used so that the
form corresponding to the YFCDocument ydoc is posted. On invocation of
the subsequent JSP, the focus is transferred to the txtLocationId field and
data is posted.
sendForm(ydoc, "txtLocationId", true)
827
JSP file names and directory structure, 700 complex queries, 578
JSP files, naming controls, 700 AND, 578
lookup icon usage and placement, 120 OR, 578
naming files, 663 condition builder, 591
pop-up windows, 74 adding custom attributes, 591
reserved keywords, 664 creating extn_conditionbuilder.xml
screen organization, 75 file, 592
XML Group, 558 during condition definition, 594 to 595
XML Name, 558 process type based, 591 to 594
Binding providing condition properties, 596
check boxes, 284 defining YCPDynamicConditionEx
combo box cell editors, 282 interface, 596
combo boxes, 279 configuring
labels, 274 resource cache refresh actions, 54
links, 287 service invocation, remote, 642
list boxes, 282 yifclient.properties file, 642
radio buttons, 285 container pages, 74
styledText components, 278 Controls
tables, 288 localizing, 302
text boxes, 276 naming. See Also creating a binding object
binding, 182 theming, 303
Binding Object creating
creating, 262 custom business entity, 107
new resource, 86
themes, 65
C
credit card numbers
calendar lookup, 119 displaying, 143
callApi JSP tag, 743 displaying multiple, 145
callApi (alternative method) JSP tag, 744 encryption
calling APIs and Services, 303 custom APIs. See extended APIs
calling APIs and Services. See Also calling multiple custom error codes, 157
APIs creating, 157
callLookup JavaScript function, 756 reserved keywords, 157
changeSessionLocale JSP function, 706 custom tables
changing creating, 523
number of records displayed on list view, 91 Customer Order Management (COM), 178
Character User Interfaces (CUI), 670 customer_overrides.properties file
clearTempQ mobile device JSP function, 819 maximum number of records to display, 81
client-side validations, 125 customizing
colors about box logo, 73
best practices, 65, 66 action from inner panel
themes, used in, 64 actions, 131
columns API action to open new view, 85
adding, 508 APIs called by default, 79
extending, 508 condition builder, 591 to 596
829
dynamic attributes exceptions
namespaces, 138 behavior, 551
dynamic input in synchronous API calls, 642
credit card, 145 expandCollapseDetails JavaScript function, 760
Dynamic Link Library (DLL), 670 extended APIs
configuration properties, 629
connection properties, 630
E signature configuration, 629
editable lists, 109 Extending API templates, 538
Editable Tables extensible
binding. See Also binding standard tables, 293 business-related entities, 77
creating. See Also creating standard extensible files
tables, 261 customer_overrides.properties, 81, 91
EJB mode datatypes.xml, 141
configuration properties, 640 extnibundle.properties, 122
e-mail event handler, 584 innerpanel.jsp, 104
encrypting .jar files, 70
credit card numbers logindetails.jsp, 67
properties, 651 theme CSS files, 65
entities, 77 theme XML files, 65
customizing, 107 yfsdatatypemap.xml, 141, 142
entity keys Extension Points, 673
API input, 137 YRCPluginAutoLoader, 182
Entity Relationship Diagrams, 508 extension points, 673
environment variable extensions, 673
INSTALL_DIR, 35 extnbundle.properties file, 122
INSTALL_DIR_OLD, 35
equal sign (=) used in resource bundle F
mapping, 122
equals JSP function, 707 fields
error checking custom validation, 125
user exits, 631 hiding, 124
event handlers hiding and displaying, 124
behavior of, 583 lookup, 119
browser, 125 figures
chaining, 589 about box, 73
field-level, 125 calendar lookup, 118
screen-level, 126 data lookup, 118
Service Definition Framework, 125 entities within the Resource Configurator, 78
event handlers, types of lookup icons, 118
Alert Console, 585 Sign In screen logic, 67
e-mail, 584 standard detail view, 82
Java interoperability, 587 standard home page, 74, 106
publish, 587 standard list view, 80
exception, 631 standard screen layout, 75
831
customizing actions, 131 isTrue JSP function, 734
inner panels, 74 isVoid JSP function, 735
JSP files, 103 i18n
JSP tag library, 103 JSP tag, 748
innerpanel.jsp file, 104 XML tag, 127
input boxes i18ndb
data type, 140 JSP tag, 749
field size, 140
getGetTextOptions API, 140
J
getTextOptions, 140
validation, 140 Java Runtime Environment (JRE), 180
input namespaces JavaScript functions
API input, 136 callLookup, 756
input XML doCheckAll, 757
APIs usage, 557 doCheckFirstLevel, 758
binding to UI controls, 152 expandCollapseDetails, 760
custom time-triggered transactions, 633 getAttributeNameFromBinding, 762
example, 557 getCurrentSearchViewId, 762
nested orderby element, 561 getCurrentViewId, 763
orderby element, 561 getObjectByAttrName, 764
query type attributes, 559 getParentObject, 765
in custom task-based time-triggered goToURL, 766
transactions, 635 ignoreChangeNames, 767
in custom time-triggered transactions, 633 invokeCalendar, 768
query type values, 560 invokeTimeLookup, 768
unique key attributes used by select APIs, 553 showDetailFor, 770
XMLBindingString, 152 showDetailForViewGroupId, 772
input XML files, 564 showHelp, 772
input XML, blanks and spaces, 557, 665 showPopupDetailFor, 773
INSTALL_DIR, 35 validateControlValues, 775
INSTALL_DIR_OLD, 35 yfcAllowSingleSelection, 776
Integrated Development Environment (IDE), 672 yfcBodyOnLoad, 777
Integrated Development Environments (IDEs), 672 yfcChangeDetailView, 778
integrating yfcChangeListView, 779
sign in from external application, 69 yfcCheckAllToSingleAPI, 780
sign in, automatic, 69 yfcDisplayOnlySelectedLines, 780
single signon, 70 yfcDoNotPromptForChanges, 782
with external applications, 69 yfcGetCurrentStyleSheet(), 784
International Business Machines (IBM), 672 yfcGetSaveSearchHandle, 784
internationalization yfcGetSearchHandle, 785
multi-byte characters, 667 yfcHasControlChanged, 786
invokeCalendar JavaScript function, 768 yfcMultiSelectToSingleAPI, 787
invokeTimeLookup JavaScript function, 768 yfcSetControlAsUnchanged, 791
isModificationAllowed JSP function, 732 yfcShowDefaultDetailPopupForEntity, 792
isPopupWindow JSP function, 733 yfcShowDetailPopup, 793
833
themes, 65 getStoredElement, 822
login screen. See Sign In screen. getTempQ, 823
logo getTempQValue, 823
about box, 72 replaceInTempQ, 824
menu bar, 72 resetAttribute, 825
Sign In screen, 70 sendForm, 825
lookup fields mobile user interfaces
icons, 118
lookups planning screens, 161
calendar, 119 adding menu entries, 170
multiple field, 119 creating custom, 159, 507
single field, 119 creating JSP files, 173
loopOptions JSP tag, 750 creating resources in Configurator, 164
loopXML JSP tag, 751 creating template HTMLs, 172
loopXML tag design guidelines, 161
XML binding, 135 error handling, 175
passing data between screens, 174
screen size dimensions, 162
M
understanding JSP files, 173
makeXMLInput JSP tag, 753 modifying
makeXMLKey JSP tag, 754 number of records to display, 81
maps multi-byte characters, 667
XML theme files, 65 multiple document interface (MDI), 182
maximum records multiple field lookup, 119
displaying, 91 multiple input objects
menu XML binding, 135
language, 123
menu bars N
customizing logo, 72
logo, 72 navigation
menus customizing, 123
customizing, 122 navigation behavior
Microsoft COM+, 56 APIs called, 79
adding components, 57 nested orderby element example, 561
configuring service, 58 non-ear mode, 43
creating client proxy, 59 nonextensible files
installing client proxy, 59 login.jsp, 67
mobile device JSP functions start.jsp, 67
addToTempQ, 818 ycpapibundle.properties, 122
clearTempQ, 819 nullable columns, 509
deleteAllFromTempQ, 819
deleteFromTempQ, 820
O
getErrorXML, 820
getField, 821 Operating System (OS), 669, 671
getForm, 822 orderby element example, 561
835
showHelp JavaScript function, 772 creating, 260
showPopupDetailFor JavaScript function, 773 status changes
sign in resource IDs, 131
from external application, 69 transaction, 131
Sign In screen, 67 Sterling Rich Client Platform
components, 67 benefits, 179
customizing logo, 71 Store Operations (SOP), 178
default language, 68 Swing user interface
international, 68 binding for JText field, 153
logo, 70 extending list screens, 154
signatures extending organization and item detail
API service node, 629 screens, 148
YCPBaseAgent class, 633 extending search and detail screens, 149
single field lookup, 119 XML binding, 152
single quotation mark (), 665 extensibility, 147
single signon, 70 name property, 153
special characters synchronous API, 642
API input, 664
maps and literals, 665
T
special characters, 665
in file names, 663 tables
keywords, 663 sortable, 120
multi-byte support, 667 Tag identifires, 514
not supported, 665 themes, 64
ampersand character (&), 665, 666 colors and fonts used in, 64
greater than symbol (>), 665 creating and modifying, 65
less than symbol (>), 665 CSS files, 65
parenthesis (()), 665 localizing, 65
percent sign (%), 665 standard defaults supplied, 65
plus sign (+), 665 XML files, 65
quotation mark ("), 665 theming, 183
single quotation mark (), 665 time-triggered transactions
underscore character (_), 666 input XML, 633
reserved keywords, 664 overview
third-party vendors, 666 programming, 632
square brackets (not supported), 665 signatures, 633
standard types of, 632
business-related entities, 77 Total Cost of Ownership (TCO), 670
screen layout, 75
screen navigation behavior, 74, 76
standard APIs, 551 U
Standard Table UI cache refresh actions
adding columns, 260 configuring, 54
Standard Tables UI customizations
binding, 288 testing, 55
837
function, 798 repeating elements, used in, 751
yfcShowListPopupWithParams JavaScript single quotation mark (not supported), 665
function, 801
yfcShowSearchPopup JavaScript function, 802
yfcSpecialChangeNames JavaScript function, 803
yfcSplitLine JavaScript function, 804
yfcValidateMandatoryNodes JavaScript
function, 808
yfsdatatypemap.xml file, 141
behavior, 142
yfsGetCheckBoxOptions JSP function, 736
yfsGetComboOptions JSP function, 737
yfsGetImageOptions JSP function, 738
yfsGetTemplateRowOptions JSP function, 739
yfsGetTextAreaOptions JSP function, 742
yfsGetTextOptions JSP function, 742
yfs.properties file
MaxRecords, 91
yfs.properties.in file
resource cache refresh actions, 54
YFS_EXP_INTERFACE_DATA table, 587
yifclient.properties file
encrypting properties, 651
remote service invocation, 642
YRCPluginAutoLoader, 182
YRCPluginAutoLoader extension point, 182
yscpapibundle.properties file
deployment mode, 44
Z
" quotation mark (not supported), 665
% percent sign (not supported), 665
& ampersand character (not supported), 665, 666
() parenthesis (not supported), 665
), 665
+ plus sign (not supported), 665
> greater than symbol (not supported), 665
> less than symbol (not supported), 665
@ at symbol in XML binding
loopOptions tag in repeating elements, 750
loopXML tag in repeating elements, 751
typical usage, 134
_ underscore character
Oracle, unpredictable results when used, 666