2 Replies Latest reply on Aug 14, 2012 12:06 PM by jmiguel77

    Problem with multiple popup panels

    jmiguel77

      I have a pretty complicated page, wich has several panels, and links, and tables. In the bottom of the page, i have several popup Panels, wich are rendered via different links that displays according to several parameters

       

      I am getting an error when trying to open a panel; suppose i have panel A, B, C.... F. And links to open those panels; when linkA is rendered and clicked, it is supossed to open the popup panel A, but instead is opening the D panel; why can this be happening ??

       

      This is the relevant portion of code:

       

      The command links:

       

      <a4j:commandLink styleClass="no-decor"

                                      render="panel-detalle-factura" execute="@this"

                                      oncomplete="#{rich:component('popup-panel-detalle-factura')}.show()"

                                      action="#{controladorRecuperacionComprobantes.obtenerAutorizacionSeleccionada}"

                                      rendered="#{item.esFactura}">

                                      <h:outputText value="#{item.numeroAutorizacion}" />

                                      <f:setPropertyActionListener

                                          target="#{controladorRecuperacionComprobantes.comprobante}"

                                          value="#{item}" />

                                  </a4j:commandLink>

                                  <a4j:commandLink styleClass="no-decor"

                                      render="panel-detalle-nota-credito" execute="@this"

                                      oncomplete="#{rich:component('popup-panel-detalle-nota-credito')}.show()"

                                      action="#{controladorRecuperacionComprobantes.obtenerAutorizacionSeleccionada}"

                                      rendered="#{item.esNotaCredito}">

                                      <h:outputText value="#{item.numeroAutorizacion}" />

                                      <f:setPropertyActionListener

                                          target="#{controladorRecuperacionComprobantes.comprobante}"

                                          value="#{item}" />

                                  </a4j:commandLink>

                                  <a4j:commandLink styleClass="no-decor"

                                      render="panel-detalle-nota-debito" execute="@this"

                                      oncomplete="#{rich:component('popup-panel-detalle-nota-debito')}.show()"

                                      action="#{controladorRecuperacionComprobantes.obtenerAutorizacionSeleccionada}"

                                      rendered="#{item.esNotaDebito}">

                                      <h:outputText value="#{item.numeroAutorizacion}" />

                                      <f:setPropertyActionListener

                                          target="#{controladorRecuperacionComprobantes.comprobante}"

                                          value="#{item}" />

                                  </a4j:commandLink>

                                  <a4j:commandLink styleClass="no-decor"

                                      render="panel-detalle-comprobante-retencion" execute="@this"

                                      oncomplete="#{rich:component('popup-panel-detalle-comprobante-retencion')}.show()"

                                      action="#{controladorRecuperacionComprobantes.obtenerAutorizacionSeleccionada}"

                                      rendered="#{item.esComprobanteRetencion}">

                                      <h:outputText value="#{item.numeroAutorizacion}" />

                                      <f:setPropertyActionListener

                                          target="#{controladorRecuperacionComprobantes.comprobante}"

                                          value="#{item}" />

                                  </a4j:commandLink>

                                  <a4j:commandLink styleClass="no-decor"

                                      render="panel-detalle-guia-remision" execute="@this"

                                      oncomplete="#{rich:component('popup-panel-detalle-guia-remision')}.show()"

                                      action="#{controladorRecuperacionComprobantes.obtenerAutorizacionSeleccionada}"

                                      rendered="#{item.esGuiaRemision}">

                                      <h:outputText value="#{item.numeroAutorizacion}" />

                                      <f:setPropertyActionListener

                                          target="#{controladorRecuperacionComprobantes.comprobante}"

                                          value="#{item}" />

                                  </a4j:commandLink>

       

       

      The panels:

       

      <rich:popupPanel id="popup-panel-detalle-factura"

                  header="Detalle del Comprobante" modal="true" autosized="false"

                  resizeable="true" width="850" height="650">

                  <f:facet name="controls">

                      <a4j:commandLink ajaxSingle="true"

                          onclick="#{rich:component('popup-panel-detalle-factura')}.hide(); return false;">

                          <h:graphicImage name="cerrar.gif" library="imagenes/eventos"

                              height="17px;" width="17px;" />

                      </a4j:commandLink>

                  </f:facet>

                  <ui:include src="/pages/consultas/comprobantes/detalleFactura.xhtml" />

              </rich:popupPanel>

              <rich:popupPanel id="popup-panel-detalle-nota-credito"

                  header="Detalle del Comprobante" modal="true" autosized="false"

                  resizeable="true" width="850" height="650">

                  <f:facet name="controls">

                      <a4j:commandLink ajaxSingle="true"

                          onclick="#{rich:component('popup-panel-detalle-nota-credito')}.hide(); return false;">

                          <h:graphicImage name="cerrar.gif" library="imagenes/eventos"

                              height="17px;" width="17px;" />

                      </a4j:commandLink>

                  </f:facet>

                  <ui:include

                      src="/pages/consultas/comprobantes/detalleNotaCredito.xhtml" />

              </rich:popupPanel>

              <rich:popupPanel id="popup-panel-detalle-nota-debito"

                  header="Detalle del Comprobante" modal="true" autosized="false"

                  resizeable="true" width="850" height="650">

                  <f:facet name="controls">

                      <a4j:commandLink ajaxSingle="true"

                          onclick="#{rich:component('popup-panel-detalle-nota-debito')}.hide(); return false;">

                          <h:graphicImage name="cerrar.gif" library="imagenes/eventos"

                              height="17px;" width="17px;" />

                      </a4j:commandLink>

                  </f:facet>

                  <ui:include

                      src="/pages/consultas/comprobantes/detalleNotaDebito.xhtml" />

              </rich:popupPanel>

              <rich:popupPanel id="popup-panel-detalle-comprobante-retencion"

                  header="Detalle del Comprobante" modal="true" autosized="false"

                  resizeable="true" width="850" height="650">

                  <f:facet name="controls">

                      <a4j:commandLink ajaxSingle="true"

                          onclick="#{rich:component('popup-panel-detalle-comprobante-retencion')}.hide(); return false;">

                          <h:graphicImage name="cerrar.gif" library="imagenes/eventos"

                              height="17px;" width="17px;" />

                      </a4j:commandLink>

                  </f:facet>

                  <ui:include

                      src="/pages/consultas/comprobantes/detalleComprobanteRetencion.xhtml" />

              </rich:popupPanel>

              <rich:popupPanel id="popup-panel-detalle-guia-remision"

                  header="Detalle del Comprobante" modal="true" autosized="false"

                  resizeable="true" width="850" height="650">

                  <f:facet name="controls">

                      <a4j:commandLink ajaxSingle="true"

                          onclick="#{rich:component('popup-panel-detalle-guia-remision')}.hide(); return false;">

                          <h:graphicImage name="cerrar.gif" library="imagenes/eventos"

                              height="17px;" width="17px;" />

                      </a4j:commandLink>

                  </f:facet>

                  <ui:include

                      src="/pages/consultas/comprobantes/detalleGuiaRemision.xhtml" />

              </rich:popupPanel>

        • 1. Re: Problem with multiple popup panels
          jmiguel77

          Another observation about this problem; the page was tested in jboss eap 5 and was working fine, the problem appears trying to migrate to jboss eap 6

          I am using richfaces 4.2.2.Final

          Thanks for any help

          • 2. Re: Problem with multiple popup panels
            jmiguel77

            i think i found the root of the problem, but it makes no sense to me

             

            the first link of the list, has the execute="@this" attribute, so it should be sending only itself in the request; and the same link has the value of render="panel-detalle-factura", wich is a panel inside the ui:include src="/pages/consultas/comprobantes/detalleFactura.xhtml" file: so, according to theory, this is the only element that should be rendered, right ?

             

            But it is not happening this way !!!! i have found that the other popup panels are also re rendering themselves, even when they SHOULDN'T !!! WHY ?? i assume this is a bug ??

             

            Is there any way to fix this ?? is there any patch or is not even addressed as an issue ??