You see the Properties window for a Button component when you select the component on
a page that you are editing in the Visual Designer. Most of the component's properties are
both JSP attributes and properties of the
Button
Java component in the page
bean.
This component has the following properties.
Type: String
Type: boolean
<
.
Type: String
If you navigate to a file, select the file and click OK. You see the image displayed on your button. The image file is copied to the project, and you can see it in the Projects window under project-name > Web Pages > resources.
<input>
element's
type
is image
and the button is a submit button that uses the
specified image.
type
specified in the Button Type property and the button's label
(displayed text) specified in the value property.
Type: String
Type: String
Type: boolean
Type: String
position: absolute; left: 288px; top: 312px
You can enter values directly or click the ellipsis (...) button to use the Style Editor.
For a list of CSS2 style attributes, see the web page at
Type: String
style
property description for an explanation
of why a class added to this property might appear to have no effect on the component.
For the defaulttheme.jar
CSS style classes for this component, see Button Component CSS Classes.
Type: String
value
attribute of the HTML
<input>
tag.
If you want the button to be a graphical submit button, you can set the
imageURL
property to point to an image file. This property is described
above.
Set the event properties by right-clicking the component in the Visual Designer and choosing Edit Event Handler > eventname.
Type: MethodBinding
button1_action
, the IDE adds it to the page bean for you and updates the value
of the Application Action property to point to that method.
If all you want to do is have the button display another page when the user clicks it, you do not need an action method. The easiest thing to do is open the page in the Navigation Editor, click the page and then click the button, and then drag to the page you want the button to open. See Setting Up Static Page Navigation for more information.
If you want the button to be able to determine which page to open based on certain
conditions, then you need an action method. The action method typically processes button
clicks and returns a string indicating the name of a page navigation case (the page in
your application to display next). You typically define this method by right-clicking the
button in the Visual Designer and choosing Edit Event Handler > action. The default
name for the method is button-id
_action
, where
button-id is the value of the button's id
property. For more
information, see Setting Up
Dynamic Page Navigation.
Type: boolean
Type: boolean
Type: String
title
attribute for the button, causing the text value of this
property to display if the user hovers the mouse cursor over the button.
Type: boolean
rendered
property.
type: String
alt
text for the button graphic. The alt text describes the graphic
element in the HTML page, is readable by screen readers, can display as a tool tip, and
displays when the user has display of images turned off in the web browser.
Type: String
tabindex
attribute
of the HTML <input>
tag.
Type: String
Type: String
Type: String
Type: String
Type: String
Type: String
Type: String
Type: String
Type: String
Type: String
Type: String
Type: String
Type: MethodBinding
#{Page1.action_method}
, and it must evaluate to the name
of a public method that takes an ActionEvent
parameter with a return type of
void.
Type: boolean
The most common example of an immediate action is a Cancel button. You make it immediate so that the normal validation and update steps can be skipped, but the action handler can still do whatever is necessary. Typically, the action handler will navigate back to some previous page. In some designs the action handler might also enqueue an informational message like "Transaction cancelled". It is possible to do more: for example, an application might record the fact that the user cancelled the current operation.
Type: boolean