commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert <>
Subject Re: to the developers of Jelly
Date Wed, 26 Nov 2003 15:37:50 GMT
I am not a committer, but I have been using Jelly for quite some time 
and I do not believe this is yet possible. Having said that, there are a 
couple of options here.

The first is that you can create your own tags, much like you can create 
your own JSP tags. See:

The second is that you can create tags using Jelly itself using the 
'define' taglibrary. I have not done this myself but I just looked at 
the CVS source and there are examples in the unit tests for doing this.

A third option is to use the invokeStatic jelly tag. Since JSP 2.0 
functions are public static methods, you can use your JSP function class 
in Jelly. For for your example, it would look like:

<j:invokeStatic var="testValue" method="myfunction" 
	<j:arg value="${param.value}" />
<j:if test="${testValue}">
  ... do something.

Not the same syntax, but the same results.

Robert McIntosh

Reinaldo Barreiro, E. wrote:
> Hi All,
> I hope this is the correct list to send this e-mail. 
> I have installed Jelly and perused a bit the source code and documentation. 
> I'm planning to use it for one of our projects... Well the question I want to ask is:

> Is it possible to define your own functions on a Jelly tag library (the same 
> way it is possible on JSP 2.0)? Like in:
> <j:jelly xmlns:c="jelly:core" xmlns:foo="jelly:FooTagLibrary">
>     <c:if test="${foo:myfunction(param.value)}">
>         ${param.value}
>     </c:if>                
> </j:jelly>
> In my view that is a very powerfull feature of JSP 2.0. and it would be 
> nice to have it in Jelly. My apologies to the developers if the feature is 
> already there and I didn't mangage to find how to use it.
> Best regards,
> Ernesto Reinaldo Barreiro 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message