When you click the Show More Details button, the Address text box displays. After you click the Hide Details button, the Address text box disappears.
The application consists of two major entities:
Action
or ActionListener
interface.index.jsp
file is
a JavaServer Faces page containing all the UI elements. Different UI
elements
specify either Action
or ActionListener
to
handle the user input. The CommandSubmissionBean
shows how the action listener is implemented. The Main Page,
index.jsp
,
illustrates how an action as well as action listener is specified.
The Guest Login
button results in a static action. The Login
button results in a call to the login
action method. The Show
More Details
button changes
its label to Show More Details or Hide More
Details, depending on the current context. Because this button
needs to know what is contained in its label to decide what action to
take, it is an ideal candidate for using an action listener.