velocityvtl

Escape lower than (lt) greater than (gt) operators text version Velocity Template Languaga


I have the following statement in my vtl on line 36 :

#if( !$util.isNullOrEmpty($ctx.args.filter.outstanding_amount.lt))

I get an error:

Parse error on line 36:
....outstanding_amount.lt))      $util.qui
-----------------------^
Expecting 'ID', 'CONTENT', got '<'

I read that lt and gt are a short versions of lower than and greater than operators.

How to make the parser understand .lt and .gt as identifiers and not logical operators?


Solution

  • Try:

    $ctx.args.filter.outstanding_amount.get('lt')