commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc DeXeT (JIRA)" <commons-...@jakarta.apache.org>
Subject [jira] Commented: (JELLY-193) Custom Function Tag
Date Sun, 09 Jan 2005 00:58:12 GMT
     [ http://issues.apache.org/jira/browse/JELLY-193?page=comments#action_57436 ]
     
Marc DeXeT commented on JELLY-193:
----------------------------------

I mean :
**********************
<function var="f">
<result>
  <j:arg value="wooki">
  <j:arg value="Laura">
  <j:useBean var="book" class="org.foo.Book" title="Catch22" rating="excellent"/>
  <j:arg value="${book}">
</result>
</function>

<call function="${f}" result="myPetName,myWifeName,myFavoriteBook"/> 
**********************

> Custom Function Tag
> -------------------
>
>          Key: JELLY-193
>          URL: http://issues.apache.org/jira/browse/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.
> Feature
> 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:function>
>     	
> <u:call function="${f}" result="s">
>   <j:arg value="1"/>
>   <j:arg value="2"/>
> </u:call>
> <!-- s = 3 -->
> Another example :
> <u:function var="f" args="arg0">
>   <j:switch on="${arg0}">
>     <j:case value="start">
>        <u:return value="started"/>
>     </j:case>
>     <j:case value="end">
>        <u:return value="ended"/>
>     </j:case>
>     <j:default>
>        <j:set var="ret" value="none"/>
>     </j:default>								
>   </j:switch>
> 			
>   <u:result value="${ret}"/>
> </u:function>
>     	
> <u:call function="${f}" result="s">
>   <j:arg value="start"/>
> </u:call>
> <!-- s = "started" -->

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message