Name

UICommand

Synopsis

This class represents a command component. A command component lets the user issue a command to the application, either to adjust the view or initiate backend processing. It’s often rendered as button or a link, and it must be a child component of a form component, directly or indirectly. The default rendererType is javax.faces.Button.

When triggered by a user, the command component fires an ActionEvent, which can be handled by the application through an action method or one or more listeners, in the order: javax.faces.event.ActionListener instances (in the order they are registered), the action listener method, and then the action method.

Synopsis

Class name:

javax.faces.component.UICommand

Extends:

javax.faces.component.UIComponentBase

Implements:

javax.faces.component.ActionSource,javax.faces.component.StateHolder

Fields

public static String COMPONENT_FAMILY

The component family: javax.faces.Command.

public static String COMPONENT_TYPE

The component family: javax.faces.Command.

Constructor

public UICommand()

Creates a new instance.

Methods

public void addActionListener(javax.faces.event.ActionListener l)

Adds the ActionListener to the list of listeners for the ActionEvent this component fires.

public void broadcast(javax.faces.event.FacesEvent event) throws javax.faces.event.AbortProcessingException

Extends the inherited behavior by passing an ActionEvent to the action listener method (if any) and to the default ActionListener registered for the application ...

Get JavaServer Faces now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.