Class FormRenderer


  • public class FormRenderer
    extends java.lang.Object
    A form rendering engine.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String module  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getCurrentContainerId​(ModelForm modelForm, java.util.Map<java.lang.String,​java.lang.Object> context)  
      static java.lang.String getCurrentFormName​(ModelForm modelForm, java.util.Map<java.lang.String,​java.lang.Object> context)  
      java.lang.String getFocusFieldName()  
      static java.lang.String getFocusFieldName​(ModelForm modelForm, java.util.Map<java.lang.String,​java.lang.Object> context)  
      void render​(java.lang.Appendable writer, java.util.Map<java.lang.String,​java.lang.Object> context)
      Renders this form to a writer, as defined with the FormStringRenderer implementation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • module

        public static final java.lang.String module
    • Method Detail

      • getCurrentContainerId

        public static java.lang.String getCurrentContainerId​(ModelForm modelForm,
                                                             java.util.Map<java.lang.String,​java.lang.Object> context)
      • getCurrentFormName

        public static java.lang.String getCurrentFormName​(ModelForm modelForm,
                                                          java.util.Map<java.lang.String,​java.lang.Object> context)
      • getFocusFieldName

        public static java.lang.String getFocusFieldName​(ModelForm modelForm,
                                                         java.util.Map<java.lang.String,​java.lang.Object> context)
      • getFocusFieldName

        public java.lang.String getFocusFieldName()
      • render

        public void render​(java.lang.Appendable writer,
                           java.util.Map<java.lang.String,​java.lang.Object> context)
                    throws java.lang.Exception
        Renders this form to a writer, as defined with the FormStringRenderer implementation.
        Parameters:
        writer - The Writer that the form text will be written to
        context - Map containing the form context; the following are reserved words in this context: parameters (Map), isError (Boolean), itemIndex (Integer, for lists only, otherwise null), formName (String, optional alternate name for form, defaults to the value of the name attribute)
        Throws:
        java.lang.Exception