i'm trying to modify the vaadin addressbook app to a little different one with just the field names changed. but i do not know how to populate it with specific value instead of the pseudo-random as done in the vaadin tutorial example. here is my code.
private static IndexedContainer createDummyDatasource() {
IndexedContainer ic = new IndexedContainer();
for (String p : fieldNames) {
ic.addContainerProperty(p, String.class, "");
}
String[] cnumber = { "1", "2", "3" };
String[] ctitle = { "a", "b", "c" };
String[] faculty = { "xxx" };
for (int i = 0; i < 3; i++) {
Object id = ic.addItem();
ic.getContainerProperty(id, CNUMBER).setValue(cnumber[(int) (cnumber.length * Math.random())]);
ic.getContainerProperty(id, CTITLE).setValue(ctitle[(int) (ctitle.length * Math.random())]);
ic.getContainerProperty(id, FACULTY).setValue(faculty[(int) (faculty.length * Math.random())]);
}
return ic;
}
please help..!!