Class Form

    • Field Detail

      • logger

        protected static Logger logger
        create a static logger.
    • Constructor Detail

      • Form

        public Form()
    • Method Detail

      • getFieldPattern

        public abstract String[][] getFieldPattern()
        define a pattern for all field. the first col is field name, the second is the pattern.
      • getJSP

        public String getJSP()
        get the JSP for render the form
        Returns:
      • isValid

        public boolean isValid()
      • isValid

        public boolean isValid​(boolean isLogged)
        validate the form
        Returns:
        true if all fields is valid, false else.
      • getErrorMessage

        public String getErrorMessage​(String fieldName)
        return the error message for a specific field
        Parameters:
        fieldName - the name of the field
        Returns:
        a text represant a error message
      • getHelpMessage

        public String getHelpMessage​(String fieldName)
        return the help message for a specific field
        Parameters:
        fieldName - the name of the field
        Returns:
        a text represant a help message
      • setHelpMessage

        public void setHelpMessage​(String fieldName,
                                   String key)
      • getFields

        public String[] getFields()
        return fields name
        Returns:
        a array of field name
      • getSpecialSessionForm

        public static Form getSpecialSessionForm​(javax.servlet.http.HttpSession session,
                                                 Object formKey)
      • getCurrentSessionForm

        public static Form getCurrentSessionForm​(javax.servlet.http.HttpSession session)
      • setValue

        public void setValue​(String fieldName,
                             String fieldValue)
      • setValues

        public void setValues​(Map map)
      • setValues

        public void setValues​(javax.servlet.http.HttpServletRequest request)
      • clear

        public void clear()
      • isSaved

        public boolean isSaved()
      • setSaved

        public void setSaved​(boolean saved)