Handling Events in JSF
by, 07-07-2012 at 05:51 PM (583 Views)
JSF event model is basically based upon the Event driven programming of Java that is available typically just along with the GUI applications. In case you have familiarity to the swing programming, this could be understood easily the event handling models present in JSF framework. Concept present behind this event model is that user interfaced objects have a listerner’s list. Such listeners get notified when an event is generated by the user interface objects. This shows that when a component is activated by a user, listerner gets notification and event would be fired.
This is just the way a simpler and straight forward programming pattern is, provided that events would be handled as well as created in similar machine. This is also true for the typical GUI applications that are created by Swing. User actions happen in browser so that no permenant connection is present with server. Therefore notification would be sent to the server regarding event just when next connection is made by the client with server. For dealing such kind of scenarios, a strict request life cycle is defined by JSF.
Three events are supported by the Java Server Face Technology.
• action events
• data-model events.
• value-change events