Java Doc for ButtonBase.java in  » IDE-Netbeans » visualweb.api.designer » com » sun » rave » web » ui » component » 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 » IDE Netbeans » visualweb.api.designer » com.sun.rave.web.ui.component 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.sun.rave.web.ui.component.ButtonBase

All known Subclasses:   com.sun.rave.web.ui.component.Button,
ButtonBase
abstract public class ButtonBase extends javax.faces.component.UICommand (Code)
Use the ui:button tag to display an input button in the rendered HTML page. The input button submits the associated form when activated by the user. The corresponding ActionEvent events then occur on the server.

HTML Elements and Layout

This tag uses the XHTML <input> element to create a button with a text label.

Client Side Javascript Functions

The button component supports a client side javascript object.  To use this object all you need to do is get the object by using document.getElementById() function to get the object.  It is recommended though you pass the result of the getElementById() function to a local variable rather than accessing the functions directly.  The object supports the following functions:
  • isMini(): Test if button style is "mini" for the button.  Returns a boolean.
  • isPrimary(): Test if button style is "primary" for the button.  Returns a boolean.
  • isSecondary(): DEPRECATED use isPrimary instead Test if button style is "secondary" for the button.  Returns a boolean.
  • setMini(mini): Set button style to "mini" for the button. If the mini attribute is set to true, the element is shown with mini styles.
  • setPrimary(primary): Set button style to "primary" for the given button. If the primary attribute is set to true, the element is shown with primary style.
  • setSecondary(secondary): DEPRECATED use setPrimary instead Set button style to "secondary" for the given button. If the secondary attribute is set to true, the element is shown with secondary styles.
There are two other common functions that are useful for a button.
  •  common_stripStyleClass(javascriptObj, classToRemove): Use this function to remove a style class from a any js object that supports the class property.  Takes a javascript object and the style class string to remove.
  •  common_addStyleClass(this, newType): Use this function to add a new style class to any js object that supports the class property. Takes a javascript object and the style class string to add.


Examples

Example 1: Create a primary button:

<ui:button id="button1" text="#{ButtonBean.text}" action="#{ButtonBean.success}" />

Example 2: Create a primary mini button:

<ui:button id="button1" text="#{ButtonBean.text}" action="#{ButtonBean.success}" mini="true" />

Example 3: Create a secondary button:

<ui:button id="button1" text="#{ButtonBean.text}" action="#{ButtonBean.success}" secondary="true" />

Example 4: Create a secondary mini button:

<ui:button id="button1" text="#{ButtonBean.text}" action="#{ButtonBean.success}" secondary="true" isMini="true" />

Example 5: Create a reset button:

<ui:button id="button1" text="#{ButtonBean.text}" action="#{ButtonBean.success}" reset="true" />

Example 6: Create an image button:

<ui:button id="button1" imageURL="#{ButtonBean.image}" action="#{ButtonBean.success}" />

Auto-generated component class. Do NOT modify; all changes will be lost!




Constructor Summary
public  ButtonBase()
    

Method Summary
public  javax.faces.el.MethodBindinggetAction()
    
public  javax.faces.el.MethodBindinggetActionListener()
    
public  StringgetAlt()
    
public  StringgetFamily()
    

Return the identifier of the component family to which this component belongs.

public  StringgetImageURL()
    

Resource path of an image to be displayed to create the visual appearance of this button instead of the standard button image.

public  StringgetOnBlur()
    
public  StringgetOnClick()
    
public  StringgetOnDblClick()
    
public  StringgetOnFocus()
    

Scripting code executed when this component receives focus.

public  StringgetOnKeyDown()
    
public  StringgetOnKeyPress()
    
public  StringgetOnKeyUp()
    
public  StringgetOnMouseDown()
    
public  StringgetOnMouseMove()
    
public  StringgetOnMouseOut()
    
public  StringgetOnMouseOver()
    
public  StringgetOnMouseUp()
    
public  StringgetStyle()
    
public  StringgetStyleClass()
    
public  intgetTabIndex()
    
public  ObjectgetText()
    

Textual label used to create the visual appearance of this button.

public  StringgetToolTip()
    
public  ValueBindinggetValueBinding(String name)
    
public  booleanisDisabled()
    

Indicates that activation of this component by the user is not currently permitted.

public  booleanisEscape()
    
public  booleanisMini()
    

Indicates that the button should be rendered using a different style than normal buttons.

public  booleanisNoTextPadding()
    

Indicates that padding should not be applied to the button text.

public  booleanisPrimary()
    
public  booleanisReset()
    

Indicates that the button should be a HTML reset button.

public  booleanisVisible()
    

Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page.

public  voidrestoreState(FacesContext _context, Object _state)
    
public  ObjectsaveState(FacesContext _context)
    
public  voidsetAction(javax.faces.el.MethodBinding action)
    
public  voidsetActionListener(javax.faces.el.MethodBinding actionListener)
    
public  voidsetAlt(String alt)
    
public  voidsetDisabled(boolean disabled)
    

Indicates that activation of this component by the user is not currently permitted.

public  voidsetEscape(boolean escape)
    
public  voidsetImageURL(String imageURL)
    

Resource path of an image to be displayed to create the visual appearance of this button instead of the standard button image.

public  voidsetMini(boolean mini)
    

Indicates that the button should be rendered using a different style than normal buttons.

public  voidsetNoTextPadding(boolean noTextPadding)
    

Indicates that padding should not be applied to the button text.

public  voidsetOnBlur(String onBlur)
    
public  voidsetOnClick(String onClick)
    
public  voidsetOnDblClick(String onDblClick)
    
public  voidsetOnFocus(String onFocus)
    

Scripting code executed when this component receives focus.

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  voidsetPrimary(boolean primary)
    
public  voidsetReset(boolean reset)
    

Indicates that the button should be a HTML reset button.

public  voidsetStyle(String style)
    
public  voidsetStyleClass(String styleClass)
    
public  voidsetTabIndex(int tabIndex)
    
public  voidsetText(Object text)
    

Textual label used to create the visual appearance of this button.

public  voidsetToolTip(String toolTip)
    
public  voidsetValueBinding(String name, ValueBinding binding)
    
public  voidsetVisible(boolean visible)
    

Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page.



Constructor Detail
ButtonBase
public ButtonBase()(Code)

Construct a new ButtonBase.





Method Detail
getAction
public javax.faces.el.MethodBinding getAction()(Code)

Method binding representing a method that processes application actions from this component.




getActionListener
public javax.faces.el.MethodBinding getActionListener()(Code)

Method binding representing a method that receives action from this, and possibly other, components.




getAlt
public String getAlt()(Code)

Alternative text description used by screen reader tools




getFamily
public String getFamily()(Code)

Return the identifier of the component family to which this component belongs. This identifier, in conjunction with the value of the rendererType property, may be used to select the appropriate Renderer for this component instance.




getImageURL
public String getImageURL()(Code)

Resource path of an image to be displayed to create the visual appearance of this button instead of the standard button image. Either the "imageURL" or "text" attributes must be specified. When an imageURL value is given, the button type is set to "image".




getOnBlur
public String getOnBlur()(Code)

Scripting code executed when this element loses focus.




getOnClick
public String getOnClick()(Code)

Scripting code executed when a mouse click occurs over this component.




getOnDblClick
public String getOnDblClick()(Code)

Scripting code executed when a mouse double click occurs over this component.




getOnFocus
public String getOnFocus()(Code)

Scripting code executed when this component receives focus. An element receives focus when the user selects the element by pressing the tab key or clicking the mouse.




getOnKeyDown
public String getOnKeyDown()(Code)

Scripting code executed when the user presses down on a key while the component has focus.




getOnKeyPress
public String getOnKeyPress()(Code)

Scripting code executed when the user presses and releases a key while the component has focus.




getOnKeyUp
public String getOnKeyUp()(Code)

Scripting code executed when the user releases a key while the component has focus.




getOnMouseDown
public String getOnMouseDown()(Code)

Scripting code executed when the user presses a mouse button while the mouse pointer is on the component.




getOnMouseMove
public String getOnMouseMove()(Code)

Scripting code executed when the user moves the mouse pointer while over the component.




getOnMouseOut
public String getOnMouseOut()(Code)

Scripting code executed when a mouse out movement occurs over this component.




getOnMouseOver
public String getOnMouseOver()(Code)

Scripting code executed when the user moves the mouse pointer into the boundary of this component.




getOnMouseUp
public String getOnMouseUp()(Code)

Scripting code executed when the user releases a mouse button while the mouse pointer is on the component.




getStyle
public String getStyle()(Code)

CSS style(s) to be applied when this component is rendered.




getStyleClass
public String getStyleClass()(Code)

CSS style class(es) to be applied when this component is rendered.




getTabIndex
public int getTabIndex()(Code)

The position of this component in the tabbing order sequence




getText
public Object getText()(Code)

Textual label used to create the visual appearance of this button. Either the "imageURL" or "text" attributes must be specified. When a text value is given, the standard button image is used, with the specified text displayed on the button.




getToolTip
public String getToolTip()(Code)

Display the text as a tooltip for this component




getValueBinding
public ValueBinding getValueBinding(String name)(Code)

Return the ValueBinding stored for the specified name (if any), respecting any property aliases.


Parameters:
  name - Name of value binding to retrieve



isDisabled
public boolean isDisabled()(Code)

Indicates that activation of this component by the user is not currently permitted. In this component library, the disabled attribute also causes the button to be renderered using a particular style.




isEscape
public boolean isEscape()(Code)

Escape HTML markup in the button text




isMini
public boolean isMini()(Code)

Indicates that the button should be rendered using a different style than normal buttons. If the value is set to true, the button shall appear somewhat smaller than a normal button. Mini buttons are useful in situations where a button applies to an individual field on the page, rather than a section, table, or whole page.




isNoTextPadding
public boolean isNoTextPadding()(Code)

Indicates that padding should not be applied to the button text. By default, whitespace characters are padded to button text greater than or equal to 4 characters in length. If the value is set to true, no padding is applied.




isPrimary
public boolean isPrimary()(Code)

Indicates that the button is the most commonly used button within a group.




isReset
public boolean isReset()(Code)

Indicates that the button should be a HTML reset button. By default, this value is false and the button is created as a submit button. If the value is set to true, no action listener will be invoked.




isVisible
public boolean isVisible()(Code)

Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page. If set to false, the HTML code for the component is present in the page, but the component is hidden with style attributes. By default, visible is set to true, so HTML for the component HTML is included and visible to the user. If the component is not visible, it can still be processed on subsequent form submissions because the HTML is present.




restoreState
public void restoreState(FacesContext _context, Object _state)(Code)

Restore the state of this component.




saveState
public Object saveState(FacesContext _context)(Code)

Save the state of this component.




setAction
public void setAction(javax.faces.el.MethodBinding action)(Code)

Method binding representing a method that processes application actions from this component.


See Also:   ButtonBase.getAction()



setActionListener
public void setActionListener(javax.faces.el.MethodBinding actionListener)(Code)

Method binding representing a method that receives action from this, and possibly other, components.


See Also:   ButtonBase.getActionListener()



setAlt
public void setAlt(String alt)(Code)

Alternative text description used by screen reader tools


See Also:   ButtonBase.getAlt()



setDisabled
public void setDisabled(boolean disabled)(Code)

Indicates that activation of this component by the user is not currently permitted. In this component library, the disabled attribute also causes the button to be renderered using a particular style.


See Also:   ButtonBase.isDisabled()



setEscape
public void setEscape(boolean escape)(Code)

Escape HTML markup in the button text


See Also:   ButtonBase.isEscape()



setImageURL
public void setImageURL(String imageURL)(Code)

Resource path of an image to be displayed to create the visual appearance of this button instead of the standard button image. Either the "imageURL" or "text" attributes must be specified. When an imageURL value is given, the button type is set to "image".


See Also:   ButtonBase.getImageURL()



setMini
public void setMini(boolean mini)(Code)

Indicates that the button should be rendered using a different style than normal buttons. If the value is set to true, the button shall appear somewhat smaller than a normal button. Mini buttons are useful in situations where a button applies to an individual field on the page, rather than a section, table, or whole page.


See Also:   ButtonBase.isMini()



setNoTextPadding
public void setNoTextPadding(boolean noTextPadding)(Code)

Indicates that padding should not be applied to the button text. By default, whitespace characters are padded to button text greater than or equal to 4 characters in length. If the value is set to true, no padding is applied.


See Also:   ButtonBase.isNoTextPadding()



setOnBlur
public void setOnBlur(String onBlur)(Code)

Scripting code executed when this element loses focus.


See Also:   ButtonBase.getOnBlur()



setOnClick
public void setOnClick(String onClick)(Code)

Scripting code executed when a mouse click occurs over this component.


See Also:   ButtonBase.getOnClick()



setOnDblClick
public void setOnDblClick(String onDblClick)(Code)

Scripting code executed when a mouse double click occurs over this component.


See Also:   ButtonBase.getOnDblClick()



setOnFocus
public void setOnFocus(String onFocus)(Code)

Scripting code executed when this component receives focus. An element receives focus when the user selects the element by pressing the tab key or clicking the mouse.


See Also:   ButtonBase.getOnFocus()



setOnKeyDown
public void setOnKeyDown(String onKeyDown)(Code)

Scripting code executed when the user presses down on a key while the component has focus.


See Also:   ButtonBase.getOnKeyDown()



setOnKeyPress
public void setOnKeyPress(String onKeyPress)(Code)

Scripting code executed when the user presses and releases a key while the component has focus.


See Also:   ButtonBase.getOnKeyPress()



setOnKeyUp
public void setOnKeyUp(String onKeyUp)(Code)

Scripting code executed when the user releases a key while the component has focus.


See Also:   ButtonBase.getOnKeyUp()



setOnMouseDown
public void setOnMouseDown(String onMouseDown)(Code)

Scripting code executed when the user presses a mouse button while the mouse pointer is on the component.


See Also:   ButtonBase.getOnMouseDown()



setOnMouseMove
public void setOnMouseMove(String onMouseMove)(Code)

Scripting code executed when the user moves the mouse pointer while over the component.


See Also:   ButtonBase.getOnMouseMove()



setOnMouseOut
public void setOnMouseOut(String onMouseOut)(Code)

Scripting code executed when a mouse out movement occurs over this component.


See Also:   ButtonBase.getOnMouseOut()



setOnMouseOver
public void setOnMouseOver(String onMouseOver)(Code)

Scripting code executed when the user moves the mouse pointer into the boundary of this component.


See Also:   ButtonBase.getOnMouseOver()



setOnMouseUp
public void setOnMouseUp(String onMouseUp)(Code)

Scripting code executed when the user releases a mouse button while the mouse pointer is on the component.


See Also:   ButtonBase.getOnMouseUp()



setPrimary
public void setPrimary(boolean primary)(Code)

Indicates that the button is the most commonly used button within a group.


See Also:   ButtonBase.isPrimary()



setReset
public void setReset(boolean reset)(Code)

Indicates that the button should be a HTML reset button. By default, this value is false and the button is created as a submit button. If the value is set to true, no action listener will be invoked.


See Also:   ButtonBase.isReset()



setStyle
public void setStyle(String style)(Code)

CSS style(s) to be applied when this component is rendered.


See Also:   ButtonBase.getStyle()



setStyleClass
public void setStyleClass(String styleClass)(Code)

CSS style class(es) to be applied when this component is rendered.


See Also:   ButtonBase.getStyleClass()



setTabIndex
public void setTabIndex(int tabIndex)(Code)

The position of this component in the tabbing order sequence


See Also:   ButtonBase.getTabIndex()



setText
public void setText(Object text)(Code)

Textual label used to create the visual appearance of this button. Either the "imageURL" or "text" attributes must be specified. When a text value is given, the standard button image is used, with the specified text displayed on the button.


See Also:   ButtonBase.getText()



setToolTip
public void setToolTip(String toolTip)(Code)

Display the text as a tooltip for this component


See Also:   ButtonBase.getToolTip()



setValueBinding
public void setValueBinding(String name, ValueBinding binding)(Code)

Set the ValueBinding stored for the specified name (if any), respecting any property aliases.


Parameters:
  name - Name of value binding to set
Parameters:
  binding - ValueBinding to set, or null to remove



setVisible
public void setVisible(boolean visible)(Code)

Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page. If set to false, the HTML code for the component is present in the page, but the component is hidden with style attributes. By default, visible is set to true, so HTML for the component HTML is included and visible to the user. If the component is not visible, it can still be processed on subsequent form submissions because the HTML is present.


See Also:   ButtonBase.isVisible()



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