Visit visit = getVisitState();
Integer userPK = visit.getUserId();
Person[] persons = getRemoteTemplate().getPersons();
EntitySelectionModel result = new EntitySelectionModel();
for (int i = 0; i < persons.length; i++)
{
Person p = persons[i];
Integer pk = p.getId();
// Skip the current user
if (pk.equals(userPK))
continue;
result.add(pk, p.getNaturalName());
}
return result;
}