Attributes

The SERVER_INTERFACE element has the following attributes:

Table 1. Attributes of the SERVER_INTERFACE Element

Attribute Name

Required

Default

Description

NAME

Yes

 

A unique name for this instance of the server interface on this page.

CLASS

Yes

 

The name of the server interface class.

OPERATION

Yes

 

The name of the server interface operation on the class.

PHASE

No

DISPLAY

The phase of the page in which the server interface is called. This can be DISPLAY (the default) or ACTION. Server interfaces set to the DISPLAY phase are called as the page is displayed (i.e., the execution of the JSP page).

Server interfaces set to the ACTION phase are only called in response to the activation of an ACTION_CONTROL with a TYPE of SUBMIT. It is recommended that only one SERVER_INTERFACE is set to the ACTION phase per PAGE.

ACTION_ID_PROPERTY

No

 

Specifies a name of the server access bean property that will be populated with ACTION_ID of the action control used to make the server call. The value of this attribute must be a valid property name of the corresponding server access bean. The use of shorthand notation is allowed (for example specify theProperty instead of the fully qualified dtls$theProperty).

This attribute is only valid on server interfaces with PHASE = ACTION and must be specified on all server interfaces within the page or not specified on any of them.

If multiple server interfaces specify ACTION_ID_PROPERTY with different domains the value of ACTION_ID on all action controls within the page must be suitable for all of the domains. Failing to comply with this rule will lead to error at runtime when the corresponding action control is activated.

If this attribute is specified then the ACTION_ID attribute of ACTION_CONTROL element must also be specified.

Note: It is technically possible to specify multiple SERVER_INTERFACE elements set to the ACTION phase. However, this is not recommended. Each SERVER_INTERFACE is essentially a separate transaction and when an invocation fails, no further invocations of other server interfaces are made and completed transactions are not rolled back.

For example, three SERVER_INTERFACE elements are defined, each set to the ACTION phase. When the page is executed, the first server interface invocation succeeds and the second fails. In this scenario, the third server interface is never invoked and the action of the first will not be rolled back.