- boolean failed;
-
- protected void outputError(PrintWriter out, ServletRequest req, String text, Object... contents) {
- if ( !failed) {
- failed = true;
- out.println("<div class='formError'>");
- }
- out.print("<div>");
- if (contents.length == 0) {
- out.print(Page.translate(req, text));
- } else {
- out.print(String.format(Page.translate(req, text), contents));
- }
- out.println("</div>");
- }
-
- protected void outputErrorPlain(PrintWriter out, String text) {
- if ( !failed) {
- failed = true;
- out.println("<div class='formError'>");
- }
- out.print("<div>");
- out.print(text);
- out.println("</div>");
- }
-
- public boolean isFailed(PrintWriter out) {
- if (failed) {
- out.println("</div>");
- }
- return failed;
- }
-