Skip to content
Snippets Groups Projects
Commit 59b4b3dc authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Credentials insertion and management changes

parent 5e2bad95
Branches
Tags
No related merge requests found
Showing
with 447 additions and 460 deletions
...@@ -29,7 +29,6 @@ import it.inaf.ia2.tsm.model.PropertyModel; ...@@ -29,7 +29,6 @@ import it.inaf.ia2.tsm.model.PropertyModel;
import it.inaf.ia2.tsm.model.TableModel; import it.inaf.ia2.tsm.model.TableModel;
import it.inaf.ia2.tsm.model.TapSchemaModel; import it.inaf.ia2.tsm.model.TapSchemaModel;
import it.inaf.ia2.tsm.model.TapSchemaModels; import it.inaf.ia2.tsm.model.TapSchemaModels;
import it.inaf.ia2.tsm.model.Tasman;
import java.io.Serializable; import java.io.Serializable;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -45,8 +44,6 @@ import org.slf4j.Logger; ...@@ -45,8 +44,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
/** /**
* The main implementation of {@link TapSchema}.
*
* @author Sonia Zorba {@literal <zorba at oats.inaf.it>} * @author Sonia Zorba {@literal <zorba at oats.inaf.it>}
*/ */
public class TapSchema implements EntitiesContainer<Schema>, Serializable { public class TapSchema implements EntitiesContainer<Schema>, Serializable {
......
...@@ -101,6 +101,15 @@ public class ConfigurationManager { ...@@ -101,6 +101,15 @@ public class ConfigurationManager {
return Collections.unmodifiableList(usersConfig.getUsers()); return Collections.unmodifiableList(usersConfig.getUsers());
} }
public UserConfiguration getUserConfiguration(String username) {
for (UserConfiguration user : usersConfig.getUsers()) {
if (username.equals(user.getUsername())) {
return user;
}
}
return null;
}
public List<UCDConfiguration> getUCDConfiguration() { public List<UCDConfiguration> getUCDConfiguration() {
return Collections.unmodifiableList(ucdListConfig.getUCDList()); return Collections.unmodifiableList(ucdListConfig.getUCDList());
} }
...@@ -197,9 +206,17 @@ public class ConfigurationManager { ...@@ -197,9 +206,17 @@ public class ConfigurationManager {
} }
public List<TapCredentials> getCredentials(String username) { public List<TapCredentials> getCredentials(String username) {
List<TapCredentials> credentials = getUserCredentials(username);
if (credentials == null) {
return null;
}
return Collections.unmodifiableList(credentials);
}
private List<TapCredentials> getUserCredentials(String username) {
for (UserConfiguration user : usersConfig.getUsers()) { for (UserConfiguration user : usersConfig.getUsers()) {
if (user.getUsername().equals(username)) { if (user.getUsername().equals(username)) {
return Collections.unmodifiableList(user.getCredentialsInfo()); return user.getCredentialsInfo();
} }
} }
return null; return null;
...@@ -213,18 +230,11 @@ public class ConfigurationManager { ...@@ -213,18 +230,11 @@ public class ConfigurationManager {
* otherwise. * otherwise.
*/ */
public synchronized boolean addCredentials(String username, TapCredentials credentials) { public synchronized boolean addCredentials(String username, TapCredentials credentials) {
for (UserConfiguration user : usersConfig.getUsers()) { List<TapCredentials> userCredentials = getUserCredentials(username);
if (user.getUsername().equals(username)) { if (userCredentials != null) {
for (TapCredentials tapCredentials : user.getCredentialsInfo()) { userCredentials.add(credentials);
if (tapCredentials.equals(credentials)) {
return false;
}
}
user.getCredentialsInfo().add(credentials);
updateUsersConfigurationFile(); updateUsersConfigurationFile();
return false; return true;
}
} }
return false; return false;
} }
...@@ -234,11 +244,21 @@ public class ConfigurationManager { ...@@ -234,11 +244,21 @@ public class ConfigurationManager {
* otherwise. * otherwise.
*/ */
public synchronized boolean deleteCredentials(String username, int credentialsIndex) { public synchronized boolean deleteCredentials(String username, int credentialsIndex) {
for (UserConfiguration user : usersConfig.getUsers()) { List<TapCredentials> userCredentials = getUserCredentials(username);
if (user.getUsername().equals(username)) { if (userCredentials != null && userCredentials.size() > credentialsIndex) {
user.getCredentialsInfo().remove(credentialsIndex); userCredentials.remove(credentialsIndex);
updateUsersConfigurationFile();
return true; return true;
} }
return false;
}
public synchronized boolean updateCredentials(String username, TapCredentials updatedCredentials, int index) {
List<TapCredentials> userCredentials = getUserCredentials(username);
if (userCredentials != null && userCredentials.size() > index) {
userCredentials.set(index, updatedCredentials);
updateUsersConfigurationFile();
return true;
} }
return false; return false;
} }
......
...@@ -71,6 +71,6 @@ public class ConsistencyChecksBean implements Serializable { ...@@ -71,6 +71,6 @@ public class ConsistencyChecksBean implements Serializable {
} }
public String back() { public String back() {
return "schemaSelection.xhtml?faces-redirect=true"; return "credentialsEditing.xhtml?faces-redirect=true";
} }
} }
...@@ -24,9 +24,7 @@ package it.inaf.ia2.tsm.webapp; ...@@ -24,9 +24,7 @@ package it.inaf.ia2.tsm.webapp;
import it.inaf.ia2.tsm.webapp.xmlconfig.SeparatedCredentials; import it.inaf.ia2.tsm.webapp.xmlconfig.SeparatedCredentials;
import it.inaf.ia2.tsm.datalayer.Credentials; import it.inaf.ia2.tsm.datalayer.Credentials;
import it.inaf.ia2.tsm.datalayer.DBWrapper;
import it.inaf.ia2.tsm.model.TapSchemaModels; import it.inaf.ia2.tsm.model.TapSchemaModels;
import it.inaf.ia2.tsm.webapp.env.UIModal;
import it.inaf.ia2.tsm.webapp.xmlconfig.JoinedCredentials; import it.inaf.ia2.tsm.webapp.xmlconfig.JoinedCredentials;
import it.inaf.ia2.tsm.webapp.xmlconfig.TapCredentials; import it.inaf.ia2.tsm.webapp.xmlconfig.TapCredentials;
import java.io.IOException; import java.io.IOException;
...@@ -60,12 +58,11 @@ public class CredentialsEditing implements Serializable { ...@@ -60,12 +58,11 @@ public class CredentialsEditing implements Serializable {
private ConfigurationManager config; private ConfigurationManager config;
@Inject @Inject
private SchemaSelectionBean schemaSelectionBean; private TapSchemaLoader tapSchemaLoader;
private Integer credentialsInEditing; private Integer credentialsInEditing;
private Integer credentialsToRemove; private Integer credentialsToRemove;
private UIModal.StatusObserver credentialsDialogStatusObserver;
private boolean credentialsDialogOpened; private boolean credentialsDialogOpened;
private List<String> tapSchemaVersions; private List<String> tapSchemaVersions;
...@@ -79,12 +76,6 @@ public class CredentialsEditing implements Serializable { ...@@ -79,12 +76,6 @@ public class CredentialsEditing implements Serializable {
@PostConstruct @PostConstruct
public void init() { public void init() {
this.credentialsDialogStatusObserver = new UIModal.StatusObserver() {
@Override
public void statusChanged(boolean isOpen) {
credentialsDialogOpened = isOpen;
}
};
this.tapSchemaVersions = TapSchemaModels.getAvailableVersions(); this.tapSchemaVersions = TapSchemaModels.getAvailableVersions();
} }
...@@ -117,7 +108,8 @@ public class CredentialsEditing implements Serializable { ...@@ -117,7 +108,8 @@ public class CredentialsEditing implements Serializable {
hasObscore = credentials.isHasObscore(); hasObscore = credentials.isHasObscore();
} }
public void addNewCredentials() { public void addNewCredentialsInEditing() {
credentialsInEditing = null;
separateCredentials = false; separateCredentials = false;
sourceCredentials = new Credentials(); sourceCredentials = new Credentials();
tapSchemaCredentials = new Credentials(); tapSchemaCredentials = new Credentials();
...@@ -126,63 +118,73 @@ public class CredentialsEditing implements Serializable { ...@@ -126,63 +118,73 @@ public class CredentialsEditing implements Serializable {
hasObscore = false; hasObscore = false;
} }
// public void editCredentials(Credentials credentials, int index) { public void loadTapSchema(TapCredentials tapCredentials) throws SQLException {
// this.sourceCredentials = credentials; tapSchemaLoader.tryLoadingTapSchema(tapCredentials);
// separateCredentials = false;
// currentEditingRow = index;
// }
//
// public void editSeparateCredentials(SeparatedCredentials sc, int index) {
// this.sourceCredentials = sc.getSourceCredentials();
// this.tapSchemaCredentials = sc.getTapSchemaCredentials();
// currentEditingRow = index;
// separateCredentials = true;
// }
public String loginWithJoinedCredentials(JoinedCredentials credentials) {
return loginWithDBWrapper(new DBWrapper(credentials.getCredentials()));
} }
public String loginWithSeparatedCredentials(Credentials sourceCredentials, Credentials tapSchemaCredentials) { public void openDeleteCredentialsConfirmation(int index) throws IOException {
return loginWithDBWrapper(new DBWrapper(sourceCredentials, tapSchemaCredentials)); credentialsToRemove = index;
} }
private String loginWithDBWrapper(DBWrapper dbWrapper) { public void confirmCredentialsDeletion() {
if (credentialsToRemove != null) {
try { config.deleteCredentials(user.getUsername(), credentialsToRemove);
dbWrapper.testConnections();
schemaSelectionBean.setDbWrapper(dbWrapper);
return "schemaSelection.xhtml?faces-redirect=true";
} catch (SQLException e) {
LOG.error("Exception caught", e);
FacesContext.getCurrentInstance().addMessage("main", new FacesMessage("Connection error: " + e.getMessage()));
return null;
} }
credentialsToRemove = null;
} }
public void removeCredentials(int index) throws IOException { public boolean validateNotNull(FacesContext ctx, String value, String componentId, String errorMessage) {
// getSavedCredentials().remove(index); if (value == null || value.isEmpty()) {
// config.updateUsersConfigurationFile(); ctx.addMessage(componentId, new FacesMessage(errorMessage));
return false;
}
return true;
} }
public void saveCredentialsEdited() throws IOException { public void saveCredentialsEdited() throws IOException {
//
// // If is editing existing, remove old for creating a new one /**
// if (currentEditingRow < getSavedCredentials().size()) { * We need to validate manually to avoid problem with JSF AJAX partial
// getSavedCredentials().remove(currentEditingRow); * updates.
// } */
// FacesContext ctx = FacesContext.getCurrentInstance();
// if (separateCredentials) {
// SeparatedCredentials sc = new SeparatedCredentials(sourceCredentials, tapSchemaCredentials); /**
// getSavedCredentials().add(currentEditingRow, sc); * Single & operator used to perform all validation.
// } else { */
// getSavedCredentials().add(currentEditingRow, sourceCredentials); boolean validationOk
// } = validateNotNull(ctx, sourceCredentials.getHostname(), "main:source_hostname", "Hostname is required")
// & validateNotNull(ctx, sourceCredentials.getUsername(), "main:source_username", "Username is required")
// config.updateUsersConfigurationFile(); & validateNotNull(ctx, tapSchemaName, "main:tap_schema_name", "TAP_SCHEMA name is required");
}
if (separateCredentials) {
public UIModal.StatusObserver getCredentialsDialogStatus() { validationOk = validationOk
return credentialsDialogStatusObserver; & validateNotNull(ctx, tapSchemaCredentials.getHostname(), "main:tap_schema_hostname", "Hostname is required")
& validateNotNull(ctx, tapSchemaCredentials.getHostname(), "main:tap_schema_username", "Username is required");
}
if (!validationOk) {
return;
}
TapCredentials editedCredentials;
if (separateCredentials) {
editedCredentials = new SeparatedCredentials(sourceCredentials, tapSchemaCredentials);
} else {
editedCredentials = new JoinedCredentials(sourceCredentials);
}
editedCredentials.setHasObscore(hasObscore);
editedCredentials.setTapSchemaName(tapSchemaName);
editedCredentials.setTapSchemaVersion(tapSchemaVersion);
if (credentialsInEditing == null) {
// New credentials
config.addCredentials(user.getUsername(), editedCredentials);
} else {
// Existing credentials
config.updateCredentials(user.getUsername(), editedCredentials, credentialsInEditing);
}
} }
public List<String> getTapSchemaVersions() { public List<String> getTapSchemaVersions() {
...@@ -201,33 +203,6 @@ public class CredentialsEditing implements Serializable { ...@@ -201,33 +203,6 @@ public class CredentialsEditing implements Serializable {
this.separateCredentials = separateCredentials; this.separateCredentials = separateCredentials;
} }
// public void separateCredentialsChanged() {
// if (separateCredentials) {
// Credentials credentials = getJoinedCredentialsInEditing().getCredentials();
// SeparatedCredentials separatedCredentials = new SeparatedCredentials();
// separatedCredentials.setSourceCredentials(credentials);
// credentialsInEditing = separatedCredentials;
// } else {
// Credentials credentials = getSeparatedCredentialsInEditing().getSourceCredentials();
// JoinedCredentials joinedCredentials = new JoinedCredentials();
// joinedCredentials.setCredentials(credentials);
// credentialsInEditing = joinedCredentials;
// }
// }
//
// public JoinedCredentials getJoinedCredentialsInEditing() {
// if (credentialsInEditing instanceof JoinedCredentials) {
// return (JoinedCredentials) credentialsInEditing;
// }
// return null;
// }
//
// public SeparatedCredentials getSeparatedCredentialsInEditing() {
// if (credentialsInEditing instanceof SeparatedCredentials) {
// return (SeparatedCredentials) credentialsInEditing;
// }
// return null;
// }
public boolean isCredentialsDialogOpened() { public boolean isCredentialsDialogOpened() {
return credentialsDialogOpened; return credentialsDialogOpened;
} }
......
...@@ -25,7 +25,6 @@ package it.inaf.ia2.tsm.webapp; ...@@ -25,7 +25,6 @@ package it.inaf.ia2.tsm.webapp;
import it.inaf.ia2.tsm.ChildEntity; import it.inaf.ia2.tsm.ChildEntity;
import it.inaf.ia2.tsm.Column; import it.inaf.ia2.tsm.Column;
import it.inaf.ia2.tsm.webapp.env.CustomPartialResponseWriter; import it.inaf.ia2.tsm.webapp.env.CustomPartialResponseWriter;
import it.inaf.ia2.tsm.webapp.env.JSUpdateHandler;
import it.inaf.ia2.tsm.EntitiesContainer; import it.inaf.ia2.tsm.EntitiesContainer;
import it.inaf.ia2.tsm.Key; import it.inaf.ia2.tsm.Key;
import it.inaf.ia2.tsm.KeyColumn; import it.inaf.ia2.tsm.KeyColumn;
...@@ -58,7 +57,7 @@ public class TapSchemaEditingBean implements Serializable { ...@@ -58,7 +57,7 @@ public class TapSchemaEditingBean implements Serializable {
private static final Logger LOG = LoggerFactory.getLogger(TapSchemaEditingBean.class); private static final Logger LOG = LoggerFactory.getLogger(TapSchemaEditingBean.class);
@Inject @Inject
SchemaSelectionBean schemaSelection; private TapSchemaLoader tapSchemaLoader;
private TapSchema tapSchema; private TapSchema tapSchema;
private Schema selectedSchema; private Schema selectedSchema;
...@@ -247,7 +246,7 @@ public class TapSchemaEditingBean implements Serializable { ...@@ -247,7 +246,7 @@ public class TapSchemaEditingBean implements Serializable {
} }
public String back() { public String back() {
return "schemaSelection.xhtml?faces-redirect=true"; return "credentialsEditing.xhtml?faces-redirect=true";
} }
public void undoRemove(ChildEntity entity) throws SQLException { public void undoRemove(ChildEntity entity) throws SQLException {
...@@ -310,13 +309,7 @@ public class TapSchemaEditingBean implements Serializable { ...@@ -310,13 +309,7 @@ public class TapSchemaEditingBean implements Serializable {
} }
// New UCD is set and we can notify the client to close the UCD Search modal dialog. // New UCD is set and we can notify the client to close the UCD Search modal dialog.
CustomPartialResponseWriter.getCurrentInstance().addCustomJSUpdate(new JSUpdateHandler() { CustomPartialResponseWriter.getCurrentInstance().addCustomJSUpdate(String.valueOf(true));
@Override
public String getUpdate() {
return "true";
}
});
} }
} }
...@@ -338,13 +331,7 @@ public class TapSchemaEditingBean implements Serializable { ...@@ -338,13 +331,7 @@ public class TapSchemaEditingBean implements Serializable {
if (key.equals("unit")) { if (key.equals("unit")) {
voUnitValidator = new VOUnitValidator(entity.getValue(key, String.class)); voUnitValidator = new VOUnitValidator(entity.getValue(key, String.class));
} }
CustomPartialResponseWriter.getCurrentInstance().addCustomJSUpdate(new JSUpdateHandler() { CustomPartialResponseWriter.getCurrentInstance().addCustomJSUpdate(String.valueOf(isChanged));
@Override
public String getUpdate() {
return isChanged + "";
}
});
} }
public void removeColumn(String name) { public void removeColumn(String name) {
...@@ -371,17 +358,10 @@ public class TapSchemaEditingBean implements Serializable { ...@@ -371,17 +358,10 @@ public class TapSchemaEditingBean implements Serializable {
public void reload() { public void reload() {
if (schemaSelection.getSelectedRadioOption().equals("edit")) {
schemaSelection.edit();
} else {
if (tapSchema.exists()) { if (tapSchema.exists()) {
schemaSelection.setSelectedRadioOption("edit"); tapSchemaLoader.edit();
schemaSelection.setSelectedTAPSchema(tapSchema.getName());
schemaSelection.selectedTAPSchemaChanged();
schemaSelection.edit();
} else { } else {
schemaSelection.create(); tapSchemaLoader.create();
}
} }
} }
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Trieste INAF - IA2 Italian Center for Astronomical Archives * Trieste INAF - IA2 Italian Center for Astronomical Archives
* _____________________________________________________________________________ * _____________________________________________________________________________
* *
* Copyright (C) 2016 Istituto Nazionale di Astrofisica * Copyright (C) 2017 Istituto Nazionale di Astrofisica
* *
* This program is free software; you can redistribute it and/or modify it under * This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License Version 3 as published by the * the terms of the GNU General Public License Version 3 as published by the
...@@ -26,19 +26,12 @@ import it.inaf.ia2.tsm.TapSchema; ...@@ -26,19 +26,12 @@ import it.inaf.ia2.tsm.TapSchema;
import it.inaf.ia2.tsm.datalayer.DBBroker; import it.inaf.ia2.tsm.datalayer.DBBroker;
import it.inaf.ia2.tsm.datalayer.DBBrokerFactory; import it.inaf.ia2.tsm.datalayer.DBBrokerFactory;
import it.inaf.ia2.tsm.datalayer.DBWrapper; import it.inaf.ia2.tsm.datalayer.DBWrapper;
import it.inaf.ia2.tsm.model.TapSchemaModel; import it.inaf.ia2.tsm.webapp.env.CustomPartialResponseWriter;
import it.inaf.ia2.tsm.model.TapSchemaModels; import it.inaf.ia2.tsm.webapp.xmlconfig.JoinedCredentials;
import it.inaf.ia2.tsm.webapp.xmlconfig.SeparatedCredentials;
import it.inaf.ia2.tsm.webapp.xmlconfig.TapCredentials;
import java.io.Serializable; import java.io.Serializable;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.faces.application.FacesMessage;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.validator.ValidatorException;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Named; import javax.inject.Named;
import org.apache.deltaspike.core.api.scope.WindowScoped; import org.apache.deltaspike.core.api.scope.WindowScoped;
...@@ -49,147 +42,57 @@ import org.slf4j.LoggerFactory; ...@@ -49,147 +42,57 @@ import org.slf4j.LoggerFactory;
* *
* @author Sonia Zorba {@literal <zorba at oats.inaf.it>} * @author Sonia Zorba {@literal <zorba at oats.inaf.it>}
*/ */
@Named("schemaSelection") @Named("tapSchemaLoader")
@WindowScoped @WindowScoped
public class SchemaSelectionBean implements Serializable { public class TapSchemaLoader implements Serializable {
private static final long serialVersionUID = -5745720427701334323L; private static final long serialVersionUID = 3203810003976020854L;
private static final Logger LOG = LoggerFactory.getLogger(SchemaSelectionBean.class);
private static final Logger LOG = LoggerFactory.getLogger(TapSchemaLoader.class);
@Inject @Inject
TapSchemaEditingBean tapSchemaEditingBean; private ConsistencyChecksBean consistencyChecksBean;
@Inject @Inject
ConsistencyChecksBean consistencyChecksBean; TapSchemaEditingBean tapSchemaEditingBean;
private TapCredentials tapCredentials;
private DBWrapper dbWrapper; private DBWrapper dbWrapper;
private String selectedRadioOption;
// For editing
private List<String> allTAPSchemas;
private String selectedTAPSchema;
private String exposedSchemas;
// For creation
private String tapSchemaName;
private List<String> versions;
private String version;
private List<String> allSchemas;
private List<String> selectedSchemas;
private boolean loading; private boolean loading;
private TapSchema loadedTapSchema; private TapSchema loadedTapSchema;
private String loadingError; private String loadingError;
@PostConstruct public void tryLoadingTapSchema(TapCredentials tapCredentials) throws SQLException {
public void init() { this.tapCredentials = tapCredentials;
selectedRadioOption = "edit";
exposedSchemas = "";
versions = new ArrayList<>();
Iterator<TapSchemaModel> ite = TapSchemaModels.getIterator();
while (ite.hasNext()) {
TapSchemaModel model = ite.next();
versions.add(model.getVersion());
}
Collections.sort(versions);
}
public void onPageLoad() {
FacesContext fc = FacesContext.getCurrentInstance();
final boolean ajaxRequest = fc.getPartialViewContext().isAjaxRequest();
final boolean validationFailed = fc.isValidationFailed();
if (!ajaxRequest && !validationFailed) {
// Loading all schemas of the source database if (tapCredentials instanceof JoinedCredentials) {
try { JoinedCredentials joinedCredentials = (JoinedCredentials) tapCredentials;
DBBroker broker = DBBrokerFactory.getDBBroker(dbWrapper.getSourceDataSourceWrapper()); dbWrapper = new DBWrapper(joinedCredentials.getCredentials());
allSchemas = broker.getAllSchemaNames(); } else {
setSelectedSchemas(new ArrayList<String>()); SeparatedCredentials separatedCredentials = (SeparatedCredentials) tapCredentials;
} catch (SQLException e) { dbWrapper = new DBWrapper(separatedCredentials.getSourceCredentials(), separatedCredentials.getTapSchemaCredentials());
throw new RuntimeException(e);
} }
// Loading all schemas of the TAP_SCHEMA database // Testing connections
try { dbWrapper.testConnections();
DBBroker broker = DBBrokerFactory.getDBBroker(dbWrapper.getTapSchemaDataSourceWrapper());
allTAPSchemas = broker.getAllTAPSchemaNames(allSchemas);
if (!allTAPSchemas.isEmpty()) {
this.selectedTAPSchema = allTAPSchemas.get(0);
loadExposedSchemas();
}
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
}
private void loadExposedSchemas() throws SQLException { // Searching for TAP_SCHEMA name
DBBroker broker = DBBrokerFactory.getDBBroker(dbWrapper.getTapSchemaDataSourceWrapper()); DBBroker broker = DBBrokerFactory.getDBBroker(dbWrapper.getTapSchemaDataSourceWrapper());
List<String> schemas = broker.getExposedSchemas(selectedTAPSchema); boolean tapSchemaExists = false;
exposedSchemas = ""; for (String schemaName : broker.getAllSchemaNames()) {
for (int i = 0; i < schemas.size(); i++) { if (schemaName.equals(tapCredentials.getTapSchemaName())) {
exposedSchemas += schemas.get(i); tapSchemaExists = true;
if (i < schemas.size() - 1) { break;
exposedSchemas += ", ";
}
} }
} }
public List<String> getAllTAPSchemas() { CustomPartialResponseWriter.getCurrentInstance().addCustomJSUpdate("tap_schema_existence", String.valueOf(tapSchemaExists));
return allTAPSchemas;
}
public List<String> getAllSchemas() { if (tapSchemaExists) {
return allSchemas; edit();
}
public String getExposedSchemas() {
return exposedSchemas;
}
public String getSelectedRadioOption() {
return selectedRadioOption;
}
public void setSelectedRadioOption(String selectedRadioOption) {
this.selectedRadioOption = selectedRadioOption;
}
public String getSelectedTAPSchema() {
return selectedTAPSchema;
}
public void setSelectedTAPSchema(String selectedTAPSchema) {
this.selectedTAPSchema = selectedTAPSchema;
}
public void selectedTAPSchemaChanged() {
try {
loadExposedSchemas();
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
public List<String> getSelectedSchemas() {
return selectedSchemas;
}
public void setSelectedSchemas(List<String> selectedSchemas) {
this.selectedSchemas = selectedSchemas;
}
public String openLoaded() {
if (loadedTapSchema.getConsistencyChecks().isInconsistent()) {
consistencyChecksBean.setDbWrapper(dbWrapper);
consistencyChecksBean.setTapSchema(loadedTapSchema);
return "consistencyChecks.xhtml?faces-redirect=true";
} else {
tapSchemaEditingBean.setTapSchema(loadedTapSchema);
return "tapSchemaEditing.xhtml?faces-redirect=true";
} }
// Otherwise create TAP_SCHEMA only if user press Ok on confirmation dialog
} }
public void edit() { public void edit() {
...@@ -202,9 +105,7 @@ public class SchemaSelectionBean implements Serializable { ...@@ -202,9 +105,7 @@ public class SchemaSelectionBean implements Serializable {
@Override @Override
public void run() { public void run() {
try { try {
DBBroker broker = DBBrokerFactory.getDBBroker(dbWrapper.getTapSchemaDataSourceWrapper()); loadedTapSchema = new TapSchema(tapCredentials.getTapSchemaVersion(), dbWrapper, tapCredentials.getTapSchemaName(), true);
String version = broker.detectVersion(selectedTAPSchema);
loadedTapSchema = new TapSchema(version, dbWrapper, selectedTAPSchema, true);
} catch (Throwable e) { } catch (Throwable e) {
LOG.error("Exception caught", e); LOG.error("Exception caught", e);
loadingError = e.getMessage(); loadingError = e.getMessage();
...@@ -227,10 +128,7 @@ public class SchemaSelectionBean implements Serializable { ...@@ -227,10 +128,7 @@ public class SchemaSelectionBean implements Serializable {
@Override @Override
public void run() { public void run() {
try { try {
loadedTapSchema = new TapSchema(version, dbWrapper, tapSchemaName, false); loadedTapSchema = new TapSchema(tapCredentials.getTapSchemaVersion(), dbWrapper, tapCredentials.getTapSchemaName(), false);
for (String schemaName : selectedSchemas) {
loadedTapSchema.addChild(schemaName);
}
} catch (Throwable e) { } catch (Throwable e) {
LOG.error("Exception caught", e); LOG.error("Exception caught", e);
if (e.getMessage() != null) { if (e.getMessage() != null) {
...@@ -245,67 +143,30 @@ public class SchemaSelectionBean implements Serializable { ...@@ -245,67 +143,30 @@ public class SchemaSelectionBean implements Serializable {
}).start(); }).start();
} }
public String getTapSchemaName() { public TapCredentials getTapCredentials() {
return tapSchemaName; return tapCredentials;
}
public void setTapSchemaName(String tapSchemaName) {
this.tapSchemaName = tapSchemaName;
}
public DBWrapper getDbWrapper() {
return dbWrapper;
}
public void setDbWrapper(DBWrapper dbWrapper) {
this.dbWrapper = dbWrapper;
}
public void validateTapSchemaName(FacesContext context, UIComponent inputComponent, Object value) {
String textValue = (String) value;
String validatorMessage = null;
if (textValue == null || textValue.isEmpty()) {
validatorMessage = "TAP_SCHEMA name is required";
} else if (!textValue.matches("^[a-zA-Z0-9_[-]]*$")) {
validatorMessage = "TAP_SCHEMA name has to be a valid table name";
} else if (allSchemas.contains(textValue)) {
validatorMessage = "Database already contains a schema with this name. Please choose another name";
}
if (validatorMessage != null) {
throw new ValidatorException(new FacesMessage(validatorMessage));
}
} }
/**
* This boolean is true when a TapSchema instance is loading.
*/
public boolean isLoading() { public boolean isLoading() {
return loading; return loading;
} }
/**
* This String is not null when an error happens while a TapSchema is
* loading.
*/
public String getLoadingError() {
return loadingError;
}
public TapSchema getLoadedTapSchema() { public TapSchema getLoadedTapSchema() {
return loadedTapSchema; return loadedTapSchema;
} }
public List<String> getVersions() { public String getLoadingError() {
return versions; return loadingError;
} }
public String getVersion() { public String openLoaded() {
return version; if (loadedTapSchema.getConsistencyChecks().isInconsistent()) {
consistencyChecksBean.setDbWrapper(dbWrapper);
consistencyChecksBean.setTapSchema(loadedTapSchema);
return "consistencyChecks.xhtml?faces-redirect=true";
} else {
tapSchemaEditingBean.setTapSchema(loadedTapSchema);
return "tapSchemaEditing.xhtml?faces-redirect=true";
} }
public void setVersion(String version) {
this.version = version;
} }
} }
...@@ -39,15 +39,15 @@ import javax.json.JsonObjectBuilder; ...@@ -39,15 +39,15 @@ import javax.json.JsonObjectBuilder;
public class TapSchemaLoaderResource { public class TapSchemaLoaderResource {
@Inject @Inject
private SchemaSelectionBean schemaSelection; private TapSchemaLoader loader;
@GET @GET
@Path("status") @Path("status")
public String getStatus() { public String getStatus() {
JsonObjectBuilder job = Json.createObjectBuilder(); JsonObjectBuilder job = Json.createObjectBuilder();
job.add("loading", schemaSelection.isLoading()); job.add("loading", loader.isLoading());
if (schemaSelection.getLoadingError() != null) { if (loader.getLoadingError() != null) {
job.add("error", schemaSelection.getLoadingError()); job.add("error", loader.getLoadingError());
} }
return job.build().toString(); return job.build().toString();
} }
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
package it.inaf.ia2.tsm.webapp; package it.inaf.ia2.tsm.webapp;
import it.inaf.ia2.tsm.webapp.env.CustomPartialResponseWriter; import it.inaf.ia2.tsm.webapp.env.CustomPartialResponseWriter;
import it.inaf.ia2.tsm.webapp.env.JSUpdateHandler;
import it.inaf.ia2.tsm.webapp.xmlconfig.UserConfiguration; import it.inaf.ia2.tsm.webapp.xmlconfig.UserConfiguration;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;
...@@ -142,13 +141,7 @@ public class UsersEditing implements Serializable { ...@@ -142,13 +141,7 @@ public class UsersEditing implements Serializable {
canSave = false; canSave = false;
} }
final String jsUpdate = String.valueOf(canSave); CustomPartialResponseWriter.getCurrentInstance().addCustomJSUpdate(String.valueOf(canSave));
CustomPartialResponseWriter.getCurrentInstance().addCustomJSUpdate(new JSUpdateHandler() {
@Override
public String getUpdate() {
return jsUpdate;
}
});
if (canSave) { if (canSave) {
if (newUser) { if (newUser) {
......
...@@ -36,7 +36,7 @@ import javax.faces.context.ResponseWriter; ...@@ -36,7 +36,7 @@ import javax.faces.context.ResponseWriter;
*/ */
public class CustomPartialResponseWriter extends PartialResponseWriter { public class CustomPartialResponseWriter extends PartialResponseWriter {
private final Map<String, JSUpdateHandler> customJSUpdates; private final Map<String, String> customJSUpdates;
public CustomPartialResponseWriter(ResponseWriter wrapped) { public CustomPartialResponseWriter(ResponseWriter wrapped) {
super(wrapped); super(wrapped);
...@@ -47,11 +47,11 @@ public class CustomPartialResponseWriter extends PartialResponseWriter { ...@@ -47,11 +47,11 @@ public class CustomPartialResponseWriter extends PartialResponseWriter {
public void endDocument() throws IOException { public void endDocument() throws IOException {
if (!customJSUpdates.isEmpty()) { if (!customJSUpdates.isEmpty()) {
startExtension(Collections.singletonMap("id", "jsupdates")); startExtension(Collections.singletonMap("id", "jsupdates"));
for (Map.Entry<String, JSUpdateHandler> entry : customJSUpdates.entrySet()) { for (Map.Entry<String, String> entry : customJSUpdates.entrySet()) {
String componentId = entry.getKey(); String componentId = entry.getKey();
startElement("jsupdate", null); startElement("jsupdate", null);
writeAttribute("src", componentId, null); writeAttribute("src", componentId, null);
write(entry.getValue().getUpdate()); write(entry.getValue());
endElement("jsupdate"); endElement("jsupdate");
} }
endExtension(); endExtension();
...@@ -60,13 +60,13 @@ public class CustomPartialResponseWriter extends PartialResponseWriter { ...@@ -60,13 +60,13 @@ public class CustomPartialResponseWriter extends PartialResponseWriter {
super.endDocument(); super.endDocument();
} }
public void addCustomJSUpdate(String componentId, JSUpdateHandler updateHandler) { public void addCustomJSUpdate(String key, String jsUpdate) {
customJSUpdates.put(componentId, updateHandler); customJSUpdates.put(key, jsUpdate);
} }
public void addCustomJSUpdate(JSUpdateHandler updateHandler) { public void addCustomJSUpdate(String jsUpdate) {
String sourceComponentId = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("javax.faces.source"); String sourceComponentId = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("javax.faces.source");
addCustomJSUpdate(sourceComponentId, updateHandler); addCustomJSUpdate(sourceComponentId, jsUpdate);
} }
public static CustomPartialResponseWriter getCurrentInstance() { public static CustomPartialResponseWriter getCurrentInstance() {
......
/*
* _____________________________________________________________________________
*
* INAF - OATS National Institute for Astrophysics - Astronomical Observatory of
* Trieste INAF - IA2 Italian Center for Astronomical Archives
* _____________________________________________________________________________
*
* Copyright (C) 2016 Istituto Nazionale di Astrofisica
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License Version 3 as published by the
* Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 51
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package it.inaf.ia2.tsm.webapp.env;
/**
*
* @author Sonia Zorba {@literal <zorba at oats.inaf.it>}
*/
public abstract class JSUpdateHandler {
public abstract String getUpdate();
}
/*
* _____________________________________________________________________________
*
* INAF - OATS National Institute for Astrophysics - Astronomical Observatory of
* Trieste INAF - IA2 Italian Center for Astronomical Archives
* _____________________________________________________________________________
*
* Copyright (C) 2017 Istituto Nazionale di Astrofisica
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License Version 3 as published by the
* Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 51
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package it.inaf.ia2.tsm.webapp.env;
import java.io.IOException;
import javax.faces.component.FacesComponent;
import javax.faces.component.UIComponentBase;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
/**
*
* @author Sonia Zorba {@literal <zorba at oats.inaf.it>}
*/
@FacesComponent(tagName = "modal", namespace = "http://ia2.inaf.it/component", createTag = true)
public class UIModal extends UIComponentBase {
public static abstract class StatusObserver {
public abstract void statusChanged(boolean isOpen);
}
@Override
public void decode(FacesContext context) {
if (getAttributes().containsKey("status-observer")) {
StatusObserver status = (StatusObserver) getAttributes().get("status-observer");
boolean open = Boolean.parseBoolean((String) getAttributes().get("open"));
status.statusChanged(open);
}
}
@Override
public String getFamily() {
return "modal";
}
@Override
public void encodeBegin(FacesContext context) throws IOException {
ResponseWriter writer = context.getResponseWriter();
writer.write("<div class=\"modal fade\" tabindex=\"-1\" role=\"dialog\" id=\"");
writer.write(getClientId());
writer.write("\">");
}
@Override
public void encodeEnd(FacesContext context) throws IOException {
ResponseWriter writer = context.getResponseWriter();
writer.write("</div>");
}
}
This diff is collapsed.
...@@ -27,8 +27,20 @@ ...@@ -27,8 +27,20 @@
init: function (l) { init: function (l) {
loading = l; loading = l;
}, },
startChecking: function (event) { openTapSchemaClicked: function (event) {
if (event.status === 'success' && $('.validation-message').length === 0) { if (event.status === 'success' && $('.validation-message').length === 0) {
var $tsExistenceEl = $(event.responseXML).find('jsupdate[src="tap_schema_existence"]');
if ($tsExistenceEl.length === 1) {
if ($tsExistenceEl.text() === 'true') {
periodicCheck();
} else {
$('#modal-confirm-ts-creation').modal('show');
}
}
}
},
tapSchemaCreationConfirmed: function (event) {
if (event.status === 'success') {
periodicCheck(); periodicCheck();
} }
} }
......
...@@ -89,7 +89,8 @@ ...@@ -89,7 +89,8 @@
// Setup loading animation // Setup loading animation
jsf.ajax.addOnEvent(function (data) { jsf.ajax.addOnEvent(function (data) {
if ($(data.source).is('input[type="text"]')) { if ($(data.source).is('input[type="text"]') ||
$(data.source).is('[data-jsf-modal]')) {
return; // special case return; // special case
} }
switch (data.status) { switch (data.status) {
......
...@@ -2,19 +2,19 @@ ...@@ -2,19 +2,19 @@
function checkSeparateCredentials() { function checkSeparateCredentials() {
var separateCredentials = $('#main\\:separate-credentials').is(':checked'); var separateCredentials = $('#main\\:separate-credentials').is(':checked');
$('#main\\:credentials-modal .modal-dialog').toggleClass('modal-lg', separateCredentials); $('#credentials-modal .modal-dialog').toggleClass('modal-lg', separateCredentials);
} }
window.credentials = { window.credentials = {
editClicked: function (event) { editClicked: function (event) {
if (event.status === 'success') { if (event.status === 'success') {
$('#main\\:credentials-modal').modal('show'); $('#credentials-modal').modal('show');
} }
}, },
credentialsSaved: function (event) { credentialsSaved: function (event) {
if (event.status === 'success') { if (event.status === 'success') {
if ($('#main\\:credentials-modal .text-danger').length === 0) { if ($('#credentials-modal .text-danger').length === 0) {
$('#main\\:credentials-modal').modal('hide'); $('#credentials-modal').modal('hide');
} }
} }
}, },
...@@ -22,21 +22,25 @@ ...@@ -22,21 +22,25 @@
if (event.status === 'success') { if (event.status === 'success') {
checkSeparateCredentials(); checkSeparateCredentials();
} }
},
openConfirmDeleteModal: function (event) {
if (event.status === 'success') {
$('#modal-confirm-credentials-deletion').modal('show');
}
},
closeConfirmDeleteModal: function (event) {
if (event.status === 'success') {
$('#modal-confirm-credentials-deletion').modal('hide');
}
} }
}; };
$(document).ready(function () { $(document).ready(function () {
$('body').on('show.bs.modal', '#main\\:credentials-modal', function ( ) { $('body').on('show.bs.modal', '#credentials-modal', function ( ) {
checkSeparateCredentials(); checkSeparateCredentials();
}); });
// $('body').on('shown.bs.modal', '#main\\:credentials-modal', function ( ) {
// $.post(TSM.getRestPath("credentialsDialog?opened=true"));
// });
// $('body').on('hidden.bs.modal', '#main\\:credentials-modal', function ( ) {
// $.post(TSM.getRestPath("credentialsDialog?opened=false"));
// });
$('body').on('keyup', '#main\\:credentials-modal input', function (event) { $('body').on('keyup', '#credentials-modal input', function (event) {
if (event.keyCode === 13) { if (event.keyCode === 13) {
$('#main\\:save-credentials').click(); $('#main\\:save-credentials').click();
event.preventDefault(); event.preventDefault();
......
<?xml version="1.0" encoding="UTF-8" ?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:composite="http://java.sun.com/jsf/composite">
<composite:interface>
<composite:attribute name="credentials" type="it.inaf.ia2.tsm.datalayer.Credentials" required="true" />
</composite:interface>
<composite:implementation>
(${cc.attrs.credentials.databaseType eq 'MYSQL' ? 'MySQL' : 'Postgres'}) ${cc.attrs.credentials.hostname}:${cc.attrs.credentials.port} ${cc.attrs.credentials.username}
</composite:implementation>
</html>
<?xml version="1.0" encoding="UTF-8" ?>
<ui:composition template="/WEB-INF/templates/master.xhtml"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:tsm_components="http://xmlns.jcp.org/jsf/composite/tsm_components">
<ui:define name="title">TASMAN - Schemata selection page</ui:define>
<ui:define name="scripts">
<h:outputScript library="js" name="ucd-editor.js"></h:outputScript>
<h:outputScript library="js" name="async-loader.js"></h:outputScript>
<script>TSM.asyncLoader.init(#{schemaSelection.loading});</script>
</ui:define>
<ui:define name="content">
<f:event listener="#{loggedInChecker.checkFromNonIndex()}" type="preRenderView" />
<f:event listener="#{schemaSelection.onPageLoad()}" type="preRenderView" />
<h:form id="main">
<tsm_components:user_navbar />
<div class="container">
<h1 class="text-center">Schemata selection page</h1>
<br/>
<f:passThroughAttribute name="autocomplete" value="off" />
<div class="panel panel-default col-sm-10 col-sm-offset-1">
<div class="panel-body">
<div class="row">
<div class="col-sm-2 text-right">
<strong>Action:</strong>
</div>
<div class="form-inline col-sm-10">
<h:selectOneRadio value="#{schemaSelection.selectedRadioOption}">
<f:selectItem itemValue="edit" itemLabel="Edit existing" />
<f:selectItem itemValue="create" itemLabel="Create new" />
<f:ajax event="click" render="main:radioPanels"></f:ajax>
</h:selectOneRadio>
</div>
</div>
<br/>
<h:panelGroup id="radioPanels">
<!-- Edit -->
<h:panelGroup rendered="#{schemaSelection.selectedRadioOption eq 'edit'}">
<div id="editContainer">
<div class="form-group">
<h:outputLabel for="selectedTAPSchema">Tap Schema:</h:outputLabel>
<h:selectOneMenu value="#{schemaSelection.selectedTAPSchema}" id="selectedTAPSchema" class="form-control">
<f:selectItems value="#{schemaSelection.allTAPSchemas}"></f:selectItems>
<f:ajax event="change" render="main:exposedSchemas" listener="#{schemaSelection.selectedTAPSchemaChanged}"></f:ajax>
</h:selectOneMenu>
</div>
<div class="form-group" id="exposedDatabasesWrapper">
<label class="control-label">Exposed databases:</label>
<p class="form-control-static" id="exposed-schemas">
<h:panelGroup id="exposedSchemas">#{schemaSelection.exposedSchemas}</h:panelGroup>
</p>
</div>
<div class="form-group">
<h:commandButton value="Edit Tapschema" class="btn btn-primary" action="#{schemaSelection.edit()}">
<f:ajax execute="@form" render="@form" onevent="TSM.asyncLoader.startChecking" />
</h:commandButton>
</div>
</div>
</h:panelGroup>
<!-- Create -->
<h:panelGroup rendered="#{schemaSelection.selectedRadioOption eq 'create'}">
<div id="createContainer">
<div class="form-group">
<h:outputLabel for="tapschemaName">Name:</h:outputLabel>
<h:inputText id="tapschemaName" value="#{schemaSelection.tapSchemaName}" class="form-control" validator="#{schemaSelection.validateTapSchemaName}" />
<h:message for="tapschemaName" class="text-danger validation-message"></h:message>
</div>
<div class="form-group">
<h:outputLabel for="tapschemaVersion">Version:</h:outputLabel>
<h:selectOneMenu id="tapschemaVersion" value="#{schemaSelection.version}" class="form-control" required="true" requiredMessage="Select version">
<f:selectItem itemValue="#{null}" itemLabel="Select..." noSelectionOption="true" />
<f:selectItems value="#{schemaSelection.versions}" var="v" itemLabel="TAP_SCHEMA #{v}" itemValue="#{v}" />
</h:selectOneMenu>
<h:message for="tapschemaVersion" class="text-danger validation-message"></h:message>
</div>
<div class="form-group">
<h:outputLabel for="selectedSchemas">Databases to expose:</h:outputLabel>
<h:selectManyListbox value="#{schemaSelection.selectedSchemas}" id="selectedSchemas" class="form-control" size="7" validatorMessage="Select at least one schema">
<f:selectItems value="#{schemaSelection.allSchemas}"></f:selectItems>
<f:validateRequired></f:validateRequired>
</h:selectManyListbox>
<h:message for="selectedSchemas" class="text-danger validation-message"></h:message>
</div>
<div class="form-group">
<h:commandButton value="Create TAP_SCHEMA" class="btn btn-primary" action="#{schemaSelection.create()}">
<f:ajax execute="@form" render="@form" onevent="TSM.asyncLoader.startChecking" />
</h:commandButton>
</div>
</div>
</h:panelGroup>
</h:panelGroup>
</div>
</div>
<ui:remove>
<div class="row">
<div class="col-sm-10 col-sm-offset-1">
<h:commandLink action="#{schemaSelection.logout()}" class="btn btn-danger pull-right" immediate="true">
<span class="glyphicon glyphicon-log-out"></span>
Close session
</h:commandLink>
</div>
</div>
</ui:remove>
</div>
<tsm_components:ucd_editor id="ucd-editor" />
</h:form>
<h:form id="async-loader" class="hide">
<h:commandButton action="#{schemaSelection.openLoaded()}" id="open-loaded" />
</h:form>
</ui:define>
</ui:composition>
\ No newline at end of file
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<h:outputScript library="js" name="edit-tapschema.js"></h:outputScript> <h:outputScript library="js" name="edit-tapschema.js"></h:outputScript>
<h:outputScript library="js" name="ucd-editor.js"></h:outputScript> <h:outputScript library="js" name="ucd-editor.js"></h:outputScript>
<h:outputScript library="js" name="async-loader.js"></h:outputScript> <h:outputScript library="js" name="async-loader.js"></h:outputScript>
<script>TSM.asyncLoader.init(#{schemaSelection.loading});</script> <script>TSM.asyncLoader.init(#{tapSchemaLoader.loading});</script>
</ui:define> </ui:define>
<ui:define name="content"> <ui:define name="content">
<f:event listener="#{loggedInChecker.checkFromNonIndex()}" type="preRenderView" /> <f:event listener="#{loggedInChecker.checkFromNonIndex()}" type="preRenderView" />
...@@ -852,7 +852,7 @@ ...@@ -852,7 +852,7 @@
</div> </div>
<h:form id="async-loader" class="hide"> <h:form id="async-loader" class="hide">
<h:commandButton action="#{schemaSelection.openLoaded()}" id="open-loaded" /> <h:commandButton action="#{tapSchemaLoader.openLoaded()}" id="open-loaded" />
</h:form> </h:form>
</ui:define> </ui:define>
</ui:composition> </ui:composition>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment