Siebel Advisor API Reference > Application File Reference for Siebel Advisor >
Files in the Custom Directory
The custom directory contains JavaScript files that you can edit to customize the behavior of the applications' engine without modifying the core engine code itself. app_config.js
The Application Configuration file contains variables that define properties of the application. The file contains all required variables, set to their default values. You can add optional variables to further customize the behavior of the application. For variables that accept strings, all strings must be inside quotation marks. Table 2 lists the variables that must be included in the Application Configuration file.
Table 2. Required Variables in the Application Configuration File
|
|
|
APP_DATA_VERSION |
string |
Defines a version number for the feature and configuration data in your application. After a user clicks a link from an order back to the application, the engine reads this information to check data versions. |
APP_AUTO_LOAD_RESULTS |
boolean |
Enables automatic loading of output targets when a pageset first loads. |
APP_RELOAD_ALL |
boolean |
Defines whether all display pages reload when output targets are generated. |
APP_RELOAD_INPUTS_ON_EXC |
boolean |
Defines whether all display pages that contain input UI controls reload as an exception message displays, after a user selects an invalid configuration. |
APP_DEFAULT_TIMEOUT |
integer |
Specifies the amount of time (in milliseconds) the browser waits for a file to load before it times out. Without this variable, the default time-out length is 5000 milliseconds. |
APP_ABOUT_WIN_ARGS |
string |
Sets properties of the window into which the About file loads. Use the same properties inside the string (such as "scrollbars=1, resizable=0, width=450") that you would use to launch a separate browser window from inside any HTML file. |
APP_EXC_DISPLAY_NUM |
integer |
Defines the maximum number of exception messages that should appear. |
APP_HELP_WIN_ARGS |
string |
Sets properties of the window into which the Help file set loads. Use the same properties inside the string (such as "scrollbars=1, resizable=0, width=450") that you would use to launch a separate browser window from inside any HTML file. |
TRANSACT_URL |
string |
Defines the URL to a Transact Server™. |
TRANSACT_THIRD_PARTY_CART |
boolean |
Defines whether the Transact Server uses a third-party shopping cart. |
TRANSACT_CART_WINARGS |
string |
Sets properties of the window into which the Transact Server loads a shopping cart. Use the same properties inside the string (such as "scrollbars=1, resizable=0, width=450") that you would use to launch a separate browser window from inside any HTML file. |
TRANSACT_SHOW_CART_URL |
string |
Defines the URL to a third-party shopping cart. Use the Transact ShowCart function to link from the application to the shopping cart located at this URL. |
TRANSACT_ACTIVE |
boolean |
Determines whether the application runs in conjunction with Transact Server. |
ORDER_SUBVAR |
string |
Specifies a string whose elements initialize the variables that track subitem subtotal and order total. |
The following four required configuration variables allow the engine to access module configuration variables. Do not edit the content or location of these variables. APP_ENGINE_CHANGED
APP_CONFIG_LOADED
ORDER_CONFIG_LOADED
TRANSACT_CONFIG_LOADED
These variables should appear at the end of the Application Configuration file. Do not add any variables after them. Table 3 lists optional variables you can add to the Application Configuration file to further customize the appearance and behavior of the application. Do not add any of these variables to the file after the *_CONFIG_LOADED variables.
Table 3. Optional Variables in the Application Configuration File
|
|
|
APP_ALWAYS_KEEP_BACK_STATE |
boolean |
If you work with large pagesets, you can set this variable to "false" in order to improve performance speed. By default, this variable is set to "false." |
APP_DISPLAY_AREA_FRAME |
string |
Defines the location of the display area. Use the syntax, APP_DISPLAY_AREA_FRAME = ISSStr+".displayArea" If top.swe.contentFrame is defined, it is used instead, overriding the value in the config variable. |
APP_LOAD_UI_ON_STARTUP |
boolean |
Shows the UI when the engine loads. If this variable is set to false, the persistent engine is used. |
APP_SIEBEL_INTEGRATION_ON |
boolean |
Determines whether or not to include Siebel integration code. |
APP_VERSION |
string |
Defines a version number for the application. |
APP_HELP_URL |
string |
Specifies a URL that overrides the default Help page location. |
APP_ABOUT_URL |
string |
Specifies a URL that overrides the default About page location. |
APP_SHOW_DATA_LOADING_PAGE |
boolean |
Specifies whether a message appears inside the application while the application is loading a pageset. If you do not add this variable, a message appears by default. |
APP_SHOW_CALC_PAGE |
boolean |
Specifies whether a processing message appears in the exception message area. This occurs after the user makes a selection in an input UI control but before the associated output target appears. If you do not add this variable, a message appears by default. |
APP_PRECONFIG_SEP_CHAR |
string |
Defines the character used to separate items in a list of dynamic default (DYNDEF) strings. The default character is a comma. |
APP_PRECONFIG_EQUALS_CHAR |
string |
Defines the character used to equate a key with a value in a dynamic default (DYNDEF) string. The default character is an equal sign. |
APP_PRICE_DATA |
string |
Defines what appears in the Pricing window. The strings you specify in this variable need to match what is being sent from the server. For example, the server sends an object that contains the attributes 'price,' 'description,' 'quantity,' 'color,' and 'size.' The exact data sent is determined by the server. To display the description, quantity, and price, set the variable using the following line: "var APP_PRICE_DATA=new Array('description', 'quantity', 'price'); Default value: 'Product Name,' 'Net Price,' 'Start Price,' 'Pricing Comments' |
APP_PRICE_TITLE_ATTR |
string |
Defines the title for the pricing window. Default value: "Pricing Window" |
APP_PRICE_BODY_ATTR |
string |
Defines the behavior of the body tag in the Pricing window, including background color, the onLoad event, or any of the valid body attributes or events. Default value: "bgcolor=#fffffff" |
APP_PRICE_FONT_ATTR |
string |
Determines the fonts displayed in the Pricing window. Default value: "face='Verdana, Arial' size=2 color = 'blue'" |
APP_PRICE_TABLE_ATTR |
string |
Use this variable to define the Pricing table attributes. All pricing information appears in a table. Default value: "border = 0 cellpadding=2 cellspacing=2 width=100%" |
APP_PRICE_CLOSE_ATTR |
string |
Specifies the text to display for the Close Window link for the Pricing window. For AOL users, it may become difficult to keep track of newly opened windows, so a Close Window link appears in the Pricing window. Default value: Close Window |
APP_PRICE_WIN_ATTR |
string |
Defines attributes of the Pricing window. Using this variable, you can adjust the size (height, width), the controls displayed, whether or not the window is resizable, and any other valid window attributes. This variable is particularly useful for sizing the window to the data that is expected to appear. Default value: "status=0,scrollbars=1,resizable=1,width=450,height=200" |
APP_SOA_TOP_LOC |
string |
Defines location of frame containing the application. Use this variable when Start on Active module is being used and the application is in a nested frameset. Default: top |
TRANSACT_CART_TARGET |
string |
Determines the type of window in the Transact Server loads. The type of window is defined in Javascript. |
TRANSACT_NOT_ACTIVE_MSSG |
string |
Specifies the text content of the message that appears when users try to interact with an unavailable Transact Server. |
TRANSACT_OPEN_QUOTE_PROMPT |
string |
Specifies the text that precedes display of an open quote from the Transact Server. |
Optional Variables for Use with Session Timeout Problems
Use the following optional variables if you are having problems with session timeout. Using these variables, as shown in Table 4, puts you in session simulator mode. The session simulator will ping the server at an interval equal to half the session length, as long as any qualifying client-side activity has occurred within that time frame.
Table 4. Session Timeout Variables
|
|
|
APP_SESSION_LENGTH |
integer |
Set this variable to the length of the Siebel server session in minutes. Default = 15.0. |
APP_PING_SERVER_URL |
string |
Specifies a URL to be "pinged." A default values is retrieved using ISS.GetTopURL(). |
customCode.js
This is the file inside which you can write custom code to be associated with a callout point function. Sample usage: function COP_InvalidItemAdded(calloutPkg)
{
alert("Behold the invalid configuration.");
}
The customCode.js file also contains the InitApp function, which determines the behavior of the application when it first loads. You can write custom code to define the behavior. You can also edit either of the included InitApp examples to display the Contents List or a specific pageset when the application loads. You can even use InitApp to return a string if you want to override the default module registry file. InitApp can also be used to activate Start On Active when using an application in a stand-alone environment. NOTE: If using the persistent engine (APP_LOAD_UI_ON_STARTUP = false), InitApp should not contain code that displays anything in the display area. This is because the display area is not available until you call ShowCDA().
Sample Usage: function InitApp() {
ISS.ShowContentsList();
}
|