f:param in p:ajax with p:selectonemenu
<p>I have a JSF project using Java 8, JSF 2.2 and primefaces 5.3 running on Tomcat 8.
I have pages with parameters (<a href="http://server/app/page?x=1" rel="nofollow">http://server/app/page?x=1</a>).
I have a form with <code>p:commandButton</code> updating some page parts with AJAX. When I submit the form the POST request is built correctly and contains also the page parameters (x = 1) passed with <code>f:param</code>.
I have however other form with <code>p:selectOneMenu</code> with an <code>p:ajax</code> and an AJAX listener changing some other form components. BUT the AJAX call does <strong>NOT</strong> include the page <code>f:param</code> parameters (x = 1) in this case into the POST message and thus the backing bean is unable to read proper data from DB and build requested page parts.</p>

<p><strong>The question is: how to pass the page parameters to the <code>p:ajax</code> call...?</strong></p>

<p><em>I know there is an option to pass the parameters as arguments to the listener, but in this case the parameters are not visible to other beans and components used to build the page.
I'm using <code>@RequestScoped</code> beans and <code>@ManagedProperty</code> to set up the page parameters and it makes the code clean and simple. Using parameters for ALL XHTML calls would be a mess...</em></p>