Hi,
I have a page with a command button on it. On click of the button ,it calls a method in a bean which calls a BO class and gets a new VO object. If the new VO object is not null, then I need to extract some attributes of the new VO and pass it as request params to the new xhtml. The bean for the new XHTMl will read the params and displays appropriate data.How do I do this using JSF2.0
Alternatively, you also put your object in the flash scope like this
and in the next page use the value as
Additionally, i was trying. It will only work page to page basis. Not with Ajax. I guess you have to put it in servlet request as an attribute and then access it. It could be something like this
But unfortunately, i am unable to access the request parameter in the new page.
Currently, i have found one solution, that you inject that bean as a managed property in the current bean.
You can do it either by the use of @ManagedProperty or explicitly set in faces-config.xml. I am also finding
out the proper way of passing parameters. As soon as i get some, i will update you.
Passing parameters isn't really JSF's style. More typically, you'd set properties in a backing bean and make that backing bean available to the next process down the line. Typically that bean would be in session or flash scope.
Sometimes the only way things ever got fixed is because people became uncomfortable.