Package org.javlo.component.form
Class Form
- java.lang.Object
-
- org.javlo.component.form.Form
-
- Direct Known Subclasses:
AddressFormRegister
,FormMailing
public abstract class Form extends Object
- Author:
- pvandermaesen
-
-
Constructor Summary
Constructors Constructor Description Form()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
clear()
static Form
getCurrentSessionForm(javax.servlet.http.HttpSession session)
String
getErrorMessage(String fieldName)
return the error message for a specific fieldabstract String[][]
getFieldPattern()
define a pattern for all field. the first col is field name, the second is the pattern.String[]
getFields()
return fields nameString
getHelpMessage(String fieldName)
return the help message for a specific fieldString
getJSP()
get the JSP for render the formGenericMessage
getMessage(String fieldName)
static Form
getSpecialSessionForm(javax.servlet.http.HttpSession session, Object formKey)
String
getValue(String fieldName)
boolean
isSaved()
boolean
isValid()
boolean
isValid(boolean isLogged)
validate the formvoid
setHelpMessage(String fieldName, String key)
void
setSaved(boolean saved)
void
setValue(String fieldName, String fieldValue)
void
setValues(Map map)
void
setValues(javax.servlet.http.HttpServletRequest request)
-
-
-
Field Detail
-
logger
protected static Logger logger
create a static logger.
-
-
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.
-
getMessage
public GenericMessage getMessage(String fieldName)
-
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
-
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)
-
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)
-
-