dao.fillMessagesList(user, recordsData, ptForm);
Iterator it = recordsData.getRecords().iterator();
boolean attachEnabled = Configurator.getInstance().getBoolean(
IConst.CONFIG.ENABLE_FILE_UPLOAD);
if (it.hasNext()) {
Message mess = (Message) it.next();
currThread.setSubject(mess.getHeading());
mess.setSenderInfo(userdao.getSenderInfo(mess.getSender()));
if (attachEnabled) {
mess.setAttachments(dao.getAttachmentsInfo(mess.getId()));
}
} else {
return (new ActionForward("/ShowForum.do?fid="
+ ptForm.getFid(), true));
}
while (it.hasNext()) {
Message mess = (Message) it.next();
mess.setSenderInfo(userdao.getSenderInfo(mess.getSender()));
if (attachEnabled) {
mess.setAttachments(dao.getAttachmentsInfo(mess.getId()));
}
}
request.setAttribute(IConst.REQUEST.RECORDS_DATA, recordsData);
request.setAttribute(IConst.REQUEST.CURR_THREAD, currThread);