Webwork The framework provides a tag library decoupled from the view technology. In this section, we describe each tag in general terms, such as the attributes it supports, what the behaviors are, etcand so forth. Most tags are supported in all template languages (see JSP Tags, Velocity Tags, and FreeMarker Tags), but some are currently only specific to one language. Whenever a tag doesn't have complete support for every langaugelanguage, it will be is noted in on the tag's reference documents.
- Control Tags provide control flow, such as if, else, and iterator.
- Data Tags allow for data manipulation or creation, such as bean, push, and i18n.
- Form Tags provide all form-related HTML output, such as form, textfield, and select.
- HTML Tags provide all non-form-related HTML output, such as a, div, and tabbedPanel.
Control Tags
append
generator
iterator
merge
sort
subset
if
elseIf
elseif
else
Data Tags
action
bean
set
param
push
property
text
i18n
debug
url
include
Form Tags
checkbox
checkboxlist
form
token
label
password
hidden
submit
radio
combobox
select
doubleselect
textarea
textfield
file
datepicker
HTML Tags
...
page.
The types of tags can be broken in to two types: generic and UI. Besides function and responsibility, the biggest difference between the two is that the HTML tags support templates and themes. In addition to the general tag reference, we also provide examples for using these generic tags in each of the support languages.
Be sure to read the Tag Syntax document to learn how tag attribute syntax works.
FAQs
- Why do the form tags put table tags around controls?
- How can I put a String literal in a Javascript call, for instance in an onChange attribute?
- Why won't the 'if' tag evaluate a one char string?
- Why does FreeMarker complain that there's an error in my user-directive when I used JSP Tag?
- Can an action tag run another method apart from the default execute method?
- Why didn't my action tag get executed when I have validation errors?
- Why are request parameters appended to our hyperlinks?
Resources
- Creating a UI Component in Struts 2 (Mark Menard)
- Struts 2 Tags (Rose India)