Creating your own navigation planner

RAMP-TS

Creating your own navigation planner

When a framework users executes a command that is associated with a RAMP destination screen a plan is always made of how to navigate from the current 5250 screen to the required destination 5250 screen.  

Normally this plan is constructed automatically by the RAMP framework. In specialized cases you can define your own navigation planning logic.

Imagine that destination screen DestinationA needs to take over the planning of how to best navigate to it.

To do this a function named vHandle_USER_NAVIGATION_PLAN is added to the script associated with screen DestinationA, like this:

 

   vHandle_USER_NAVIGATION_PLAN: function()

   {

      var bReturn = true;

 

      //  your alternate navigation planning logic goes here

 

      return(bReturn); /* ß Remember to return a Boolean success/fail value */ 

 

   },  /* ß Remember to separate this function from the others with a comma */

 

When the user executes a VLF command that is associated with DestinationA, instead of making its own plan, the RAMP framework will invoke function vHandle_USER_NAVIGATION_PLAN in DestinationA.

Typically the function NAVIGATE_TO_SCREEN("screen name") is used by this type of navigation planning function to initiate its own navigation plan.

Before using this feature, consider a screen named Destination1 that contains its own navigation planner coded like this ….

 

   vHandle_USER_NAVIGATION_PLAN: function()

   {

      NAVIGATE_TO_SCREEN("Destination1");   

      return(true);  

 

   }, 

 

If you cannot see why this code could never possibly work you should not attempt to use this feature.