Wednesday, March 08, 2006

JSF notes on event handling

Three different kinds of listeners:
  • Phase listener -- listener is invoked as jsf goes through each of the 6 phases, you can register for a specific phase or all of them.
  • Action listener -- listener is invoked when an action like command button is clicked.
  • Vlaue change listener -- listener is invoked when an input component like textbox value is entered and form submitted
There is subtle difference between the use of action handlers and action listeners, handlers are meant for business rules, iterfacging with backend systems, and
navigational logic whereas listeners are meant to handle with UI elements only.

Action listeners are invoked before action handlers.

Value change and action listeners can be added as UI element attibutes as well as tags. It is better to add as tags.

Below are the execution of different phases for different scenarios:
  • value change listener --> 1 -- 2 -- 3 (listener called) -- (4 -- 5 -- 6)
  • value change listener with immediate --> 1 -- 2 (listener called) -- 3 -- (4 -- 5 -- 6)
  • action listener --> 1 -- 2 -- 3 -- 4 -- 5 (listener called) -- (6)
  • action listener with immediate --> 1 -- 2 (listener called) -- (6)


lucyjackson60244619 said...

Do you want free porn? Contact my AIM SN 'p1nkn3ss' just say 'give me some pics now!'.

No age verification required, totally free! Just send an instant message to AIM screen name "p1nkn3ss".

Any message you send is fine!

AIM abuse can be reported here.

matttheo59020677 said...

Get any Desired College Degree, In less then 2 weeks.

Call this number now 24 hours a day 7 days a week (413) 208-3069

Get these Degrees NOW!!!

"BA", "BSc", "MA", "MSc", "MBA", "PHD",

Get everything within 2 weeks.
100% verifiable, this is a real deal

Act now you owe it to your future.

(413) 208-3069 call now 24 hours a day, 7 days a week.