Action Configuration

Top  Previous  Next

The actions are defined with action element in the MoreMotion configuration. The definition must be made in global configuration files. See Global Configuration versus Page Configuration.

  <action name="myaction">
    <class>mypack.MyActionService</class>
    <accessControl/>
    <unitname/>
    <log logger="" level=""/> (since v5.0, "debug" element deprecated)
    <param name="myparam1">myparam1 value</param>
  </command>

See ActionService Class.

The nested Elements

class Element

Defines the name of the action service class that implements org.moremotion.action.ActionService interface.

accessControl Element

The accessControl element can be used to control the accessing of the action service with a sufficient authority. See accessControl configuration element.

unitname Element (Accepts MScript)

This element defines the resource bundle name of the action service class. Resource bundles contain multi-lingual resources. See Resource Management.

log (since v5.0, "debug" element deprecated)

This element defines a logger and a log level. The logger attribute (Accepts MScript) contains the name of a logger configuration. If this attribute is omitted the standard logger is used to print the log records to the system console. The level attribute (Accepts MScript) specifies the detail level of the logging.

param Element (Accepts MScript)

The parameters defined with param element are evaluated by the action service classes. An action service parameter can be given either with param element

   <action name="details">
    ...
    <param name="sql">select * from products</param>
  </action>

or with custom element

  <action name="details">
    ...
    <sql>select * from products</sql>
  </action>