From: "David E Jones" <d...@me.com>
I agree, Groovy is not just way better than BSH, but also better than UEL too. 
It might be a bit of a pain to change now, but I
don't know. While designing based on the idea of starting over I was planning on a move 
to "everything's Groovy" to use Groovy for
all expressions, scriptlets, and inline scripts and scripts in separate files.

Yes, I'd like it, more powerful, consistent and better syntax

Jacques

Of course, that brings up the question... why not just use Grails where every 
artifact is a groovy script instead of having some
artifacts as XML? Well, IMO for many things XML is easier and cleaner for both 
writing and reading/maintaining. If you don't like
that, well, Grails isn't too bad as frameworks go... :)

-David


On Aug 31, 2010, at 6:51 PM, Scott Gray wrote:

Sounds fine to me.  As an alternative you can do something like this:
<display description="${empty usage ? uiLabelMap.CommonNone : usage}"/>
I know it's a bit verbose but it should also work.  "empty" is a UEL operator that works 
in a similar fashion to Groovy's "Truth"
boolean casting.

Unfortunately UEL doesn't support groovy's elvis operator or it would be easier:
"${usage ?: uiLabelMap.CommonNone}"
or perhaps freemarker's default value operator:
"${usage!uiLabelMap.CommonNone}"

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com

On 1/09/2010, at 5:29 AM, Jacques Le Roux wrote:

Hi Bruno,

In such case I handle the field with set and groovy before in the row-action. 
But yes, why not a default-value?

Jacques

From: "Bruno Busco" <bruno.bu...@gmail.com>
Hi,
I need to show a default string (e.g. "None") in a field of a form of type
"list".
I was looking for something like...
<field name="usage" title="${uiLabelMap.WebtoolsUsage}" sort-field="true">
 <display default-value="${uiLabelMap.CommonNone}"/>
</field>
...but the display tag does not support the default-value.
Would it make sense to add it?
Thanks,
Bruno






Reply via email to