Reputation: 33
I've got an application with two user interfaces, one for mobile and one for desktop. Users can switch between them no matter in which device they are using, for example, they can watch desktop interface from a mobile device. To accomplish this, the application adds a parameter to the url that specifies the interface to load.
The solution I found is to add
<f:metadata>
<f:viewParam name="param" value="#{myBean.param}"></f:viewParam>
</f:metadata>
in all pages, that's because I saw that isn't possible to define it on the template page (JSF 2 facelets <f:metadata/> in template and page).
Is there a way in JSF to pass a get parameter to all pages without having to put the viewparam definition on every page?
Upvotes: 0
Views: 130