We want to pass a variable from a backing bean in request scope of one page as query string parameter to other backing bean in view scope of the next page.
I tried to use @ManagedParam
, but this signature is not found.
Is there any way to do this?
Best Answer
You probably meant to use
@ManagedProperty
. This isn't useable on a view scoped bean to set a request parameter, because the view scope is of a broader scope than the request scope.The canonical JSF2 way of passing request parameters and invoking actions on them would be something like the following:
view.xhtml
view:edit.xhtml
view:Edit
backing bean:See also: