|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.struts.action.ActionForm
org.apache.struts.validator.ValidatorForm
org.apache.struts.validator.ValidatorActionForm
jp.terasoluna.fw.web.struts.form.ValidatorActionFormEx
public class ValidatorActionFormEx
Base class of Validator Framework supported ActionForm.
This is the actionform base class in which ValidatorActionForm of
Struts is inherited.
Following is the configuration example of action form that inherits this class
in Struts configuration file (struts-config.xml) .
Configuration example of action form in Struts configuration file (struts-config.xml)
<form-beans>
<form-bean
name="_validateSampleForm"
type="jp.terasoluna.sample.xxxx.SampleValidatorActionFormEx"
>
</form-bean>
</form-beans>
Specify form name in name attribute of <form-bean> tag
and class name in type attribute.Implementation example of form
public class SampleValidatorActionForm extends ValidatorActionFormEx {
// Company ID
private String companyId = null;
// User ID
private String userId = null;
// Password
private String password = null;
...
// company ID setter
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
// company ID getter
public String getCompanyId() {
return companyId;
}
...
}
Creates the field of the information that needs to be retained in form and provides the description about the
getter/setter of that field.
Functionality provided by extending this class
DynaValidatorActionFormEx
,
RequestProcessorEx
,
Resetter
,
ResetterPlugIn
,
FieldChecksEx
,
BLogicMapper
,
Serialized FormField Summary | |
---|---|
private static org.apache.commons.logging.Log |
log
Log class. |
private boolean |
modified
Field value change flag. |
private static long |
serialVersionUID
Serial version ID. |
Fields inherited from class org.apache.struts.validator.ValidatorForm |
---|
page, validatorResults |
Fields inherited from class org.apache.struts.action.ActionForm |
---|
multipartRequestHandler, servlet |
Constructor Summary | |
---|---|
ValidatorActionFormEx()
|
Method Summary | |
---|---|
int |
getIndexCount(java.lang.String fieldName)
Fetches the record count of specified field. |
java.lang.Object |
getIndexedValue(java.lang.String name,
int index)
Fetches the specified indexed property value. |
boolean |
isModified()
Fetches field value change flag. |
void |
reset(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
Resets the field value of action form. |
void |
setIndexedValue(java.lang.String name,
int index,
java.lang.Object value)
Sets property value to the specified position of index. |
void |
setModified(boolean modified)
Sets field value change flag. |
Methods inherited from class org.apache.struts.validator.ValidatorActionForm |
---|
getValidationKey |
Methods inherited from class org.apache.struts.validator.ValidatorForm |
---|
getPage, getResultValueMap, getValidatorResults, setPage, setValidatorResults, validate |
Methods inherited from class org.apache.struts.action.ActionForm |
---|
getMultipartRequestHandler, getServlet, getServletWrapper, reset, setMultipartRequestHandler, setServlet, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private static org.apache.commons.logging.Log log
private boolean modified
Constructor Detail |
---|
public ValidatorActionFormEx()
Method Detail |
---|
public java.lang.Object getIndexedValue(java.lang.String name, int index)
getIndexedValue
in interface FormEx
name
- Property name to be fetched index
- Index to be fetched
public int getIndexCount(java.lang.String fieldName)
getIndexCount
in interface FormEx
fieldName
- Field name for fetchign the records.
Returns 0 when it is not possible to fetch the property name.
public void setIndexedValue(java.lang.String name, int index, java.lang.Object value)
setIndexedValue
in interface FormEx
name
- Indexed property name to be setindex
- Index position to be setvalue
- Property value to be setpublic boolean isModified()
isModified
in interface FormEx
public void setModified(boolean modified)
setModified
in interface FormEx
modified
- Field value change flagpublic void reset(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
reset
in class org.apache.struts.validator.ValidatorForm
mapping
- Mapping informationrequest
- Request information
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |