How to fill SeparatorList or FormList
This page shows two ways how to fill separatorlist or Formlist
Java
public Response actionIndex() throws IOException, IllegalArgumentException, IllegalAccessException{
Page_home model = new Page_home();
model.load();
Page_homeView view = new Page_homeView();
/*----#start-code(index)----*/
Teste teste = new Teste();
List<Teste> lista_teste = teste.findAll();
ArrayList<Page_home.Separatorlist_1> lista_final = new ArrayList<>();
for(Teste lista: lista_teste) {
Page_home.Separatorlist_1 separa = new Page_home.Separatorlist_1();
separa.setMae(new Pair(lista.getMae(),lista.getMae()));
separa.setPai(new Pair(lista.getPai(),lista.getPai()));
separa.setIdade(new Pair(lista.getIdade()+"",lista.getIdade()+""));
separa.setNome(new Pair(lista.getNome(),lista.getNome()));
lista_final.add(separa);
}
model.setSeparatorlist_1(lista_final);
/*----#end-code----*/
view.setModel(model);
return this.renderView(view);
}
SQL



Last updated