| java.lang.Object org.apache.struts2.components.Component org.apache.struts2.components.UIBean
All known Subclasses: org.apache.struts2.components.FormButton, org.apache.struts2.components.TextArea, org.apache.struts2.components.File, org.apache.struts2.components.ListUIBean, org.apache.struts2.components.Checkbox, org.apache.struts2.components.GenericUIBean, org.apache.struts2.components.Head, org.apache.struts2.components.Label, org.apache.struts2.components.DateTimePicker, org.apache.struts2.components.FieldError, org.apache.struts2.components.ActionError, org.apache.struts2.components.Token, org.apache.struts2.components.TextField, org.apache.struts2.components.Debug, org.apache.struts2.components.ActionMessage, org.apache.struts2.components.ClosingUIBean, org.apache.struts2.components.Hidden,
UIBean | abstract public class UIBean extends Component (Code) | | 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). A behavior similar to that of OS based tooltips. |
key |
simple |
String |
The name of the property this input field represents. This will auto populate the name, label, and value |
Every Form UI component (in xhtml / css_xhtml or any others that extends of them) could
have tooltip assigned to a them. The Form component's tooltip related attribute once
defined will be applicable to all form UI component that is created under it unless
explicitly overriden by having the Form UI component itself defined that tooltip attribute.
In Example 1, the textfield will inherit the tooltipDelay adn tooltipIcon attribte from
its containing form. In other words, although it doesn't defined a tooltipAboveMousePointer
attribute, it will have that attributes inherited from its containing form.
In Example 2, the the textfield will inherite both the tooltipDelay and
tooltipIcon attribute from its containing form but tooltipDelay
attribute is overriden at the textfield itself. Hence, the textfield actually will
have tooltipIcon defined as /myImages/myIcon.gif, inherited from its containing form and
tooltipDelay defined as 5000, due to overriden at the textfield itself.
Example 3, 4 and 5 shows different way of setting the tooltipConfig attribute.
Example 3:Set tooltip config through body of param tag
Example 4:Set tooltip config through value attribute of param tag
Example 5:Set tooltip config through tooltipConfig attribute of component tag
<!-- Example 1: -->
<s:form
tooltipConfig="#{'tooltipDelay':'500',
'tooltipIcon='/myImages/myIcon.gif'}" .... >
....
<s:textfield label="Customer Name" tooltip="Enter the customer name" .... />
....
</s:form>
<!-- Example 2: -->
<s:form
tooltipConfig="#{'tooltipDelay':'500',
'tooltipIcon':'/myImages/myIcon.gif'}" ... >
....
<s:textfield label="Address"
tooltip="Enter your address"
tooltipConfig="#{'tooltipDelay':'5000'}" />
....
</s:form>
<-- Example 3: -->
<s:textfield
label="Customer Name"
tooltip="One of our customer Details'">
<s:param name="tooltipConfig">
tooltipDelay = 500 |
tooltipIcon = /myImages/myIcon.gif
</s:param>
</s:textfield>
<-- Example 4: -->
<s:textfield
label="Customer Address"
tooltip="Enter The Customer Address" >
<s:param
name="tooltipConfig"
value="#{'tooltipDelay':'500',
'tooltipIcon':'/myImages/myIcon.gif'}" />
</s:textfield>
<-- Example 5: -->
<s:textfield
label="Customer Telephone Number"
tooltip="Enter customer Telephone Number"
tooltipConfig="#{'tooltipDelay':'500',
'tooltipIcon':'/myImages/myIcon.gif'}" />
|
enableAncestorFormCustomOnsubmit | protected void enableAncestorFormCustomOnsubmit()(Code) | | |
evaluateExtraParams | protected void evaluateExtraParams()(Code) | | |
evaluateNameValue | protected boolean evaluateNameValue()(Code) | | |
evaluateParams | public void evaluateParams()(Code) | | |
getDefaultTemplate | abstract protected String getDefaultTemplate()(Code) | | A contract that requires each concrete UI Tag to specify which template should be used as a default. For
example, the CheckboxTab might return "checkbox.vm" while the RadioTag might return "radio.vm". This value
not begin with a '/' unless you intend to make the path absolute rather than relative to the
current theme.
The name of the template to be used as the default. |
getValueClassType | protected Class getValueClassType()(Code) | | |
populateComponentHtmlId | protected void populateComponentHtmlId(Form form)(Code) | | Create HTML id element for the component and populate this component parmaeter
map. Additionally, a parameter named escapedId is populated which contains the found id value filtered by
UIBean.escape(String) , needed eg. for naming Javascript identifiers based on the id value.
The order is as follows :-
- This component id attribute
- [containing_form_id]_[this_component_name]
- [this_component_name]
Parameters: form - |
setAccesskey | public void setAccesskey(String accesskey)(Code) | | |
setDefaultTemplateDir | public void setDefaultTemplateDir(String dir)(Code) | | |
setDefaultUITheme | public void setDefaultUITheme(String theme)(Code) | | |
setLabelposition | public void setLabelposition(String labelPosition)(Code) | | |
setOndblclick | public void setOndblclick(String ondblclick)(Code) | | |
setOnkeydown | public void setOnkeydown(String onkeydown)(Code) | | |
setOnkeypress | public void setOnkeypress(String onkeypress)(Code) | | |
setOnmousedown | public void setOnmousedown(String onmousedown)(Code) | | |
setOnmousemove | public void setOnmousemove(String onmousemove)(Code) | | |
setOnmouseout | public void setOnmouseout(String onmouseout)(Code) | | |
setOnmouseover | public void setOnmouseover(String onmouseover)(Code) | | |
setOnmouseup | public void setOnmouseup(String onmouseup)(Code) | | |
setRequiredposition | public void setRequiredposition(String requiredposition)(Code) | | |
setTemplateDir | public void setTemplateDir(String templateDir)(Code) | | |
setTooltipConfig | public void setTooltipConfig(String tooltipConfig)(Code) | | |
Methods inherited from org.apache.struts2.components.Component | public void addAllParameters(Map params)(Code)(Java Doc) public void addParameter(String key, Object value)(Code)(Java Doc) public boolean altSyntax()(Code)(Java Doc) public void copyParams(Map params)(Code)(Java Doc) protected String determineActionURL(String action, String namespace, String method, HttpServletRequest req, HttpServletResponse res, Map parameters, String scheme, boolean includeContext, boolean encodeResult)(Code)(Java Doc) protected String determineActionURL(String action, String namespace, String method, HttpServletRequest req, HttpServletResponse res, Map parameters, String scheme, boolean includeContext, boolean encodeResult, boolean forceAddSchemeHostAndPort, boolean escapeAmp)(Code)(Java Doc) protected String determineNamespace(String namespace, ValueStack stack, HttpServletRequest req)(Code)(Java Doc) public boolean end(Writer writer, String body)(Code)(Java Doc) protected boolean end(Writer writer, String body, boolean popComponentStack)(Code)(Java Doc) protected StrutsException fieldError(String field, String errorMsg, Exception e)(Code)(Java Doc) protected Component findAncestor(Class clazz)(Code)(Java Doc) protected String findString(String expr)(Code)(Java Doc) protected String findString(String expr, String field, String errorMsg)(Code)(Java Doc) protected Object findValue(String expr)(Code)(Java Doc) protected Object findValue(String expr, String field, String errorMsg)(Code)(Java Doc) protected Object findValue(String expr, Class toType)(Code)(Java Doc) public Stack getComponentStack()(Code)(Java Doc) public String getId()(Code)(Java Doc) public Map getParameters()(Code)(Java Doc) public ValueStack getStack()(Code)(Java Doc) protected void popComponentStack()(Code)(Java Doc) public void setActionMapper(ActionMapper mapper)(Code)(Java Doc) public void setId(String id)(Code)(Java Doc) public boolean start(Writer writer)(Code)(Java Doc) protected String toString(Throwable t)(Code)(Java Doc) public boolean usesBody()(Code)(Java Doc)
|
|
|