0
I’m using PhaseListener
to validate user permission. And when I use the Update tag with biding I cannot view the parameter javax.faces.source
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`.***
}