GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||
GeezerVison is showing javaee.github.io — Referencing a Managed Bean Method
Referencing a Managed Bean MethodA component tag has a set of attributes for referencing managed bean methods that can perform certain functions for the component associated with the tag. These attributes are summarized in Table 11-7. Table 11-7 Component Tag Attributes That Reference Managed Bean Methods
Only components that implement The component tag refers to a managed bean method using a method
expression as a value of one of the attributes. The method referenced by
an attribute must follow a particular signature, which is defined by the
tag attribute’s definition in the oJavaServer Faces Facelets
Tag Library documentation. For example, the definition of the
The following sections give examples of how to use the attributes. Referencing a Method That Performs NavigationIf your page includes a component, such as a button or a link, that
causes the application to navigate to another page when the component is
activated, the tag corresponding to this component must include an
The following example shows how to reference a navigation method:
See Writing a Method to Handle Navigation for information on how to write such a method. Referencing a Method That Handles an Action EventIf a component on your page generates an action event, and if that event
is handled by a managed bean method, you refer to the method by using
the component’s The following example shows how such a method could be referenced:
The Referencing a Method That Performs ValidationIf the input of one of the components on your page is validated by a
managed bean method, refer to the method from the component’s tag by
using the The following simplified example from
The guessnumber-cdi CDI Example
shows how to reference a method that performs validation on
The managed bean method Referencing a Method That Handles a Value-Change EventIf you want a component on your page to generate a value-change event
and you want that event to be handled by a managed bean method instead
of a
The Writing a Method to Handle a Value-Change
Event describes how to implement a method that handles a
Copyright © 2017, Oracle and/or its affiliates. All rights reserved.
| |||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |