I have a JSF page which has this component:
<p:selectBooleanCheckbox id="_spring_security_remember_me" label="Remember Me"/>
The exact input field ID/name _spring_security_remember_me is required by Spring Security. However, PrimeFaces generates it with the _input suffix as follows:
<div id="_spring_security_remember_me" class="ui-chkbox ui-widget">
<div class="ui-helper-hidden-accessible">
<input id="_spring_security_remember_me_input" name="_spring_security_remember_me_input" type="checkbox" />
</div>
<div class="ui-chkbox-box ui-widget ui-corner-all ui-state-default"><span class="ui-chkbox-icon"></span></div>
</div>
Therefore the “Remember me” functionality fails to find the parameter. How can I solve it? Can I tell PrimeFaces to not suffix it with _input, or can I tell Spring Security to look for a different request parameter name for the “Remember me” checkbox?
My solution:
put a property named “parameter” with a value that equals to the id/name that primefaces generates.