Home > Guides > Tag Developers Guide > Struts Tags > Tag Reference > UI Tag Reference > submit
Icon

Please make sure you have read the Tag Syntax document and understand how tag attribute syntax works.

Description

Render a submit button. The submit tag is used together with the form tag to provide asynchronous form submissions. The submit can have three different types of rendering:

  • input: renders as html <input type="submit"...>
  • image: renders as html <input type="image"...>
  • button: renders as html <button type="submit"...>
Please note that the button type has advantages by adding the possibility to seperate the submitted value from the text shown on the button face, but has issues with Microsoft Internet Explorer at least up to 6.0
Icon

To use method attribute (to use multiple submit buttons which direct to different action methods) you must set struts.enable.DynamicMethodInvocation to true but this can lead to security vulnerability - use with care! Instead you can try to use Multiple Submit Buttons solution.

Icon

This tag works with all themes, but has special importance when combined with the form tag in the ajax theme. Please read up on the ajax theme for more information.

Parameters

Dynamic Attributes Allowed:

true
 

Name

Required

Default

Evaluated

Type

Description

accesskeyfalsefalseStringSet the html accesskey attribute on rendered html element
actionfalsefalseStringSet action attribute.
alignfalsefalseStringHTML align attribute.
cssClassfalsefalseStringThe css class to use for element
cssErrorClassfalsefalseStringThe css error class to use for element
cssErrorStylefalsefalseStringThe css error style definitions for element to use
cssStylefalsefalseStringThe css style definitions for element to use
disabledfalsefalseStringSet the html disabled attribute on rendered html element
errorPositionfalsefalseStringDefine error position of form element (top|bottom)
idfalsefalseStringHTML id attribute
javascriptTooltipfalsefalsefalseBooleanUse JavaScript to generate tooltips
keyfalsefalseStringSet the key (name, value, label) for this particular component
labelfalsefalseStringLabel expression used for rendering an element specific label
labelSeparatorfalse:falseStringString that will be appended to the label
labelpositionfalsefalseStringDefine label position of form element (top/left)
methodfalsefalseStringSet method attribute.
namefalsefalseStringThe name to set for element
onblurfalsefalseString Set the html onblur attribute on rendered html element
onchangefalsefalseStringSet the html onchange attribute on rendered html element
onclickfalsefalseStringSet the html onclick attribute on rendered html element
ondblclickfalsefalseStringSet the html ondblclick attribute on rendered html element
onfocusfalsefalseStringSet the html onfocus attribute on rendered html element
onkeydownfalsefalseStringSet the html onkeydown attribute on rendered html element
onkeypressfalsefalseStringSet the html onkeypress attribute on rendered html element
onkeyupfalsefalseStringSet the html onkeyup attribute on rendered html element
onmousedownfalsefalseStringSet the html onmousedown attribute on rendered html element
onmousemovefalsefalseStringSet the html onmousemove attribute on rendered html element
onmouseoutfalsefalseStringSet the html onmouseout attribute on rendered html element
onmouseoverfalsefalseStringSet the html onmouseover attribute on rendered html element
onmouseupfalsefalseStringSet the html onmouseup attribute on rendered html element
onselectfalsefalseStringSet the html onselect attribute on rendered html element
openTemplatefalsefalseStringSet template to use for opening the rendered html.
requiredLabelfalsefalsefalseBooleanIf set to true, the rendered element will indicate that input is required
requiredPositionfalsefalseStringDefine required position of required form element (left|right)
srcfalsefalseStringSupply an image src for image type submit button. Will have no effect for types input and button.
tabindexfalsefalseStringSet the html tabindex attribute on rendered html element
templatefalsefalseStringThe template (other than default) to use for rendering the element
templateDirfalsefalseStringThe template directory.
themefalsefalseStringThe theme (other than default) to use for rendering the element
titlefalsefalseStringSet the html title attribute on rendered html element
tooltipfalsefalseStringSet the tooltip of this particular component
tooltipConfigfalsefalseStringDeprecated. Use individual tooltip configuration attributes instead.
tooltipCssClassfalseStrutsTTClassicfalseStringCSS class applied to JavaScrip tooltips
tooltipDelayfalseClassicfalseStringDelay in milliseconds, before showing JavaScript tooltips
tooltipIconPathfalsefalseStringIcon path used for image that will have the tooltip
typefalseinputfalseStringThe type of submit to use. Valid values are input, button and image.
valuefalsefalseStringPreset the value of input element.