Configuring Siebel Open UI > Customizing Siebel Open UI for Siebel Mobile Disconnected > Methods You Can Use to Customize Siebel Mobile Disconnected >

Methods You Can Use in Offline Classes


This topic describes methods that you can use that reside in the offline classes. It includes the following information:

These methods reside in the OfflineAppMgr class, except for SetErrorMsg. It resides in the OfflineErrorObject class.

setReturnValue Method

The setReturnValue method sets the return value that Siebel Open UI sends to the method that calls the setReturnValue method. It uses the following syntax:

$.setReturnValue(return_value)

where:

  • return_value identifies an object that includes the following information:
    • Error status of the code that Siebel Open UI called
    • retVal contains the return value of the code that Siebel Open UI called

For example:

$.setReturnValue({err: errCode,retVal:bRet})

where:

  • errCode contains the error code that Siebel Open UI returns to the caller. For more information, see SetErrorMsg Method.

If you do not use setReturnValue, then Siebel Open UI sends a retObj with err set to null and retVal set to empty, by default.

For examples that use the setReturnValue method, see Registering Methods to Make Sure Siebel Open UI Runs Them in the Correct Sequence and SetErrorMsg Method.

callback Method

The callback method registers the done handler. it uses the following syntax:

$.callback (scope,done_handler)

where:

  • scope identifies the object that Siebel Open UI uses to call the asynchronous method. You typically use the following scope:

    this

  • done_handler identifies the method that Siebel Open UI calls at the end of the asynchronous method that Siebel Open UI calls. The done_handler that Siebel Open UI registers with the callback method expects a return object. You use the setReturnValue method to return this object.

For example:

PharmaCallSubmitsvc.prototype.Submit = function () {
  bc.ExecuteQuery();
  $.callback(this,function(retObj){
    err = retObj.err;

For another example that uses this method, Registering Methods to Make Sure Siebel Open UI Runs Them in the Correct Sequence.

eachAsyncOp Method

The eachAsyncOp method iteratively calls an asynchronous method. It uses the following syntax:

$.eachAsyncOp(scope,configObj)

where:

  • configObj identifies the configuration object. A configuration object is a type of object that includes information that Siebel Open UI uses to send as input properties to a method.

For example:

$.eachAsyncOp(this,configobj);

The eachAsyncOp method handles the done handlers for each iteration. It requires a configuration object that includes the following properties as inputs:

  • executeScope. Scope of the asynchronous method that Siebel Open UI must call.
  • execute. Asynchronous method that Siebel Open UI must call.
  • preExecute. Optional property that specifies the method that Siebel Open UI runs before it calls the asynchronous method. You can also use preExecute to send information that the asynchronous method requires. You must write this method so that it returns the following information:
    • Arguments that Siebel Open UI must send to the asynchronous method
    • Returns these arguments in an array.

      The preExecute property can use the iteration value as an input.

  • postExecute. Optional property that specifies the method that Siebel Open UI runs after the asynchronous call finishes.
  • iterations. Optional property that specifies the total number of iterations that eachAsyncOp runs. If you do not include this property, then Siebel Open UI runs the asynchronous method only one time.

SetErrorMsg Method

The SetErrorMsg method defines an error message for a business service that you customize. It returns nothing. It uses the following Syntax:

SiebelApp.S_App.OfflineErrorObject.SetErrorMsg("messageKey", errParamArray);

where:

  • messageKey contains the error message key. A message key is a text string that includes variable characters. %1 is an example of a variable character.
  • errParamArray is an optional array that contains error properties that SetErrorMsg includes in the error message. SetErrorMsg replaces each variable character that the messageKey contains with a value from errParamArray.

For an example that uses SetErrorMsg, see Configuring Error Messages for Disconnected Clients. For an example that uses SetErrorMsg in the context of a call to a custom business service, see Registering Methods to Make Sure Siebel Open UI Runs Them in the Correct Sequence.

Configuring Siebel Open UI Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.