Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] displaying multi-valued attributes in Entity/Member details

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] displaying multi-valued attributes in Entity/Member details

Chronological Thread 
  • From: Dominique Petitpierre <>
  • To: Chris Hyzer <>
  • Cc: "" <>
  • Subject: Re: [grouper-users] displaying multi-valued attributes in Entity/Member details
  • Date: Wed, 05 Sep 2012 04:48:10 +0200
  • Organization: University of Geneva


On 09/04/2012 02:00 AM, Chris Hyzer wrote:
> I created a Jira:
> Its not easy to fix since multi-valued subject attributes have not been an
> often-used feature of Grouper and could use some attention. e.g. in WS you
> cannot get multi-valued attributes back in separate distinct values...

OK, thanks!

In the meantime, for those who need something now or for an earlier
release, here is an example of a workaround using the
subjectVirtualAttribute feature (tested on Grouper 1.6.3 and 2.1.1):

In grouper/WEB-INF/classes/sources.xml add the following lines (in
this context case is significant in the attribute names which is
useful to keep the same spelling):


If needed, change the subject.attributes.order.<source_id> parameter
in grouper/WEB-INF/classes/resources/grouper/ to
include EmployeeType (instead of employeeType), e.g.


After restarting the application server the values of employeeType
will be displayed separated by a comma and a space. E.g:

EmployeeType student, staff

If the values are very long (e.g. values of organizationalUnitName)
and are displayed on many lines, the commas might be difficult to
see. One could then create multiple virtual attributes. E.g.:

)?[^,]*(, )?([^,]*).*","$3")}

For the same example values, they will be displayed like this:

employeeType1 student
employeeType2 staff

If the very long values contain commas, it's becoming complicated with
JEXL expressions. But a generic solution like the one described in would be simpler and


Grouper GRP-390, allow virtual attributes for subjects

Grouper Training – Admin – Subject API – Part 3

Java Expression Language, Commons JEXL Syntax

Best regards,
Mr Dominique Petitpierre, user=Dominique.Petitpierre
IT Division, University of Geneva, Switzerland

Archive powered by MHonArc 2.6.16.

Top of Page