This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
I am using JSF, but it seems problem with the lifecycle, only backing beans getters are getting called not the setters. I mam skipping validation phase using immediate="true" in command button.
I am adding data into the table using add() method. this method is getting called but the fields are null.
Can any body tell me what could be the possible reasons for it. If need more clarification just mention.
Thanks in Advance
Regard, Tushar
Tushar
Bauke Scholtz
Ranch Hand
Joined: Oct 08, 2006
Posts: 2458
posted
0
It might be worth reading the http://balusc.xs4all.nl/srv/dev-jep-djl.html to get some insight in the JSF lifecycle. If you want to use immediate="true" in the UICommand component, then only the UIInput fields which also uses immediate="true" will be set to the backing bean.
I have implemented LifeCycleListener and each Phase is getting called multiple times and nesting of same phase is there. I am unable to explore the reason for it What is the significane of it.
Following is the logger for the same
APPLY_REQUEST_VALUES(2) [Nov 25 10:54:21] INFO (LifeCycleListener.java:19) - AfterPhase: APPLY_REQUEST_VALUES(2) [Nov 25 10:54:21] INFO (LifeCycleListener.java:14) - BeforePhase: PROCESS_VALIDATIONS(3) [Nov 25 10:54:21] INFO (LifeCycleListener.java:14) - BeforePhase: PROCESS_VALIDATIONS(3) [Nov 25 10:54:21] INFO (LifeCycleListener.java:19) - AfterPhase: PROCESS_VALIDATIONS(3) [Nov 25 10:54:21] INFO (LifeCycleListener.java:19) - AfterPhase: PROCESS_VALIDATIONS(3) UPDATE_MODEL_VALUES(4) [Nov 25 10:54:21] INFO (LifeCycleListener.java:14) - BeforePhase: UPDATE_MODEL_VALUES(4) [Nov 25 10:54:21] INFO (LifeCycleListener.java:19) - AfterPhase: UPDATE_MODEL_VALUES(4) [Nov 25 10:54:21] INFO (LifeCycleListener.java:19) - AfterPhase: UPDATE_MODEL_VALUES(4) [Nov 25 10:54:21] INFO (LifeCycleListener.java:14) - BeforePhase: INVOKE_APPLICATION(5) [Nov 25 10:54:21] INFO (LifeCycleListener.java:14) - BeforePhase: INVOKE_APPLICATION(5) [Nov 25 10:54:21] INFO (LifeCycleListener.java:19) - AfterPhase: INVOKE_APPLICATION(5) [Nov 25 10:54:21] INFO (LifeCycleListener.java:19) - AfterPhase: INVOKE_APPLICATION(5) [Nov 25 10:54:21] INFO (LifeCycleListener.java:14) - BeforePhase: RENDER_RESPONSE(6) [Nov 25 10:54:21] INFO (LifeCycleListener.java:14) - BeforePhase: RENDER_RESPONSE(6) [Nov 25 10:54:21] INFO (LifeCycleListener.java:19) - AfterPhase: RENDER_RESPONSE(6) [Nov 25 10:54:21] INFO (LifeCycleListener.java:19) - AfterPhase: RENDER_RESPONSE(6)
Bauke Scholtz
Ranch Hand
Joined: Oct 08, 2006
Posts: 2458
posted
0
This is unusual behaviour. I can't find an explanation.
But did setting immediate="true" in the appropriate UIInput elements solve the problem?
Tushar Kherde
Ranch Hand
Joined: Apr 28, 2006
Posts: 56
posted
0
Hi Bauke,
Thanks for your reply, Yes i am using immediate="true" in the appropriate UIInput elements.
It is also calling myConverter an myValidator for that UIInput but it is not updating the model values.
I am using FacesContex to read the value but i think this is not the proper way.