Class BasicFormBean
- java.lang.Object
-
- net.anotheria.anosite.handler.validation.AbstractFormBean
-
- net.anotheria.anosite.handler.validation.BasicFormBean
-
- All Implemented Interfaces:
Serializable
public class BasicFormBean extends AbstractFormBean
Basic form bean. Use it as example for real form beans.- Author:
- Alexandr Bolbat
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringATTR_NAME_FIRST_NAMEAttribute name for first name.static StringATTR_NAME_LAST_NAMEAttribute name for last name.-
Fields inherited from class net.anotheria.anosite.handler.validation.AbstractFormBean
EMPTY_BOOLEAN, EMPTY_LIST, EMPTY_NUMBER, EMPTY_SET, EMPTY_STRING
-
-
Constructor Summary
Constructors Constructor Description BasicFormBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetFieldValue(String fieldName)Get form field value by form field name.StringgetFirstName()Get first name in right type.StringgetLastName()Get last name in right type.protected voidprepare(jakarta.servlet.http.HttpServletRequest req)Any bean extended from this abstract class must have possibility to initialize by self from request.-
Methods inherited from class net.anotheria.anosite.handler.validation.AbstractFormBean
getFieldsNames, readField, readField, saveField
-
-
-
-
Field Detail
-
ATTR_NAME_FIRST_NAME
public static final String ATTR_NAME_FIRST_NAME
Attribute name for first name.- See Also:
- Constant Field Values
-
ATTR_NAME_LAST_NAME
public static final String ATTR_NAME_LAST_NAME
Attribute name for last name.- See Also:
- Constant Field Values
-
-
Method Detail
-
getFieldValue
public Object getFieldValue(String fieldName)
Description copied from class:AbstractFormBeanGet form field value by form field name. By default it use internal storage.- Overrides:
getFieldValuein classAbstractFormBean- Parameters:
fieldName- - form field name- Returns:
Object
-
prepare
protected void prepare(jakarta.servlet.http.HttpServletRequest req)
Description copied from class:AbstractFormBeanAny bean extended from this abstract class must have possibility to initialize by self from request.- Specified by:
preparein classAbstractFormBean- Parameters:
req- request
-
-