@Override
public void chooseDone(int type, int id) throws ChoosePanelComboException {
try {
DirectoryEnterpriseItem dei = dirEnterprise.getItemFromID(id);
DirectoryCollaboratorItem collaborator = dei.getCollaborator();
DirectoryEnterpriseItem parentEnt = dei.getParent();
while (collaborator == null && parentEnt != null){//find collab up
collaborator = parentEnt.getCollaborator();
parentEnt = parentEnt.getParent();
}
if (collaborator == null){
lblCollab.setText("Не установлен для данного предприятия");
}else{
lblCollab.setText(collaborator.getTitle());
current = collaborator;
}
lblNotCorrect.setVisible(collaborator != null && collaborator != UserInfo.get().getCollaborator());
Set<ContractLocal> usableContracts = searchLocal.search(dei).getUsableContracts();