Siebel CRM Configuring Siebel Open UI Siebel Innovation Pack 2015 E52417-01 |
|
Previous |
Next |
View PDF |
This topic describes the Siebel CRM events that you can use to customize Siebel Open UI. The jQuery library binds actions to JavaScript events, such as mouse down, mouse over, blur, and so on. It also provides its own events that are part of the jQuery library and not part of Siebel Open UI. Siebel Open UI uses some Siebel CRM events that jQuery does not define, such as the postload event. This topic describes these Siebel CRM events. Note the following:
All example code that this topic describes must reside in the Init method of your custom presentation model. For more information, see "Init Method".
You can use JavaScript methods to manage Siebel CRM events, such as BindEvent, OnControlEvent, and so on. For more information, see "OnControlEvent Method", "BindEvents Method" and "AttachEventHandler Method".
Table B-5 describes the events that you can use to customize a form applet.
Table B-5 Events That You Can Use to Customize Form Applets
Event | Description |
---|---|
PHYEVENT_APPLET_FOCUS |
Siebel Open UI triggers the PHYEVENT_APPLET_FOCUS event when an applet receives focus. You can use it to trigger custom code when Siebel Open UI sets the focus to the presentation model that the applet references as the result of a user action. No objects are available with this event. The following code is an example usage of this event: "this.AttachEventHandler(siebConsts.get(""PHYEVENT_APPLET_FOCUS""), function () { // My applet recived focus. this.SetProperty (""AppletInFocus"", true); return (true); });" |
PHYEVENT_CONTROL_FOCUS |
Siebel Open UI triggers the PHYEVENT_CONTROL_FOCUS event when a control in an applet comes into focus. You can use this event to update the value for this control or to call code according to this value. You can use it with the following objects:
The following code is an example usage of this event: this.AttachEventHandler(siebConsts.get("PHYEVENT_CONTROL_FOCUS"), function (control, value) { if (this.Get("AppletInFocus"){ var controlArray = this.Get("FlaggedControlSet"); if (controlArray.indexOf(control) >= 0){ // This is a flagged control. var valueObject = this.GetProperty ("FlaggedControlsValue"); if (value > maxValue){ // Value higher than allowed when receiving focus. Let's flag this. this.SetProperty ("FlagHigher", true); } } } return (true); }); |
PHYEVENT_CONTROL_BLUR |
Siebel Open UI triggers the PHYEVENT_CONTROL_BLUR event when a control in an applet goes out of focus. You can use this event to update the value for this control or to call code according to this value. You can use it with the following objects:
The following code is an example usage of this event: "this.AttachEventHandler(siebConsts.get(""PHYEVENT_CONTROL_BLUR""), function (control, value) { if (this.Get(""AppletInFocus""){ var controlArray = this.Get(""FlaggedControlSet""); if (controlArray.indexOf(control) >= 0){ // This is a flagged control. var valueObject = this.GetProperty (""FlaggedControlsValue""); if (valueObject[ control.GetName() ] !== value){ // Value change. Need to update internal storage, and fire any potential extensions attached to the property. valueOjbect[ control.GetName() ] = value; this.SetProperty (""FlaggedControlsValue"", valueObject); } } } return (true); });" |
PHYEVENT_INVOKE_CONTROL |
Siebel Open UI triggers the PHYEVENT_INVOKE_CONTROL event when it calls a method that is associated with a control. Siebel Open UI makes this call in reply to a user action. You can use this event to configure Siebel Open UI to call a method at the physical layer before it makes this call at a proxy layer. You can use this event with the following objects:
The following code is an example usage of this event: "this.AttachEventHandler(siebConsts.get(""PHYEVENT_INVOKE_CONTROL""), function (method, inputPS, ai) { if (method === ""WriteRecord""){ var valueObject = this.GetProperty (""FlaggedControlsValue""); var min = this.Get(""MinRangeForFlagged""); for (var value in valueObject){ if (value < min){ alert (""Invalid Values. Think again!""); return (false); } } } return (true); });" |
PHYEVENT_INVOKE_PICK |
Siebel Open UI triggers the PHYEVENT_INVOKE_PICK event when it calls a pop-up control for a picklist. Siebel Open UI makes this call in reply to a user action on the keyboard or mouse. You can use this event to configure Siebel Open UI to handle the action that the pop-up control requests. You can use it with the following objects:
The following code is an example usage of this event: "this.AttachEventHandler(siebConsts.get(""PHYEVENT_INVOKE_MVG""), function (control) { if (control === this.GetProperty(""AddressMVG"")){ varhighValue = this.Get(""HighVal""); if (highValue < this.Get (""MinRangeForFlagged""){ alert (""Sorry, can't popup this MVG""); return (false); } } return (true); });" |
PHYEVENT_INVOKE_MVG |
Siebel Open UI triggers the PHYEVENT_INVOKE_MVG event when it calls a pop-up control for a multivalue group. Siebel Open UI makes this call in reply to a user action on the keyboard or mouse. You can use this event to configure Siebel Open UI to handle the action that the pop-up control requests. You can use it with the following objects:
The following code is an example usage of this event: "this.AttachEventHandler(siebConsts.get(""PHYEVENT_INVOKE_MVG""), function (control) { if (control === this.GetProperty(""AddressMVG"")){ varhighValue = this.Get(""HighVal""); if (highValue < this.Get (""MinRangeForFlagged""){ alert (""Sorry, can't popup this MVG""); return (false); } } return (true); });" |
PHYEVENT_INVOKE_DETAIL |
Siebel Open UI triggers the PHYEVENT_INVOKE_DETAIL event when it calls a pop-up details control. Siebel Open UI makes this call in reply to a user action on the keyboard or mouse. You can use this event to configure Siebel Open UI to handle the action that the pop-up control requests. You can use it with the following objects:
The following code is an example usage of this event: "this.AttachEventHandler(siebConsts.get(""PHYEVENT_INVOKE_DETAIL""), function (control) { if (control === this.GetProperty(""City"")){ varhighValue = this.Get(""HighVal""); if (highValue < this.Get (""MinRangeForFlagged""){ alert (""Sorry, can't use this Details""); return (false); } } return (true); });" |
PHYEVENT_INVOKE_EFFDAT |
Siebel Open UI triggers the PHYEVENT_INVOKE_EFFDAT event when it calls a pop-up effective dating control. Siebel Open UI makes this call in reply to a user action on the keyboard or mouse. You can use this event to configure Siebel Open UI to handle the action that the pop-up control requests. You can use it with the following objects:
The following code is an example usage of this event: "this.AttachEventHandler(siebConsts.get(""PHYEVENT_INVOKE_EFFDAT""), function (control) { if (control === this.GetProperty(""AccountTrail"")){ varhighValue = this.Get(""HighVal""); if (highValue < this.Get (""MinRangeForFlagged""){ alert (""Sorry, can't open this Dating Popup""); return (false); } } return (true); });" |
PHYEVENT_INVOKE_COMBO |
Siebel Open UI triggers the PHYEVENT_INVOKE_COMBO event when it calls a combo box or dropdown list. Siebel Open UI makes this call in reply to a user action on the keyboard or mouse. You can use this event to configure Siebel Open UI to handle the open action that the combo box or dropdown list requests. You can use it with the following objects:
The following code is an example usage of this event: "this.AttachEventHandler(siebConsts.get(""PHYEVENT_INVOKE_COMBO""), function (control) { if (control === this.GetProperty(""Designation"")){ varhighValue = this.Get(""HighVal""); if (highValue < this.Get (""MinRangeForFlagged""){ alert (""Sorry, can't open this Dropdown""); return (false); } } return (true); });" |
PHYEVENT_INVOKE_CURRENCY |
Siebel Open UI triggers the PHYEVENT_INVOKE_CURRENCY event when it calls a popup currency calculator. Siebel Open UI makes this call in reply to a user action on the keyboard or mouse. You can use this event to configure Siebel Open UI to handle the open action that the currency calculator requests. You can use it with the following objects:
The following code is an example usage of this event: "this.AttachEventHandler(siebConsts.get(""PHYEVENT_INVOKE_CURRENCY""), function (control) { if (control === this.GetProperty(""RevenueControl"")){ varhighValue = this.Get(""HighVal""); if (highValue < this.Get (""MinRangeForFlagged""){ alert (""Sorry, can't open this currency field""); return (false); } } return (true); });" |
PHYEVENT_INVOKE_TOGGLE |
Siebel Open UI triggers the PHYEVENT_INVOKE_TOGGLE event when it calls a control that includes a toggle layout configuration. Siebel Open UI makes this call in reply to a user action to toggle the layout. You can use this event to configure Siebel Open UI to handle the action that the toggle layout requests. You can use it with the following objects:
The following code is an example usage of this event: "this.AttachEventHandler(siebConsts.get(""PHYEVENT_INVOKE_TOGGLE""), function (value) { if (value === this.GetProperty(""FlaggedControl"")){ varhighValue = this.Get(""HighVal""); if (highValue < this.Get (""MinRangeForFlagged""){ alert (""Sorry, change the Range value to toggle""); return (false); } } return (true); });" |
PHYEVENT_DRILLDOWN_FORM |
Siebel Open UI triggers the PHYEVENT_DRILLDOWN_FORM event when it calls a drilldown control that resides on a form applet. Siebel Open UI makes this call in reply to a user click on the drilldown. You can use this event to configure Siebel Open UI to handle the action that the drilldown requests. You can use it with the following objects:
The following code is an example usage of this event: "this.AttachEventHandler(siebConsts.get(""PHYEVENT_DRILLDOWN_FORM""), function (control) { if (control === this.GetProperty(""AccountDrill"")){ varhighValue = this.Get(""HighVal""); if (highValue < this.Get (""MinRangeForFlagged""){ alert (""Sorry, change the Range value to drilldown""); return (false); } } return (true); });" |
PHYEVENT_ENTER_KEY_PRESS |
Siebel Open UI triggers the PHYEVENT_ENTER_KEY_PRESS event when the user presses the Enter key. Siebel Open UI triggers it only if a control is in focus. You can use this event to handle an Enter key press before the proxy layer uses the default configuration to handle it. You can use this event with the following objects:
The following code is an example usage of this event: "this.AttachEventHandler(siebConsts.get(""PHYEVENT_ENTER_KEY_PRESS""), function (control) { if (control === this.GetProperty(""Salary"")){ varhighValue = this.Get(""HighVal""); if (highValue < this.Get (""MinRangeForFlagged""){ alert (""Sorry, change the Range value to commit""); return (false); } } return (true); });" |
PHYEVENT_ESC_KEY_PRESS |
Siebel Open UI triggers the PHYEVENT_ESC_KEY_PRESS event when the user presses the Esc (Escape) key. Siebel Open UI triggers it only if a control is in focus. You can use this event to handle an Esc key press before the proxy layer uses the default configuration to handle it. You can use this event with the following objects:
The following code is an example usage of this event: "this.AttachEventHandler(siebConsts.get(""PHYEVENT_ESC_KEY_PRESS""), function (control) { if (control === this.GetProperty(""Salary"")){ varhighValue = this.Get(""HighVal""); if (highValue < this.Get (""MinRangeForFlagged""){ alert (""Sorry, change the Range value to undo""); return (false); } } return (true); });" |
PHYEVENT_TAB_KEY_PRESS |
Siebel Open UI triggers the PHYEVENT_TAB_KEY_PRESS event when the user presses the Tab key. Siebel Open UI triggers it only if a control is in focus. You can use this event to handle a Tab key press before the proxy layer uses the default configuration to handle it. You can use this event with the following objects:
The following code is an example usage of this event: "this.AttachEventHandler(siebConsts.get(""PHYEVENT_TAB_KEY_PRESS""), function (control) { if (control === this.GetProperty(""Salary"")){ varhighValue = this.Get(""HighVal""); if (highValue < this.Get (""MinRangeForFlagged""){ alert (""Sorry, change the Range value to undo""); return (false); } } return (true); });" |
Table B-6 describes the events that you can use to customize a list applet.
Table B-6 Events That You Can Use to Customize List Applets
Event | Description |
---|---|
PHYEVENT_SELECT_ROW |
Siebel Open UI triggers the PHYEVENT_SELECT_ROW event when the user chooses a row in a list applet. You can use it to determine whether or not the user clicked a row that is not the current row. Using this event might cause the state of objects that reside on the Siebel Server to be inconsistent with the state of objects that reside in the client. You can use this event with the following objects:
The following code is an example usage of this event: "this.AttachEventHandler(siebConsts.get(""PHYEVENT_SELECT_ROW""), function (rowIndex, shiftKey, controlKey) { if (rowIndex === 0 && shiftKey){ alert (""Do not multiselect all rows.""); return (false); } });" |
PHYEVENT_COLUMN_FOCUS |
Siebel Open UI triggers the PHYEVENT_COLUMN_FOCUS event when a column in a list applet comes into focus. You can use it to identify the column that is in focus, and to call custom code. You can use this event with the following objects:
The following code is an example usage of this event: "this.AttachEventHandler(siebConsts.get(""PHYEVENT_COLUMN_FOCUS""), function (rowIndex, control, value) { if (rowIndex > 5) { return (true); } if (this.Get(""AppletInFocus""){ var controlArray = this.Get(""FlaggedControlSet""); if (controlArray.indexOf(control) >= 0){ // Declare the flagged control. var valueObject = this.GetProperty (""FlaggedControlsValue""); if (value > maxValue){ // Flag value that is higher than allowed when receiving focus. this.SetProperty (""FlagHigher"", true); } } } return (true); });" |
PHYEVENT_COLUMN_BLUR |
Siebel Open UI triggers the PHYEVENT_COLUMN_BLUR event when a column in a list applet goes out of focus. You can use it to identify the column that is going out of focus, and to call custom code. You can use this event with the following objects:
The following code is an example usage of this event: "this.AttachEventHandler(siebConsts.get(""PHYEVENT_COLUMN_BLUR""), function (rowIndex, control, value) { if (rowIndex > 5) { return (true); } if (this.Get(""AppletInFocus""){ var controlArray = this.Get(""FlaggedControlSet""); if (controlArray.indexOf(control) >= 0)) { // This is a flagged control. var valueObject = this.GetProperty (""FlaggedControlsValue""); if (value > maxValue){ // Value higher than allowed when receiving focus. Let's flag this. this.SetProperty (""FlagHigher"", true); } } } return (true); });" |
PHYEVENT_DRILLDOWN_LIST |
Siebel Open UI triggers the PHYEVENT_DRILLDOWN_LIST event when the user clicks a drilldown link in a list applet. You can use it to call custom code when the user clicks a drilldown link. You can use this event with the following objects:
The following code is an example usage of this event: "this.AttachEventHandler(siebConsts.get(""PHYEVENT_DRILLDOWN_LIST""), function (colName, rowIndex) { if (name === ""Type"")){ varmaxOptyArray = this.Get(""mO""); if (maxOptyArray[rowIndex] > this.Get(""HigVal"")){ alert (""Fix opportunity value before drilldown.""); return (false); } } return (true); });" |
PHYEVENT_VSCROLL_LIST |
Siebel Open UI triggers the PHYEVENT_VSCROLL_LIST event when the user clicks the next page or prior page control in a list applet or tile applet. You can use it to call custom code when the user clicks one of these controls. Siebel Open UI does not trigger this event if the user uses a keyboard shortcut to do the pagination. You can use this event with the following objects:
The following code is an example usage of this event: "this.AttachEventHandler(siebConsts.get(""PHYEVENT_VSCROLL_LIST""), function (direction) { if (direction ===SiebelApp.Contants.Get(""PAG_NEXT_SET"")){ alert (""Jump record by record. Not sets.""); return (false); } return (true); });" |
PHYEVENT_SORT_LIST |
Siebel Open UI triggers the PHYEVENT_SORT_LIST event when the user sorts a list column. You can use it to call custom code when the user does this sort. You can use this event with the following objects:
The following code is an example usage of this event: "this.AttachEventHandler(siebConsts.get(""PHYEVENT_SORT_LIST""), function (colName, direction) { if (colName === ""Type""){ if (direction === SiebelApp.Constants.Get(""SORT_ASCENDING"")){ alert (""You cannot sort this column.""); return (false); } } return (true); });" |
PHYEVENT_HIER_EXPAND |
Siebel Open UI triggers the PHYEVENT_HIER_EXPAND event when the user expands a row in a hierarchal list applet. You can use it to call custom code when the user does this expansion. Siebel Open UI uses this event only with hierarchal list applets. You can use this event with the following objects:
The following code is an example usage of this event: "this.AttachEventHandler(siebConsts.get(""PHYEVENT_HIER_EXPAND""), function (rowNum) { if (rowNum === 0)){ varhighValue = this.Get(""HighVal""); if (highValue < this.Get (""MinRangeForFlagged""){ alert (""Sorry. Change the Range value to expand this row.""); return (false); } } return (true); });" |
PHYEVENT_HIER_COLLAPSE |
Siebel Open UI triggers the PHYEVENT_HIER_COLLAPSE event when the user collapses a row in a hierarchal list applet. You can use it to call custom code when the user does this collapse. Siebel Open UI uses this event only with hierarchal list applets. You can use this event with the following objects:
The following code is an example usage of this event: "this.AttachEventHandler(siebConsts.get(""PHYEVENT_HIER_COLLAPSE""), function (rowNum) { if (rowNum === 2)){ varhighValue = this.Get(""HighVal""); if (highValue < this.Get (""MinRangeForFlagged""){ alert (""Sorry, change the Range to collapse this row.""); return (false); } } return (true); });" |