commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
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="${}"/>
    <j:if test="${empty(foo)}">
        <!-- default to some other value-->
        <j:set var="foo" value="some default"/>

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="${}" defaultValue="${some default}"/>


Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts

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

View raw message