|
The behavior logic descriptor example is shown below.
BEHAVIOR DESCRIPTORS |
id |
type |
data-source |
value |
define-id |
define-class |
define-scope |
details |
| debtorFlag |
less-than |
{customerBean.balance} |
0 |
|
|
|
|
The definition resides in this descriptor, but it would be referenced in other descriptors like element and segment. This logic could then be applied for the presentation attributes, like visible (render) or enable.
A list of
logic types is provided below, and their equivalents on the JSF
platform. Explanations are provided where necessary.
| dWebSpec Logical Behavior Type | Description | JSF equivalent |
| equal | | #{object.property eq value} |
| not-equal | | #{object.property ne value} |
| greater-equal | | #{object.property ge value} |
| greater-than | | #{object.property gt value} |
| less-equal | | #{object.property le value} |
| less-than | | #{object.property lt value} |
| empty | Null object or empty string | #{object.property empty} |
| not-empty | Not null object and not empty string | #{object.property not empty} |
| present | Present within a list. For instance role present; whether a user role is present within a list of roles.
This could also be used to verify presence of cookies and header entries.
| Authentication objects could be exposed through the backing beans and needed verification could be performed using general expressions. |
| not-present | Not present within a list. For instance role not present; whether a user role is not present within a list of roles. | Move to struts: <logic:present role="SERVICE,SYSTEM"> |
| expression | The standard logic types are defined to provide for easy to read specification documentations. The expression using target platform syntax could also be needed to enhance precision in the specification./td> | "#{ logical-expression }" |
The applications of these behaviors are to the segment and
elements; discussions on their implementations are discussed in the related
descriptors.
The entries in the descriptor is used to compose the logic expression. For all the standard logic the composition is like this.
| Attribute | data-source | logic-type | value |
| Examples | (object.property | > | 40) |
More details are available in the attributes descriptions
type
id
data-source
value
define-id
define-class
define-scope
|