setModel(new ListModel<Question>(questionService.getQuestionsByUser(userId)));
}
@Override
protected void populateItem(ListItem<Question> item) {
Question q = (Question)item.getModelObject();
boolean isCurrent = q.equals(current);
BookmarkablePageLink<WebPage> link = new BookmarkablePageLink<WebPage>("link", linkPage);
item.add(link);
link.setParameter("question", q.getId());
link.setParameter("callingPageName", ((ISIStandardPage) getPage()).getPageName());
link.add(new Label("text", q.getText()));
link.setPopupSettings(popupSettings);
if (isCurrent)
link.setEnabled(false);
if (q.getOwner() != null) {
if (isCurrent) {
link.add(new SimpleAttributeModifier("class", "selected"));
}
else
item.add(new SimpleAttributeModifier("class", "questionP"));