1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
| @ManagedBean (name="SelectTableBean")
@SessionScoped
public class SelectTableBean implements Serializable
{
int i = 0;
String choixS;
String TableName;
private List<SelectItem> maValeur = new ArrayList<SelectItem>();
private List<String> tablesStringSource = new ArrayList<String>();
public List<SelectItem> getTables() throws SQLException
{
return ConnectionBean.moDatabaseConnection.getMyElements();
}
public List<SelectItem> getColumnsTables( String T) throws SQLException
{
return ConnectionBean.moDatabaseConnection.getMyColumns(T);
}
public String getTableName() {
return TableName;
}
public void setTableName(String TableName) {
this.TableName = TableName;
}
public String getChoixS() {
return choixS;
}
public void setChoixS(String choixS) {
this.maValeur.add(new SelectItem(choixS));
this.tablesStringSource.add(choixS);
}
public List<SelectItem> getMaValeur() {
return maValeur;
}
public void setMaValeur(List<SelectItem> maValeur) {
this.maValeur = maValeur;
}
public List<String> getTablesStringSource() {
return tablesStringSource;
}
public void setTablesStringSource(List<String> tablesStringSource) {
this.tablesStringSource = tablesStringSource;
}
} |