This is the short code:
<p:selectOneMenu id="field2"
...
required="#{empty param[submit.field1]}">
<p:ajax listener="#{test.onField2Change}" event="change" .../>
...
</p:selectOneMenu>
Problem is that when field2 is null and field1 is null I receive an error because the required field is not selected and the listener is no longer triggered.
I want the listener to trigger, how can I do this, or what are my other options? I already tried valueChangeListener and onchange instead but the problem is the same.