if (responseMap.size() == 0) {
rootContainer.add(new WebMarkupContainer("pageListing").setVisible(false));
} else {
enableNames = true;
noData.setVisible(false);
RepeatingView pageListing = new RepeatingView("pageListing");
rootContainer.add(pageListing);
for (ISIXmlSection sec : responseMap.keySet()) {
WebMarkupContainer pageItem = new WebMarkupContainer(pageListing.newChildId());
pageItem.setOutputMarkupId(true);
pageListing.add(pageItem);
RepeatingView questionListing = new RepeatingView("questionListing");
pageItem.add(questionListing);
SortedMap<ISIPrompt, List<ISIResponse>> promptResponseMap = responseMap.get(sec);
for (ISIPrompt isiprompt : promptResponseMap.keySet()) {
List<ISIResponse> responseList = promptResponseMap.get(isiprompt);
WebMarkupContainer questionItem = new WebMarkupContainer(questionListing.newChildId());
questionItem.setOutputMarkupId(true);
questionListing.add(questionItem);
BookmarkablePageLink<ISIStandardPage> titleLink = new SectionLinkFactory().linkToPage("titleLink", sec);
titleLink.add(ISIApplication.get().iconFor(sec.getSectionAncestor()));
questionItem.add(titleLink);
questionItem.add(new StudentScorePanel("responseScore", getModels(responseList)));
questionItem.add(factory.makeQuestionTextComponent("questionText", isiprompt));
RepeatingView responses = new RepeatingView("responseListing");
questionItem.add(responses);
for (ISIResponse response : responseList) {
WebMarkupContainer responseItem = new WebMarkupContainer(responses.newChildId());
responseItem.setOutputMarkupId(true);
responses.add(responseItem);
responseItem.add(new WebMarkupContainer("responseAnchor")
.add(new SimpleAttributeModifier("name", String.valueOf(response.getId()))));
responseItem.add(new ResponseViewerFactory().makeResponseViewComponent("response", new HibernateObjectModel<ISIResponse>(Response.class, response.getId())));
// Remove from Whiteboard link