htmlResult.append("<div id='result" + questionId + "'>");
//htmlResult.append("<h2>" + question.getDescription() + "</h2>");
htmlResult.append("<table class='poll-result-table'>");
for (int i = 0; i < choices.size(); i++) {
PollsChoice choice = (PollsChoice) choices.get(i);
int choiceVotes = pollsAPI.getChoiceVotes(questionId, choice
.getChoiceId());
double votesPercent = 0.0;
if (totalVotes > 0) {
votesPercent = (double) choiceVotes / totalVotes;
}
htmlResult.append("<tr>");
htmlResult.append("<td colspan=4 class='poll-question'>");
htmlResult.append(choice.getDescription());
htmlResult.append("</td>");
htmlResult.append("</tr>");
htmlResult.append("<tr>");
htmlResult.append("<td class='poll-percents'>");
htmlResult.append(percentFormat.format(votesPercent));