View RSS Feed


JSF Event Classes

Rate this Entry
, 07-07-2012 at 05:52 PM (617 Views)
Interfaces which are related with JSF events are present in package'javax.faces.event'. All Events present in JSF shall be extending the javax.faces.event.FacesEvent. This class’s constructor has argument UIComponent that would be making it specific that this Event is for which UI component.

Java Code:
UIComponent someComponent = new UIComponent();
MyFacesEvent event = new MyFacesEvent(someComponent);
UIComponent sourceCompoenent = event.getComponent();
In the code given above, particular event that has been created by the source component could be obtained when event.getComponent() is called. Method known as queue() is present in this class that queues the Event when request processing life cycle ends. When it is required to queue the Event and takes place at specific processing phase of the request, it could be done when this given code is being followed:

Java Code:
MyFacesEvent event = new MyFacesEvent();

Submit "JSF Event Classes" to Facebook Submit "JSF Event Classes" to Digg Submit "JSF Event Classes" to Submit "JSF Event Classes" to StumbleUpon Submit "JSF Event Classes" to Google