Class HtmlForm

    • Constructor Detail

      • HtmlForm

        public HtmlForm​(RecordTemplate template)
                 throws FormException
        Creates a new HTML form from the specified template of records.
        Parameters:
        template - the record template from which the form is built.
        Throws:
        FormException - if an error occurs while setting up the form.
    • Method Detail

      • setFileName

        public void setFileName​(String fileName)
        Sets the HTML file into which the form should be printed.
        Parameters:
        fileName - the HTML file.
      • display

        public void display​(javax.servlet.jsp.JspWriter jw,
                            PagesContext pagesContext,
                            DataRecord record)
        Prints the HTML layout of the dataRecord using the RecordTemplate to extract labels and extra informations. The value formats may be adapted to a local language. Never throws an Exception but log a silvertrace and writes an empty string when :
        • a field is unknown by the template.
        • a field has not the required type.
        Specified by:
        display in interface Form
        Specified by:
        display in class AbstractForm
        Parameters:
        jw - the JSP writer.
        pagesContext - the JSP page context.
        record - the record the data records embbed the form fields.
      • toString

        public String toString​(PagesContext pageContext,
                               DataRecord record)
        Prints the HTML layout of the dataRecord using the RecordTemplate to extract labels and extra informations. The value formats may be adapted to a local language. Never throws an Exception but log a silvertrace and writes an empty string when :
        • a field is unknown by the template.
        • a field has not the required type.
        Returns:
        the string to be displayed
      • getTitle

        public String getTitle()
        Get the form title No title for HTML form
        Specified by:
        getTitle in interface Form
        Overrides:
        getTitle in class AbstractForm
        Returns:
        the title of this form or an empty string if it isn't set.