I am using PhaseListener
to validate user permission. And when I use the Update tag with biding I can not see the javax.faces.source
parameter in the request.
HTML that works:
<p:commandButton actionListener="# cadastroGenericoControle.alterarCadastroGenerico}" >
</p:commandButton>
HTML that does not work:
p:commandButton update="#{principalControle.updateAlterarCadastroGenerico}"
actionListener="#{cadastroGenericoControle.alterarCadastroGenerico}" >
</p:commandButton>
Java code
public void afterPhase(PhaseEvent event) {
Map<String, String> params =event.getFacesContext().getExternalContext().getRequestParameterMap();
boolean achouParametro = params.containsKey("javax.faces.source");
***quando não utilizo 'update="# principalControle.updateAlterarCadastroGenerico}"' no botão, a variável 'achouParametro' está 'true', e quando utilizo está 'false'.***
}