protected void init(WebRoomService.OverviewResult overview) { RoomsGrid active = new RoomsGrid(); active.setModel(new SimpleDataModel<RoomInfo>(overview.activeRooms), 0); add(new TongueBox(_msgs.activeRooms(), active)); RoomsGrid cool = new RoomsGrid(); cool.setModel(new SimpleDataModel<RoomInfo>(overview.coolRooms), 0); add(new TongueBox(_msgs.coolRooms(), cool)); // give a title to each contest winning room based on its location in the list for (int ii = 0; ii < overview.winningRooms.size(); ii++) { RoomInfo room = overview.winningRooms.get(ii); if (ii == 0) { room.winnerRank = _msgs.winnerFirst(); } else if (ii == 1) { room.winnerRank = _msgs.winnerSecond(); } else if (ii == 2) { room.winnerRank = _msgs.winnerThird(); } else if (ii < 8) { room.winnerRank = _msgs.winnerHonorable(); } else { room.winnerRank = _msgs.winnerOther(); } } RoomsGrid winners = new RoomsGrid(); winners.setModel(new SimpleDataModel<RoomInfo>(overview.winningRooms), 0); add(new TongueBox(_msgs.winningRooms(), winners)); }