Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: <simple-method> final draft

...

Section
Column
width20%
<simple-method>
Column
Contains a block of code.

A simple method can be called in either an event context from the Control
Servlet (or another event) or in a service context through the Service
Engine, or any other component that has access to a service dispatcher.

Code Block
xml
xml
<simple-method method-name="fooMethod">
  <!-- some mini-language code goes here -->
</simple-method>

Attributes

Name

Type

Requirements

Description

Note

method-nameoptional

constant

required

A name (preferably a legal Java identifier) for this method.

Each simple method in a file must have a unique name.

short-description

constant

optional

A short description of the method.

Used for documentation.

defaultlogin-error-coderequired

optional

 

default-success-code

optional

 

parameter-map-name

optional

 

event-request-object-name

optional

 

constant

optional

Require a user login to run this method.

Defaults to "true".

use-transaction

constant

optional

Create a transaction if none exists for this thread.

Defaults to "true".

default-error-code

constant

optional

The default error return code.

Defaults to "error".

default-success-code

constant

optional

The default success return code.

Defaults to "success".

event-requestevent-session-object-name

constant

optional 

The name of the field containing the javax.servlet.ServletRequest object.

Defaults to "request".

event-response-object-name

optional

constant

optional

The name of the field containing the javax.servlet.ServletResponse object.

Defaults to "response".

event-session-object-name

constant

optional

The name of the field containing the javax.servlet.http.HttpSession object.

Defaults to "session". 

event-response-code-name

constant

optional 

The name of the field containing the event response code.

Defaults to "response_code".

event-error-message-name

constant

optional 

The name of the field containing the event error message.

Defaults to "error_message".

event-error-message-list-name

optional

constant

optional

The name of the field containing the event message list.

Defaults to "error_message_list". 

event-event-message-name

constant

optional 

The name of the field containing the event message.

Defaults to "event_message".

event-event-message-list-name

constant

optional 

The name of the field containing the event message list.

Defaults to "event_message_list".

service-response-message-name

constant

optional

 

service-error-message-name

optional

 

The name of the field containing the service response message.

Defaults to "responseMessage".

service-error-message-list-name

constant

optional 

The name of the field containing the service error message.

Defaults to "errorMessage".

service-error-message-maplist-name

constant

optional 

The name of the field containing the service error message list.

Defaults to "errorMessageList".

service-successerror-message-map-name

constant

optional 

The name of the field containing the service error message map.

Defaults to "errorMessageMap".

service-success-message-list-name

constant

optional

 

login-required

optional

 

use-transaction

optional

 

locale-name

optional

 

delegator-name

optional

 

security-name

optional

 

dispatcher-name

optional

 

user-login-name

optional

 

The name of the field containing the service success message.

Defaults to "successMessage".

service-success-message-list-name

constant

optional

The name of the field containing the service success message list.

Defaults to "successMessageList".


Note
titleDraft Status

Final draft

Info
titleProposed Changes
  • Eliminate unused and seldom used attributes.
  • Currently, the method-name attribute is optional. Require the method-name attribute

    .



    Assignment Operations

    Section
    Column
    width20%
    <add-error>
    Column
    Adds a message to the error message list.
    Code Block
    xml
    xml
    <add-error>
      <fail-message message="There was an error" />
    </add-error>
    

    Attributes

    error-list-name

    optional

    The name of a list that will contain the message

    Default is "error_list"


    Child Elements

    <fail-message>

    optional

    <fail-property>

    optional


    Info
    titleProposed Changes

    Currently, child elements are optional. Require one child element.

    ...