commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Schnitzer <>
Subject [jexl] Test for existence
Date Thu, 01 Mar 2012 06:44:15 GMT
How can I test for the existence of something in jexl?

I've set lenient mode off in order to get more information - essentially
lenient mode suppresses any interesting errors.  But without lenient mode
there seems to be no way to test the presence or absence of a variable.
 I'm looking for something like:

if (foo?) { /* ok foo is a variable, might be null, but that's ok */ }

Is this possible?  It is common in template languages, I'm surprised it
isn't here.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message