Java Doc for UIBean.java in  » Web-Framework » struts-2.0.11 » org » apache » struts2 » components » Java Source Code / Java DocumentationJava Source Code and Java Documentation

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 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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'}" />
 
 


Field Summary
protected  Stringaccesskey
    
protected  StringcssClass
    
protected  StringcssStyle
    
protected  StringdefaultTemplateDir
    
protected  StringdefaultUITheme
    
protected  Stringdisabled
    
protected  Stringkey
    
protected  Stringlabel
    
protected  StringlabelPosition
    
protected  Stringname
    
protected  Stringonblur
    
protected  Stringonchange
    
protected  Stringonclick
    
protected  Stringondblclick
    
protected  Stringonfocus
    
protected  Stringonkeydown
    
protected  Stringonkeypress
    
protected  Stringonkeyup
    
protected  Stringonmousedown
    
protected  Stringonmousemove
    
protected  Stringonmouseout
    
protected  Stringonmouseover
    
protected  Stringonmouseup
    
protected  Stringonselect
    
protected  HttpServletRequestrequest
    
protected  Stringrequired
    
protected  Stringrequiredposition
    
protected  HttpServletResponseresponse
    
protected  Stringtabindex
    
protected  Stringtemplate
    
protected  StringtemplateDir
    
protected  TemplateEngineManagertemplateEngineManager
    
protected  StringtemplateSuffix
    
protected  Stringtheme
    
protected  Stringtitle
    
protected  Stringtooltip
    
protected  StringtooltipConfig
    
protected  Stringvalue
    

Constructor Summary
public  UIBean(ValueStack stack, HttpServletRequest request, HttpServletResponse response)
    

Method Summary
public  voidaddFormParameter(String key, Object value)
    
protected  TemplatebuildTemplateName(String myTemplate, String myDefaultTemplate)
    
protected  voidenableAncestorFormCustomOnsubmit()
    
public  booleanend(Writer writer, String body)
    
protected  Stringescape(String name)
    
protected  voidevaluateExtraParams()
    
protected  booleanevaluateNameValue()
    
public  voidevaluateParams()
    
abstract protected  StringgetDefaultTemplate()
     A contract that requires each concrete UI Tag to specify which template should be used as a default.
public  StringgetTemplate()
    
public  StringgetTemplateDir()
    
public  StringgetTheme()
    
protected  MapgetTooltipConfig(UIBean component)
    
protected  ClassgetValueClassType()
    
protected  voidmergeTemplate(Writer writer, Template template)
    
protected  voidpopulateComponentHtmlId(Form form)
     Create HTML id element for the component and populate this component parmaeter map.
public  voidsetAccesskey(String accesskey)
    
public  voidsetCssClass(String cssClass)
    
public  voidsetCssStyle(String cssStyle)
    
public  voidsetDefaultTemplateDir(String dir)
    
public  voidsetDefaultUITheme(String theme)
    
public  voidsetDisabled(String disabled)
    
public  voidsetKey(String key)
    
public  voidsetLabel(String label)
    
public  voidsetLabelposition(String labelPosition)
    
public  voidsetName(String name)
    
public  voidsetOnblur(String onblur)
    
public  voidsetOnchange(String onchange)
    
public  voidsetOnclick(String onclick)
    
public  voidsetOndblclick(String ondblclick)
    
public  voidsetOnfocus(String onfocus)
    
public  voidsetOnkeydown(String onkeydown)
    
public  voidsetOnkeypress(String onkeypress)
    
public  voidsetOnkeyup(String onkeyup)
    
public  voidsetOnmousedown(String onmousedown)
    
public  voidsetOnmousemove(String onmousemove)
    
public  voidsetOnmouseout(String onmouseout)
    
public  voidsetOnmouseover(String onmouseover)
    
public  voidsetOnmouseup(String onmouseup)
    
public  voidsetOnselect(String onselect)
    
public  voidsetRequired(String required)
    
public  voidsetRequiredposition(String requiredposition)
    
public  voidsetTabindex(String tabindex)
    
public  voidsetTemplate(String template)
    
public  voidsetTemplateDir(String templateDir)
    
public  voidsetTemplateEngineManager(TemplateEngineManager mgr)
    
public  voidsetTheme(String theme)
    
public  voidsetTitle(String title)
    
public  voidsetTooltip(String tooltip)
    
public  voidsetTooltipConfig(String tooltipConfig)
    
public  voidsetValue(String value)
    

Field Detail
accesskey
protected String accesskey(Code)



cssClass
protected String cssClass(Code)



cssStyle
protected String cssStyle(Code)



defaultTemplateDir
protected String defaultTemplateDir(Code)



defaultUITheme
protected String defaultUITheme(Code)



disabled
protected String disabled(Code)



key
protected String key(Code)



label
protected String label(Code)



labelPosition
protected String labelPosition(Code)



name
protected String name(Code)



onblur
protected String onblur(Code)



onchange
protected String onchange(Code)



onclick
protected String onclick(Code)



ondblclick
protected String ondblclick(Code)



onfocus
protected String onfocus(Code)



onkeydown
protected String onkeydown(Code)



onkeypress
protected String onkeypress(Code)



onkeyup
protected String onkeyup(Code)



onmousedown
protected String onmousedown(Code)



onmousemove
protected String onmousemove(Code)



onmouseout
protected String onmouseout(Code)



onmouseover
protected String onmouseover(Code)



onmouseup
protected String onmouseup(Code)



onselect
protected String onselect(Code)



request
protected HttpServletRequest request(Code)



required
protected String required(Code)



requiredposition
protected String requiredposition(Code)



response
protected HttpServletResponse response(Code)



tabindex
protected String tabindex(Code)



template
protected String template(Code)



templateDir
protected String templateDir(Code)



templateEngineManager
protected TemplateEngineManager templateEngineManager(Code)



templateSuffix
protected String templateSuffix(Code)



theme
protected String theme(Code)



title
protected String title(Code)



tooltip
protected String tooltip(Code)



tooltipConfig
protected String tooltipConfig(Code)



value
protected String value(Code)




Constructor Detail
UIBean
public UIBean(ValueStack stack, HttpServletRequest request, HttpServletResponse response)(Code)




Method Detail
addFormParameter
public void addFormParameter(String key, Object value)(Code)



buildTemplateName
protected Template buildTemplateName(String myTemplate, String myDefaultTemplate)(Code)



enableAncestorFormCustomOnsubmit
protected void enableAncestorFormCustomOnsubmit()(Code)



end
public boolean end(Writer writer, String body)(Code)



escape
protected String escape(String name)(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.



getTemplate
public String getTemplate()(Code)



getTemplateDir
public String getTemplateDir()(Code)



getTheme
public String getTheme()(Code)



getTooltipConfig
protected Map getTooltipConfig(UIBean component)(Code)



getValueClassType
protected Class getValueClassType()(Code)



mergeTemplate
protected void mergeTemplate(Writer writer, Template template) throws Exception(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 :-
  1. This component id attribute
  2. [containing_form_id]_[this_component_name]
  3. [this_component_name]

Parameters:
  form -



setAccesskey
public void setAccesskey(String accesskey)(Code)



setCssClass
public void setCssClass(String cssClass)(Code)



setCssStyle
public void setCssStyle(String cssStyle)(Code)



setDefaultTemplateDir
public void setDefaultTemplateDir(String dir)(Code)



setDefaultUITheme
public void setDefaultUITheme(String theme)(Code)



setDisabled
public void setDisabled(String disabled)(Code)



setKey
public void setKey(String key)(Code)



setLabel
public void setLabel(String label)(Code)



setLabelposition
public void setLabelposition(String labelPosition)(Code)



setName
public void setName(String name)(Code)



setOnblur
public void setOnblur(String onblur)(Code)



setOnchange
public void setOnchange(String onchange)(Code)



setOnclick
public void setOnclick(String onclick)(Code)



setOndblclick
public void setOndblclick(String ondblclick)(Code)



setOnfocus
public void setOnfocus(String onfocus)(Code)



setOnkeydown
public void setOnkeydown(String onkeydown)(Code)



setOnkeypress
public void setOnkeypress(String onkeypress)(Code)



setOnkeyup
public void setOnkeyup(String onkeyup)(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)



setOnselect
public void setOnselect(String onselect)(Code)



setRequired
public void setRequired(String required)(Code)



setRequiredposition
public void setRequiredposition(String requiredposition)(Code)



setTabindex
public void setTabindex(String tabindex)(Code)



setTemplate
public void setTemplate(String template)(Code)



setTemplateDir
public void setTemplateDir(String templateDir)(Code)



setTemplateEngineManager
public void setTemplateEngineManager(TemplateEngineManager mgr)(Code)



setTheme
public void setTheme(String theme)(Code)



setTitle
public void setTitle(String title)(Code)



setTooltip
public void setTooltip(String tooltip)(Code)



setTooltipConfig
public void setTooltipConfig(String tooltipConfig)(Code)



setValue
public void setValue(String value)(Code)



Fields inherited from org.apache.struts2.components.Component
final public static String COMPONENT_STACK(Code)(Java Doc)
protected ActionMapper actionMapper(Code)(Java Doc)
protected String id(Code)(Java Doc)
protected Map parameters(Code)(Java Doc)
protected ValueStack stack(Code)(Java Doc)

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)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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