Class FileUploadTag
java.lang.Object
jakarta.servlet.jsp.tagext.TagSupport
org.deltava.taglib.BrowserInfoTag
org.deltava.taglib.html.ElementTag
org.deltava.taglib.html.FormElementTag
org.deltava.taglib.html.FileUploadTag
- All Implemented Interfaces:
jakarta.servlet.jsp.tagext.IterationTag, jakarta.servlet.jsp.tagext.JspTag, jakarta.servlet.jsp.tagext.Tag, Serializable
A JSP tag to generate a FILE tag.
- Since:
- 1.0
- Version:
- 10.2
- Author:
- Luke
- See Also:
-
Field Summary
Fields inherited from class FormElementTag
_valueFields inherited from class ElementTag
_classes, _data, _outModifier and TypeFieldDescriptionprotected final Collection<String> protected final XMLRendererprotected jakarta.servlet.jsp.JspWriterFields inherited from class jakarta.servlet.jsp.tagext.TagSupport
id, pageContextFields inherited from interface jakarta.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAINFields inherited from interface jakarta.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdoEndTag()Generates the HTML for this Input element.voidrelease()voidsetMax(int maxLen) Sets the maximum length of this field.voidsetMaxSize(int kb) Sets the maximum size for the file.voidsetOnChange(String jscript) Sets the JavaScript onChange event for this field.voidsetSize(int len) Sets the size of this field.Methods inherited from class FormElementTag
setDelimValues, setIdx, setName, setRequired, setValue, validateStateModifier and TypeMethodDescriptionvoidsetDelimValues(String values) Sets multiple values for this input element.voidSets the tab index of this field.voidSets the name of this field.voidsetRequired(boolean isRequired) Sets this field as required for HTML5 browsers.voidSets the value of this input element.protected voidValidates tag state.Methods inherited from class ElementTag
doStartTag, getFormIndexCount, getName, getParentFormTag, setClassName, setID, setNumericAttr, setPageContext, setStyleModifier and TypeMethodDescriptionintprotected intGets and increments the current tab index count for the parent form tag.protected StringgetName()Returns the type of HTML element this tag generated.protected FormTagReturns the parent form tag.voidsetClassName(String cName) Sets the CSS class name of this HTML element.voidSets the ID of this HTML element.protected voidsetNumericAttr(String attrName, int value, int minValue) Sets a numeric attribute.voidsetPageContext(jakarta.servlet.jsp.PageContext ctxt) voidAssociates a CSS style with this HTML element.Methods inherited from class BrowserInfoTag
getBrowserContext, passedCAPTCHAModifier and TypeMethodDescriptionprotected HTTPContextDataFetches the browser data.protected booleanReturns whether the user has passed CAPTCHA validation.Methods inherited from class jakarta.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setParent, setValue
-
Constructor Details
-
FileUploadTag
public FileUploadTag()Creates a new file upload element tag.
-
-
Method Details
-
setSize
public void setSize(int len) Sets the size of this field. This does nothing if a negative, zero or non-numeric value is passed.- Parameters:
len- the size of the field- See Also:
-
setOnChange
Sets the JavaScript onChange event for this field.- Parameters:
jscript- the JavaScript to execute when the field value changes
-
setMax
public void setMax(int maxLen) Sets the maximum length of this field. This does nothing if a negative, zero or non-numeric value is passed.- Parameters:
maxLen- the maximum length of the field- See Also:
-
setMaxSize
public void setMaxSize(int kb) Sets the maximum size for the file. This will NOT provide validation code, instead places a small label to the right of the input box with the size limit displayed.- Parameters:
kb- the size limit in kilobytes
-
release
public void release()- Specified by:
releasein interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
releasein classElementTag
-
doEndTag
public int doEndTag() throws jakarta.servlet.jsp.JspExceptionGenerates the HTML for this Input element.- Specified by:
doEndTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doEndTagin classjakarta.servlet.jsp.tagext.TagSupport- Throws:
jakarta.servlet.jsp.JspException- if an error occurs
-