This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

bean properties are null at various phases  RSS feed

Anthony Taylor
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is my dilemma. I have a bean with a save action. I also have a PhaseListener attached to the f:view tag associated with this page. For whatever reason, I need to perform a save before the Invoke Application phase is reached. Now I am using ELResolver to pull and retrieve the Bean at the afterUpdateModelValues phase, i.e. FacesContext oContext = FacesContext.getCurrentInstance();
ELResolver oResolver = oContext.getApplication().getELResolver();
Object oValue = oResolver.getValue(oContext.getELContext(), null, "beanNameAsItAppearsInFacesConfig");. Now I appear to be finding the bean as I am not returning null. However, when I try to access the various properties to retrieve their values, they are all null. This is a backing bean with its properties binded to the page components. I have tried to access the Bean from several of the different phases with the same result. Is there any reason why this would occur? Maybe I am misunderstanding the various phases. Any help would be greatly appreciated. Thanks.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!