View Full Version : problem in viewing textArea in a grid

14 Jun 2010, 7:35 AM
hello every one,
i want to view textAreas in a grid of one column, i initialized two of this textArea and the others i want to be empty,
i used a for loop but the problem is i can see just the first text area

//grid with one column and 5 lines
final com.google.gwt.user.client.ui.Grid missionGrid = new com.google.gwt.user.client.ui.Grid(5, 1);

// the initialized two text area
final TextArea m1 = new TextArea();
m1.setValue("Jardinage, 1h, Mme Dupont");
final TextArea m2 = new TextArea();
m2.setValue("Repassage, 2h, Mr Durand");
List<TextArea> mNonAffectes = new ArrayList<TextArea>();

// folow the grid with text area

for(int i = 0; i< missionGrid.getRowCount() ; i++){

for (int j= 0; j < mNonAffectes.size(); j++){
missionGrid.setWidget(i, 0, mNonAffectes.get(j));
i++ ;
i know that the problem is in the for loop but i don't know where :">,
if you can help me