Server
API Reference Guide
Product Documentation:

Visualization Server
Documentation Home
List of all members | Public Member Functions | Public Attributes
javascript::IlsMvServer Class Reference

Acts as a proxy to the running dynamic view server of the application. More...

#include <javascript/serverside.h>

Public Member Functions

void DeclGlobalCallback (String funcName, String resType, Int nbParam)
 Declares an Rogue Wave Script function with a global callback that can be called from a component. More...
 
void DeclObjectLabel (IlsViewed obj, String label)
 Associates a label with a server object and stores the association in the server. More...
 
IlsViewed GetInstance (String typeNm, Int id)
 Retrieves an object instance that has been registered with identifier id in dictionary typeNm. More...
 
IlsViewed GetObjectFromLabel (String label)
 Retrieves a declared object from its label. More...
 
void Notify ()
 Triggers a notification cycle. More...
 
void OpenView (IlsViewed object, String viewName)
 Opens the dynamic view viewName on the object object. More...
 
void OpenView (String objectLabel, String viewName)
 Opens the dynamic view viewName on the object name objectLabel. More...
 
void ReplyError (String message)
 Return an error message to the current interactor. More...
 
void ReplyMessage (String message)
 Returns a message of type information to the current interactor. More...
 
void ReplyWarning (String message)
 Returns a warning message to the current interactor. More...
 
void UndeclObjectLabel (IlsViewed obj)
 Undeclares the object as an identified object. More...
 

Public Attributes

IlsMvUser interactor
 The current interacting user (IlsMvUser).
 
String serverName
 The name used to initialize the process (see -ilsn option in class IlsMvProcess).
 

Detailed Description

Acts as a proxy to the running dynamic view server of the application.

The single instance of IlsMvServer running in the application is accessible to script functions through the global variable MvServer.

Global functions declared using the ILS_GLOBAL_FUNCTION() macros are implicit methods of this class.

Warning
This class is a JavaScript class, not a C++ one.
See also
IlsMvProcess (C++), IlsMvServer (C++).

Member Function Documentation

◆ DeclGlobalCallback()

void javascript::IlsMvServer::DeclGlobalCallback ( String  funcName,
String  resType,
Int  nbParam 
)

Declares an Rogue Wave Script function with a global callback that can be called from a component.

Note that global callbacks declared using this method cannot be invoked through the MvServer object.

You provide only the number of arguments that your callback will receive. All arguments will be of type string.

Parameters
funcNamefunction name.
resTypeThe resType argument takes the following valid types:
  • void
  • IlsBoolean or boolean
  • char
  • int
  • long
  • float
  • double
  • IlsString or string Any other type is considered as a user type.
nbParamnumber of parameters.

◆ DeclObjectLabel()

void javascript::IlsMvServer::DeclObjectLabel ( IlsViewed  obj,
String  label 
)

Associates a label with a server object and stores the association in the server.

Parameters
objobject to declare.
labellabel to associate to the object.

◆ GetInstance()

IlsViewed javascript::IlsMvServer::GetInstance ( String  typeNm,
Int  id 
)

Retrieves an object instance that has been registered with identifier id in dictionary typeNm.

Parameters
typeNmdictionary.
idobject id.
Returns
The retrieved object or null.

◆ GetObjectFromLabel()

IlsViewed javascript::IlsMvServer::GetObjectFromLabel ( String  label)

Retrieves a declared object from its label.

See also
IlsMvServer::GetObjectFromLabel().

◆ Notify()

void javascript::IlsMvServer::Notify ( )

Triggers a notification cycle.

When callbacks are called from a component, there is no need to trigger a notification cycle as such a cycle will start after the request has been processed. This function is generally used when a Rogue Wave Script timer is fired to start a notification cycle explicitly.

See also
IlsMvServer::Notify() (C++).

◆ OpenView() [1/2]

void javascript::IlsMvServer::OpenView ( IlsViewed  object,
String  viewName 
)

Opens the dynamic view viewName on the object object.

This method can take a variable number of arguments. See the corresponding C++ member function IlsMvServer::OpenView().

Parameters
objectorigin of the view.
viewNamename of the view to open.

◆ OpenView() [2/2]

void javascript::IlsMvServer::OpenView ( String  objectLabel,
String  viewName 
)

Opens the dynamic view viewName on the object name objectLabel.

This method can take a variable number of arguments. See the corresponding C++ member function IlsMvServer::OpenView().

Parameters
objectLabellabel of the origin of the view.
viewNamename of the view to open.

◆ ReplyError()

void javascript::IlsMvServer::ReplyError ( String  message)

Return an error message to the current interactor.

See also
IlsMvServer::ReplyMessage().
Parameters
messagemessage.

◆ ReplyMessage()

void javascript::IlsMvServer::ReplyMessage ( String  message)

Returns a message of type information to the current interactor.

See also
IlsMvServer::ReplyMessage().
Parameters
messagemessage.

◆ ReplyWarning()

void javascript::IlsMvServer::ReplyWarning ( String  message)

Returns a warning message to the current interactor.

See also
IlsMvServer::ReplyMessage().
Parameters
messagemessage.

◆ UndeclObjectLabel()

void javascript::IlsMvServer::UndeclObjectLabel ( IlsViewed  obj)

Undeclares the object as an identified object.

See also
IlsMvServer::UndeclObjectLabel().
Parameters
objobject to undeclare.