use of au.org.ala.spatial.composer.input.UploadLayerListController in project spatial-portal by AtlasOfLivingAustralia.
the class ToolComposer method onClick$bSpeciesListUpload.
public void onClick$bSpeciesListUpload(Event event) {
UploadLayerListController window = (UploadLayerListController) Executions.createComponents("WEB-INF/zul/input/UploadSpeciesList.zul", this, null);
window.setCallback(new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
importList((String) event.getData());
//enable btnOk
btnOk.setAutodisable("");
btnOk.setDisabled(false);
}
});
try {
window.setParent(this);
window.doModal();
} catch (Exception e) {
LOGGER.error("error opening UploadSpeciesList.zul", e);
}
}
use of au.org.ala.spatial.composer.input.UploadLayerListController in project spatial-portal by AtlasOfLivingAustralia.
the class ToolComposer method onSelect$selectedLayersCombobox.
public void onSelect$selectedLayersCombobox(Event event) {
Comboitem ci = selectedLayersCombobox.getSelectedItem();
if (ci != null && lbListLayers != null) {
String layersList = null;
if (ci.getValue() != null && ci.getValue() instanceof LayerSelection) {
layersList = ((LayerSelection) ci.getValue()).getLayers();
} else {
if (ci.getValue() == null) {
if (ci.getLabel().toLowerCase().contains("paste")) {
PasteLayerListController window = (PasteLayerListController) Executions.createComponents("WEB-INF/zul/input/PasteLayerList.zul", this, null);
window.setCallback(new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
selectLayerFromList((String) event.getData());
updateLayerSelectionCount();
}
});
try {
window.setParent(this);
window.doModal();
} catch (Exception e) {
LOGGER.error("error opening PasteLayerList.zul", e);
}
} else if (ci.getLabel().toLowerCase().contains("import")) {
UploadLayerListController window = (UploadLayerListController) Executions.createComponents("WEB-INF/zul/input/UploadLayerList.zul", this, null);
window.setCallback(new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
selectLayerFromList((String) event.getData());
updateLayerSelectionCount();
}
});
try {
window.setParent(this);
window.doModal();
} catch (Exception e) {
LOGGER.error("error opening UploadLayerList.zul", e);
}
}
selectedLayersCombobox.setSelectedIndex(-1);
}
}
selectLayerFromList(layersList);
}
}
use of au.org.ala.spatial.composer.input.UploadLayerListController in project spatial-portal by AtlasOfLivingAustralia.
the class AddSpeciesController method onClick$bSpeciesListUpload.
public void onClick$bSpeciesListUpload(Event event) {
UploadLayerListController window = (UploadLayerListController) Executions.createComponents("WEB-INF/zul/input/UploadSpeciesList.zul", this, null);
window.setCallback(new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
importList((String) event.getData());
//enable btnOk
btnOk.setAutodisable("");
btnOk.setDisabled(false);
}
});
try {
window.setParent(this);
window.doModal();
} catch (Exception e) {
LOGGER.error("error opening UploadSpeciesList.zul", e);
}
}
Aggregations