velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Williams <mi...@cortexebusiness.com.au>
Subject Re: #set silently fails if RHS is null
Date Thu, 08 Nov 2001 04:43:52 GMT
  >>> On Wed, 07 Nov 2001 22:46:37 -0500,
  >>> "Geir" == "Geir Magnusson Jr." <geirm@optonline.net> wrote:

  Geir> The logs don't lie.

I value their honesty :-)

  Geir> How about

  Geir> #foreach( $item in $items )
  Geir>   #if( $item.color)
  Geir>      A $item.color $item.name
  Geir>   #end
  Geir> #end

Yep, that works.  However, as you may have guessed, my previous example was
a slightly artificial one.  The actual template I'm having problems with
has a construct like this:

  #set( $remoteName = $class.getTag("@ejb:remote-interface").getParam("name") )
  #if( $remoteName )
    REMOTE $remoteName
  #end

and I was hoping to avoid

  #if( $class.getTag("@ejb:remote-interface").getParam("name") )
    REMOTE $class.getTag("@ejb:remote-interface").getParam("name")
  #end

Should I be thinking about simplifying my model?

-- 
cheers, Mike


--
To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>


Mime
View raw message