xel-method"
From Documentation
m (Created page with "{{ZESTEssentialsPageHeader}} =Version History= {{LastUpdated}} {| border='1px' | width="100%" ! Version !! Date !! Content |- | | | |} {{ZESTEssentialsPage...") |
m |
||
Line 1: | Line 1: | ||
{{ZESTEssentialsPageHeader}} | {{ZESTEssentialsPageHeader}} | ||
+ | |||
+ | __NOTOC__ | ||
+ | |||
+ | '''Syntax:''' | ||
+ | <xel-method prefix="..." name="..." class="..." signature="..."/> | ||
+ | |||
+ | It specifies an EL function that could be used in EL expressions. For example, | ||
+ | |||
+ | <source lang="xml" > | ||
+ | <xel-method prefix="c" name="forName" | ||
+ | class="java.lang.Class" | ||
+ | signature="java.lang.Class forName(java.lang.String)"/> | ||
+ | <action class="${c:forName('foo.MyAction')}"> | ||
+ | ... | ||
+ | </source> | ||
+ | |||
+ | Notice that the class attribute of [[ZEST Essentials/Configuration/zest.xml/action|an action definition]] could be a string, so the above statement is equivalent to the following: | ||
+ | |||
+ | <source lang="xml"> | ||
+ | <action class="foo.MyAction"> | ||
+ | </source> | ||
+ | |||
+ | =Attributes= | ||
+ | == The prefix Attribute== | ||
+ | |||
+ | [Required] | ||
+ | |||
+ | Specifies the prefix used to identify this method. | ||
+ | |||
+ | == The name Attribute== | ||
+ | |||
+ | [Required] | ||
+ | |||
+ | Specifies the name used to identify this method. The full name is "prefix:name". | ||
+ | |||
+ | == The class Attribute == | ||
+ | |||
+ | [Required] | ||
+ | |||
+ | Specifies the class that the method is defined in. | ||
+ | |||
+ | = signature = | ||
+ | |||
+ | [Required] | ||
+ | |||
+ | The signature of the method. Note: the method must be public static. In additions, Java 5 Generics are ''not'' allowed. | ||
=Version History= | =Version History= |
Latest revision as of 10:32, 14 March 2011
Syntax:
<xel-method prefix="..." name="..." class="..." signature="..."/>
It specifies an EL function that could be used in EL expressions. For example,
<xel-method prefix="c" name="forName"
class="java.lang.Class"
signature="java.lang.Class forName(java.lang.String)"/>
<action class="${c:forName('foo.MyAction')}">
...
Notice that the class attribute of an action definition could be a string, so the above statement is equivalent to the following:
<action class="foo.MyAction">
Attributes
The prefix Attribute
[Required]
Specifies the prefix used to identify this method.
The name Attribute
[Required]
Specifies the name used to identify this method. The full name is "prefix:name".
The class Attribute
[Required]
Specifies the class that the method is defined in.
signature
[Required]
The signature of the method. Note: the method must be public static. In additions, Java 5 Generics are not allowed.
Version History
Version | Date | Content |
---|---|---|