I have a JSF Page which gets few inputs from the User, I want to show a review page to the user – as what he has given as inputs in the previous page. I am using h:OutputText in the review page to show all the inputs the User had given – but when the user has reviewed and if the user wants to save them – I have a commandButton which is bound to an action method in the backing bean – which will not submit any values as the outputTexts are not submitted. What are the options do I have to show a review page at the same time get the values at the server side – I dont want to have the bean session-scoped.
I am using Apache My faces Implementation of JSF 1.2 without any component libs.
You can use
h:inputHiddento retain data for the subsequent POST request. E.g.When you don’t have an aversion against component libraries, I’d have suggested Tomahawk’s
t:saveStatefor this. This way you don’t need to specify every property separately in a hidden field.When you’re already on JSF 2.0, just putting the bean in the
viewscope would have been sufficient (assuming that you’re conditionally rendering input form and review form in the same view). This way it lives as long as you’re interacting with the same view.