3 Replies Latest reply on Mar 3, 2011 4:36 AM by gallimazo

    <rich:colums action problem

    gallimazo

      Hi, I'm using <rich:columns component with a4j:support to create a datatable. I'm try to capture an event on each cell and execute an action. The action is executed only the first time on the first cell. When I try on a second cell the onbsubmit event is lunched, the onbeforedomupdate is lanched and oncomplete is launched too but the action is not executed.

       

      Could you please help me?

       

      Thanks in advance,

      Gene.

       

      Here is a part of the code:

       

       

       

                                                                              <rich:columns value="#{_escalado.listaBaremos}"

                                                                                  var="colm" index="indice" id="td_importe_#{indice}"

                                                                                  rendered="#{_lineaFraccion.listaBaremosPorte.size()==_escalado.listaBaremos.size()}"

                                                                                  styleClass="td_#{_lineaFraccion.listaBaremosPorte.get(indice).estilo}">

                                                                                  <h:inputText id="i_importe_#{indice}"

                                                                                      styleClass="i_limpio_#{_lineaFraccion.listaBaremosPorte.get(indice).estilo}"

                                                                                      value="#{_lineaFraccion.listaBaremosPorte.get(indice).impTarifa}"

                                                                                      size="10" maxlength="10"

                                                                                      readonly="#{!controlAltaTarifa.modoEdicion or !_version.estaEditable}"

                                                                                      valueChangeListener="#{controlAltaTarifa.comprobarBigDecimal}">

                                                                                      <f:converter converterId="BigDecimalEsConverter" />

                                                                                      <a4j:support event="onchange" ajaxSingle="true"

                                                                                          reRender="op_botones, modSel_portes_#{_versionStatus.index}"

                                                                                          action="#{controlAltaTarifa.hayCambioEnVersion()}"

                                                                                          eventsQueue="myQueue"/>

                                                                                  </h:inputText>

                                                                                  <a4j:support event="onmousedown"

                                                                                      onsubmit="if(handleEvent(event, this, 'cportes')==false || #{_version.getProductoActivo().modoSeleccionActivado}==true){return false;}"

                                                                                      ajaxSingle="true"

                                                                                      action="#{_lineaFraccion.listaBaremosPorte.get(indice).activaCelda()}"

                                                                                      eventsQueue="myQueue"

                                                                                      />

                                                                                  <a4j:support event="onclick"

                                                                                      onsubmit="alert(1);"

                                                                                      ajaxSingle="false"

                                                                                      action="#{_lineaFraccion.listaBaremosPorte.get(indice).activaCelda()}"

                                                                                      oncomplete="alert(2);"

                                                                                      onbeforedomupdate="alert(3)"

                                                                                       />

       

                                                                              </rich:columns>

       

       

                                                                          </rich:dataTable>

        • 1. <rich:colums action problem
          gallimazo

          Hi,

          Further info about the problem

          There are the traces in the server.log

          First time:

          (including any PhaseListeners) -> UPDATE_MODEL_VALUES 4

          2011-03-02 15:55:50,625 DEBUG [javax.enterprise.resource.webcontainer.jsf.lifecycle] Entering InvokeApplicationsPhase

          2011-03-02 15:55:50,625 DEBUG [javax.enterprise.resource.webcontainer.jsf.application] processAction(j_id2903)

          2011-03-02 15:56:06,453 DEBUG [javax.enterprise.resource.webcontainer.jsf.application] No navigation rule found for null outcome and viewId /webpages/tarifas/altaTarifa.xhtml Explicitly remain on the current view

          2011-03-02 15:56:06,640 DEBUG [javax.enterprise.resource.webcontainer.jsf.lifecycle] Exiting InvokeApplicationsPhase

           

          Second time:

          (including any PhaseListeners) -> UPDATE_MODEL_VALUES 4

          2011-03-02 15:57:13,060 DEBUG [javax.enterprise.resource.webcontainer.jsf.lifecycle] Entering InvokeApplicationsPhase

          2011-03-02 15:57:13,060 DEBUG [javax.enterprise.resource.webcontainer.jsf.lifecycle] Exiting InvokeApplicationsPhase

           

          Regards,

          Gene.

          • 2. <rich:colums action problem
            ilya_shaikovsky

            do you intentionally using two supports? why you need two requests?

            which RF version used?

            if there are any problems in a4j:log?

            • 3. Re: <rich:colums action problem
              gallimazo

              Hi Ilya,

              We are using 3.3.3.Final version. Our framework is seam 2.2.

              I have try it with only one support with the same result. For clarifying I use two supports because I have to interact with the cells in two different ways (events in this case) to do the same thing. I have tried to use for each tag but an it works fine but I have another critical error whilst doing rerendering.

              I have reviewed the a4j:log and I have no seen any error.

               

              Please let me know if you need further information.

              Thanks in advance,

              Gene.