Uploaded image for project: 'Velocity Tools'
  1. Velocity Tools
  2. VELTOOLS-139

Bundle a NullTool in velocity Tools

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 2.0
    • None
    • GenericTools
    • None

    Description

      Right now, in order to check for null we have to use:

      #if ((! $var) && ("$!var" == ""))

      which is painful when you have lots of checks to do in several places.

      It would be nice either to have better null check support in velocity core or to bundle to NullTool in Velocity Tools:
      http://wiki.apache.org/velocity/NullTool

      I checked the user guide and googled around and couldn't find any simple way to check for null except using an undefined variable which I find way too magical and dangerous (what if someone defines that variable in the context).

      Attachments

        Activity

          People

            Unassigned Unassigned
            vmassol Vincent Massol
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: