/** * Initialize the topic list when a keyword is selected. The last topic selected for the keyword * is automatically selected. */ @EventHandler(value = "change", target = "@lstKeywords") private void onSelect$lstKeywords() { Listitem item = lstKeywords.getSelectedItem(); if (item == null) { lstTopics.destroyChildren(); setTopic(null); return; } List<HelpTopic> topics = getTopics(item.getLabel()); if (!item.hasAttribute("sorted")) { item.setAttribute("sorted", true); Collections.sort(topics); } modelAndView.setModel(new ListModel<>(topics)); onSelect$lstTopics(); }