You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Robert McIntosh <ro...@bull-enterprises.com> on 2003/02/17 16:27:12 UTC

[Jelly] Tag contribution

I've been playing around quite a bit with Jelly and I found a need to 
invoke static methods without having an object instance, like InvokeTag 
requires. An example of this would be the System class. So, I created 
one and happily contributing it if it is wanted.

It is fully JavaDoced, but while I have tested the code that does the 
invocation via other means, I don't have a junit for this tag in particular.

- Robert McIntosh

Re: [Jelly] Tag contribution

Posted by Robert McIntosh <ro...@bull-enterprises.com>.
Fine with me! Perhaps Class.forName() is about as lazy as catch( 
Exception e )... Glad I could contribute :-)
I've been looking around the new website and I like how the tags are 
seperated out now. One thing that has been on my mind is to povide some 
mini tutorials or example usages on several of the tags, mostly to show 
what attributes are required, which are optional, what do they mean, 
etc. The current documentation is pretty good I'll admit, but there 
aren't a lot of examples on a tag by tag basis. Even something as simple 
as what is shown for the jelly:setProperties tag would be helpful.

And yes, I'll write a junit for my static tag :-)

- Robert

James Strachan wrote:

>From: "Robert McIntosh" <ro...@bull-enterprises.com>
>  
>
>>I've been playing around quite a bit with Jelly and I found a need to
>>invoke static methods without having an object instance, like InvokeTag
>>requires. An example of this would be the System class. So, I created
>>one and happily contributing it if it is wanted.
>>    
>>
>
>Great stuff - I've wanted to get around this issue too. Adding support for
>methods on Class instances in Jexl might be a good idea too.
>
>Patch applied. I made a couple of minor changes, mostly that Class.forName()
>is evil...
>
>http://radio.weblogs.com/0112098/stories/2003/02/12/classfornameIsEvil.html
>
>so I refactored that part of the code a little and migrated the code to the
>new checked exception API.
>
>
>  
>
>>It is fully JavaDoced, but while I have tested the code that does the
>>invocation via other means, I don't have a junit for this tag in
>>    
>>
>particular.
>
>A JUnit test case for this code would be great :)
>
>James
>-------
>http://radio.weblogs.com/0112098/
>
>__________________________________________________
>Do You Yahoo!?
>Everything you'll ever need on one web page
>from News and Sport to Email and Music Charts
>http://uk.my.yahoo.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>  
>


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


Re: [Jelly] Tag contribution

Posted by James Strachan <ja...@yahoo.co.uk>.
From: <di...@multitask.com.au>
> James.,
> 
> Thread.getContextClassLoader() could return null.....

Well spotted dIon - have fixed it now.

James
-------
http://radio.weblogs.com/0112098/
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

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


Re: [Jelly] Tag contribution

Posted by di...@multitask.com.au.
James.,

Thread.getContextClassLoader() could return null.....
--
dIon Gillard, Multitask Consulting
Blog:      http://www.freeroller.net/page/dion/Weblog
Work:      http://www.multitask.com.au


"James Strachan" <ja...@yahoo.co.uk> wrote on 19/02/2003 06:44:42 
PM:

> From: "Robert McIntosh" <ro...@bull-enterprises.com>
> > I've been playing around quite a bit with Jelly and I found a need to
> > invoke static methods without having an object instance, like 
InvokeTag
> > requires. An example of this would be the System class. So, I created
> > one and happily contributing it if it is wanted.
> 
> Great stuff - I've wanted to get around this issue too. Adding support 
for
> methods on Class instances in Jexl might be a good idea too.
> 
> Patch applied. I made a couple of minor changes, mostly that 
Class.forName()
> is evil...
> 
> 
http://radio.weblogs.com/0112098/stories/2003/02/12/classfornameIsEvil.html
> 
> so I refactored that part of the code a little and migrated the code to 
the
> new checked exception API.
> 
> 
> > It is fully JavaDoced, but while I have tested the code that does the
> > invocation via other means, I don't have a junit for this tag in
> particular.
> 
> A JUnit test case for this code would be great :)
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 
> __________________________________________________
> 
> Do You Yahoo!?
> 
> Everything you'll ever need on one web page
> 
> from News and Sport to Email and Music Charts
> 
> http://uk.my.yahoo.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 


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


Re: [Jelly] Tag contribution

Posted by James Strachan <ja...@yahoo.co.uk>.
From: "Robert McIntosh" <ro...@bull-enterprises.com>
> I've been playing around quite a bit with Jelly and I found a need to
> invoke static methods without having an object instance, like InvokeTag
> requires. An example of this would be the System class. So, I created
> one and happily contributing it if it is wanted.

Great stuff - I've wanted to get around this issue too. Adding support for
methods on Class instances in Jexl might be a good idea too.

Patch applied. I made a couple of minor changes, mostly that Class.forName()
is evil...

http://radio.weblogs.com/0112098/stories/2003/02/12/classfornameIsEvil.html

so I refactored that part of the code a little and migrated the code to the
new checked exception API.


> It is fully JavaDoced, but while I have tested the code that does the
> invocation via other means, I don't have a junit for this tag in
particular.

A JUnit test case for this code would be great :)

James
-------
http://radio.weblogs.com/0112098/

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

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