ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adri...@apache.org
Subject svn commit: r662123 [1/6] - in /ofbiz/trunk/framework/widget/src/org/ofbiz/widget: ./ fo/ form/ html/ menu/ screen/ text/ tree/ xml/
Date Sun, 01 Jun 2008 01:50:42 GMT
Author: adrianc
Date: Sat May 31 18:50:41 2008
New Revision: 662123

URL: http://svn.apache.org/viewvc?rev=662123&view=rev
Log:
Screen Widget refactor - changed StringBuffer arguments to Writer arguments to help make the screen widget API more consistent. Also added some parameterized data types to cut down on the unchecked warnings.

There are no functional changes to the screen widgets.

Modified:
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelWidget.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/fo/FoFormRenderer.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/fo/FoScreenRenderer.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/FormStringRenderer.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelForm.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/ModelFormField.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormWrapper.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuRendererImage.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlMenuWrapper.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlTreeRenderer.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlWidgetRenderer.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/MenuStringRenderer.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenu.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuAction.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuCondition.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/menu/ModelMenuItem.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/HtmlWidget.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/IterateSectionWidget.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreen.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenAction.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenCondition.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ScreenStringRenderer.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/text/TextFormRenderer.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/text/TextScreenRenderer.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTree.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeAction.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/ModelTreeCondition.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/tree/TreeStringRenderer.java
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/xml/XmlFormRenderer.java

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelWidget.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelWidget.java?rev=662123&r1=662122&r2=662123&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelWidget.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/ModelWidget.java Sat May 31 18:50:41 2008
@@ -92,7 +92,7 @@
      * Enables/disables boundary comments for this widget.
      * @param context The screen rendering context
      */
-    public void setWidgetBoundaryComments(Map context) {
+    public void setWidgetBoundaryComments(Map<String, Object> context) {
         enableWidgetBoundaryComments = widgetBoundaryCommentsEnabled((Map) context.get("parameters"));
     }
 

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java?rev=662123&r1=662122&r2=662123&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java Sat May 31 18:50:41 2008
@@ -18,7 +18,10 @@
  *******************************************************************************/
 package org.ofbiz.widget;
 
+import java.io.IOException;
+import java.io.Writer;
 import java.util.Map;
+
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -34,80 +37,82 @@
 
     public WidgetWorker () {}
 
-    public static void buildHyperlinkUrl(StringBuffer buffer, String requestName, String targetType, HttpServletRequest request, HttpServletResponse response, Map context) {
+    public static void buildHyperlinkUrl(Writer writer, String requestName, String targetType, HttpServletRequest request, HttpServletResponse response, Map<String, Object> context) throws IOException {
         String localRequestName = UtilHttp.encodeAmpersands(requestName);
         
         if ("intra-app".equals(targetType)) {
-            appendOfbizUrl(buffer, "/" + localRequestName, request, response);
+            appendOfbizUrl(writer, "/" + localRequestName, request, response);
         } else if ("inter-app".equals(targetType)) {
             String fullTarget = localRequestName;
-            buffer.append(fullTarget);
+            writer.write(fullTarget);
             String externalLoginKey = (String) request.getAttribute("externalLoginKey");
             if (UtilValidate.isNotEmpty(externalLoginKey)) {
                 if (fullTarget.indexOf('?') == -1) {
-                    buffer.append('?');
+                    writer.write('?');
                 } else {
-                    buffer.append("&amp;");
+                    writer.write("&amp;");
                 }
-                buffer.append("externalLoginKey=");
-                buffer.append(externalLoginKey);
+                writer.write("externalLoginKey=");
+                writer.write(externalLoginKey);
             }
         } else if ("content".equals(targetType)) {
-            appendContentUrl(buffer, localRequestName, request);
+            appendContentUrl(writer, localRequestName, request);
         } else if ("plain".equals(targetType)) {
-            buffer.append(localRequestName);
+            writer.write(localRequestName);
         } else {
-            buffer.append(localRequestName);
+            writer.write(localRequestName);
         }
 
     }
 
-    public static void appendOfbizUrl(StringBuffer buffer, String location, HttpServletRequest request, HttpServletResponse response) {
+    public static void appendOfbizUrl(Writer writer, String location, HttpServletRequest request, HttpServletResponse response) throws IOException {
         ServletContext ctx = (ServletContext) request.getAttribute("servletContext");
         RequestHandler rh = (RequestHandler) ctx.getAttribute("_REQUEST_HANDLER_");
         // make and append the link
-        buffer.append(rh.makeLink(request, response, location));
+        writer.write(rh.makeLink(request, response, location));
     }
 
-    public static void appendContentUrl(StringBuffer buffer, String location, HttpServletRequest request) {
+    public static void appendContentUrl(Writer writer, String location, HttpServletRequest request) throws IOException {
+        StringBuffer buffer = new StringBuffer();
         ContentUrlTag.appendContentPrefix(request, buffer);
-        buffer.append(location);
+        writer.write(buffer.toString());
+        writer.write(location);
     }
 
-    public static void makeHyperlinkString(StringBuffer buffer, String linkStyle, String targetType, String target, String description, HttpServletRequest request, HttpServletResponse response, Map context, String targetWindow, String event, String action) {
+    public static void makeHyperlinkString(Writer writer, String linkStyle, String targetType, String target, String description, HttpServletRequest request, HttpServletResponse response, Map<String, Object> context, String targetWindow, String event, String action) throws IOException {
         if (UtilValidate.isNotEmpty(description)) {
-            buffer.append("<a");
+            writer.write("<a");
 
             if (UtilValidate.isNotEmpty(linkStyle)) {
-                buffer.append(" class=\"");
-                buffer.append(linkStyle);
-                buffer.append("\"");
+                writer.write(" class=\"");
+                writer.write(linkStyle);
+                writer.write("\"");
             }
 
-            buffer.append(" href=\"");
+            writer.write(" href=\"");
 
-            WidgetWorker.buildHyperlinkUrl(buffer, target, targetType, request, response, context);
+            buildHyperlinkUrl(writer, target, targetType, request, response, context);
 
-            buffer.append("\"");
+            writer.write("\"");
             
             if (UtilValidate.isNotEmpty(targetWindow)) {
-                buffer.append(" target=\"");
-                buffer.append(targetWindow);
-                buffer.append("\"");
+                writer.write(" target=\"");
+                writer.write(targetWindow);
+                writer.write("\"");
             }
 
             if (UtilValidate.isNotEmpty(event) && UtilValidate.isNotEmpty(action)) {
-                buffer.append(" ");
-                buffer.append(event);
-                buffer.append("=\"");
-                buffer.append(action);
-                buffer.append('"');
+                writer.write(" ");
+                writer.write(event);
+                writer.write("=\"");
+                writer.write(action);
+                writer.write('"');
             }
 
-            buffer.append('>');
+            writer.write('>');
 
-            buffer.append(description);
-            buffer.append("</a>");
+            writer.write(description);
+            writer.write("</a>");
         }
     }
 }

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/fo/FoFormRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/fo/FoFormRenderer.java?rev=662123&r1=662122&r2=662123&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/fo/FoFormRenderer.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/fo/FoFormRenderer.java Sat May 31 18:50:41 2008
@@ -18,14 +18,16 @@
  *******************************************************************************/
 package org.ofbiz.widget.fo;
 
-import java.util.Iterator;
+import java.io.IOException;
+import java.io.Writer;
 import java.util.List;
 import java.util.Map;
+
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.base.util.UtilFormatOut;
+import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.widget.form.FormStringRenderer;
 import org.ofbiz.widget.form.ModelForm;
 import org.ofbiz.widget.form.ModelFormField;
@@ -64,358 +66,355 @@
 
     public FoFormRenderer() {}
 
-    public FoFormRenderer(HttpServletRequest request, HttpServletResponse response) {
+    public FoFormRenderer(HttpServletRequest request, HttpServletResponse response) throws IOException {
         this.request = request;
         this.response = response;
     }
 
-    private void makeBlockString(StringBuffer buffer, String widgetStyle, String text) {
-        buffer.append("<fo:block");
+    private void makeBlockString(Writer writer, String widgetStyle, String text) throws IOException {
+        writer.write("<fo:block");
         if (UtilValidate.isNotEmpty(widgetStyle)) {
-            buffer.append(" ");
-            buffer.append(FoScreenRenderer.getFoStyle(widgetStyle));
+            writer.write(" ");
+            writer.write(FoScreenRenderer.getFoStyle(widgetStyle));
         }
-        buffer.append(">");
-        buffer.append(UtilFormatOut.encodeXmlValue(text));
-        buffer.append("</fo:block>");
+        writer.write(">");
+        writer.write(UtilFormatOut.encodeXmlValue(text));
+        writer.write("</fo:block>");
     }
 
-    public void renderDisplayField(StringBuffer buffer, Map context, DisplayField displayField) {
+    public void renderDisplayField(Writer writer, Map<String, Object> context, DisplayField displayField) throws IOException {
         ModelFormField modelFormField = displayField.getModelFormField();
-        this.makeBlockString(buffer, modelFormField.getWidgetStyle(), displayField.getDescription(context));
-        appendWhitespace(buffer);
+        this.makeBlockString(writer, modelFormField.getWidgetStyle(), displayField.getDescription(context));
+        appendWhitespace(writer);
     }
 
-    public void renderHyperlinkField(StringBuffer buffer, Map context, HyperlinkField hyperlinkField) {
+    public void renderHyperlinkField(Writer writer, Map<String, Object> context, HyperlinkField hyperlinkField) throws IOException {
         ModelFormField modelFormField = hyperlinkField.getModelFormField();
-        this.makeBlockString(buffer, modelFormField.getWidgetStyle(), hyperlinkField.getDescription(context));
-        appendWhitespace(buffer);
+        this.makeBlockString(writer, modelFormField.getWidgetStyle(), hyperlinkField.getDescription(context));
+        appendWhitespace(writer);
     }
 
-    public void renderTextField(StringBuffer buffer, Map context, TextField textField) {
+    public void renderTextField(Writer writer, Map<String, Object> context, TextField textField) throws IOException {
         ModelFormField modelFormField = textField.getModelFormField();
-        this.makeBlockString(buffer, modelFormField.getWidgetStyle(), modelFormField.getEntry(context, textField.getDefaultValue(context)));
-        appendWhitespace(buffer);
+        this.makeBlockString(writer, modelFormField.getWidgetStyle(), modelFormField.getEntry(context, textField.getDefaultValue(context)));
+        appendWhitespace(writer);
     }
 
-    public void renderTextareaField(StringBuffer buffer, Map context, TextareaField textareaField) {
+    public void renderTextareaField(Writer writer, Map<String, Object> context, TextareaField textareaField) throws IOException {
         ModelFormField modelFormField = textareaField.getModelFormField();
-        this.makeBlockString(buffer, modelFormField.getWidgetStyle(), modelFormField.getEntry(context, textareaField.getDefaultValue(context)));
-        appendWhitespace(buffer);
+        this.makeBlockString(writer, modelFormField.getWidgetStyle(), modelFormField.getEntry(context, textareaField.getDefaultValue(context)));
+        appendWhitespace(writer);
     }
 
-    public void renderDateTimeField(StringBuffer buffer, Map context, DateTimeField dateTimeField) {
+    public void renderDateTimeField(Writer writer, Map<String, Object> context, DateTimeField dateTimeField) throws IOException {
         ModelFormField modelFormField = dateTimeField.getModelFormField();
-        this.makeBlockString(buffer, modelFormField.getWidgetStyle(), modelFormField.getEntry(context, dateTimeField.getDefaultValue(context)));
-        appendWhitespace(buffer);
+        this.makeBlockString(writer, modelFormField.getWidgetStyle(), modelFormField.getEntry(context, dateTimeField.getDefaultValue(context)));
+        appendWhitespace(writer);
     }
 
-    public void renderDropDownField(StringBuffer buffer, Map context, DropDownField dropDownField) {
+    public void renderDropDownField(Writer writer, Map<String, Object> context, DropDownField dropDownField) throws IOException {
         ModelFormField modelFormField = dropDownField.getModelFormField();
         ModelForm modelForm = modelFormField.getModelForm();
         String currentValue = modelFormField.getEntry(context);
-        List allOptionValues = dropDownField.getAllOptionValues(context, modelForm.getDelegator(context));
+        List<ModelFormField.OptionValue> allOptionValues = dropDownField.getAllOptionValues(context, modelForm.getDelegator(context));
         // if the current value should go first, display it
         if (UtilValidate.isNotEmpty(currentValue) && "first-in-list".equals(dropDownField.getCurrent())) {
             String explicitDescription = dropDownField.getCurrentDescription(context);
             if (UtilValidate.isNotEmpty(explicitDescription)) {
-                this.makeBlockString(buffer, modelFormField.getWidgetStyle(), explicitDescription);
+                this.makeBlockString(writer, modelFormField.getWidgetStyle(), explicitDescription);
             } else {
-                this.makeBlockString(buffer, modelFormField.getWidgetStyle(), ModelFormField.FieldInfoWithOptions.getDescriptionForOptionKey(currentValue, allOptionValues));
+                this.makeBlockString(writer, modelFormField.getWidgetStyle(), ModelFormField.FieldInfoWithOptions.getDescriptionForOptionKey(currentValue, allOptionValues));
             }
         } else {
-            Iterator optionValueIter = allOptionValues.iterator();
             boolean optionSelected = false;
-            while (optionValueIter.hasNext()) {
-                ModelFormField.OptionValue optionValue = (ModelFormField.OptionValue) optionValueIter.next();
+            for (ModelFormField.OptionValue optionValue : allOptionValues) {
                 String noCurrentSelectedKey = dropDownField.getNoCurrentSelectedKey(context);
                 if ((UtilValidate.isNotEmpty(currentValue) && currentValue.equals(optionValue.getKey()) && "selected".equals(dropDownField.getCurrent())) ||
                         (UtilValidate.isEmpty(currentValue) && noCurrentSelectedKey != null && noCurrentSelectedKey.equals(optionValue.getKey()))) {
-                    this.makeBlockString(buffer, modelFormField.getWidgetStyle(), optionValue.getDescription());
+                    this.makeBlockString(writer, modelFormField.getWidgetStyle(), optionValue.getDescription());
                     optionSelected = true;
                     break;
                 }
             }
             if (!optionSelected) {
-                this.makeBlockString(buffer, null, "");
+                this.makeBlockString(writer, null, "");
             }
         }
-        appendWhitespace(buffer);
+        appendWhitespace(writer);
     }
 
-    public void renderCheckField(StringBuffer buffer, Map context, CheckField checkField) {
-        this.makeBlockString(buffer, null, "");
+    public void renderCheckField(Writer writer, Map<String, Object> context, CheckField checkField) throws IOException {
+        this.makeBlockString(writer, null, "");
     }
 
-    public void renderRadioField(StringBuffer buffer, Map context, RadioField radioField) {
-        this.makeBlockString(buffer, null, "");
+    public void renderRadioField(Writer writer, Map<String, Object> context, RadioField radioField) throws IOException {
+        this.makeBlockString(writer, null, "");
     }
 
-    public void renderSubmitField(StringBuffer buffer, Map context, SubmitField submitField) {
-        this.makeBlockString(buffer, null, "");
+    public void renderSubmitField(Writer writer, Map<String, Object> context, SubmitField submitField) throws IOException {
+        this.makeBlockString(writer, null, "");
     }
 
-    public void renderResetField(StringBuffer buffer, Map context, ResetField resetField) {
-        this.makeBlockString(buffer, null, "");
+    public void renderResetField(Writer writer, Map<String, Object> context, ResetField resetField) throws IOException {
+        this.makeBlockString(writer, null, "");
     }
 
-    public void renderHiddenField(StringBuffer buffer, Map context, HiddenField hiddenField) {
+    public void renderHiddenField(Writer writer, Map<String, Object> context, HiddenField hiddenField) throws IOException {
     }
 
-    public void renderHiddenField(StringBuffer buffer, Map context, ModelFormField modelFormField, String value) {
+    public void renderHiddenField(Writer writer, Map<String, Object> context, ModelFormField modelFormField, String value) throws IOException {
     }
 
-    public void renderIgnoredField(StringBuffer buffer, Map context, IgnoredField ignoredField) {
+    public void renderIgnoredField(Writer writer, Map<String, Object> context, IgnoredField ignoredField) throws IOException {
     }
 
-    public void renderFieldTitle(StringBuffer buffer, Map context, ModelFormField modelFormField) {
+    public void renderFieldTitle(Writer writer, Map<String, Object> context, ModelFormField modelFormField) throws IOException {
         String tempTitleText = modelFormField.getTitle(context);
-        buffer.append(tempTitleText);
+        writer.write(tempTitleText);
     }
 
-    public void renderSingleFormFieldTitle(StringBuffer buffer, Map context, ModelFormField modelFormField) {
-        renderFieldTitle(buffer, context, modelFormField);
+    public void renderSingleFormFieldTitle(Writer writer, Map<String, Object> context, ModelFormField modelFormField) throws IOException {
+        renderFieldTitle(writer, context, modelFormField);
     }
 
-    public void renderFormOpen(StringBuffer buffer, Map context, ModelForm modelForm) {
-        renderBeginningBoundaryComment(buffer, "Form Widget", modelForm);
+    public void renderFormOpen(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException {
+        renderBeginningBoundaryComment(writer, "Form Widget", modelForm);
     }
 
-    public void renderFormClose(StringBuffer buffer, Map context, ModelForm modelForm) {
-        renderEndingBoundaryComment(buffer, "Form Widget", modelForm);
+    public void renderFormClose(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException {
+        renderEndingBoundaryComment(writer, "Form Widget", modelForm);
     }
 
-    public void renderMultiFormClose(StringBuffer buffer, Map context, ModelForm modelForm) {
-        renderEndingBoundaryComment(buffer, "Form Widget", modelForm);
+    public void renderMultiFormClose(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException {
+        renderEndingBoundaryComment(writer, "Form Widget", modelForm);
     }
 
-    public void renderFormatListWrapperOpen(StringBuffer buffer, Map context, ModelForm modelForm) {
-        buffer.append("<fo:table border=\"solid black\">");
-        Iterator fieldListIter = modelForm.getFieldList().iterator();
-        while (fieldListIter.hasNext()) {
-            ModelFormField childField = (ModelFormField)fieldListIter.next();
+    public void renderFormatListWrapperOpen(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException {
+        writer.write("<fo:table border=\"solid black\">");
+        List<ModelFormField> childFieldList = modelForm.getFieldList();
+        for (ModelFormField childField : childFieldList) {
             int childFieldType = childField.getFieldInfo().getFieldType();
             if (childFieldType == ModelFormField.FieldInfo.HIDDEN || childFieldType == ModelFormField.FieldInfo.IGNORED) {
                 continue;
             }
-            buffer.append("<fo:table-column");
+            writer.write("<fo:table-column");
             String areaStyle = childField.getTitleAreaStyle();
             if (UtilValidate.isNotEmpty(areaStyle)) {
-                buffer.append(" ");
-                buffer.append(FoScreenRenderer.getFoStyle(areaStyle));
+                writer.write(" ");
+                writer.write(FoScreenRenderer.getFoStyle(areaStyle));
             }
-            buffer.append("/>");
-            appendWhitespace(buffer);
+            writer.write("/>");
+            appendWhitespace(writer);
         }
-        appendWhitespace(buffer);
+        appendWhitespace(writer);
     }
 
-    public void renderFormatListWrapperClose(StringBuffer buffer, Map context, ModelForm modelForm) {
-        buffer.append("</fo:table-body>");
-        buffer.append("</fo:table>");
-        appendWhitespace(buffer);
+    public void renderFormatListWrapperClose(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException {
+        writer.write("</fo:table-body>");
+        writer.write("</fo:table>");
+        appendWhitespace(writer);
     }
 
-    public void renderFormatHeaderRowOpen(StringBuffer buffer, Map context, ModelForm modelForm) {
-        buffer.append("<fo:table-header>");
-        buffer.append("<fo:table-row>");
-        appendWhitespace(buffer);
+    public void renderFormatHeaderRowOpen(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException {
+        writer.write("<fo:table-header>");
+        writer.write("<fo:table-row>");
+        appendWhitespace(writer);
     }
 
-    public void renderFormatHeaderRowClose(StringBuffer buffer, Map context, ModelForm modelForm) {
-        buffer.append("</fo:table-row>");
-        buffer.append("</fo:table-header>");
-        buffer.append("<fo:table-body>");
+    public void renderFormatHeaderRowClose(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException {
+        writer.write("</fo:table-row>");
+        writer.write("</fo:table-header>");
+        writer.write("<fo:table-body>");
         // FIXME: this is an hack to avoid FOP rendering errors for empty lists (fo:table-body cannot be null)
-        buffer.append("<fo:table-row><fo:table-cell><fo:block/></fo:table-cell></fo:table-row>");
-        appendWhitespace(buffer);
+        writer.write("<fo:table-row><fo:table-cell><fo:block/></fo:table-cell></fo:table-row>");
+        appendWhitespace(writer);
     }
 
-    public void renderFormatHeaderRowCellOpen(StringBuffer buffer, Map context, ModelForm modelForm, ModelFormField modelFormField, int positionSpan) {
-        buffer.append("<fo:table-cell ");
+    public void renderFormatHeaderRowCellOpen(Writer writer, Map<String, Object> context, ModelForm modelForm, ModelFormField modelFormField, int positionSpan) throws IOException {
+        writer.write("<fo:table-cell ");
         if (positionSpan > 1) {
-            buffer.append("number-columns-spanned=\"");
-            buffer.append(positionSpan);
-            buffer.append("\" ");
+            writer.write("number-columns-spanned=\"");
+            writer.write(Integer.toString(positionSpan));
+            writer.write("\" ");
         }
-        buffer.append("font-weight=\"bold\" text-align=\"center\" border=\"solid black\" padding=\"2pt\"");
-        buffer.append(">");
-        buffer.append("<fo:block>");
-        appendWhitespace(buffer);
+        writer.write("font-weight=\"bold\" text-align=\"center\" border=\"solid black\" padding=\"2pt\"");
+        writer.write(">");
+        writer.write("<fo:block>");
+        appendWhitespace(writer);
     }
 
-    public void renderFormatHeaderRowCellClose(StringBuffer buffer, Map context, ModelForm modelForm, ModelFormField modelFormField) {
-        buffer.append("</fo:block>");
-        buffer.append("</fo:table-cell>");
-        appendWhitespace(buffer);
+    public void renderFormatHeaderRowCellClose(Writer writer, Map<String, Object> context, ModelForm modelForm, ModelFormField modelFormField) throws IOException {
+        writer.write("</fo:block>");
+        writer.write("</fo:table-cell>");
+        appendWhitespace(writer);
     }
 
-    public void renderFormatHeaderRowFormCellOpen(StringBuffer buffer, Map context, ModelForm modelForm) {
-        buffer.append("<fo:table-cell>");
-        appendWhitespace(buffer);
+    public void renderFormatHeaderRowFormCellOpen(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException {
+        writer.write("<fo:table-cell>");
+        appendWhitespace(writer);
     }
 
-    public void renderFormatHeaderRowFormCellClose(StringBuffer buffer, Map context, ModelForm modelForm) {
-        buffer.append("</fo:table-cell>");
-        appendWhitespace(buffer);
+    public void renderFormatHeaderRowFormCellClose(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException {
+        writer.write("</fo:table-cell>");
+        appendWhitespace(writer);
     }
 
-    public void renderFormatHeaderRowFormCellTitleSeparator(StringBuffer buffer, Map context, ModelForm modelForm, ModelFormField modelFormField, boolean isLast) {
+    public void renderFormatHeaderRowFormCellTitleSeparator(Writer writer, Map<String, Object> context, ModelForm modelForm, ModelFormField modelFormField, boolean isLast) throws IOException {
     }
 
-    public void renderFormatItemRowOpen(StringBuffer buffer, Map context, ModelForm modelForm) {
-        buffer.append("<fo:table-row>");
-        appendWhitespace(buffer);
+    public void renderFormatItemRowOpen(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException {
+        writer.write("<fo:table-row>");
+        appendWhitespace(writer);
     }
 
-    public void renderFormatItemRowClose(StringBuffer buffer, Map context, ModelForm modelForm) {
-        buffer.append("</fo:table-row>");
-        appendWhitespace(buffer);
+    public void renderFormatItemRowClose(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException {
+        writer.write("</fo:table-row>");
+        appendWhitespace(writer);
     }
 
-    public void renderFormatItemRowCellOpen(StringBuffer buffer, Map context, ModelForm modelForm, ModelFormField modelFormField, int positionSpan) {
-        buffer.append("<fo:table-cell ");
+    public void renderFormatItemRowCellOpen(Writer writer, Map<String, Object> context, ModelForm modelForm, ModelFormField modelFormField, int positionSpan) throws IOException {
+        writer.write("<fo:table-cell ");
         if (positionSpan > 1) {
-            buffer.append("number-columns-spanned=\"");
-            buffer.append(positionSpan);
-            buffer.append("\" ");
+            writer.write("number-columns-spanned=\"");
+            writer.write(Integer.toString(positionSpan));
+            writer.write("\" ");
         }
         String areaStyle = modelFormField.getWidgetAreaStyle();
         if (UtilValidate.isEmpty(areaStyle)) {
             areaStyle = "tabletext";
         }
-        buffer.append(FoScreenRenderer.getFoStyle(areaStyle));
-        buffer.append(">");
-        appendWhitespace(buffer);
+        writer.write(FoScreenRenderer.getFoStyle(areaStyle));
+        writer.write(">");
+        appendWhitespace(writer);
     }
 
-    public void renderFormatItemRowCellClose(StringBuffer buffer, Map context, ModelForm modelForm, ModelFormField modelFormField) {
-        buffer.append("</fo:table-cell>");
-        appendWhitespace(buffer);
+    public void renderFormatItemRowCellClose(Writer writer, Map<String, Object> context, ModelForm modelForm, ModelFormField modelFormField) throws IOException {
+        writer.write("</fo:table-cell>");
+        appendWhitespace(writer);
     }
 
-    public void renderFormatItemRowFormCellOpen(StringBuffer buffer, Map context, ModelForm modelForm) {
-        buffer.append("<fo:table-cell>");
-        appendWhitespace(buffer);
+    public void renderFormatItemRowFormCellOpen(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException {
+        writer.write("<fo:table-cell>");
+        appendWhitespace(writer);
     }
 
-    public void renderFormatItemRowFormCellClose(StringBuffer buffer, Map context, ModelForm modelForm) {
-        buffer.append("</fo:table-cell>");
-        appendWhitespace(buffer);
+    public void renderFormatItemRowFormCellClose(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException {
+        writer.write("</fo:table-cell>");
+        appendWhitespace(writer);
     }
 
     // TODO: multi columns (position attribute) in single forms are still not implemented
-    public void renderFormatSingleWrapperOpen(StringBuffer buffer, Map context, ModelForm modelForm) {
-        buffer.append("<fo:table>");
-        appendWhitespace(buffer);
-        buffer.append("<fo:table-column column-width=\"2in\"/>");
-        appendWhitespace(buffer);
-        buffer.append("<fo:table-column/>");
-        appendWhitespace(buffer);
-        buffer.append("<fo:table-body>");
-        appendWhitespace(buffer);
+    public void renderFormatSingleWrapperOpen(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException {
+        writer.write("<fo:table>");
+        appendWhitespace(writer);
+        writer.write("<fo:table-column column-width=\"2in\"/>");
+        appendWhitespace(writer);
+        writer.write("<fo:table-column/>");
+        appendWhitespace(writer);
+        writer.write("<fo:table-body>");
+        appendWhitespace(writer);
     }
-    public void renderFormatSingleWrapperClose(StringBuffer buffer, Map context, ModelForm modelForm) {
-        buffer.append("</fo:table-body>");
-        buffer.append("</fo:table>");
-        appendWhitespace(buffer);
+    public void renderFormatSingleWrapperClose(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException {
+        writer.write("</fo:table-body>");
+        writer.write("</fo:table>");
+        appendWhitespace(writer);
     }
 
-    public void renderFormatFieldRowOpen(StringBuffer buffer, Map context, ModelForm modelForm) {
-        buffer.append("<fo:table-row>");
-        appendWhitespace(buffer);
+    public void renderFormatFieldRowOpen(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException {
+        writer.write("<fo:table-row>");
+        appendWhitespace(writer);
     }
 
-    public void renderFormatFieldRowClose(StringBuffer buffer, Map context, ModelForm modelForm) {
-        buffer.append("</fo:table-row>");
-        appendWhitespace(buffer);
+    public void renderFormatFieldRowClose(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException {
+        writer.write("</fo:table-row>");
+        appendWhitespace(writer);
     }
 
 
-    public void renderFormatFieldRowTitleCellOpen(StringBuffer buffer, Map context, ModelFormField modelFormField) {
-        buffer.append("<fo:table-cell font-weight=\"bold\" text-align=\"right\" padding=\"3pt\">");
-        buffer.append("<fo:block>");
-        appendWhitespace(buffer);
+    public void renderFormatFieldRowTitleCellOpen(Writer writer, Map<String, Object> context, ModelFormField modelFormField) throws IOException {
+        writer.write("<fo:table-cell font-weight=\"bold\" text-align=\"right\" padding=\"3pt\">");
+        writer.write("<fo:block>");
+        appendWhitespace(writer);
     }
 
-    public void renderFormatFieldRowTitleCellClose(StringBuffer buffer, Map context, ModelFormField modelFormField) {
-        buffer.append("</fo:block>");
-        buffer.append("</fo:table-cell>");
-        appendWhitespace(buffer);
+    public void renderFormatFieldRowTitleCellClose(Writer writer, Map<String, Object> context, ModelFormField modelFormField) throws IOException {
+        writer.write("</fo:block>");
+        writer.write("</fo:table-cell>");
+        appendWhitespace(writer);
     }
 
-    public void renderFormatFieldRowSpacerCell(StringBuffer buffer, Map context, ModelFormField modelFormField) {
+    public void renderFormatFieldRowSpacerCell(Writer writer, Map<String, Object> context, ModelFormField modelFormField) throws IOException {
     }
 
-    public void renderFormatFieldRowWidgetCellOpen(StringBuffer buffer, Map context, ModelFormField modelFormField, int positions, int positionSpan, Integer nextPositionInRow) {
-        buffer.append("<fo:table-cell text-align=\"left\" padding=\"2pt\" padding-left=\"5pt\">");
-        appendWhitespace(buffer);
+    public void renderFormatFieldRowWidgetCellOpen(Writer writer, Map<String, Object> context, ModelFormField modelFormField, int positions, int positionSpan, Integer nextPositionInRow) throws IOException {
+        writer.write("<fo:table-cell text-align=\"left\" padding=\"2pt\" padding-left=\"5pt\">");
+        appendWhitespace(writer);
     }
 
-    public void renderFormatFieldRowWidgetCellClose(StringBuffer buffer, Map context, ModelFormField modelFormField, int positions, int positionSpan, Integer nextPositionInRow) {
-        buffer.append("</fo:table-cell>");
-        appendWhitespace(buffer);
+    public void renderFormatFieldRowWidgetCellClose(Writer writer, Map<String, Object> context, ModelFormField modelFormField, int positions, int positionSpan, Integer nextPositionInRow) throws IOException {
+        writer.write("</fo:table-cell>");
+        appendWhitespace(writer);
     }
 
-    public void renderFormatEmptySpace(StringBuffer buffer, Map context, ModelForm modelForm) {
+    public void renderFormatEmptySpace(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException {
         // TODO
     }
 
-    public void renderTextFindField(StringBuffer buffer, Map context, TextFindField textFindField) {
+    public void renderTextFindField(Writer writer, Map<String, Object> context, TextFindField textFindField) throws IOException {
         ModelFormField modelFormField = textFindField.getModelFormField();
-        this.makeBlockString(buffer, modelFormField.getWidgetStyle(), modelFormField.getEntry(context, textFindField.getDefaultValue(context)));
-        appendWhitespace(buffer);
+        this.makeBlockString(writer, modelFormField.getWidgetStyle(), modelFormField.getEntry(context, textFindField.getDefaultValue(context)));
+        appendWhitespace(writer);
     }
 
-    public void renderRangeFindField(StringBuffer buffer, Map context, RangeFindField rangeFindField) {
+    public void renderRangeFindField(Writer writer, Map<String, Object> context, RangeFindField rangeFindField) throws IOException {
         ModelFormField modelFormField = rangeFindField.getModelFormField();
-        this.makeBlockString(buffer, modelFormField.getWidgetStyle(), modelFormField.getEntry(context, rangeFindField.getDefaultValue(context)));
-        appendWhitespace(buffer);
+        this.makeBlockString(writer, modelFormField.getWidgetStyle(), modelFormField.getEntry(context, rangeFindField.getDefaultValue(context)));
+        appendWhitespace(writer);
     }
 
-    public void renderDateFindField(StringBuffer buffer, Map context, DateFindField dateFindField) {
+    public void renderDateFindField(Writer writer, Map<String, Object> context, DateFindField dateFindField) throws IOException {
         ModelFormField modelFormField = dateFindField.getModelFormField();
-        this.makeBlockString(buffer, modelFormField.getWidgetStyle(), modelFormField.getEntry(context, dateFindField.getDefaultValue(context)));
-        appendWhitespace(buffer);
+        this.makeBlockString(writer, modelFormField.getWidgetStyle(), modelFormField.getEntry(context, dateFindField.getDefaultValue(context)));
+        appendWhitespace(writer);
     }
 
-    public void renderLookupField(StringBuffer buffer, Map context, LookupField lookupField) {
+    public void renderLookupField(Writer writer, Map<String, Object> context, LookupField lookupField) throws IOException {
         ModelFormField modelFormField = lookupField.getModelFormField();
-        this.makeBlockString(buffer, modelFormField.getWidgetStyle(), modelFormField.getEntry(context, lookupField.getDefaultValue(context)));
-        appendWhitespace(buffer);
+        this.makeBlockString(writer, modelFormField.getWidgetStyle(), modelFormField.getEntry(context, lookupField.getDefaultValue(context)));
+        appendWhitespace(writer);
     }
 
-    public void renderNextPrev(StringBuffer buffer, Map context, ModelForm modelForm) {
+    public void renderNextPrev(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException {
     }
 
-    public void renderFileField(StringBuffer buffer, Map context, FileField textField) {
+    public void renderFileField(Writer writer, Map<String, Object> context, FileField textField) throws IOException {
         ModelFormField modelFormField = textField.getModelFormField();
-        this.makeBlockString(buffer, modelFormField.getWidgetStyle(), modelFormField.getEntry(context, textField.getDefaultValue(context)));
-        appendWhitespace(buffer);
+        this.makeBlockString(writer, modelFormField.getWidgetStyle(), modelFormField.getEntry(context, textField.getDefaultValue(context)));
+        appendWhitespace(writer);
     }
 
-    public void renderPasswordField(StringBuffer buffer, Map context, PasswordField passwordField) {
-        this.makeBlockString(buffer, null, "");
+    public void renderPasswordField(Writer writer, Map<String, Object> context, PasswordField passwordField) throws IOException {
+        this.makeBlockString(writer, null, "");
     }
 
-    public void renderImageField(StringBuffer buffer, Map context, ImageField imageField) {
+    public void renderImageField(Writer writer, Map<String, Object> context, ImageField imageField) throws IOException {
         // TODO
-        this.makeBlockString(buffer, null, "");
+        this.makeBlockString(writer, null, "");
     }
 
-    public void renderFieldGroupOpen(StringBuffer buffer, Map context, ModelForm.FieldGroup fieldGroup) {
+    public void renderFieldGroupOpen(Writer writer, Map<String, Object> context, ModelForm.FieldGroup fieldGroup) throws IOException {
         // TODO
     }
 
-    public void renderFieldGroupClose(StringBuffer buffer, Map context, ModelForm.FieldGroup fieldGroup) {
+    public void renderFieldGroupClose(Writer writer, Map<String, Object> context, ModelForm.FieldGroup fieldGroup) throws IOException {
         // TODO
     }
     
-    public void renderBanner(StringBuffer buffer, Map context, ModelForm.Banner banner) {
+    public void renderBanner(Writer writer, Map<String, Object> context, ModelForm.Banner banner) throws IOException {
         // TODO
-        this.makeBlockString(buffer, null, "");
+        this.makeBlockString(writer, null, "");
     }
     
-    public void renderHyperlinkTitle(StringBuffer buffer, Map context, ModelFormField modelFormField, String titleText) {
+    public void renderHyperlinkTitle(Writer writer, Map<String, Object> context, ModelFormField modelFormField, String titleText) throws IOException {
     }
 }

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/fo/FoScreenRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/fo/FoScreenRenderer.java?rev=662123&r1=662122&r2=662123&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/fo/FoScreenRenderer.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/fo/FoScreenRenderer.java Sat May 31 18:50:41 2008
@@ -47,14 +47,14 @@
         return value;
     }
 
-    public void renderSectionBegin(Writer writer, Map context, ModelScreenWidget.Section section) throws IOException {
+    public void renderSectionBegin(Writer writer, Map<String, Object> context, ModelScreenWidget.Section section) throws IOException {
         renderBeginningBoundaryComment(writer, section.isMainSection?"Screen":"Section Widget", section);
     }
-    public void renderSectionEnd(Writer writer, Map context, ModelScreenWidget.Section section) throws IOException {
+    public void renderSectionEnd(Writer writer, Map<String, Object> context, ModelScreenWidget.Section section) throws IOException {
         renderEndingBoundaryComment(writer, section.isMainSection?"Screen":"Section Widget", section);
     }
 
-    public void renderContainerBegin(Writer writer, Map context, ModelScreenWidget.Container container) throws IOException {
+    public void renderContainerBegin(Writer writer, Map<String, Object> context, ModelScreenWidget.Container container) throws IOException {
         writer.write("<fo:block");
 
         String style = container.getStyle(context);
@@ -65,12 +65,12 @@
         writer.write(">");
         appendWhitespace(writer);
     }
-    public void renderContainerEnd(Writer writer, Map context, ModelScreenWidget.Container container) throws IOException {
+    public void renderContainerEnd(Writer writer, Map<String, Object> context, ModelScreenWidget.Container container) throws IOException {
         writer.write("</fo:block>");
         appendWhitespace(writer);
     }
 
-    public void renderLabel(Writer writer, Map context, ModelScreenWidget.Label label) throws IOException {
+    public void renderLabel(Writer writer, Map<String, Object> context, ModelScreenWidget.Label label) throws IOException {
         String labelText = label.getText(context);
         if (UtilValidate.isEmpty(labelText)) {
             // nothing to render
@@ -92,51 +92,51 @@
         appendWhitespace(writer);
     }
 
-    public void renderLink(Writer writer, Map context, ModelScreenWidget.Link link) throws IOException {
+    public void renderLink(Writer writer, Map<String, Object> context, ModelScreenWidget.Link link) throws IOException {
         // TODO: not implemented
     }
 
-    public void renderImage(Writer writer, Map context, ModelScreenWidget.Image image) throws IOException {
+    public void renderImage(Writer writer, Map<String, Object> context, ModelScreenWidget.Image image) throws IOException {
         // TODO: not implemented
     }
 
-    public void renderContentBegin(Writer writer, Map context, ModelScreenWidget.Content content) throws IOException {
+    public void renderContentBegin(Writer writer, Map<String, Object> context, ModelScreenWidget.Content content) throws IOException {
         // TODO: not implemented
     }
 
-    public void renderContentBody(Writer writer, Map context, ModelScreenWidget.Content content) throws IOException {
+    public void renderContentBody(Writer writer, Map<String, Object> context, ModelScreenWidget.Content content) throws IOException {
         // TODO: not implemented
     }
 
-    public void renderContentEnd(Writer writer, Map context, ModelScreenWidget.Content content) throws IOException {
+    public void renderContentEnd(Writer writer, Map<String, Object> context, ModelScreenWidget.Content content) throws IOException {
         // TODO: not implemented
     }
 
-    public void renderContentFrame(Writer writer, Map context, ModelScreenWidget.Content content) throws IOException {
+    public void renderContentFrame(Writer writer, Map<String, Object> context, ModelScreenWidget.Content content) throws IOException {
         // TODO: not implemented
     }
 
-    public void renderSubContentBegin(Writer writer, Map context, ModelScreenWidget.SubContent content) throws IOException {
+    public void renderSubContentBegin(Writer writer, Map<String, Object> context, ModelScreenWidget.SubContent content) throws IOException {
         // TODO: not implemented
     }
 
-    public void renderSubContentBody(Writer writer, Map context, ModelScreenWidget.SubContent content) throws IOException {
+    public void renderSubContentBody(Writer writer, Map<String, Object> context, ModelScreenWidget.SubContent content) throws IOException {
         // TODO: not implemented
     }
 
-    public void renderSubContentEnd(Writer writer, Map context, ModelScreenWidget.SubContent content) throws IOException {
+    public void renderSubContentEnd(Writer writer, Map<String, Object> context, ModelScreenWidget.SubContent content) throws IOException {
         // TODO: not implemented
     }
 
-    public void renderScreenletBegin(Writer writer, Map context, boolean collapsed, ModelScreenWidget.Screenlet screenlet) throws IOException {
+    public void renderScreenletBegin(Writer writer, Map<String, Object> context, boolean collapsed, ModelScreenWidget.Screenlet screenlet) throws IOException {
         // TODO: not implemented
     }
 
-    public void renderScreenletSubWidget(Writer writer, Map context, ModelScreenWidget subWidget, ModelScreenWidget.Screenlet screenlet) throws GeneralException {
+    public void renderScreenletSubWidget(Writer writer, Map<String, Object> context, ModelScreenWidget subWidget, ModelScreenWidget.Screenlet screenlet) throws GeneralException {
         // TODO: not implemented
     }
 
-    public void renderScreenletEnd(Writer writer, Map context, ModelScreenWidget.Screenlet screenlet) throws IOException {
+    public void renderScreenletEnd(Writer writer, Map<String, Object> context, ModelScreenWidget.Screenlet screenlet) throws IOException {
         // TODO: not implemented
     }
 }

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/FormStringRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/FormStringRenderer.java?rev=662123&r1=662122&r2=662123&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/FormStringRenderer.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/form/FormStringRenderer.java Sat May 31 18:50:41 2008
@@ -18,77 +18,79 @@
  *******************************************************************************/
 package org.ofbiz.widget.form;
 
+import java.io.IOException;
+import java.io.Writer;
 import java.util.Map;
 
 /**
- * Widget Library - Form String Renderer interface
+ * Widget Library - Form String Renderer interface.
  */
 public interface FormStringRenderer {
-    public void renderDisplayField(StringBuffer buffer, Map context, ModelFormField.DisplayField displayField);
-    public void renderHyperlinkField(StringBuffer buffer, Map context, ModelFormField.HyperlinkField hyperlinkField);
+    public void renderDisplayField(Writer writer, Map<String, Object> context, ModelFormField.DisplayField displayField) throws IOException;
+    public void renderHyperlinkField(Writer writer, Map<String, Object> context, ModelFormField.HyperlinkField hyperlinkField) throws IOException;
 
-    public void renderTextField(StringBuffer buffer, Map context, ModelFormField.TextField textField);
-    public void renderTextareaField(StringBuffer buffer, Map context, ModelFormField.TextareaField textareaField);
-    public void renderDateTimeField(StringBuffer buffer, Map context, ModelFormField.DateTimeField dateTimeField);
-
-    public void renderDropDownField(StringBuffer buffer, Map context, ModelFormField.DropDownField dropDownField);
-    public void renderCheckField(StringBuffer buffer, Map context, ModelFormField.CheckField checkField);
-    public void renderRadioField(StringBuffer buffer, Map context, ModelFormField.RadioField radioField);
-
-    public void renderSubmitField(StringBuffer buffer, Map context, ModelFormField.SubmitField submitField);
-    public void renderResetField(StringBuffer buffer, Map context, ModelFormField.ResetField resetField);
-
-    public void renderHiddenField(StringBuffer buffer, Map context, ModelFormField modelFormField, String value);
-    public void renderHiddenField(StringBuffer buffer, Map context, ModelFormField.HiddenField hiddenField);
-    public void renderIgnoredField(StringBuffer buffer, Map context, ModelFormField.IgnoredField ignoredField);
+    public void renderTextField(Writer writer, Map<String, Object> context, ModelFormField.TextField textField) throws IOException;
+    public void renderTextareaField(Writer writer, Map<String, Object> context, ModelFormField.TextareaField textareaField) throws IOException;
+    public void renderDateTimeField(Writer writer, Map<String, Object> context, ModelFormField.DateTimeField dateTimeField) throws IOException;
+
+    public void renderDropDownField(Writer writer, Map<String, Object> context, ModelFormField.DropDownField dropDownField) throws IOException;
+    public void renderCheckField(Writer writer, Map<String, Object> context, ModelFormField.CheckField checkField) throws IOException;
+    public void renderRadioField(Writer writer, Map<String, Object> context, ModelFormField.RadioField radioField) throws IOException;
+
+    public void renderSubmitField(Writer writer, Map<String, Object> context, ModelFormField.SubmitField submitField) throws IOException;
+    public void renderResetField(Writer writer, Map<String, Object> context, ModelFormField.ResetField resetField) throws IOException;
+
+    public void renderHiddenField(Writer writer, Map<String, Object> context, ModelFormField modelFormField, String value) throws IOException;
+    public void renderHiddenField(Writer writer, Map<String, Object> context, ModelFormField.HiddenField hiddenField) throws IOException;
+    public void renderIgnoredField(Writer writer, Map<String, Object> context, ModelFormField.IgnoredField ignoredField) throws IOException;
 
-    public void renderFieldTitle(StringBuffer buffer, Map context, ModelFormField modelFormField);
-    public void renderSingleFormFieldTitle(StringBuffer buffer, Map context, ModelFormField modelFormField);
+    public void renderFieldTitle(Writer writer, Map<String, Object> context, ModelFormField modelFormField) throws IOException;
+    public void renderSingleFormFieldTitle(Writer writer, Map<String, Object> context, ModelFormField modelFormField) throws IOException;
     
-    public void renderFormOpen(StringBuffer buffer, Map context, ModelForm modelForm);
-    public void renderFormClose(StringBuffer buffer, Map context, ModelForm modelForm);
-    public void renderMultiFormClose(StringBuffer buffer, Map context, ModelForm modelForm);
+    public void renderFormOpen(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException;
+    public void renderFormClose(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException;
+    public void renderMultiFormClose(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException;
     
-    public void renderFormatListWrapperOpen(StringBuffer buffer, Map context, ModelForm modelForm);
-    public void renderFormatListWrapperClose(StringBuffer buffer, Map context, ModelForm modelForm);
+    public void renderFormatListWrapperOpen(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException;
+    public void renderFormatListWrapperClose(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException;
 
-    public void renderFormatHeaderRowOpen(StringBuffer buffer, Map context, ModelForm modelForm);
-    public void renderFormatHeaderRowClose(StringBuffer buffer, Map context, ModelForm modelForm);
-    public void renderFormatHeaderRowCellOpen(StringBuffer buffer, Map context, ModelForm modelForm, ModelFormField modelFormField, int positionSpan);
-    public void renderFormatHeaderRowCellClose(StringBuffer buffer, Map context, ModelForm modelForm, ModelFormField modelFormField);
-
-    public void renderFormatHeaderRowFormCellOpen(StringBuffer buffer, Map context, ModelForm modelForm);
-    public void renderFormatHeaderRowFormCellClose(StringBuffer buffer, Map context, ModelForm modelForm);
-    public void renderFormatHeaderRowFormCellTitleSeparator(StringBuffer buffer, Map context, ModelForm modelForm, ModelFormField modelFormField, boolean isLast);
+    public void renderFormatHeaderRowOpen(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException;
+    public void renderFormatHeaderRowClose(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException;
+    public void renderFormatHeaderRowCellOpen(Writer writer, Map<String, Object> context, ModelForm modelForm, ModelFormField modelFormField, int positionSpan) throws IOException;
+    public void renderFormatHeaderRowCellClose(Writer writer, Map<String, Object> context, ModelForm modelForm, ModelFormField modelFormField) throws IOException;
+
+    public void renderFormatHeaderRowFormCellOpen(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException;
+    public void renderFormatHeaderRowFormCellClose(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException;
+    public void renderFormatHeaderRowFormCellTitleSeparator(Writer writer, Map<String, Object> context, ModelForm modelForm, ModelFormField modelFormField, boolean isLast) throws IOException;
     
-    public void renderFormatItemRowOpen(StringBuffer buffer, Map context, ModelForm modelForm);
-    public void renderFormatItemRowClose(StringBuffer buffer, Map context, ModelForm modelForm);
-    public void renderFormatItemRowCellOpen(StringBuffer buffer, Map context, ModelForm modelForm, ModelFormField modelFormField, int positionSpan);
-    public void renderFormatItemRowCellClose(StringBuffer buffer, Map context, ModelForm modelForm, ModelFormField modelFormField);
-    public void renderFormatItemRowFormCellOpen(StringBuffer buffer, Map context, ModelForm modelForm);
-    public void renderFormatItemRowFormCellClose(StringBuffer buffer, Map context, ModelForm modelForm);
-
-    public void renderFormatSingleWrapperOpen(StringBuffer buffer, Map context, ModelForm modelForm);
-    public void renderFormatSingleWrapperClose(StringBuffer buffer, Map context, ModelForm modelForm);
-
-    public void renderFormatFieldRowOpen(StringBuffer buffer, Map context, ModelForm modelForm);
-    public void renderFormatFieldRowClose(StringBuffer buffer, Map context, ModelForm modelForm);
-    public void renderFormatFieldRowTitleCellOpen(StringBuffer buffer, Map context, ModelFormField modelFormField);
-    public void renderFormatFieldRowTitleCellClose(StringBuffer buffer, Map context, ModelFormField modelFormField);
-    public void renderFormatFieldRowSpacerCell(StringBuffer buffer, Map context, ModelFormField modelFormField);
-    public void renderFormatFieldRowWidgetCellOpen(StringBuffer buffer, Map context, ModelFormField modelFormField, int positions, int positionSpan, Integer nextPositionInRow);
-    public void renderFormatFieldRowWidgetCellClose(StringBuffer buffer, Map context, ModelFormField modelFormField, int positions, int positionSpan, Integer nextPositionInRow);
-
-    public void renderFormatEmptySpace(StringBuffer buffer, Map context, ModelForm modelForm);
-
-    public void renderTextFindField(StringBuffer buffer, Map context, ModelFormField.TextFindField textField);
-    public void renderDateFindField(StringBuffer buffer, Map context, ModelFormField.DateFindField textField);
-    public void renderRangeFindField(StringBuffer buffer, Map context, ModelFormField.RangeFindField textField);
-    public void renderLookupField(StringBuffer buffer, Map context, ModelFormField.LookupField textField);
-    public void renderFileField(StringBuffer buffer, Map context, ModelFormField.FileField textField);
-    public void renderPasswordField(StringBuffer buffer, Map context, ModelFormField.PasswordField textField);
-    public void renderImageField(StringBuffer buffer, Map context, ModelFormField.ImageField textField);
-    public void renderBanner(StringBuffer buffer, Map context, ModelForm.Banner banner);
-    public void renderFieldGroupOpen(StringBuffer buffer, Map context, ModelForm.FieldGroup fieldGroup);
-    public void renderFieldGroupClose(StringBuffer buffer, Map context, ModelForm.FieldGroup fieldGroup);
+    public void renderFormatItemRowOpen(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException;
+    public void renderFormatItemRowClose(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException;
+    public void renderFormatItemRowCellOpen(Writer writer, Map<String, Object> context, ModelForm modelForm, ModelFormField modelFormField, int positionSpan) throws IOException;
+    public void renderFormatItemRowCellClose(Writer writer, Map<String, Object> context, ModelForm modelForm, ModelFormField modelFormField) throws IOException;
+    public void renderFormatItemRowFormCellOpen(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException;
+    public void renderFormatItemRowFormCellClose(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException;
+
+    public void renderFormatSingleWrapperOpen(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException;
+    public void renderFormatSingleWrapperClose(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException;
+
+    public void renderFormatFieldRowOpen(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException;
+    public void renderFormatFieldRowClose(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException;
+    public void renderFormatFieldRowTitleCellOpen(Writer writer, Map<String, Object> context, ModelFormField modelFormField) throws IOException;
+    public void renderFormatFieldRowTitleCellClose(Writer writer, Map<String, Object> context, ModelFormField modelFormField) throws IOException;
+    public void renderFormatFieldRowSpacerCell(Writer writer, Map<String, Object> context, ModelFormField modelFormField) throws IOException;
+    public void renderFormatFieldRowWidgetCellOpen(Writer writer, Map<String, Object> context, ModelFormField modelFormField, int positions, int positionSpan, Integer nextPositionInRow) throws IOException;
+    public void renderFormatFieldRowWidgetCellClose(Writer writer, Map<String, Object> context, ModelFormField modelFormField, int positions, int positionSpan, Integer nextPositionInRow) throws IOException;
+
+    public void renderFormatEmptySpace(Writer writer, Map<String, Object> context, ModelForm modelForm) throws IOException;
+
+    public void renderTextFindField(Writer writer, Map<String, Object> context, ModelFormField.TextFindField textField) throws IOException;
+    public void renderDateFindField(Writer writer, Map<String, Object> context, ModelFormField.DateFindField textField) throws IOException;
+    public void renderRangeFindField(Writer writer, Map<String, Object> context, ModelFormField.RangeFindField textField) throws IOException;
+    public void renderLookupField(Writer writer, Map<String, Object> context, ModelFormField.LookupField textField) throws IOException;
+    public void renderFileField(Writer writer, Map<String, Object> context, ModelFormField.FileField textField) throws IOException;
+    public void renderPasswordField(Writer writer, Map<String, Object> context, ModelFormField.PasswordField textField) throws IOException;
+    public void renderImageField(Writer writer, Map<String, Object> context, ModelFormField.ImageField textField) throws IOException;
+    public void renderBanner(Writer writer, Map<String, Object> context, ModelForm.Banner banner) throws IOException;
+    public void renderFieldGroupOpen(Writer writer, Map<String, Object> context, ModelForm.FieldGroup fieldGroup) throws IOException;
+    public void renderFieldGroupClose(Writer writer, Map<String, Object> context, ModelForm.FieldGroup fieldGroup) throws IOException;
 }



Mime
View raw message