Ú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?:))
- Easun iSolar SMW 11kW Twin Hibrid inverter // Dupla MPPT // BMS // WiFi
- GAMER PC : RYZEN 7 5700G/// 32 GB DDR4 /// RX 6700 XT 12 GB /// 512 GB NVME
- GAMER MSI LAPTOP : 15,6" 144 HZ /// i5 12450H /// 16GB DDR4/// RTX 4050 6GB/// 1TB NVME
- Manfrotto 055 magnézium fotó-videófej Q5 gyorskioldóval
- Sony ECM-W2BT
- Bomba ár! Lenovo ThinkPad P50 - i7-HQ I 16GB I 256SSD I Nvidia I 15,6" FHD I Cam I W10 I Gari!
- Motorola E40 64GB, Kártyafüggetlen, 1 Év Garanciával
- Telefon felvásárlás!! Apple iPhone 16, Apple iPhone 16e, Apple iPhone 16 Plus, Apple iPhone 16 Pro
- AKCIÓ! Apple Macbook Pro 16" 2019 i9 9980HK 64GB DDR4 1TB SSD Radeon Pro 5500M garanciával
- Xiaomi Redmi Note 13 256GB, Kártyafüggetlen, 1 Év Garanciával
Állásajánlatok
Cég: CAMERA-PRO Hungary Kft
Város: Budapest
Cég: PC Trade Systems Kft.
Város: Szeged