JSF components trigger events and these events are process by the JSF application. User generates these events by interacting with the application. For example, Click a button event is generated and triggered by the user. Programmer is responsible to handle all such events in code. You can write event listeners for this purpose.
Following JSF code is written to create a button.
Java Code: This is example of a JSF Button