powered by Jive Software

How to get group for a selected user?

Hi all,

We are using Smack 2.1.0 and Wildfire 2.4.0. In our client UI, we list users based on groups. Group-user combinations

are obtained from a DB. We allow a user to belong to multiple groups.

We would like to get GroupName when a user is selected. What we get is a SelectionList that contains user objects. For each user in this selection list, we are able to get RosterEntry and from RosterEntry we can get ALL the groups that this user belongs to. We are, instead, interested in getting the SPECIFIC group that the selected user belongs to.

Is there a way to get the group name of a selected user?

Mahaveer

Hi Mahaveer,

is this a GUI problem or how should I understand this?

Actually you “allow a user to belong to multiple groups”. So there will be likely more than one group the users belongs to.

I think Spark uses a seperate area for every group (to minimize it independently) and is able to this. Otherwise one would have problems to move a user form one group into another.

So maybe you’'d like to store for every displayed user to which group he/she belongs?

LG