My Oracle Support Banner

PHYEVENT_COLUMN_FOCUS Not Getting Triggered In IP2015 (Doc ID 2109417.1)

Last updated on FEBRUARY 28, 2018

Applies to:

Siebel CRM - Version 15.0 [IP2015] to 15.18 [IP2015] [Release V15]
Information in this document applies to any platform.

Symptoms

ACTUAL BEHAVIOR
---------------
PHYEVENT_COLUMN_FOCUS not getting triggered in IP2015 Patchset 5

TEST CASES that explain this behavior
------------------------------------------------------------------------

NOTE! JS File Must be named "test_PHYEVENT_COLUMN_FOCUSPM.js"

 
Context - TEST CASE 1
----------------------
> Generated template PM - http://duncanford.github.io/prpm-code-generator/?prpm=PR&object=DesktopForm&name=BeautifulThing&userprops=&comments=Yes&logging=No
> Identified List Applet - SIS Account List Applet

> Bookshelf documentation: Siebel CRM Events You Can Use to Customize Siebel Open UI - https://docs.oracle.com/cd/E14004_01/books/config_open_ui/appendix_b_reference15.html
Search: "PHYEVENT_COLUMN_FOCUS"

Steps
----------------------
   Created below PM and added it in the Manifest:

if (typeof(SiebelAppFacade.test_PHYEVENT_COLUMN_FOCUSPM) === "undefined") {

  SiebelJS.Namespace("SiebelAppFacade.test_PHYEVENT_COLUMN_FOCUSPM");
  define("siebel/custom/test_PHYEVENT_COLUMN_FOCUSPM", ["siebel/listpmodel"],
  function() {
   SiebelAppFacade.test_PHYEVENT_COLUMN_FOCUSPM = (function() {

   function test_PHYEVENT_COLUMN_FOCUSPM(pm) {
      SiebelAppFacade.test_PHYEVENT_COLUMN_FOCUSPM.superclass.constructor.apply(this, arguments);
   }

   SiebelJS.Extend(test_PHYEVENT_COLUMN_FOCUSPM, SiebelAppFacade.ListPresentationModel);

   test_PHYEVENT_COLUMN_FOCUSPM.prototype.Init = function() {
      // Init is called each time the object is initialised.
      // Add code here that should happen before default processing
      SiebelAppFacade.test_PHYEVENT_COLUMN_FOCUSPM.superclass.Init.apply(this, arguments);
      SiebelJS.Log(this.Get("GetName") + ": test_PHYEVENT_COLUMN_FOCUSPM: Init method reached.");

      // Add code here that should happen after default processing
      var siebConsts = SiebelJS.Dependency("SiebelApp.Constants");

      ////////////////////////////////////////////////////////////
      //PHYEVENT_COLUMN_FOCUS - List Applets
      ////////////////////////////////////////////////////////////

      //PHYEVENT_COLUMN_FOCUS - NOT WORKING
      ////////////////////////////////////////////////////////////
      //this.AttachEventHandler(siebConsts.get("PHYEVENT_COLUMN_FOCUS"), function(rowIndex, control, value) {
      // SelectionChange(this, control, value, "PHYEVENT_COLUMN_FOCUS");
      //});

      //PHYEVENT_COLUMN_FOCUS - NOT WORKING
      ////////////////////////////////////////////////////////////
      //this.AttachEventHandler(siebConsts.get("PHYEVENT_COLUMN_FOCUS"), function(control, value) {
      // SelectionChange(this, control, value, "PHYEVENT_COLUMN_FOCUS");
      //});

      //PHYEVENT_COLUMN_FOCUS - NOT WORKING - VANILLA CODE
      ////////////////////////////////////////////////////////////
      //this.AttachEventHandler(siebConsts.get("PHYEVENT_COLUMN_FOCUS"), function(rowIndex, control, value) {
      // SiebelJS.Log("Vanilla Code - PHYEVENT_COLUMN_FOCUS");
      // 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);
      // });

      //WORKING - on every focus change
      ////////////////////////////////////////////////////////////
      //this.AttachPMBinding("OnCtrlFocus", OnCtrlFocus, {
      // scope: this
      //});

      //PHYEVENT_COLUMN_FOCUS - NOT WORKING - VANILLA CODE
      ////////////////////////////////////////////////////////////
      //this.AttachEventHandler(siebConsts.get("PHYEVENT_COLUMN_FOCUS"), function() {
      // SiebelJS.Log("Control focus 1");
      // arguments[arguments.length - 1][consts.get( "SWE_EXTN_CANCEL_ORIG_OP" )] = false;
      //});

      ////////////////////////////////////////////////////////////
      //PHYEVENT_CONTROL_FOCUS - Form Applets
      ////////////////////////////////////////////////////////////

      //PHYEVENT_CONTROL_FOCUS - WORKING
      ////////////////////////////////////////////////////////////
      //this.AttachEventHandler(siebConsts.get("PHYEVENT_CONTROL_FOCUS"), function(control, value) {
      // SelectionChange(this, control, value, "PHYEVENT_CONTROL_FOCUS");
      //});

      //PHYEVENT_CONTROL_FOCUS - WORKING - VANILLA CODE
      ////////////////////////////////////////////////////////////
      //this.AttachEventHandler(siebConsts.get("PHYEVENT_CONTROL_FOCUS"),
      // function(control, value) {
      // SiebelJS.Log("Vanilla Code - PHYEVENT_CONTROL_FOCUS");
      // 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);
      // });
      //

   }

   test_PHYEVENT_COLUMN_FOCUSPM.prototype.Setup = function(propSet) {
      // Setup is called each time the object is initialised.
      // Add code here that should happen before default processing
      SiebelAppFacade.test_PHYEVENT_COLUMN_FOCUSPM.superclass.Setup.apply(this, arguments);
      SiebelJS.Log(this.Get("GetName") + ": test_PHYEVENT_COLUMN_FOCUSPM: Setup method reached.");
      // Add code here that should happen after default processing
   }

   function SelectionChange(presentationModel, control, value, callingEvent) {
      SiebelJS.Log(callingEvent + " invoked!");
      SiebelJS.Log("value = " + value);
      return (true);
   }

   function OnCtrlFocus() {
      alert("********OnCtrlFocus PM Binding**********");
   }

   return test_PHYEVENT_COLUMN_FOCUSPM;
  }());
  return "SiebelAppFacade.test_PHYEVENT_COLUMN_FOCUSPM";
 })
}

Results
----------------------

PHYEVENT_COLUMN_FOCUS is not triggered.*


*Please review Each Code Block for results.

============================================================================

 

Context - TEST CASE 2
----------------------
> Generated template PM - http://duncanford.github.io/prpm-code-generator/?prpm=PR&object=DesktopForm&name=BeautifulThing&userprops=&comments=Yes&logging=No
> Identified List Applet - SIS Account List Applet

> Bookshelf documentation: Attaching and Validating Event Handlers in Any Sequence - https://docs.oracle.com/cd/E58886_01/books/ConfigOpenUI/customizing26.html
Search: "Complete Contents of the derivedpm1 Presentation Model"

Steps
----------------------
   Created below PM and added it in the Manifest:

if (typeof(SiebelAppFacade.test_PHYEVENT_COLUMN_FOCUSPM) === "undefined") {
   SiebelJS.Namespace("SiebelAppFacade.test_PHYEVENT_COLUMN_FOCUSPM");
   define("siebel/custom/test_PHYEVENT_COLUMN_FOCUSPM", [], function() {
      SiebelAppFacade.test_PHYEVENT_COLUMN_FOCUSPM = (function() {
         var siebConsts = SiebelJS.Dependency("SiebelApp.Constants"), CANCEL_OPR = consts.get("SWE_EXTN_CANCEL_ORIG_OP"), STOP_PROP = consts.get("SWE_EXTN_STOP_PROP_OP");

         function test_PHYEVENT_COLUMN_FOCUSPM() {
             SiebelAppFacade.test_PHYEVENT_COLUMN_FOCUSPM.superclass.constructor.apply(this, arguments);
         }
         SiebelJS.Extend(test_PHYEVENT_COLUMN_FOCUSPM, SiebelAppFacade.ListPresentationModel);
         test_PHYEVENT_COLUMN_FOCUSPM.prototype.Init = function() {
             SiebelAppFacade.test_PHYEVENT_COLUMN_FOCUSPM.superclass.Init.call(this);
             this.AttachEventHandler(siebConsts.get("PHYEVENT_COLUMN_FOCUS"), function() {
                SiebelJS.Log("Control focus 1");
                arguments[arguments.length - 1][consts.get("SWE_EXTN_CANCEL_ORIG_OP")] = false;
             });
             this.AddValidator(siebConsts.get("PHYEVENT_COLUMN_FOCUS"), function() {
             return true;
          });
   };
   test_PHYEVENT_COLUMN_FOCUSPM.prototype.Setup = function(propSet) {
      SiebelAppFacade.test_PHYEVENT_COLUMN_FOCUSPM.superclass.Setup.call(this, propSet);
   };
   return test_PHYEVENT_COLUMN_FOCUSPM;
  }());
  return "SiebelAppFacade.test_PHYEVENT_COLUMN_FOCUSPM";
 });
}

 

Results
----------------------

No logs registered.

 

Changes

 N/A

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.