Infinite Loop Method

Asked

Viewed 41 times

0

I have a method call that is made with <p:remoteCommand /> of Primefaces on my system’s home page. And it works perfectly with some users, but with others it goes through the method in the complete Bean, but never finishes. The loop happens within the implementation of JSF itself, but I can’t keep up with Debug because I don’t have the sources, so I’m not sure where it occurs.

I lock the screen for the user with the <p:blockUI />. And for that reason, the user never gets past that part. The only difference between users is that the list to popular the chart comes empty, but without the use of <p:remoteCommand /> I never had a problem with that.

Remote Command:

<h:form id="remoteCommandForm">
<p:remoteCommand 
	action="#{paginaInicialBean.inicializar()}" 
	autoRun="true"
	update="formIndex"
	onstart="PF('blockUIWidget').show();"
	oncomplete="PF('blockUIWidget').hide();" />
</h:form>

Blockui:

<p:blockUI
    widgetVar="blockUIWidget"
    block=":body"
    styleClass="blockui-background">

    <h:outputText 
      value="Por favor, aguarde.."
      escape="false" />

    <br />
    <br />

    <p:graphicImage 
      library="imagens" 
      name="loading_ring_1.gif"
      width="70px"
      height="70px" />
  </p:blockUI>

Bean method:

public void inicializar() throws SistemaException {

    inicializaConfiguracaoGrafico();

    Cliente clienteLogado = seguranca.getClienteAutenticado();
    carregar(clienteLogado);
    idFilialSelecionado = clienteLogado.getCodAtual();

    criarGraficoQuantidadeUnidadeBarChartModelo();
    criarGraficoQuantidadePorcentagemBarChartModelo();
    criarGraficoValorPorcentagemBarChartModelo();
    criarGraficoValorUnidadeBarChartModelo();

    trataMudancaGrafico();

    RequestContext context = RequestContext.getCurrentInstance();
    context.update("controleGrafico");

}
  • To have a loop infinity would need to have a loop, nay?

  • Or a recursive call. This happens after it finishes my method, when JSF updates EL, and this happens in the classes of the Mojarra library.

  • If it is a recursive call it would be an infinite recursion, which also does not occur in any shown chunk.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.