org.apache.struts2.components |
|
Java Source File Name | Type | Comment |
AbstractRemoteCallUIBean.java | Class | TODO: Document AbstractRemoteCallUIBean. |
ActionComponent.java | Class |
This tag enables developers to call actions directly from a JSP page by specifying the action name and an optional
namespace. |
ActionError.java | Class |
Render action errors if they exists the specific layout of the rendering depends on
the theme itself.
Examples
<s:actionerror />
<s:form .... |
ActionMessage.java | Class |
Render action messages if they exists, specific rendering layout depends on the
theme itself.
Examples
<s:actionmessage />
<s:form .... |
Anchor.java | Class |
A tag that creates a HTML <a href='' /> that when clicked calls a URL remote XMLHttpRequest call via the dojo
framework.
THE FOLLOWING IS ONLY VALID WHEN AJAX IS CONFIGURED
- href
- errorText
- listenTopics
- notifyTopics
- executeScripts
- loadingText
- listenTopics
- handler
- formId
- formFilter
- targets
- showErrorTransportText
- targets
- indicator
'resultDivId' Deprecated. |
AppendIterator.java | Class | |
Autocompleter.java | Class |
The autocomplete tag is a combobox that can autocomplete text entered on the input box.
When used on the "simple" theme, the autocompleter can be used like the ComboBox.
When used on the "ajax" theme, the list can be retieved from an action. |
Bean.java | Class |
Instantiates a class that conforms to the JavaBeans specification. |
Checkbox.java | Class |
Renders an HTML input element of type checkbox, populated by the specified property from the ValueStack. |
CheckboxList.java | Class |
Creates a series of checkboxes from a list. |
ClosingUIBean.java | Class | ClosingUIBean is the standard superclass for UI components such as div etc. |
ComboBox.java | Class |
The combo box is basically an HTML INPUT of type text and HTML SELECT grouped together to give you a combo box
functionality. |
Component.java | Class | Base class to extend for UI components. |
ComponentTest.java | Class | Test case for method findAncestor(Class) in Component and some commons
test cases for Component in general. |
Date.java | Class |
Format Date object in different ways.
The date tag will allow you to format a Date in a quick and easy way.
You can specify a custom format (eg. |
DateTimePicker.java | Class |
Renders a date/time picker in a dropdown container.
A stand-alone DateTimePicker widget that makes it easy to select a date/time, or increment by week, month,
and/or year.
It is possible to customize the user-visible formatting with either the
'formatLength' (long, short, medium or full) or 'displayFormat' attributes. |
Debug.java | Class | |
Div.java | Class |
The div tag when used on the ajax theme, provides a remote call
from the current page to update a section of content without having to refresh the entire page.
It creates a HTML <DIV /> that obtains it's content via a remote XMLHttpRequest call via
the dojo framework.
THE FOLLOWING IS ONLY VALID WHEN AJAX IS CONFIGURED
- href
- errorText
- afterLoading
- executeScripts
- loadingText
- listenTopics
- handler
- formId
- formFilter
- targets
- notifyTopics
- showErrorTransportText
- indicator
'targets' is a list of element ids whose content will be updated with the
text returned from request.
'href' needs to be set as an url tag reference value.
'errorText' is the text that will be displayed when there is an error making the request.
'afterLoading' Deprecated. |
DoubleListUIBean.java | Class | DoubleListUIBean is the standard superclass of all Struts double list handling components. |
DoubleSelect.java | Class |
Renders two HTML select elements with second one changing displayed values depending on selected entry of first one. |
Else.java | Class |
Perform basic condition flow. |
ElseIf.java | Class |
Perform basic condition flow. |
FieldError.java | Class |
Render field errors if they exists. |
File.java | Class |
Renders an HTML file input element. |
Form.java | Class |
Renders HTML an input form.
The remote form allows the form to be submitted without the page being refreshed. |
FormButton.java | Class | FormButton. |
FormButtonTest.java | Class | |
FormTest.java | Class | |
GenericUIBean.java | Class |
Renders an custom UI widget using the specified templates. |
Head.java | Class |
Renders parts of the HEAD section for an HTML file. |
Hidden.java | Class |
Renders an HTML input element of type hidden, populated by the specified property from the ValueStack. |
I18n.java | Class |
Gets a resource bundle and place it on the value stack. |
If.java | Class |
Perform basic condition flow. |
Include.java | Class | |
InputTransferSelect.java | Class |
Create a input transfer select component which is basically an text input
and <select ...> tag with buttons in the middle of them allowing text
to be added to the transfer select. |
IteratorComponent.java | Class |
Iterator will iterate over a value. |
Label.java | Class |
Renders an HTML LABEL that will allow you to output label:name combination that has the same format treatment as
the rest of your UI controls.
Examples
In this example, a label is rendered. |
ListUIBean.java | Class | DoubleListUIBean is the standard superclass of all Struts list handling components. |
MergeIterator.java | Class |
Component for MergeIteratorTag, which job is to merge iterators and successive
call to the merged iterator will cause each merge iterator to have a chance to
expose its element, subsequently next call will allow the next iterator to expose
its element. |
OptGroup.java | Class |
Create a optgroup component which needs to resides within a select tag. |
OptionTransferSelect.java | Class |
Create a option transfer select component which is basically two <select ...>
tag with buttons in the middle of them allowing options in each of the
<select ...> to be moved between themselves. |
Param.java | Class |
This tag can be used to parameterize other tags.
The include tag and bean tag are examples of such tags.
The parameters can be added with or without a name as key.
If the tag provides a name attribute the parameters are added using the
Component.addParameter(StringObject) addParamter method.
For unnamed parameters the Tag must implement the
UnnamedParametric interface defined in
this class (e.g. |
Password.java | Class |
Render an HTML input tag of type password.
Examples
In this example, a password control is displayed. |
Property.java | Class |
Used to get the property of a value, which will default to the top of
the stack if none is specified.
- default (String) - The default value to be used if value attribute is null
- escape (Boolean) - Escape HTML.
|
PropertyTest.java | Class | |
Push.java | Class |
Push value on stack for simplified usage.
- value* (Object) - value to be pushed into the top of the stack
Examples
<s:push value="user">
<s:propery value="firstName" />
<s:propery value="lastName" />
</s:push>
Pushed user into the stack, and hence property tag could access user's properties
(firstName, lastName etc) since user is not at the top of the stack
<s:push value="myObject"> ----- (1)
<s:bean name="jp.SomeBean" id="myBean"/> ----- (2)
<s:param name="myParam" value="top"/> ----- (3)
</s:bean>
</s:push>
when in (1), myObject is at the top of the stack
when in (2), jp.SomeBean is in the top of stack, also in stack's context with key myBean
when in (3), top will get the jp.SomeBean instance
<s:push value="myObject"> ---(A)
<s:bean name="jp.SomeBean" id="myBean"/> ---(B)
<s:param name="myParam" value="top.mySomeOtherValue"/> ---(C)
</s:bean>
</s:push>
when in (A), myObject is at the top of the stack
when in (B), jp.SomeBean is at the top of the stack, also in context with key myBean
when in (C), top refers to jp.SomeBean instance. |
Radio.java | Class |
Render a radio button input field.
Examples
In this example, a radio control is displayed with a list of genders. |
RemoteUICallBean.java | Interface | |
Reset.java | Class |
Render a reset button. |
Select.java | Class |
Render an HTML input tag of type select.
Examples
<s:select label="Pets"
name="petIds"
list="petDao.pets"
listKey="id"
listValue="name"
multiple="true"
size="3"
required="true"
/>
<s:select label="Months"
name="months"
headerKey="-1" headerValue="Select Month"
list="#{'01':'Jan', '02':'Feb', [...]}"
value="selectedMonth"
required="true"
/>
// The month id (01, 02, ...) returned by the getSelectedMonth() call
// against the stack will be auto-selected
Note: For any of the tags that use lists (select probably being the most ubiquitous), which uses the OGNL list
notation (see the "months" example above), it should be noted that the map key created (in the months example,
the '01', '02', etc.) is typed. |
Set.java | Class |
The set tag assigns a value to a variable in a specified scope. |
Submit.java | Class |
Render a submit button. |
TabbedPanel.java | Class |
The tabbedpanel widget is primarily an AJAX component, where each tab can either be local content or remote
content (refreshed each time the user selects that tab).
If the useSelectedTabCookie attribute is set to true, the id of the selected tab is saved in a cookie on activation. |
Text.java | Class |
Render a I18n text message.
The message must be in a resource bundle
with the same name as the action that it is associated with. |
TextArea.java | Class | |
TextField.java | Class |
Render an HTML input field of type text
Examples
In this example, a text control for the "user" property is rendered. |
Token.java | Class |
Stop double-submission of forms.
The token tag is used to help with the "double click" submission problem. |
Tree.java | Class | |
TreeNode.java | Class |
Renders a tree node within a tree widget with AJAX support.
Either of the following combinations should be used depending on if the tree
is to be constrcted dynamically or statically. |
UIBean.java | Class | UIBean is the standard superclass of all Struts UI componentns.
It defines common Struts and html properties all UI components should present for usage.
Attribute |
Theme |
Data Types |
Description |
templateDir |
n/a |
String |
define the template directory |
theme |
n/a |
String |
define the theme name |
template |
n/a |
String |
define the template name |
Attribute |
Theme |
Data Types |
Description |
cssClass |
simple |
String |
define html class attribute |
cssStyle |
simple |
String |
define html style attribute |
title |
simple |
String |
define html title attribute |
disabled |
simple |
String |
define html disabled attribute |
label |
xhtml |
String |
define label of form element |
labelPosition |
xhtml |
String |
define label position of form element (top/left), default to left |
requiredposition |
xhtml |
String |
define required label position of form element (left/right), default to right |
name |
simple |
String |
Form Element's field name mapping |
required |
xhtml |
Boolean |
add * to label (true to add false otherwise) |
tabIndex |
simple |
String |
define html tabindex attribute |
value |
simple |
Object |
define value of form element |
Attribute |
Theme |
Data Types |
Description |
onclick |
simple |
String |
html javascript onclick attribute |
ondbclick |
simple |
String |
html javascript ondbclick attribute |
onmousedown |
simple |
String |
html javascript onmousedown attribute |
onmouseup |
simple |
String |
html javascript onmouseup attribute |
onmouseover |
simple |
String |
html javascript onmouseover attribute |
onmouseout |
simple |
String |
html javascript onmouseout attribute |
onfocus |
simple |
String |
html javascript onfocus attribute |
onblur |
simple |
String |
html javascript onblur attribute |
onkeypress |
simple |
String |
html javascript onkeypress attribute |
onkeyup |
simple |
String |
html javascript onkeyup attribute |
onkeydown |
simple |
String |
html javascript onkeydown attribute |
onselect |
simple |
String |
html javascript onselect attribute |
onchange |
simple |
String |
html javascript onchange attribute |
Attribute |
Data Type |
Default |
Description |
tooltip |
String |
none |
Set the tooltip of this particular component |
jsTooltipEnabled |
String |
false |
Enable js tooltip rendering |
tooltipIcon |
String |
/struts/static/tooltip/tooltip.gif |
The url to the tooltip icon |
tooltipDelay |
String |
500 |
Tooltip shows up after the specified timeout (miliseconds). | UIBeanTest.java | Class | | UIComponentTest.java | Class | Test case common for all UI component in general. | UpDownSelect.java | Class |
Create a Select component with buttons to move the elements in the select component
up and down. | URL.java | Class |
This tag is used to create a URL.
You can use the "param" tag inside the body to provide
additional request parameters.
NOTE:
By default request parameters will be separated using escaped ampersands (i.e., &).
This is necessary for XHTML compliance, however, when using the URL generated by this tag
with the <s:property> tag, the escapeAmp attribute should be used to disable
ampersand escaping.
NOTE:
When includeParams is 'all' or 'get', the parameter defined in param tag will take
precedence and will not be overriden if they exists in the parameter submitted. | URLTest.java | Class | Verifies correct operation of parameter merging. |
|