public abstract class Form extends Object
Modifier and Type | Field and Description |
---|---|
protected static Logger |
logger
create a static logger.
|
Constructor and Description |
---|
Form() |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
static Form |
getCurrentSessionForm(javax.servlet.http.HttpSession session) |
String |
getErrorMessage(String fieldName)
return the error message for a specific field
|
abstract String[][] |
getFieldPattern()
define a pattern for all field. the first col is field name, the second
is the pattern.
|
String[] |
getFields()
return fields name
|
String |
getHelpMessage(String fieldName)
return the help message for a specific field
|
String |
getJSP()
get the JSP for render the form
|
GenericMessage |
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 form
|
void |
setHelpMessage(String fieldName,
String key) |
void |
setSaved(boolean saved) |
void |
setValue(String fieldName,
String fieldValue) |
void |
setValues(javax.servlet.http.HttpServletRequest request) |
void |
setValues(Map map) |
protected static Logger logger
public abstract String[][] getFieldPattern()
public String getJSP()
public boolean isValid()
public boolean isValid(boolean isLogged)
public GenericMessage getMessage(String fieldName)
public String getErrorMessage(String fieldName)
fieldName
- the name of the fieldpublic String getHelpMessage(String fieldName)
fieldName
- the name of the fieldpublic String[] getFields()
public static Form getSpecialSessionForm(javax.servlet.http.HttpSession session, Object formKey)
public static Form getCurrentSessionForm(javax.servlet.http.HttpSession session)
public void setValues(Map map)
public void setValues(javax.servlet.http.HttpServletRequest request)
public void clear()
public boolean isSaved()
public void setSaved(boolean saved)
Copyright © 2012-2018. All Rights Reserved.