|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.opensymphony.webwork.components.Component
com.opensymphony.webwork.components.UIBean
public abstract class UIBean
UIBean is the standard superclass of all webwork UI componentns. It defines common webwork 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 |
tooltipIcon | String | /webwork/static/tooltip/tooltip.gif | The url to the tooltip icon | tooltipAboveMousePointer | Boolean | false | Places the tooltip above the mousepointer. Additionally applied the tooltipOffseY allows to set the vertical distance from the mousepointer. |
tooltipBgColor | String | #e6ecff | Background color of the tooltip. |
tooltipBgImg | String | none | Background image. |
tooltipBorderWidth | String | 1 | Width of tooltip border. |
tooltipBorderColor | String | #003399 | Background color of the tooltip |
tooltipDelay | String | 500 | Tooltip shows up after the specified timeout (miliseconds). A behavior similar to that of OS based tooltips. |
tooltipFixCoordinateX | String | not specified | Fixes the tooltip to the X co-ordinates specified. Useful for example if combined with tooltipSticky attribute. |
tooltipFixCoordinateY | String | not specified | Fixes the tooltip to the Y co-ordinates specified. Useful for example if combined with tooltipSticky attribute. |
tooltipFontColor | String | #000066 | Font color. |
tooltipFontFace | String | arial,helvetica,sans-serif | Font face/family eg. verdana,geneva,sans-serif |
tooltipFontSize | String | 11px | Font size + unit eg. 30px |
tooltipFontWeight | String | normal | Font weight. either normal or bold |
tooltipLeftOfMousePointer | Boolean | false | Tooltip positioned on the left side of the mousepointer |
tooltipOffsetX | String | 12 | Horizontal offset from mouse-pointer. |
tooltipOffsetY | String | 15 | Vertical offset from mouse-pointer. |
tooltipOpacity | String | 100 | Transparency of tooltip. Opacity is the opposite of transparency. Value must be a number between 0 (fully transparent) and 100 (opaque, no transparency). Not (yet) supported by Opera. |
tooltipPadding | String | 3 | Inner spacing, ie. the spacing between border and content, for instance text or image(s) |
tooltipShadowColor | String | #cccccc | Creates shadow with the specified color. |
tooltipShadowWidth | String | 5 | Creates shodow with the specified width (offset). |
tooltipStatic | Boolean | false | Like OS-based tooltips, the tooltip doesn't follow the movements of the mouse pointer. |
tooltipSticky | Boolean | false | The tooltip stays fixed on its inital position until anohter tooltip is activated, or the user clicks on the document. |
tooltipStayAppearTime | String | 0 | Specifies a time span in miliseconds after which the tooltip disappears, even if the mousepointer is still on the concerned HTML element, with value <=0 it acts as if no time span is defined |
tooltipTextAlign | String | left | Aligns the text of both the title and the body of the tooltip. Either right, left or justify |
tooltipTitle | String | none | title |
tooltipTitleColor | String | #ffffff | Color of the title text |
tooltipWidth | String | 300 | Width of tooltip |
<!-- Example 1: --> <ww:form tooltipConfig="#{'tooltipAboveMousePointer':'true', 'tooltipBgColor='#eeeeee'}" .... > .... <ww:textfield label="Customer Name" tooltip="Enter the customer name" .... /> .... </ww:form> <!-- Example 2: --> <ww:form tooltipConfig="#{'tooltipAboveMousePointer':'true', 'tooltipLeftOfMousePointer':'true'}" ... > .... <ww:textfield label="Address" tooltip="Enter your address" tooltipConfig="#{'tooltipLeftOfMousePointer':'false'}" /> .... </ww:form> <-- Example 3: --> <ww:textfield label="Customer Name" tooltip="One of our customer Details'"> <ww:param name="tooltipConfig"> tooltipWidth = 150 | tooltipAboveMousePointer = false | tooltipLeftOfMousePointer = false </ww:param> </ww:textfield> <-- Example 4: --> <ww:textfield label="Customer Address" tooltip="Enter The Customer Address" > <ww:param name="tooltipConfig" value="#{'tooltipStatic':'true', 'tooltipSticky':'true', 'tooltipAboveMousePointer':'false', 'tooltipLeftOfMousePointer':'false'}" /> </ww:textfield> <-- Example 5: --> <ww:textfield label="Customer Telephone Number" tooltip="Enter customer Telephone Number" tooltipConfig="#{'tooltipBgColor':'#cccccc', 'tooltipFontColor':'#eeeeee', 'tooltipAboveMousePointer':'false', 'tooltipLeftOfMousePointer':'false'}" /<
Field Summary | |
---|---|
protected String |
accesskey
|
protected String |
cssClass
|
protected String |
cssStyle
|
protected String |
disabled
|
protected String |
label
|
protected String |
labelPosition
|
protected String |
name
|
protected String |
onblur
|
protected String |
onchange
|
protected String |
onclick
|
protected String |
ondblclick
|
protected String |
onfocus
|
protected String |
onkeydown
|
protected String |
onkeypress
|
protected String |
onkeyup
|
protected String |
onmousedown
|
protected String |
onmousemove
|
protected String |
onmouseout
|
protected String |
onmouseover
|
protected String |
onmouseup
|
protected String |
onselect
|
protected HttpServletRequest |
request
|
protected String |
required
|
protected String |
requiredposition
|
protected HttpServletResponse |
response
|
protected String |
tabindex
|
protected String |
template
|
protected String |
templateDir
|
protected String |
templateSuffix
|
protected String |
theme
|
protected String |
title
|
protected String |
tooltip
|
protected String |
tooltipConfig
|
protected String |
value
|
Fields inherited from class com.opensymphony.webwork.components.Component |
---|
COMPONENT_STACK, id, parameters, stack |
Constructor Summary | |
---|---|
UIBean(OgnlValueStack stack,
HttpServletRequest request,
HttpServletResponse response)
|
Method Summary | |
---|---|
void |
addFormParameter(String key,
Object value)
|
protected Template |
buildTemplateName(String myTemplate,
String myDefaultTemplate)
|
protected void |
enableAncestorFormCustomOnsubmit()
|
boolean |
end(Writer writer,
String body)
Callback for the end tag of this component. |
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 |
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)
Set the html accesskey attribute on rendered html ekement |
void |
setCssClass(String cssClass)
The css class to use for element |
void |
setCssStyle(String cssStyle)
The css style definitions for element ro use |
void |
setDisabled(String disabled)
Set the html disabled attribute on rendered html element |
void |
setLabel(String label)
Label expression used for rendering a element specific label |
void |
setLabelposition(String labelPosition)
define label position of form element (top/left) |
void |
setLabelPosition(String labelPosition)
Deprecated. please use setLabelposition(String) instead |
void |
setName(String name)
The name to set for element |
void |
setOnblur(String onblur)
Set the html onblur attribute on rendered html element |
void |
setOnchange(String onchange)
Set the html onchange attribute on rendered html element |
void |
setOnclick(String onclick)
Set the html onclick attribute on rendered html element |
void |
setOndblclick(String ondblclick)
Set the html ondblclick attribute on rendered html element |
void |
setOnfocus(String onfocus)
Set the html onfocus attribute on rendered html element |
void |
setOnkeydown(String onkeydown)
Set the html onkeydown attribute on rendered html element |
void |
setOnkeypress(String onkeypress)
Set the html onkeypress attribute on rendered html element |
void |
setOnkeyup(String onkeyup)
Set the html onkeyup attribute on rendered html element |
void |
setOnmousedown(String onmousedown)
Set the html onmousedown attribute on rendered html element |
void |
setOnmousemove(String onmousemove)
Set the html onmousemove attribute on rendered html element |
void |
setOnmouseout(String onmouseout)
Set the html onmouseout attribute on rendered html element |
void |
setOnmouseover(String onmouseover)
Set the html onmouseover attribute on rendered html element |
void |
setOnmouseup(String onmouseup)
Set the html onmouseup attribute on rendered html element |
void |
setOnselect(String onselect)
Set the html onselect attribute on rendered html element |
void |
setRequired(String required)
If set to true, the rendered element will indicate that input is required |
void |
setRequiredposition(String requiredposition)
define required position of required form element (left|right) |
void |
setTabindex(String tabindex)
Set the html tabindex attribute on rendered html element |
void |
setTemplate(String template)
The template (other than default) to use for rendering the element |
void |
setTemplateDir(String templateDir)
The template directory (other than default) to used to find the themes and hence the template. |
void |
setTheme(String theme)
The theme (other than default) to use for rendering the element |
void |
setTitle(String title)
Set the html title attribute on rendered html element |
void |
setTooltip(String tooltip)
Set the tooltip of this particular component |
void |
setTooltipConfig(String tooltipConfig)
Set the tooltip configuration |
void |
setValue(String value)
Preset the value of input element. |
Methods inherited from class com.opensymphony.webwork.components.Component |
---|
addAllParameters, addParameter, altSyntax, copyParams, determineActionURL, determineNamespace, end, fieldError, findAncestor, findString, findString, findValue, findValue, findValue, getComponentStack, getId, getParameters, getStack, popComponentStack, setId, start, toString, usesBody |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected HttpServletRequest request
protected HttpServletResponse response
protected String templateSuffix
protected String template
protected String templateDir
protected String theme
protected String cssClass
protected String cssStyle
protected String disabled
protected String label
protected String labelPosition
protected String requiredposition
protected String name
protected String required
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
Constructor Detail |
---|
public UIBean(OgnlValueStack stack, HttpServletRequest request, HttpServletResponse response)
Method Detail |
---|
public boolean end(Writer writer, String body)
Component
end
in class Component
writer
- the output writer.body
- the rendered body.
protected abstract String getDefaultTemplate()
protected Template buildTemplateName(String myTemplate, String myDefaultTemplate)
protected void mergeTemplate(Writer writer, Template template) throws Exception
Exception
public String getTemplateDir()
public String getTheme()
public void evaluateParams()
protected String escape(String name)
protected void evaluateExtraParams()
protected boolean evaluateNameValue()
protected Class getValueClassType()
public void addFormParameter(String key, Object value)
protected void enableAncestorFormCustomOnsubmit()
protected Map getTooltipConfig(UIBean component)
protected void populateComponentHtmlId(Form form)
form
- public void setTheme(String theme)
public String getTemplate()
public void setTemplateDir(String templateDir)
public void setTemplate(String template)
public void setCssClass(String cssClass)
public void setCssStyle(String cssStyle)
public void setTitle(String title)
public void setDisabled(String disabled)
public void setLabel(String label)
public void setLabelPosition(String labelPosition)
setLabelposition(String)
instead
public void setLabelposition(String labelPosition)
public void setRequiredposition(String requiredposition)
public void setName(String name)
public void setRequired(String required)
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)
|
WebWork Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |