public abstract class UIBean extends Component
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 |
cssClass | simple | String | error class attribute |
cssStyle | simple | String | error 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 |
errorPosition | xhtml | String | define error position of form element (top|bottom), default to top |
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 |
ondblclick | 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 |
<!-- Example 1: --> <s:form tooltipDelay="500" tooltipIconPath="/myImages/myIcon.gif" .... > .... <s:textfield label="Customer Name" tooltip="Enter the customer name" .... /> .... </s:form> <!-- Example 2: --> <s:form tooltipDelay="500" tooltipIconPath="/myImages/myIcon.gif" .... > .... <s:textfield label="Address" tooltip="Enter your address" tooltipDelay="5000" /> .... </s:form> <-- Example 3: --> <s:textfield label="Customer Name" tooltip="One of our customer Details"> <s:param name="tooltipDelay"> 500 </s:param> <s:param name="tooltipIconPath"> /myImages/myIcon.gif </s:param> </s:textfield> <-- Example 4: --> <s:textfield label="Customer Address" tooltip="Enter The Customer Address" > <s:param name="tooltipDelay" value="500" /> </s:textfield> <-- Example 5: --> <s:textfield label="Customer Telephone Number" tooltip="Enter customer Telephone Number" tooltipDelay="500" tooltipIconPath="/myImages/myIcon.gif" />
actionMapper, COMPONENT_STACK, parameters, stack, throwExceptionOnELFailure
Constructor and Description |
---|
UIBean(ValueStack stack,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
Modifier and Type | Method and Description |
---|---|
void |
addFormParameter(String key,
Object value) |
protected Template |
buildTemplateName(String myTemplate,
String myDefaultTemplate) |
void |
copyParams(Map params)
Pushes this component's parameter Map as well as the component itself on to the stack
and then copies the supplied parameters over.
|
protected void |
enableAncestorFormCustomOnsubmit() |
boolean |
end(Writer writer,
String body)
Callback for the end tag of this component.
|
protected String |
ensureAttributeSafelyNotEscaped(String val)
Ensures an unescaped attribute value cannot be vulnerable to XSS attacks
|
protected String |
escape(String name) |
protected void |
evaluateExtraParams() |
protected boolean |
evaluateNameValue() |
void |
evaluateParams() |
protected abstract String |
getDefaultTemplate()
A contract that requires each concrete UI Tag to specify which template should be used as a default.
|
String |
getId()
Get's the id for referencing element.
|
protected Set<String> |
getStandardAttributes() |
String |
getTemplate() |
String |
getTemplateDir() |
String |
getTheme() |
protected Map |
getTooltipConfig(UIBean component) |
protected Class |
getValueClassType() |
protected void |
mergeTemplate(Writer writer,
Template template) |
protected void |
populateComponentHtmlId(Form form)
Create HTML id element for the component and populate this component parmaeter
map.
|
void |
setAccesskey(String accesskey) |
void |
setCssClass(String cssClass) |
void |
setCssErrorClass(String cssErrorClass) |
void |
setCssErrorStyle(String cssErrorStyle) |
void |
setCssStyle(String cssStyle) |
void |
setDefaultTemplateDir(String dir) |
void |
setDefaultUITheme(String theme) |
void |
setDisabled(String disabled) |
void |
setDynamicAttributes(Map<String,Object> dynamicAttributes) |
void |
setErrorPosition(String errorPosition) |
void |
setId(String id) |
void |
setJavascriptTooltip(String javascriptTooltip) |
void |
setKey(String key) |
void |
setLabel(String label) |
void |
setLabelposition(String labelPosition) |
void |
setLabelSeparator(String labelseparator) |
void |
setName(String name) |
void |
setOnblur(String onblur) |
void |
setOnchange(String onchange) |
void |
setOnclick(String onclick) |
void |
setOndblclick(String ondblclick) |
void |
setOnfocus(String onfocus) |
void |
setOnkeydown(String onkeydown) |
void |
setOnkeypress(String onkeypress) |
void |
setOnkeyup(String onkeyup) |
void |
setOnmousedown(String onmousedown) |
void |
setOnmousemove(String onmousemove) |
void |
setOnmouseout(String onmouseout) |
void |
setOnmouseover(String onmouseover) |
void |
setOnmouseup(String onmouseup) |
void |
setOnselect(String onselect) |
void |
setRequiredLabel(String requiredLabel) |
void |
setRequiredPosition(String requiredPosition) |
void |
setTabindex(String tabindex) |
void |
setTemplate(String template) |
void |
setTemplateDir(String templateDir) |
void |
setTemplateEngineManager(TemplateEngineManager mgr) |
void |
setTheme(String theme) |
void |
setTitle(String title) |
void |
setTooltip(String tooltip) |
void |
setTooltipConfig(String tooltipConfig) |
void |
setTooltipCssClass(String tooltipCssClass) |
void |
setTooltipDelay(String tooltipDelay) |
void |
setTooltipIconPath(String tooltipIconPath) |
void |
setValue(String value) |
addAllParameters, addParameter, altSyntax, completeExpressionIfAltSyntax, determineActionURL, determineNamespace, end, fieldError, findAncestor, findString, findString, findStringIfAltSyntax, findValue, findValue, findValue, getComponentStack, getParameters, getStack, popComponentStack, setActionMapper, setThrowExceptionsOnELFailure, setUrlHelper, start, stripExpressionIfAltSyntax, toString, usesBody
protected javax.servlet.http.HttpServletRequest request
protected javax.servlet.http.HttpServletResponse response
protected String templateSuffix
protected String template
protected String templateDir
protected String theme
protected String key
protected String id
protected String cssClass
protected String cssStyle
protected String cssErrorClass
protected String cssErrorStyle
protected String disabled
protected String label
protected String labelPosition
protected String labelSeparator
protected String requiredPosition
protected String errorPosition
protected String name
protected String requiredLabel
protected String tabindex
protected String value
protected String title
protected String onclick
protected String ondblclick
protected String onmousedown
protected String onmouseup
protected String onmouseover
protected String onmousemove
protected String onmouseout
protected String onfocus
protected String onblur
protected String onkeypress
protected String onkeydown
protected String onkeyup
protected String onselect
protected String onchange
protected String accesskey
protected String tooltip
protected String tooltipConfig
protected String javascriptTooltip
protected String tooltipDelay
protected String tooltipCssClass
protected String tooltipIconPath
protected String defaultTemplateDir
protected String defaultUITheme
protected TemplateEngineManager templateEngineManager
protected static ConcurrentMap<Class,Set<String>> standardAttributesMap
public UIBean(ValueStack stack, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
public void setDefaultTemplateDir(String dir)
public void setDefaultUITheme(String theme)
public void setTemplateEngineManager(TemplateEngineManager mgr)
public boolean end(Writer writer, String body)
Component
protected abstract String getDefaultTemplate()
protected void mergeTemplate(Writer writer, Template template) throws Exception
Exception
public String getTemplateDir()
public String getTheme()
public void evaluateParams()
protected String ensureAttributeSafelyNotEscaped(String val)
val
- The value to checkprotected void evaluateExtraParams()
protected boolean evaluateNameValue()
protected Class getValueClassType()
protected void enableAncestorFormCustomOnsubmit()
protected void populateComponentHtmlId(Form form)
escape(String)
, needed eg. for naming Javascript identifiers based on the id value.
The order is as follows :-
form
- public String getId()
public void setId(String id)
public void setTemplateDir(String templateDir)
public void setTheme(String theme)
public String getTemplate()
public void setTemplate(String template)
public void setCssClass(String cssClass)
public void setCssStyle(String cssStyle)
public void setCssErrorClass(String cssErrorClass)
public void setCssErrorStyle(String cssErrorStyle)
public void setTitle(String title)
public void setDisabled(String disabled)
public void setLabel(String label)
public void setLabelSeparator(String labelseparator)
public void setLabelposition(String labelPosition)
public void setRequiredPosition(String requiredPosition)
public void setErrorPosition(String errorPosition)
public void setName(String name)
public void setRequiredLabel(String requiredLabel)
public void setTabindex(String tabindex)
public void setValue(String value)
public void setOnclick(String onclick)
public void setOndblclick(String ondblclick)
public void setOnmousedown(String onmousedown)
public void setOnmouseup(String onmouseup)
public void setOnmouseover(String onmouseover)
public void setOnmousemove(String onmousemove)
public void setOnmouseout(String onmouseout)
public void setOnfocus(String onfocus)
public void setOnblur(String onblur)
public void setOnkeypress(String onkeypress)
public void setOnkeydown(String onkeydown)
public void setOnkeyup(String onkeyup)
public void setOnselect(String onselect)
public void setOnchange(String onchange)
public void setAccesskey(String accesskey)
public void setTooltip(String tooltip)
public void setTooltipConfig(String tooltipConfig)
public void setKey(String key)
public void setJavascriptTooltip(String javascriptTooltip)
public void setTooltipCssClass(String tooltipCssClass)
public void setTooltipDelay(String tooltipDelay)
public void setTooltipIconPath(String tooltipIconPath)
public void copyParams(Map params)
Component
copyParams
in class Component
params
- the parameters to copy.Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.