View RSS Feed

JSF

JSF Event Listeners

Rate this Entry
by
JSF
, 07-07-2012 at 05:56 PM (640 Views)
When a link or button is clicked by a user, values present in a field get changed or a selection is made in list so that the application might react. Interface components of JSF User would signal certain user action when an event is fired that is being handled by the code.

Event listeners that are very commonly used are value change and action. Others like phase or data model would not be discussed over here. In separate listener or managed bean, it is possible to declare the listeners. When listeners are placed in separate classes then reusage is allowed across various page views. Creation of the listener class shall be implementing the ValueChangeListener or ActionListener. As it has been described before that only taken parameter by the listener is FacesEvent object. Information is provided by FacesEvent regarding event like form element which makes the event initiation and also the phaseId relevant to the life cycle phase of JSF. Two sub interfaces are present in FacesEvent, ValueChangeEvent and ActionEvent.

Submit "JSF Event Listeners" to Facebook Submit "JSF Event Listeners" to Digg Submit "JSF Event Listeners" to del.icio.us Submit "JSF Event Listeners" to StumbleUpon Submit "JSF Event Listeners" to Google

Categories
Event

Comments