6 Replies Latest reply on Mar 5, 2009 9:54 AM by nbelaevski

    rich:tabPanel not changing beetwen tabs

    cerdiogenes

      Hi,

      I have the following rich:tabPanel:

      <rich:tabPanel onclick="calc_div_size()">
       <rich:tab rendered="#{!s:hasPermission('SadauPssPares', 'inserir', identity)}" label="Pares [#{avlPssFscEtapaHome.pares == null ? 0 : avlPssFscEtapaHome.pares.size}]" labelClass="required">
       <div class="association" id="pssFisicaPares">
       <rich:panel>
       <f:facet name="header">Pares Atuais</f:facet>
      
       <h:outputText value="Não há nenhum par associado com este avaliado."
       rendered="#{empty avlPssFscEtapaHome.pares}"/>
      
       <rich:dataTable var="par"
       value="#{avlPssFscEtapaHome.pares}"
       rendered="#{not empty avlPssFscEtapaHome.pares}"
       rowClasses="rvgRowOne,rvgRowTwo"
       id="paresTable">
       <h:column>
       <f:facet name="header">Código Par</f:facet>
       #{par.pssFscPar.pssFscCodigo}
       </h:column>
       <h:column>
       <f:facet name="header">Nome do Par</f:facet>
       #{par.pssFscPar.pssFscNome}
       </h:column>
       <h:column>
       <f:facet name="header">Ação</f:facet>
       <s:link action="#{bscPssFsc.excluirPar}"
       id="excluirpssFisicaPar"
       value="Excluir"
       rendered="#{not avlPssFscEtapaHome.parJahAvaliou(par.pssFscPar)}">
       <f:param name="pssFisicaPssFscCodigo"
       value="#{par.pssFscPar.pssFscCodigo}"/>
       </s:link>
       <h:outputText value="Nenhuma - Avalição Já Realizada" rendered="#{avlPssFscEtapaHome.parJahAvaliou(par.pssFscPar)}"/>
       </h:column>
       </rich:dataTable>
       </rich:panel>
      
       <br/>
      
       <!-- Formulário de busca -->
       <h:form id="parBusca" styleClass="edit">
      
       <rich:simpleTogglePanel label="Parâmetros de busca" switchType="ajax">
      
       <s:decorate template="../layout/busca.xhtml">
       <ui:define name="colEsquerda">
       <rich:comboBox id="parOpcaoBusca" defaultLabel="Nome" enableManualInput="false" value="#{bscPssFsc.valorCombo}">
       <f:selectItems value="#{bscPssFsc.listaLabels}"/>
       </rich:comboBox>
       </ui:define>
       <h:inputText id="parValorBusca" value="#{bscPssFsc.valorBusca}"/>
       </s:decorate>
      
       <div class="actionButtons">
       <h:commandButton id="parBusca" value="Procurar" action="#{bscPssFsc.aplicarConsulta}"/>
       <h:commandButton id="parTodos" value="Todos" action="#{bscPssFsc.todos}"/>
       </div>
      
       </rich:simpleTogglePanel>
       </h:form>
      
       <rich:panel>
       <f:facet name="header">Resultados da busca</f:facet>
       <div class="results" id="parList">
      
       <h:outputText value="Uma avaliação de desempenho deve ser selecionada."
       rendered="#{not bscPssFsc.avlPssFscEtapaSelecionada}"/>
      
       <h:outputText value="A pesquisa por pessoa fÃsica não retornou nenhum resultado."
       rendered="#{empty pssFisicaList.resultList or not bscPssFsc.avlPssFscEtapaSelecionada}"/>
      
       <rich:dataTable id="parList"
       var="pssFisica"
       value="#{pssFisicaList.resultList}"
       rendered="#{not empty pssFisicaList.resultList and bscPssFsc.avlPssFscEtapaSelecionada}">
       <h:column>
       <f:facet name="header">
       <s:link styleClass="columnHeader"
       value="Código #{pssFisicaList.order=='pssFscCodigo asc' ? messages.down : ( pssFisicaList.order=='pssFscCodigo desc' ? messages.up : '' )}">
       <f:param name="pssFisicaOrder" value="#{pssFisicaList.order=='pssFscCodigo asc' ? 'pssFscCodigo desc' : 'pssFscCodigo asc'}"/>
       </s:link>
       </f:facet>
       #{pssFisica.pssFscCodigo}
       </h:column>
       <h:column>
       <f:facet name="header">
       <s:link styleClass="columnHeader"
       value="Nome #{pssFisicaList.order=='pssFscNome asc' ? messages.down : ( pssFisicaList.order=='pssFscNome desc' ? messages.up : '' )}">
       <f:param name="pssFisicaOrder" value="#{pssFisicaList.order=='pssFscNome asc' ? 'pssFscNome desc' : 'pssFscNome asc'}"/>
       </s:link>
       </f:facet>
       #{pssFisica.pssFscNome}
       </h:column>
       <!--
       <h:column>
       <f:facet name="header">pssFscCpf</f:facet>
       #{pssFisica.pssFscCpf}
       </h:column>
       -->
       <h:column>
       <f:facet name="header">Ação</f:facet>
       <s:link action="#{bscPssFsc.inserirPar}"
       value="Inserir"
       id="parLink"
       rendered="#{s:hasPermission('SadauAvaliado', 'alterar', identity)}">
       <f:param name="pssFisicaPssFscCodigo"
       value="#{pssFisica.pssFscCodigo}"/>
       <!--
       <f:param name="pssFisicaPssFscCpf"
       value="#{pssFisica.pssFscCpf}"/>
       -->
       </s:link>
      
       <!--
       <h:outputText value="Já inserido na etapa"
       id="pssFisicaText"
       rendered="#{bscPssFisica.ehPar}">
       <f:param name="pssFisicaPssFscCodigo"
       value="#{pssFisica.pssFscCodigo}"/>
       <f:param name="pssFisicaPssFscCpf"
       value="#{pssFisica.pssFscCpf}"/>
       </h:outputText>
       -->
       </h:column>
       </rich:dataTable>
       </div>
       </rich:panel>
      
       <div class="tableControl">
      
       <s:link view="/admin/AvlPssFscEtapa.xhtml"
       rendered="#{pssFisicaList.previousExists and bscPssFsc.avlPssFscEtapaSelecionada}"
       value="#{messages.left}#{messages.left} Primeira Página"
       id="parFirstPage">
       <f:param name="pssFisicaFirstResult" value="0"/>
       </s:link>
      
       <s:link view="/admin/AvlPssFscEtapa.xhtml"
       rendered="#{pssFisicaList.previousExists and bscPssFsc.avlPssFscEtapaSelecionada}"
       value="#{messages.left} Página Anterior"
       id="parPreviousPage">
       <f:param name="pssFisicaFirstResult"
       value="#{pssFisicaList.previousFirstResult}"/>
       </s:link>
      
       <s:link view="/admin/AvlPssFscEtapa.xhtml"
       rendered="#{pssFisicaList.nextExists and bscPssFsc.avlPssFscEtapaSelecionada}"
       value="Próxima Página #{messages.right}"
       id="parNextPage">
       <f:param name="pssFisicaFirstResult"
       value="#{pssFisicaList.nextFirstResult}"/>
       </s:link>
      
       <s:link view="/admin/AvlPssFscEtapa.xhtml"
       rendered="#{pssFisicaList.nextExists and bscPssFsc.avlPssFscEtapaSelecionada}"
       value="Última Página #{messages.right}#{messages.right}"
       id="parLastPage">
       <f:param name="pssFisicaFirstResult"
       value="#{pssFisicaList.lastFirstResult}"/>
       </s:link>
      
       </div>
       <!-- Fim do formulário de busca -->
       </div>
       </rich:tab>
      
       <rich:tab label="PossÃveis Pares [#{avlPssFscEtapaHome.possiveisParesPersistidos == null ? 0 : avlPssFscEtapaHome.possiveisParesPersistidos.size}]" labelClass="required">
       <div class="association" id="pssFisicaPossiveisPares">
      
       ....
      
       </div>
       </rich:tab>
      
       <rich:tab rendered="#{!s:hasPermission('SadauPssPares', 'inserir', identity)}" label="Chefia(s) Avaliadora(s) [#{avlPssFscEtapaHome.chefes == null ? 0 : avlPssFscEtapaHome.chefes.size}]" labelClass="required">
       <div class="association" id="pssFisicaChefia">
      
       ...
      
       </div>
       </rich:tab>
      
       <rich:tab label="Conjunto de Fatores [#{avlPssFscEtapaHome.cnjFatores == null ? 0 : 1}]" labelClass="required">
       <div class="association" id="cnjFatorParent">
      
       ....
      
       </div>
       </rich:tab>
      </rich:tabPanel>
      


      I omitted the contents of the other tabs, since they are similar to the first one.

      I have two instances of jboss-4.2.3.G.A, one in my localhost and other in a production server.

      In my localhost I can click in the tabs and they change ok, but in the production server they don't switch properly. Sometimes the tab that I clicked is selected and sometimes I click in one tab, but the first one is show. I don't have this silly behaviour in my localhost.

      I don't know how to investigate what's wrong, but I really appreciate any hint in how I can digg for more informations about what could be wrong.

      Best regards,
      Carlos.

        • 1. Re: rich:tabPanel not changing beetwen tabs
          cerdiogenes

          Don't know what make this happening. Now everything is working fine.

          I guess that the malfunction was due the server load in the afternoon. Now that everything is quite it's working okay.

          Any hing in how can I investigate to discover what's the problem?

          I'm using jboss-4.2.3.G.A, seam 2.0.1 and richfaces 3.2.2

          Best regards,
          Carlos.

          • 2. Re: rich:tabPanel not changing beetwen tabs
            nbelaevski

            Carlos,

            Any interesting messages in server log?

            • 3. Re: rich:tabPanel not changing beetwen tabs
              cerdiogenes

              I don't saw anything interesting in the log.

              I disabled the DEBUG messages that go to the log, since they eat my hd very hungry, but I don't know if can find anything usefull if I enabled these messages, since they are much and I don't know exactly what I have to look for.

              Do you have any hint?

              • 4. Re: rich:tabPanel not changing beetwen tabs
                nbelaevski

                Unfortunately, nothing particular. Please take a look: http://www.jboss.org/index.html?module=bb&op=viewtopic&t=149458

                • 5. Re: rich:tabPanel not changing beetwen tabs
                  cerdiogenes

                  Hi,

                  I saw the following in my log now after a re-deploy of my application:

                  2009-03-05 08:55:33,044 ERROR [STDERR] 05/03/2009 08:55:33 com.sun.facelets.impl.DefaultFacelet refresh
                  INFO: Facelet[/layout/template.xhtml] was modified @ 08:55:33, flushing component applied @ 08:55:30
                  2009-03-05 08:55:33,045 ERROR [STDERR] 05/03/2009 08:55:33 com.sun.facelets.impl.DefaultFacelet refresh
                  INFO: Facelet[/layout/template.xhtml] was modified @ 08:55:33, flushing component applied @ 08:55:30
                  2009-03-05 08:55:33,045 ERROR [STDERR] 05/03/2009 08:55:33 com.sun.facelets.impl.DefaultFacelet refresh
                  INFO: Facelet[/layout/template.xhtml] was modified @ 08:55:33, flushing component applied @ 08:55:30
                  2009-03-05 08:55:33,046 ERROR [STDERR] 05/03/2009 08:55:33 com.sun.facelets.impl.DefaultFacelet refresh
                  INFO: Facelet[/layout/template.xhtml] was modified @ 08:55:33, flushing component applied @ 08:55:30
                  2009-03-05 08:55:33,046 ERROR [STDERR] 05/03/2009 08:55:33 com.sun.facelets.impl.DefaultFacelet refresh
                  INFO: Facelet[/layout/template.xhtml] was modified @ 08:55:33, flushing component applied @ 08:55:30
                  2009-03-05 08:55:33,048 ERROR [STDERR] 05/03/2009 08:55:33 com.sun.facelets.impl.DefaultFacelet refresh
                  INFO: Facelet[/admin/menu.xhtml] was modified @ 08:55:33, flushing component applied @ 08:55:30
                  2009-03-05 08:55:33,048 ERROR [STDERR] 05/03/2009 08:55:33 com.sun.facelets.impl.DefaultFacelet refresh
                  INFO: Facelet[/admin/menu.xhtml] was modified @ 08:55:33, flushing component applied @ 08:55:30
                  2009-03-05 08:55:33,049 ERROR [STDERR] 05/03/2009 08:55:33 com.sun.facelets.impl.DefaultFacelet refresh
                  INFO: Facelet[/admin/menu.xhtml] was modified @ 08:55:33, flushing component applied @ 08:55:30
                  2009-03-05 08:55:33,049 ERROR [STDERR] 05/03/2009 08:55:33 com.sun.facelets.impl.DefaultFacelet refresh
                  INFO: Facelet[/admin/menu.xhtml] was modified @ 08:55:33, flushing component applied @ 08:55:30
                  2009-03-05 08:55:33,049 ERROR [STDERR] 05/03/2009 08:55:33 com.sun.facelets.impl.DefaultFacelet refresh
                  INFO: Facelet[/admin/menu.xhtml] was modified @ 08:55:33, flushing component applied @ 08:55:30
                  2009-03-05 08:55:33,090 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/sadau]] j_id603: tab panel [@selectedTab=j_id447] has no enabled or rendered tab with such name. Tab: j_id604 will be used instead!
                  


                  I guess that this is related with the problem that you pointed in your last post. After I restart the server, the problem go away.

                  What can I do to avoid this? Is the solution presented in the post that you indicate a good one?

                  I'm deploying a exploded version of my project.

                  When I want to re-deploy it in my production server I scp the files deployed in my localhost to the server, then copy these (with the -pr options) to the deploy folder in the prod server, then I change the owner to jboss.

                  There is some different way so I can avoid this problem?

                  • 6. Re: rich:tabPanel not changing beetwen tabs
                    nbelaevski

                    Please consult Facelets forum or sources for more suggestions.