if (senceAction) {
if (select instanceof String && !((String) select).trim().isEmpty()) {
} else if (select instanceof DirectoryKladrItem) {
senceAction = false;
try {
DirectoryKladrItem item = (DirectoryKladrItem) select;
if (item.getType().getLevel() == DirectoryKladrType.LEVEL_BLOCK) {
item = item.getParent();
}
address.getDetails().objectId = item.getID();
correctAddress();
if (item.getType().getLevel() >= DirectoryKladrType.MIN_LEVEL_HAS_BUILDINGS) {
tfBuilding.setEnabled(true);
tfFlat.setEnabled(true);
tfBuilding.setText(address.getBuilding());
tfFlat.setText(address.getFlat());
} else {
tfBuilding.setEnabled(false);
tfFlat.setEnabled(false);
tfBuilding.setText("");
tfFlat.setText("");
}
checkTextInput(item);
ArrayList<DirectoryKladrItem> path = new ArrayList<DirectoryKladrItem>();
if (item.getType().getLevel() < DirectoryKladrType.LAST_USING_LEVEL) {
path.add(null);
}
if (item.getType().isType("улица")) {
tblBlocks.setModel(new TableModelBlocks(item.toArray(new DirectoryKladrItem[item.getItems().size()])));
tblBlocks.setVisible(true);
} else {
tblBlocks.setVisible(false);
}
while (item != null) {
path.add(0, item);
item = item.getParent();
}
for (int i = 1; i < path.size(); i++) {
combos[i].setVisible(true);
DirectoryKladrItem parent = path.get(i - 1);
// combos[i].setModel(createModel(parent));
createModel(combos[i], getChildren(parent), true);
combos[i].setSelectedItem(path.get(i) != null ? path.get(i) : "");
}
for (int i = path.size(); i < combos.length; i++) {