Skip to Content.
Sympa Menu

grouper-users - Re: JEXL With Conditionals in media.properties

Subject: Grouper Users - Open Discussion List

List archive

Re: JEXL With Conditionals in media.properties


Chronological Thread 
  • From: Colin Hudler <>
  • To: "" <>
  • Subject: Re: JEXL With Conditionals in media.properties
  • Date: Fri, 11 Jun 2010 11:48:59 -0500

Replying to myself, but without a fix.. I see at least one potential problem, in GrouperUiUtils.java substituteExpressionLangauge():

Pattern pattern = Pattern.compile("\\$\\{(.*?)\\}");

That pattern will stop at my first '}'. I don't see an easy work-around at the moment.

On 06/10/2010 06:58 PM, Colin Hudler wrote:
Hi,

We use the LiteUI and it is great that some properties allow an embedded parser (is it JEXL?). I need to customize subject displays, so I am using the property:

"grouperUi.subjectImg.screenEl.0"

Unfortunately, it fails this simple test:

${if (true) { "hello"; }}

The Add member box in LiteUI says:

"Error searching for members: chudler, Error substituting string: '${if (true) { "hello"; }}'"

Does it even support conditionals? Does anyone have a link to the syntax for the version grouper is shipping with?

Would grouper-devs consider JEXL 2.0 at some point? It supports ternary operators and many other enhancements. However, it is not a drop-in replacement; Apparenlty, some API changes have occured. Yet a more active alternative is <http://velocity.apache.org/engine/index.html>.




Archive powered by MHonArc 2.6.16.

Top of Page