org.apache.struts2.components

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Framework » struts 2.0.11 » org.apache.struts2.components 
org.apache.struts2.components
Java Source File NameTypeComment
AbstractRemoteCallUIBean.javaClass TODO: Document AbstractRemoteCallUIBean.
ActionComponent.javaClass

This tag enables developers to call actions directly from a JSP page by specifying the action name and an optional namespace.

ActionError.javaClass Render action errors if they exists the specific layout of the rendering depends on the theme itself.

Examples

 
 <s:actionerror />
 <s:form ....
ActionMessage.javaClass Render action messages if they exists, specific rendering layout depends on the theme itself.

Examples

 
 <s:actionmessage />
 <s:form ....
Anchor.javaClass 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.javaClass
Autocompleter.javaClass

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.javaClass

Instantiates a class that conforms to the JavaBeans specification.

Checkbox.javaClass Renders an HTML input element of type checkbox, populated by the specified property from the ValueStack.
CheckboxList.javaClass Creates a series of checkboxes from a list.
ClosingUIBean.javaClass ClosingUIBean is the standard superclass for UI components such as div etc.
ComboBox.javaClass The combo box is basically an HTML INPUT of type text and HTML SELECT grouped together to give you a combo box functionality.
Component.javaClass Base class to extend for UI components.
ComponentTest.javaClass Test case for method findAncestor(Class) in Component and some commons test cases for Component in general.
Date.javaClass 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.javaClass

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.javaClass
Div.javaClass 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.javaClass DoubleListUIBean is the standard superclass of all Struts double list handling components.
DoubleSelect.javaClass Renders two HTML select elements with second one changing displayed values depending on selected entry of first one.
Else.javaClass

Perform basic condition flow.

ElseIf.javaClass

Perform basic condition flow.

FieldError.javaClass Render field errors if they exists.
File.javaClass Renders an HTML file input element.
Form.javaClass

Renders HTML an input form.

The remote form allows the form to be submitted without the page being refreshed.

FormButton.javaClass FormButton.
FormButtonTest.javaClass
FormTest.javaClass
GenericUIBean.javaClass Renders an custom UI widget using the specified templates.
Head.javaClass Renders parts of the HEAD section for an HTML file.
Hidden.javaClass Renders an HTML input element of type hidden, populated by the specified property from the ValueStack.
I18n.javaClass Gets a resource bundle and place it on the value stack.
If.javaClass

Perform basic condition flow.

Include.javaClass
InputTransferSelect.javaClass 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.javaClass

Iterator will iterate over a value.

Label.javaClass 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.javaClass DoubleListUIBean is the standard superclass of all Struts list handling components.
MergeIterator.javaClass

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.javaClass Create a optgroup component which needs to resides within a select tag.
OptionTransferSelect.javaClass 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.javaClass

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.javaClass Render an HTML input tag of type password.

Examples

In this example, a password control is displayed.

Property.javaClass 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.javaClass
Push.javaClass

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.javaClass Render a radio button input field.

Examples

In this example, a radio control is displayed with a list of genders.

RemoteUICallBean.javaInterface
Reset.javaClass Render a reset button.
Select.javaClass 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.javaClass

The set tag assigns a value to a variable in a specified scope.

Submit.javaClass Render a submit button.
TabbedPanel.javaClass 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.javaClass 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.javaClass
TextField.javaClass Render an HTML input field of type text

Examples

In this example, a text control for the "user" property is rendered.

Token.javaClass Stop double-submission of forms.

The token tag is used to help with the "double click" submission problem.
Tree.javaClass
TreeNode.javaClass 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.javaClass 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.javaClass
UIComponentTest.javaClass Test case common for all UI component in general.
UpDownSelect.javaClass Create a Select component with buttons to move the elements in the select component up and down.
URL.javaClass

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., &amp;). 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.javaClass Verifies correct operation of parameter merging.

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.