Matthieu Bollot wrote:
> Hi,
> Is there a way to use entitylabels in a groovy ?
> I've got a genericValue that contains a result, for example a workEffort
> with workEffortTypeId:ROUTING that I can get with
> myRow['workEffortTypeId']

myRow.workEffortTypeId is better.

> And I want to get the string of WorkEffortType.description.ROUTING from
> workEffortEntityLabels which will be 'routing' in english, 'routage' in
> french and so on.

I'm thinking about something groovy-ish; brainstorming...

In GenericEntity.java:

public Map<String, String> getLabels(Locale locale) {
}

In groovy, or any other type of language:

myRow.getLabels('fr').workEffortTypeId

--

Of course, none of this is actually implemented yet.  And, for speed,
the returned map should do a lazy lookup.  Ie, the returned map should
not attempt to find all the translated values when the getLabels()
method is called.

Reply via email to