commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james_strac...@yahoo.co.uk>
Subject [jelly] <j:set> now supports a defaultValue attribute if value="" is null or blank
Date Fri, 07 Mar 2003 12:20:23 GMT
When writing Jelly scripts (especially Maven plugins) it seems common to do
things like this

    <j:set var="foo" value="${maven.foo}"/>
    <j:if test="${empty(foo)}">
        <!-- default to some other value-->
        <j:set var="foo" value="some default"/>
    </j:if>

I've just added an extra attribute to the <set> tag to make this kind of
thing easier that if the value is null (or an empty String) then the
defaultValue is used instead.

    <j:set var="foo" value="${maven.foo}" defaultValue="${some default}"/>

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


Mime
View raw message