commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc DeXeT (JIRA)" <>
Subject [jira] Created: (JELLY-193) Custom Function Tag
Date Sat, 08 Jan 2005 18:33:14 GMT
Custom Function Tag

         Key: JELLY-193
     Project: jelly
        Type: Improvement
  Components: taglib.util  
    Versions: 1.0    
    Reporter: Marc DeXeT
    Priority: Minor
 Attachments: patch.function.test.txt, patch.function.txt

Create custom callable function in jelly script.
1 - isolated context for function execution.
2 - return list support break
3 - result list support

For example :
<u:function var="f" args="arg0,arg1">
 <u:result value="${arg0 + arg1}"/>
<u:call function="${f}" result="s">
  <j:arg value="1"/>
  <j:arg value="2"/>

<!-- s = 3 -->

Another example :

<u:function var="f" args="arg0">
  <j:switch on="${arg0}">
    <j:case value="start">
       <u:return value="started"/>
    <j:case value="end">
       <u:return value="ended"/>
       <j:set var="ret" value="none"/>
  <u:result value="${ret}"/>
<u:call function="${f}" result="s">
  <j:arg value="start"/>

<!-- s = "started" -->

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
If you want more information on JIRA, or have a bug to report see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message