|
|||||||||
| 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.appfuse.webapp.form.BaseForm
org.appfuse.webapp.form.UploadForm
public class UploadForm
This class is modeled after the UploadForm from the struts-upload example application. For more information on implementation details, please see that application.
| Field Summary | |
|---|---|
static String |
ERROR_PROPERTY_MAX_LENGTH_EXCEEDED
|
protected FormFile |
file
The file that the user has uploaded |
protected String |
name
The value of the text the user has sent as form data |
| Fields inherited from class org.apache.struts.validator.ValidatorForm |
|---|
page, validatorResults |
| Fields inherited from class org.apache.struts.action.ActionForm |
|---|
multipartRequestHandler, servlet |
| Constructor Summary | |
|---|---|
UploadForm()
|
|
| Method Summary | |
|---|---|
FormFile |
getFile()
Retrieve a representation of the file the user has uploaded |
String |
getName()
Retrieve the name the user has given the uploaded file |
void |
setFile(FormFile file)
Set a representation of the file the user has uploaded |
void |
setName(String name)
Set the name of the uploaded file (by the user) |
ActionErrors |
validate(ActionMapping mapping,
HttpServletRequest request)
Check to make sure the client hasn't exceeded the maximum allowed upload size inside of this validate method. |
| Methods inherited from class org.appfuse.webapp.form.BaseForm |
|---|
equals, hashCode, toString |
| Methods inherited from class org.apache.struts.validator.ValidatorForm |
|---|
getPage, getResultValueMap, getValidationKey, getValidatorResults, reset, setPage, setValidatorResults |
| Methods inherited from class org.apache.struts.action.ActionForm |
|---|
getMultipartRequestHandler, getServlet, getServletWrapper, reset, setMultipartRequestHandler, setServlet, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String ERROR_PROPERTY_MAX_LENGTH_EXCEEDED
protected String name
protected FormFile file
| Constructor Detail |
|---|
public UploadForm()
| Method Detail |
|---|
public String getName()
public void setName(String name)
name - public FormFile getFile()
public void setFile(FormFile file)
file - the file to upload
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request)
validate in class BaseFormmapping - The ActionMapping used to select this
instancerequest - The servlet request we are processing
ActionErrors object that encapsulates any
validation errors
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||