use of com.joliciel.jochre.web.DocumentController.AuthorListItemRenderer in project jochre by urieli.
the class UpdateDocumentController method doAfterCompose.
@Override
public void doAfterCompose(Window window) throws Exception {
super.doAfterCompose(window);
Session session = Sessions.getCurrent();
User user = (User) session.getAttribute(LoginController.SESSION_JOCHRE_USER);
if (user == null)
Executions.sendRedirect("login.zul");
DocumentDao documentDao = DocumentDao.getInstance(jochreSession);
List<Author> authors = documentDao.findAuthors();
List<Comboitem> authorItems = cmbAuthors.getItems();
for (Author author : authors) {
Comboitem item = new Comboitem(author.getFullName());
item.setValue(author.getId());
authorItems.add(item);
}
lstAuthors.setItemRenderer(new AuthorListItemRenderer());
winUpdateDocument.addEventListener("onModalOpen", new UpdateDocumentControllerModalListener());
}
Aggregations