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/>
    <debug/>
    <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.

debug Element (Accepts MScript)

Action Service classes can be designed to print the log records about their execution in order to let the users to trace it. This parameter accepts a number value between 1 and 3 as the 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>