Skip to main content

custom-attribute handler

Generates virtual attributes derived from other attributes or external elements of the application. It can be applied to any DataNode to add attributes that were not originally present at the underlying business object. Those attributes will be presented at the JXPath interface just as if they were business objects attributes



Name of the virtual attribute

expr EL expression that evaluates de attribute value


EL expression that must be evaluated to true prior to handler action


EL expression that must be evaluated to false prior to handler action
depends XPath to a attribute or business object the expression depends on

It's important to properly set the depends attribute as long as the attribute will be reevaluated whenever a dependent attribute has been changed.

The custom attribute can have an empty EL expressions and use a BeanShell script instead. Here is an example of both aproaches:

<datanode name="network">
    <custom-attribute name=”networkMask1” expr=”${}/${instance.mask}”>
    <custom-attribute name=”networkMask2”>
        return + “/” + instance.mask;