You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Kees van Dieren <ke...@mp-objects.com> on 2006/07/27 09:09:37 UTC

Does Jelly support tag functions?

Hi all,
 
Does Jelly suppor tag functions, such as:
<ct:myCustomTag customAttr="${tagf:sqr(33)}"/>
 
Is there a way define custom tag functions? If not, how difficult is it to
built in support for this?
 
Best regards,

Kees van Dieren
Senior Software Engineer

MP Objects Supply Chain Software
Stationsplein 45
3013 AK Rotterdam
The Netherlands

Post address:
Postbus 29126
3001 GC Rotterdam

Mobile: +31 (0)6-43068619
Phone: +31 (0)10-2900304
Fax: +31 (0)10-2900305
MSN: keesvandieren@gmail.com
LinkedIn: www.linkedin.com/in/keesvandieren

 

Re: Does Jelly support tag functions?

Posted by Rahul Akolkar <ra...@gmail.com>.
On 8/1/06, Paul Libbrecht <pa...@activemath.org> wrote:
> Several folks have requested that... but we have not yet implemented it.
> Can you raise a jira issue with relatively complete example usages ?
>
> Dion, does jexl allow the addition of functions ?? What are the
> syntactic constraints ??
>
<snip/>

No. (AFAIK, if I may jump in)

-Rahul


> paul
>
> Kees van Dieren wrote:
> > Thanks,
> >
> > This does answer my question; however it would be a nice feature to support
> > something like this in a next version (like JSP 2.0 tag functions)
> >
> >
> > Best regards,
> >
> > Kees van Dieren
> > Senior Software Engineer
> >
<snap/>

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


Re: Does Jelly support tag functions?

Posted by Dion Gillard <di...@gmail.com>.
On 8/1/06, Paul Libbrecht <pa...@activemath.org> wrote:
> Several folks have requested that... but we have not yet implemented it.
> Can you raise a jira issue with relatively complete example usages ?
>
> Dion, does jexl allow the addition of functions ?? What are the
> syntactic constraints ??

Nope. Jexl has a fixed grammar at this point (1.x), which is a PITA to
add new features to.

We're hoping to rewrite the Jexl internals for a 2.x which will make
this alot easier.

>
> paul
>
> Kees van Dieren wrote:
> > Thanks,
> >
> > This does answer my question; however it would be a nice feature to support
> > something like this in a next version (like JSP 2.0 tag functions)
> >
> >
> > Best regards,
> >
> > Kees van Dieren
> > Senior Software Engineer
> >
> > MP Objects Supply Chain Software
> > Stationsplein 45
> > 3013 AK Rotterdam
> > The Netherlands
> >
> > Post address:
> > Postbus 29126
> > 3001 GC Rotterdam
> >
> > Mobile: +31 (0)6-43068619
> > Phone: +31 (0)10-2900304
> > Fax: +31 (0)10-2900305
> > MSN: keesvandieren@gmail.com
> > LinkedIn: www.linkedin.com/in/keesvandieren
> >
> >
> > -----Original Message-----
> > From: Paul Libbrecht [mailto:paul@activemath.org]
> > Sent: Friday, July 28, 2006 11:38 AM
> > To: Jakarta Commons Users List
> > Subject: Re: Does Jelly support tag functions?
> >
> > No, I don't think this doable but you can define new java objects that can
> > have methods...
> >   <j:new var="myMath" className="com.x.MyMath"/>
> >   <jct:myCustomTag customAttr="${myMath.sqr(33)}"/> Does it answer your
> > question ?
> > paul
> >
> >
> > Kees van Dieren wrote:
> >
> >> Hi all,
> >>
> >> Does Jelly suppor tag functions, such as:
> >> <ct:myCustomTag customAttr="${tagf:sqr(33)}"/>
> >>
> >> Is there a way define custom tag functions? If not, how difficult is it to
> >> built in support for this?
> >>
> >> Best regards,
> >>
> >> Kees van Dieren
> >> Senior Software Engineer
> >>
> >> MP Objects Supply Chain Software
> >> Stationsplein 45
> >> 3013 AK Rotterdam
> >> The Netherlands
> >>
> >> Post address:
> >> Postbus 29126
> >> 3001 GC Rotterdam
> >>
> >> Mobile: +31 (0)6-43068619
> >> Phone: +31 (0)10-2900304
> >> Fax: +31 (0)10-2900305
> >> MSN: keesvandieren@gmail.com
> >> LinkedIn: www.linkedin.com/in/keesvandieren
> >>
> >>
> >>
> >>
> >>
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-user-help@jakarta.apache.org
> >
> >
>
>
>
>


--
http://www.multitask.com.au/people/dion/
"If you even dream of beating me you'd better wake up and apologize" -
Muhammad Ali


-- 
http://www.multitask.com.au/people/dion/
"If you even dream of beating me you'd better wake up and apologize" -
Muhammad Ali

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


Re: Does Jelly support tag functions?

Posted by Paul Libbrecht <pa...@activemath.org>.
Several folks have requested that... but we have not yet implemented it.
Can you raise a jira issue with relatively complete example usages ?

Dion, does jexl allow the addition of functions ?? What are the 
syntactic constraints ??

paul

Kees van Dieren wrote:
> Thanks,
>
> This does answer my question; however it would be a nice feature to support
> something like this in a next version (like JSP 2.0 tag functions)
>
>
> Best regards,
>
> Kees van Dieren
> Senior Software Engineer
>
> MP Objects Supply Chain Software
> Stationsplein 45
> 3013 AK Rotterdam
> The Netherlands
>
> Post address:
> Postbus 29126
> 3001 GC Rotterdam
>
> Mobile: +31 (0)6-43068619
> Phone: +31 (0)10-2900304
> Fax: +31 (0)10-2900305
> MSN: keesvandieren@gmail.com
> LinkedIn: www.linkedin.com/in/keesvandieren
>
>
> -----Original Message-----
> From: Paul Libbrecht [mailto:paul@activemath.org] 
> Sent: Friday, July 28, 2006 11:38 AM
> To: Jakarta Commons Users List
> Subject: Re: Does Jelly support tag functions?
>
> No, I don't think this doable but you can define new java objects that can
> have methods...
>   <j:new var="myMath" className="com.x.MyMath"/>
>   <jct:myCustomTag customAttr="${myMath.sqr(33)}"/> Does it answer your
> question ?
> paul
>
>
> Kees van Dieren wrote:
>   
>> Hi all,
>>  
>> Does Jelly suppor tag functions, such as:
>> <ct:myCustomTag customAttr="${tagf:sqr(33)}"/>
>>  
>> Is there a way define custom tag functions? If not, how difficult is it to
>> built in support for this?
>>  
>> Best regards,
>>
>> Kees van Dieren
>> Senior Software Engineer
>>
>> MP Objects Supply Chain Software
>> Stationsplein 45
>> 3013 AK Rotterdam
>> The Netherlands
>>
>> Post address:
>> Postbus 29126
>> 3001 GC Rotterdam
>>
>> Mobile: +31 (0)6-43068619
>> Phone: +31 (0)10-2900304
>> Fax: +31 (0)10-2900305
>> MSN: keesvandieren@gmail.com
>> LinkedIn: www.linkedin.com/in/keesvandieren
>>
>>  
>>
>>   
>>     
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>   


RE: Does Jelly support tag functions?

Posted by Kees van Dieren <ke...@mp-objects.com>.
Thanks,

This does answer my question; however it would be a nice feature to support
something like this in a next version (like JSP 2.0 tag functions)


Best regards,

Kees van Dieren
Senior Software Engineer

MP Objects Supply Chain Software
Stationsplein 45
3013 AK Rotterdam
The Netherlands

Post address:
Postbus 29126
3001 GC Rotterdam

Mobile: +31 (0)6-43068619
Phone: +31 (0)10-2900304
Fax: +31 (0)10-2900305
MSN: keesvandieren@gmail.com
LinkedIn: www.linkedin.com/in/keesvandieren


-----Original Message-----
From: Paul Libbrecht [mailto:paul@activemath.org] 
Sent: Friday, July 28, 2006 11:38 AM
To: Jakarta Commons Users List
Subject: Re: Does Jelly support tag functions?

No, I don't think this doable but you can define new java objects that can
have methods...
  <j:new var="myMath" className="com.x.MyMath"/>
  <jct:myCustomTag customAttr="${myMath.sqr(33)}"/> Does it answer your
question ?
paul


Kees van Dieren wrote:
> Hi all,
>  
> Does Jelly suppor tag functions, such as:
> <ct:myCustomTag customAttr="${tagf:sqr(33)}"/>
>  
> Is there a way define custom tag functions? If not, how difficult is it to
> built in support for this?
>  
> Best regards,
>
> Kees van Dieren
> Senior Software Engineer
>
> MP Objects Supply Chain Software
> Stationsplein 45
> 3013 AK Rotterdam
> The Netherlands
>
> Post address:
> Postbus 29126
> 3001 GC Rotterdam
>
> Mobile: +31 (0)6-43068619
> Phone: +31 (0)10-2900304
> Fax: +31 (0)10-2900305
> MSN: keesvandieren@gmail.com
> LinkedIn: www.linkedin.com/in/keesvandieren
>
>  
>
>   




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


Re: Does Jelly support tag functions?

Posted by Paul Libbrecht <pa...@activemath.org>.
No, I don't think this doable but you can define new java objects that 
can have methods...
  <j:new var="myMath" className="com.x.MyMath"/>
  <jct:myCustomTag customAttr="${myMath.sqr(33)}"/>
Does it answer your question ?
paul


Kees van Dieren wrote:
> Hi all,
>  
> Does Jelly suppor tag functions, such as:
> <ct:myCustomTag customAttr="${tagf:sqr(33)}"/>
>  
> Is there a way define custom tag functions? If not, how difficult is it to
> built in support for this?
>  
> Best regards,
>
> Kees van Dieren
> Senior Software Engineer
>
> MP Objects Supply Chain Software
> Stationsplein 45
> 3013 AK Rotterdam
> The Netherlands
>
> Post address:
> Postbus 29126
> 3001 GC Rotterdam
>
> Mobile: +31 (0)6-43068619
> Phone: +31 (0)10-2900304
> Fax: +31 (0)10-2900305
> MSN: keesvandieren@gmail.com
> LinkedIn: www.linkedin.com/in/keesvandieren
>
>  
>
>   


Re: Does Jelly support tag functions?

Posted by Philippe Poulard <Ph...@sophia.inria.fr>.
Kees van Dieren wrote:
> Hi all,
>  
> Does Jelly suppor tag functions, such as:
> <ct:myCustomTag customAttr="${tagf:sqr(33)}"/>

hi,

I don't know if Jelly support it, but RefleX does :
<ct:myCustomTag customAttr="{tagf:sqr(33)}"/>
just remove the $ sign that is exclusively used for properties : in 
fact, when you used to write ${foo} in Jelly and others, you have to 
write {$foo} in RefleX and XSLT ; the main difference is that you have 
an XPath expression within the curly brackets, which allows you to 
compute things like this : {$foo + tagf:sqr(33)} or like that : 
{$foo//bar[@oof]} or anything else à la XPath
moreover, RefleX offers you the possibility to define your custom 
function tagf:sqr() with a Java class or with other tags (like a macro 
mechanism) ; this is also possible for your own custom tag, and even for 
your custom properties

have a look here :
http://reflex.gforge.inria.fr/
and here :
http://disc.inria.fr/perso/philippe.poulard/xml/active-tags/
enjoy !

-- 
Cordialement,

               ///
              (. .)
  --------ooO--(_)--Ooo--------
|      Philippe Poulard       |
  -----------------------------
  http://reflex.gforge.inria.fr/
        Have the RefleX !

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


Re: Does Jelly support tag functions?

Posted by Dion Gillard <di...@gmail.com>.
On 7/27/06, Kees van Dieren <ke...@mp-objects.com> wrote:
> Hi all,
>
> Does Jelly suppor tag functions, such as:
> <ct:myCustomTag customAttr="${tagf:sqr(33)}"/>

No.

>
> Is there a way define custom tag functions? If not, how difficult is it to
> built in support for this?

Not built-in to Jelly. You'd need to provide your own expression
resolver for Jelly.

It is very easy, however to define your own tags, on the fly and have
them directly invoke Java methods. See the 'define' tag library, and
the <invoke/> tag in the core lib.

>
> Best regards,
>
> Kees van Dieren
> Senior Software Engineer
>
> MP Objects Supply Chain Software
> Stationsplein 45
> 3013 AK Rotterdam
> The Netherlands
>
> Post address:
> Postbus 29126
> 3001 GC Rotterdam
>
> Mobile: +31 (0)6-43068619
> Phone: +31 (0)10-2900304
> Fax: +31 (0)10-2900305
> MSN: keesvandieren@gmail.com
> LinkedIn: www.linkedin.com/in/keesvandieren
>
>
>
>


-- 
http://www.multitask.com.au/people/dion/
"If you even dream of beating me you'd better wake up and apologize" -
Muhammad Ali

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