PollsQuestion question = null;
try {
question = PollsQuestionManagerUtil.getQuestion(questionId);
PollsDisplay display =
PollsDisplayManagerUtil.updateDisplay(config.getPortletName(),
question.getQuestionId());
PortletAction pa = (PortletAction)InstancePool.get(
ViewAction.class.getName());
return pa.render(mapping, form, config, req, res);
}
catch (NoSuchQuestionException nsne) {
req.removeAttribute(WebKeys.POLLS_DISPLAY);
SessionErrors.add(
req, NoSuchQuestionException.class.getName());
}
}
else {
try {
PollsDisplay display = PollsDisplayManagerUtil.getDisplay(config.getPortletName());
req.setAttribute(WebKeys.POLLS_DISPLAY, display);
}
catch (NoSuchDisplayException nsde) {
req.removeAttribute(WebKeys.POLLS_DISPLAY);