• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSF Lifecycle

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

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.

<t:commandButton styleClass="ice_form_button" value="#{fiboproperty.settlementadd_add_label}" action="#{settlementadd.add}" id="settlementaddaddvisibleaction" immediate="true" />


Can any body tell me what could be the possible reasons for it.
If need more clarification just mention.

Thanks in Advance

Regard,
Tushar
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Tushar Kherde
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bauke,

This is really good stuff you have given thanks.
 
Tushar Kherde
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bauke,


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
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

Any Suggession.
reply
    Bookmark Topic Watch Topic
  • New Topic