Hirdetés
Új hozzászólás Aktív témák
-
Taoharcos
aktív tag
Sziasztok!
Arraylist tartalmát szeretném datable segítségével megjeleníteni JSF-ben. De nem tudom mi lenne a jó megoldás. Én ezzel próbálkoztam eredménytelenül:
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package beans;
import database.Database;
import java.util.ArrayList;
/**
*
* @author Zoli
*/
public class AllWordBean {
//private int index;
ArrayList <Integer> idList;
ArrayList <String> hunList;
ArrayList <String> engList;
database.Database database = new Database();
int index;
public AllWordBean(){
database.setQuery("", true, false);
database.execQuery();
this.idList = database.getIdList();
this.hunList = database.getHunList();
this.engList = database.getEngList();
this.index = idList.size();
}
private allWordTable[] wordTable = new allWordTable[]{
for(int i = 0; i<index; i++){
new allWordTable(idList.get(index), hunList.get(index), engList.get(index));
}
};
public allWordTable[] getallWordTable(){
return wordTable;
}
public class allWordTable{
int id;
String hunw;
String engw;
public allWordTable(int id, String hunw, String engw){
this.id = id;
this.hunw = hunw;
this.engw = engw;
}
public String getEngw() {
return engw;
}
public String getHunw() {
return hunw;
}
public int getId() {
return id;
}
public int getIndex(){
return index;
}
}
}Lényegében ezzel e résszel van a bibi:
private allWordTable[] wordTable = new allWordTable[]{
for(int i = 0; i<index; i++){
new allWordTable(idList.get(index), hunList.get(index), engList.get(index));
}
};de nem tudom hogyan lehetne az arraylistet megjeleníteni jól.
Új hozzászólás Aktív témák
A topicot kiemeltem. Valaki nem akar egy nyitó hsz-t írni?:))
- GYÁRI TÖLTŐK: USB-C / DELL / LENOVO / HP / FUJITSU / TOSHIBA / Asus / Macbook /// Bp,/MPL/Foxpost
- Keresünk Galaxy S23/S23+/S23 Ultra/S23 FE
- ÁRGARANCIA!Épített KomPhone Ryzen 7 7700X 32/64GB RAM RTX 5070 12GB GAMER PC termékbeszámítással
- Xbox One / Xbox Series játékok
- Oneplus 9 128GB,Átlagos,Adatkabel,12 hónap garanciával
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
