Loading src/java/it/inaf/oats/ia2/tap/utils/AjaxCheckBox.java +2 −2 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ public class AjaxCheckBox extends CheckBox { public AjaxCheckBox(String id, IModel model) { super(id, model); /* OnChangeAjaxBehavior onChangeAjaxBehavior = new OnChangeAjaxBehavior() { //onUpdate is never called: because is it covered by another behavior? Loading Loading @@ -63,7 +63,7 @@ public class AjaxCheckBox extends CheckBox { } }; add(onChangeAjaxBehavior); */ } public String getIdString() Loading src/java/it/inaf/oats/ia2/tap/utils/AjaxTextField.java +26 −12 Original line number Diff line number Diff line Loading @@ -7,7 +7,6 @@ package it.inaf.oats.ia2.tap.utils; import it.inaf.oats.ia2.tap.utils.tapschema.Column; import it.inaf.oats.ia2.tap.utils.tapschema.Schema; import it.inaf.oats.ia2.tap.utils.tapschema.Table; import it.inaf.oats.ia2.tap.utils.tapschema.TapSchema; import java.util.ArrayList; import java.util.Iterator; import java.util.List; Loading Loading @@ -37,17 +36,16 @@ public class AjaxTextField extends TextField { protected void onUpdate(AjaxRequestTarget target) { SchemaPage schemaPage = (SchemaPage)getPage(); String idString = getIdString(); String[] idSplit = getIdString().split("-"); if (idSplit.length == 2) //if schema TextField { //get current SchemaPanel SchemaPanel schemaPanel = (SchemaPanel)schemaPage.schemataTabbedPanel .get("panel"); //set selectSchemaCheckBox schemaPanel.selectSchemaCheckBox.setModelObject(true); String idString2 = schemaPanel.selectSchemaCheckBox.getIdString(); String[] idSplit2 = schemaPanel.selectSchemaCheckBox.getIdString().split("-"); if (idSplit2[1].equals("checked")) { Loading @@ -56,8 +54,9 @@ public class AjaxTextField extends TextField { = (boolean)schemaPanel.selectSchemaCheckBox.getModelObject(); } target.add(schemaPanel.selectSchemaCheckBox); //end set selectSchemaCheckBox //end setting selectSchemaCheckBox //set variable "checked" in the correct schema of tapschema structure for (Schema schema : schemaPage.tapschema.schemasMap.values()) { if (schema.schema_name.equals( Loading @@ -66,7 +65,9 @@ public class AjaxTextField extends TextField { schema.checked = true; } } //end setting variable "checked" //set variables "utype" and "description" in the correct schema of tapschema structure if (idSplit[1].equals("utype")) { schemaPage.tapschema.schemasMap.get(idSplit[0]) Loading @@ -79,9 +80,11 @@ public class AjaxTextField extends TextField { .description = (String)getModelObject(); } //end setting variables "utype" and "description" } else if (idSplit.length == 3) //if table TextField { //get current SchemaPanel and TablePanel SchemaPanel schemaPanel = (SchemaPanel)schemaPage.schemataTabbedPanel .get("panel"); Loading @@ -91,7 +94,6 @@ public class AjaxTextField extends TextField { //set selectTableCheckBox tablePanel.selectTableCheckBox.setModelObject(true); String idString2 = tablePanel.selectTableCheckBox.getIdString(); String[] idSplit2 = tablePanel.selectTableCheckBox.getIdString().split("-"); if (idSplit2[2].equals("checked")) { Loading @@ -101,11 +103,10 @@ public class AjaxTextField extends TextField { = (boolean)tablePanel.selectTableCheckBox.getModelObject(); } target.add(tablePanel.selectTableCheckBox); //end set selectTableCheckBox //end setting selectTableCheckBox //set selectSchemaCheckBox schemaPanel.selectSchemaCheckBox.setModelObject(true); idString2 = schemaPanel.selectSchemaCheckBox.getIdString(); idSplit2 = schemaPanel.selectSchemaCheckBox.getIdString().split("-"); if (idSplit2[1].equals("checked")) { Loading @@ -114,8 +115,9 @@ public class AjaxTextField extends TextField { = (boolean)schemaPanel.selectSchemaCheckBox.getModelObject(); } target.add(schemaPanel.selectSchemaCheckBox); //end set selectSchemaCheckBox //end setting selectSchemaCheckBox //set variable "checked" in the correct schema of tapschema structure for (Schema schema : schemaPage.tapschema.schemasMap.values()) { if (schema.schema_name.equals( Loading @@ -124,7 +126,9 @@ public class AjaxTextField extends TextField { schema.checked = true; } } //end setting variable "checked" //set variable "checked" in the correct table of tapschema structure for (Table table : schemaPage.tapschema.schemasMap.get(idSplit[0]) .tablesMap.values()) { Loading @@ -135,7 +139,9 @@ public class AjaxTextField extends TextField { table.checked = true; } } //end setting variable "checked" //set variables "utype" and "description" in the correct table of tapschema structure if (idSplit[2].equals("utype")) { schemaPage.tapschema.schemasMap.get(idSplit[0]) Loading @@ -151,6 +157,7 @@ public class AjaxTextField extends TextField { = (String)getModelObject(); } //end setting variables "utype" and "description" } else if (idSplit.length == 4) //if DataGridView TextField { Loading @@ -175,6 +182,7 @@ public class AjaxTextField extends TextField { } } //get current SchemaPanel, TablePanel, DataGridView SchemaPanel schemaPanel = (SchemaPanel)schemaPage.schemataTabbedPanel .get("panel"); Loading Loading @@ -203,7 +211,6 @@ public class AjaxTextField extends TextField { //set selectTableCheckBox tablePanel.selectTableCheckBox.setModelObject(true); String idString2 = tablePanel.selectTableCheckBox.getIdString(); String[] idSplit2 = tablePanel.selectTableCheckBox.getIdString().split("-"); if (idSplit2[2].equals("checked")) { Loading @@ -217,7 +224,6 @@ public class AjaxTextField extends TextField { //set selectSchemaCheckBox schemaPanel.selectSchemaCheckBox.setModelObject(true); idString2 = schemaPanel.selectSchemaCheckBox.getIdString(); idSplit2 = schemaPanel.selectSchemaCheckBox.getIdString().split("-"); if (idSplit2[1].equals("checked")) { Loading @@ -226,13 +232,14 @@ public class AjaxTextField extends TextField { = (boolean)schemaPanel.selectSchemaCheckBox.getModelObject(); } target.add(schemaPanel.selectSchemaCheckBox); //end set selectSchemaCheckBox //end setting selectSchemaCheckBox break; } } //end set row CheckBox //end setting row CheckBox //set variable "checked" in the correct schema of tapschema structure for (Schema schema : schemaPage.tapschema.schemasMap.values()) { if (schema.schema_name.equals( Loading @@ -241,7 +248,9 @@ public class AjaxTextField extends TextField { schema.checked = true; } } //end setting variable "checked" //set variable "checked" in the correct table of tapschema structure for (Table table : schemaPage.tapschema.schemasMap.get(idSplit[0]) .tablesMap.values()) { Loading @@ -252,7 +261,9 @@ public class AjaxTextField extends TextField { table.checked = true; } } //end setting variable "checked" //set variable "checked" in the correct column of tapschema structure for (Column column : schemaPage.tapschema.schemasMap.get(idSplit[0]) .tablesMap.get(idSplit[1]) .columnsMap.values()) Loading @@ -266,7 +277,9 @@ public class AjaxTextField extends TextField { column.checked = true; } } //end setting variable "checked" //set variables in the correct column of tapschema structure if (idSplit[3].equals("table_name")) { schemaPage.tapschema.schemasMap.get(idSplit[0]) Loading Loading @@ -355,6 +368,7 @@ public class AjaxTextField extends TextField { .std = (Integer)getModelObject(); } //end setting variables } //if length } //end onUpdate }; Loading src/java/it/inaf/oats/ia2/tap/utils/Application.java +0 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,6 @@ public class Application extends WebApplication { //return Index.class; //return HomePage.class; return CredentialPage.class; //return ProvaPage.class; } Loading src/java/it/inaf/oats/ia2/tap/utils/CredentialPage.java +0 −6 Original line number Diff line number Diff line Loading @@ -6,13 +6,8 @@ package it.inaf.oats.ia2.tap.utils; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; import java.util.ArrayList; import java.util.List; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.markup.html.form.PasswordTextField; Loading Loading @@ -142,7 +137,6 @@ public class CredentialPage extends BasePage { } catch (Exception exception) { //infoTextArea.setModelObject((String)exception.getMessage()); exception.printStackTrace(); } } Loading src/java/it/inaf/oats/ia2/tap/utils/HomePage.java +2 −2 Original line number Diff line number Diff line Loading @@ -179,7 +179,7 @@ public class HomePage extends BasePage { Collection<String> selectedDatabases = schemataListChoice.getModelObject(); for (String databaseName : selectedDatabases) { updateTapSchema.populateTapSchemaDatabase(server, port, username, password, tapschemaName, databaseName); //updateTapSchema.populateTapSchemaDatabase(server, port, username, password, tapschemaName, databaseName); } loadSchemata(target, form); Loading Loading @@ -233,7 +233,7 @@ public class HomePage extends BasePage { Collection<String> selectedDatabases = schemataListChoice.getModelObject(); for (String databaseName : selectedDatabases) { updateTapSchema.populateTapSchemaDatabase(server, port, username, password, tapschemaName, databaseName); //updateTapSchema.populateTapSchemaDatabase(server, port, username, password, tapschemaName, databaseName); } loadSchemata(target, form); Loading Loading
src/java/it/inaf/oats/ia2/tap/utils/AjaxCheckBox.java +2 −2 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ public class AjaxCheckBox extends CheckBox { public AjaxCheckBox(String id, IModel model) { super(id, model); /* OnChangeAjaxBehavior onChangeAjaxBehavior = new OnChangeAjaxBehavior() { //onUpdate is never called: because is it covered by another behavior? Loading Loading @@ -63,7 +63,7 @@ public class AjaxCheckBox extends CheckBox { } }; add(onChangeAjaxBehavior); */ } public String getIdString() Loading
src/java/it/inaf/oats/ia2/tap/utils/AjaxTextField.java +26 −12 Original line number Diff line number Diff line Loading @@ -7,7 +7,6 @@ package it.inaf.oats.ia2.tap.utils; import it.inaf.oats.ia2.tap.utils.tapschema.Column; import it.inaf.oats.ia2.tap.utils.tapschema.Schema; import it.inaf.oats.ia2.tap.utils.tapschema.Table; import it.inaf.oats.ia2.tap.utils.tapschema.TapSchema; import java.util.ArrayList; import java.util.Iterator; import java.util.List; Loading Loading @@ -37,17 +36,16 @@ public class AjaxTextField extends TextField { protected void onUpdate(AjaxRequestTarget target) { SchemaPage schemaPage = (SchemaPage)getPage(); String idString = getIdString(); String[] idSplit = getIdString().split("-"); if (idSplit.length == 2) //if schema TextField { //get current SchemaPanel SchemaPanel schemaPanel = (SchemaPanel)schemaPage.schemataTabbedPanel .get("panel"); //set selectSchemaCheckBox schemaPanel.selectSchemaCheckBox.setModelObject(true); String idString2 = schemaPanel.selectSchemaCheckBox.getIdString(); String[] idSplit2 = schemaPanel.selectSchemaCheckBox.getIdString().split("-"); if (idSplit2[1].equals("checked")) { Loading @@ -56,8 +54,9 @@ public class AjaxTextField extends TextField { = (boolean)schemaPanel.selectSchemaCheckBox.getModelObject(); } target.add(schemaPanel.selectSchemaCheckBox); //end set selectSchemaCheckBox //end setting selectSchemaCheckBox //set variable "checked" in the correct schema of tapschema structure for (Schema schema : schemaPage.tapschema.schemasMap.values()) { if (schema.schema_name.equals( Loading @@ -66,7 +65,9 @@ public class AjaxTextField extends TextField { schema.checked = true; } } //end setting variable "checked" //set variables "utype" and "description" in the correct schema of tapschema structure if (idSplit[1].equals("utype")) { schemaPage.tapschema.schemasMap.get(idSplit[0]) Loading @@ -79,9 +80,11 @@ public class AjaxTextField extends TextField { .description = (String)getModelObject(); } //end setting variables "utype" and "description" } else if (idSplit.length == 3) //if table TextField { //get current SchemaPanel and TablePanel SchemaPanel schemaPanel = (SchemaPanel)schemaPage.schemataTabbedPanel .get("panel"); Loading @@ -91,7 +94,6 @@ public class AjaxTextField extends TextField { //set selectTableCheckBox tablePanel.selectTableCheckBox.setModelObject(true); String idString2 = tablePanel.selectTableCheckBox.getIdString(); String[] idSplit2 = tablePanel.selectTableCheckBox.getIdString().split("-"); if (idSplit2[2].equals("checked")) { Loading @@ -101,11 +103,10 @@ public class AjaxTextField extends TextField { = (boolean)tablePanel.selectTableCheckBox.getModelObject(); } target.add(tablePanel.selectTableCheckBox); //end set selectTableCheckBox //end setting selectTableCheckBox //set selectSchemaCheckBox schemaPanel.selectSchemaCheckBox.setModelObject(true); idString2 = schemaPanel.selectSchemaCheckBox.getIdString(); idSplit2 = schemaPanel.selectSchemaCheckBox.getIdString().split("-"); if (idSplit2[1].equals("checked")) { Loading @@ -114,8 +115,9 @@ public class AjaxTextField extends TextField { = (boolean)schemaPanel.selectSchemaCheckBox.getModelObject(); } target.add(schemaPanel.selectSchemaCheckBox); //end set selectSchemaCheckBox //end setting selectSchemaCheckBox //set variable "checked" in the correct schema of tapschema structure for (Schema schema : schemaPage.tapschema.schemasMap.values()) { if (schema.schema_name.equals( Loading @@ -124,7 +126,9 @@ public class AjaxTextField extends TextField { schema.checked = true; } } //end setting variable "checked" //set variable "checked" in the correct table of tapschema structure for (Table table : schemaPage.tapschema.schemasMap.get(idSplit[0]) .tablesMap.values()) { Loading @@ -135,7 +139,9 @@ public class AjaxTextField extends TextField { table.checked = true; } } //end setting variable "checked" //set variables "utype" and "description" in the correct table of tapschema structure if (idSplit[2].equals("utype")) { schemaPage.tapschema.schemasMap.get(idSplit[0]) Loading @@ -151,6 +157,7 @@ public class AjaxTextField extends TextField { = (String)getModelObject(); } //end setting variables "utype" and "description" } else if (idSplit.length == 4) //if DataGridView TextField { Loading @@ -175,6 +182,7 @@ public class AjaxTextField extends TextField { } } //get current SchemaPanel, TablePanel, DataGridView SchemaPanel schemaPanel = (SchemaPanel)schemaPage.schemataTabbedPanel .get("panel"); Loading Loading @@ -203,7 +211,6 @@ public class AjaxTextField extends TextField { //set selectTableCheckBox tablePanel.selectTableCheckBox.setModelObject(true); String idString2 = tablePanel.selectTableCheckBox.getIdString(); String[] idSplit2 = tablePanel.selectTableCheckBox.getIdString().split("-"); if (idSplit2[2].equals("checked")) { Loading @@ -217,7 +224,6 @@ public class AjaxTextField extends TextField { //set selectSchemaCheckBox schemaPanel.selectSchemaCheckBox.setModelObject(true); idString2 = schemaPanel.selectSchemaCheckBox.getIdString(); idSplit2 = schemaPanel.selectSchemaCheckBox.getIdString().split("-"); if (idSplit2[1].equals("checked")) { Loading @@ -226,13 +232,14 @@ public class AjaxTextField extends TextField { = (boolean)schemaPanel.selectSchemaCheckBox.getModelObject(); } target.add(schemaPanel.selectSchemaCheckBox); //end set selectSchemaCheckBox //end setting selectSchemaCheckBox break; } } //end set row CheckBox //end setting row CheckBox //set variable "checked" in the correct schema of tapschema structure for (Schema schema : schemaPage.tapschema.schemasMap.values()) { if (schema.schema_name.equals( Loading @@ -241,7 +248,9 @@ public class AjaxTextField extends TextField { schema.checked = true; } } //end setting variable "checked" //set variable "checked" in the correct table of tapschema structure for (Table table : schemaPage.tapschema.schemasMap.get(idSplit[0]) .tablesMap.values()) { Loading @@ -252,7 +261,9 @@ public class AjaxTextField extends TextField { table.checked = true; } } //end setting variable "checked" //set variable "checked" in the correct column of tapschema structure for (Column column : schemaPage.tapschema.schemasMap.get(idSplit[0]) .tablesMap.get(idSplit[1]) .columnsMap.values()) Loading @@ -266,7 +277,9 @@ public class AjaxTextField extends TextField { column.checked = true; } } //end setting variable "checked" //set variables in the correct column of tapschema structure if (idSplit[3].equals("table_name")) { schemaPage.tapschema.schemasMap.get(idSplit[0]) Loading Loading @@ -355,6 +368,7 @@ public class AjaxTextField extends TextField { .std = (Integer)getModelObject(); } //end setting variables } //if length } //end onUpdate }; Loading
src/java/it/inaf/oats/ia2/tap/utils/Application.java +0 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,6 @@ public class Application extends WebApplication { //return Index.class; //return HomePage.class; return CredentialPage.class; //return ProvaPage.class; } Loading
src/java/it/inaf/oats/ia2/tap/utils/CredentialPage.java +0 −6 Original line number Diff line number Diff line Loading @@ -6,13 +6,8 @@ package it.inaf.oats.ia2.tap.utils; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; import java.util.ArrayList; import java.util.List; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.markup.html.form.PasswordTextField; Loading Loading @@ -142,7 +137,6 @@ public class CredentialPage extends BasePage { } catch (Exception exception) { //infoTextArea.setModelObject((String)exception.getMessage()); exception.printStackTrace(); } } Loading
src/java/it/inaf/oats/ia2/tap/utils/HomePage.java +2 −2 Original line number Diff line number Diff line Loading @@ -179,7 +179,7 @@ public class HomePage extends BasePage { Collection<String> selectedDatabases = schemataListChoice.getModelObject(); for (String databaseName : selectedDatabases) { updateTapSchema.populateTapSchemaDatabase(server, port, username, password, tapschemaName, databaseName); //updateTapSchema.populateTapSchemaDatabase(server, port, username, password, tapschemaName, databaseName); } loadSchemata(target, form); Loading Loading @@ -233,7 +233,7 @@ public class HomePage extends BasePage { Collection<String> selectedDatabases = schemataListChoice.getModelObject(); for (String databaseName : selectedDatabases) { updateTapSchema.populateTapSchemaDatabase(server, port, username, password, tapschemaName, databaseName); //updateTapSchema.populateTapSchemaDatabase(server, port, username, password, tapschemaName, databaseName); } loadSchemata(target, form); Loading