org.opencms.frontend.templateone.form
Class CmsFileUploadField

java.lang.Object
  extended by org.opencms.frontend.templateone.form.A_CmsField
      extended by org.opencms.frontend.templateone.form.CmsFileUploadField
All Implemented Interfaces:
I_CmsField

public class CmsFileUploadField
extends A_CmsField

Represents a file upload field.


Constructor Summary
CmsFileUploadField()
           
 
Method Summary
 java.lang.String buildHtml(CmsFormHandler formHandler, org.opencms.i18n.CmsMessages messages, java.lang.String errorKey)
          Builds the HTML input element for this element to be used in a frontend JSP.
static java.lang.String getStaticType()
          Returns the type of the input field, e.g.
 java.lang.String getType()
          Returns the type of the input field, e.g.
protected  void setFileSize(int fileSize)
          Sets the size of the uploaded file.
protected  java.lang.String validateValue()
          Validates the input value of this field.
 
Methods inherited from class org.opencms.frontend.templateone.form.A_CmsField
getErrorMessage, getItems, getLabel, getName, getPlaceholder, getPosition, getValidationExpression, getValue, incrementPlaceholder, isMandatory, needsItems, setErrorMessage, setItems, setLabel, setMandatory, setName, setPlaceholder, setPosition, setValidationExpression, setValue, showRowEnd, showRowStart, toString, validate, validateConstraints
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CmsFileUploadField

public CmsFileUploadField()
Method Detail

getType

public java.lang.String getType()
Description copied from interface: I_CmsField
Returns the type of the input field, e.g. "text" or "select".

Returns:
the type of the input field
See Also:
I_CmsField.getType()

getStaticType

public static java.lang.String getStaticType()
Returns the type of the input field, e.g. "text" or "select".

Returns:
the type of the input field

buildHtml

public java.lang.String buildHtml(CmsFormHandler formHandler,
                                  org.opencms.i18n.CmsMessages messages,
                                  java.lang.String errorKey)
Description copied from interface: I_CmsField
Builds the HTML input element for this element to be used in a frontend JSP.

Parameters:
formHandler - the handler of the current form
messages - a resource bundle containing HTML snippets to build the HTML element
errorKey - the key of the current error message
Returns:
the HTML input element for this element to be used in a frontend JSP
See Also:
I_CmsField.buildHtml(CmsFormHandler, org.opencms.i18n.CmsMessages, String)

validateValue

protected java.lang.String validateValue()
Validates the input value of this field.

Overrides:
validateValue in class A_CmsField
Returns:
CmsFormHandler.ERROR_VALIDATION if validation of the input value failed

setFileSize

protected void setFileSize(int fileSize)
Sets the size of the uploaded file.

Parameters:
fileSize - the file size