List of usage examples for javax.servlet.jsp JspWriter newLine
abstract public void newLine() throws IOException;
From source file:fll.web.scoreEntry.ScoreEntry.java
/** * Generate the score entry form./*www . j a v a 2 s . c o m*/ */ public static void generateScoreEntry(final JspWriter writer, final ServletContext application) throws IOException { final ChallengeDescription description = ApplicationAttributes.getChallengeDescription(application); final Formatter formatter = new Formatter(writer); String prevCategory = null; final PerformanceScoreCategory performanceElement = description.getPerformance(); for (final AbstractGoal goalEle : performanceElement.getGoals()) { final String name = goalEle.getName(); final String title = goalEle.getTitle(); final String category = goalEle.getCategory(); try { if (!StringUtils.equals(prevCategory, category)) { writer.println("<tr><td colspan='5'> </td></tr>"); if (!StringUtils.isEmpty(category)) { writer.println("<tr><td colspan='5' class='center'><b>" + category + "</b></td></tr>"); } } writer.println("<!-- " + name + " -->"); writer.println("<tr>"); writer.println(" <td>"); writer.println(" <font size='3'><b>" + title + ":</b></font>"); writer.println(" </td>"); if (goalEle.isComputed()) { writer.println(" <td colspan='2' align='center'><b>Computed Goal</b></td>"); } else { if (goalEle.isEnumerated()) { // enumerated writer.println(" <td>"); generateEnumeratedGoalButtons(goalEle, name, writer); writer.println(" </td>"); } else { writer.println(" <td>"); generateSimpleGoalButtons(goalEle, name, writer); writer.println(" </td>"); } // end simple goal } // goal // computed score writer.println(" <td align='right'>"); writer.println(" <input type='text' name='score_" + name + "' size='3' align='right' readonly tabindex='-1'>"); writer.println(" </td>"); // error message formatter.format(" <td class='error score-error' id='error_%s'> </td>%n", name); writer.println("</tr>"); writer.println("<!-- end " + name + " -->"); writer.newLine(); } catch (final ParseException pe) { throw new RuntimeException("FATAL: min/max not parsable for goal: " + name); } prevCategory = category; } // end foreach child of performance }