2

I have a page content which I display based on a condition produced by the action (f:ajax) of a button. The managed bean is in request scope.

when I do not use conditional display and allow the page to display entirely, the backing bean properties are applied with the form values. However when I use conditional display using ui:fragment , the backing bean properties are not applied with the form values and in the action method the backing bean properties are null.

Could some one suggest what might be the issue ?

Ayub
  • 599
  • 3
  • 10
  • 24

1 Answers1

1

My first suggestion would be to show some code. It's hard to guess what you're exactly doing.

If I do had to make a guess though, then this would be that the input fields are still conditionally excluded at the point where JSF is processing them.

As a quick test try putting the backing bean in view scope (@ViewScoped) and see if the problem persists.

Mike Braun
  • 3,729
  • 17
  • 15
  • Thank you all, the ViewScope seemed to have worked in my case, the issue was some what similar to the one discussed [link]http://stackoverflow.com/questions/7441219/commandbutton-in-panelgroup even the null backing bean issue got resolved using ViewScope, good guess Mike :) @Mike – Ayub Mar 03 '12 at 18:22
  • Thank you for your suggestion and answer provided in the link I referenced, I am your big fan, you ROCK!! @BalusC – Ayub Mar 03 '12 at 18:25