11 Replies Latest reply on Apr 2, 2009 6:52 AM by Ilya Shaikovsky

    Google Chrome support working ?

    Flavio Henrique Newbie

      Hi there!
      Today I updated my libs for richfaces-[ui,api,imp]-3.3.1-20090330.041326-51.jar for testing the Google Chrome support.
      Unfortunately I cant run my application with Google Chrome. I got this error:

      This page contains the following errors:
      
      error on line 76 at column 1: Extra content at the end of the document
      Below is a rendering of the page up to the first error.
      
      window.RICH_FACES_EXTENDED_SKINNING_ON=true; // // // // // My Title
      


      I searched on forum for related problems but couldn't find, and as I found users with working projects I presuming that it's my fault, but I'm totally lost here.

      The same project works with Firefox 3.x and IE6[7].

      Someone can point me to the right direction?

      Thank you.

      Hwoarang
      ---------------
      I'm using:
      richfaces 3.3.1 (tested with 3.2.2 and 3.3.0 too)
      Tomcat 6
      facelets 1.1.14
      jsf 1.2_09
      jdk 6_13

        • 1. Re: Google Chrome support working ?
          Nick Belaevski Master

          Hello Hwoarang,

          Can you please post complete page code?

          • 2. Re: Google Chrome support working ?
            Flavio Henrique Newbie

             

            "nbelaevski" wrote:
            Hello Hwoarang,

            Can you please post complete page code?


            Hi ! Of course !

            Just to clarify: every page throws the error, so I think the problem could be in template.

            Thank you.

            template.jspx
            <?xml version="1.0" encoding="ISO-8859-1"?>
            <jsp:root
             xmlns:jsp="http://java.sun.com/JSP/Page"
             xmlns:h="http://java.sun.com/jsf/html"
             xmlns:f="http://java.sun.com/jsf/core"
             xmlns:ui="http://java.sun.com/jsf/facelets"
             xmlns:r="http://richfaces.org/rich"
             xmlns:a4j="http://richfaces.org/a4j"
             version="2.0">
             <head>
             <a4j:loadBundle
             basename="util.mensagens"
             var="msg" />
             <script
             type="text/javascript"
             src="/Certificado/js/jquery.meiomask.js"></script>
             <script
             type="text/javascript"
             src="/Certificado/js/funcoesJSF.js"></script>
             <link
             href="/Certificado/default/estilo.css"
             rel="stylesheet"
             type="text/css" />
             <script type="text/javascript">
             ( function($) {
             $( function() {
             $("#formulario\\:minhaTabela\\:0\\:dataEmissaoInputDate").setMask("39/19/2999");
             $("#formulario\\:minhaTabela\\:0\\:dataEmissaoFimInputDate").setMask("39/19/2999");
             $("#formulario\\:minhaTabela\\:0\\:dataValidadeInputDate").setMask("39/19/2999");
             $("#formulario\\:minhaTabela\\:0\\:dataValidadeFimInputDate").setMask("39/19/2999");
             $("#formulario\\:minhaTabela\\:0\\:fone1").setMask();
             $("#formulario\\:minhaTabela\\:0\\:fone2").setMask();
             $("#formulario\\:minhaTabela\\:0\\:ramalFone1").setMask("9999");
             $("#formulario\\:minhaTabela\\:0\\:ramalFone2").setMask("9999");
             });
             })(jQuery);
            </script>
             <a4j:outputPanel ajaxRendered="true">
             <r:jQuery
             selector="#tabelaGUI tr:odd"
             query="addClass('odd-row')" />
             <r:jQuery
             selector="#tabelaGUI tr:even"
             query="addClass('even-row')" />
             <r:jQuery
             selector="#tabelaGUI tr"
             query="mouseover(function(){jQuery(this).addClass('active-row')})" />
             <r:jQuery
             selector="#tabelaGUI tr"
             query="mouseout(function(){jQuery(this).removeClass('active-row')})" />
             </a4j:outputPanel>
             <meta
             http-equiv="Content-Type"
             content="text/html; charset=ISO-8859-1" />
             </head>
             <center><h:panelGrid>
             <ui:insert name="cabecalho">
             </ui:insert>
             </h:panelGrid></center>
             <ui:insert name="extraHeader"></ui:insert>
             <!-- ********************** Corpo da Pagina ***************************** -->
             <ui:insert name="corpo" />
             <!-- ********************** Fim Corpo da Pagina ************************* -->
             <ui:insert name="modalP">
             <!-- **************** Mostra Mensagens ***************************** -->
             <f:view>
             <r:modalPanel
             id="panel"
             minHeight="100"
             minWidth="200"
             onshow="#{r:element('botaoOk')}.focus();"
             autosized="true"
             showWhenRendered="#{facesContext.maximumSeverity != null}">
             <f:facet name="header">
             <h:panelGroup>
             <h:outputText value="Mensagem" />
             </h:panelGroup>
             </f:facet>
             <f:facet name="controls">
             <h:panelGroup>
             <h:graphicImage
             value="/imagens/erro.png"
             id="hidelink" />
             </h:panelGroup>
             </f:facet>
             <a4j:form id="formModalMensagens">
             <r:messages style="white-space:nowrap;">
             <f:facet name="errorMarker">
             <h:graphicImage value="/imagens/erro.png" />
             </f:facet>
             <f:facet name="warnMarker">
             <h:graphicImage value="/imagens/atencao.png" />
             </f:facet>
             <f:facet name="infoMarker">
             <h:graphicImage value="/imagens/ok.png" />
             </f:facet>
             </r:messages>
             <center><h:commandButton
             id="botaoOk"
             action="#{ControleApp.cancelarModal}"
             value="#{msg.botaoOk}" /> <r:componentControl
             for="panel"
             attachTo="botaoOk"
             operation="hide"
             event="onclick" /></center>
             </a4j:form>
             </r:modalPanel>
             </f:view>
             <!-- **************** Fim Mostra Mensagens ***************************** -->
             </ui:insert>
             <div id="inclusoes"><ui:insert name="inclusoes" /></div>
            </jsp:root>
            


            ManterConfig.jspx (one of the pages that uses the template above):
            <?xml version="1.0" encoding="ISO-8859-1"?>
            <jsp:root
             xmlns:jsp="http://java.sun.com/JSP/Page"
             xmlns:h="http://java.sun.com/jsf/html"
             xmlns:f="http://java.sun.com/jsf/core"
             xmlns:ui="http://java.sun.com/jsf/facelets"
             xmlns:r="http://richfaces.org/rich"
             xmlns:a4j="http://richfaces.org/a4j"
             version="2.0">
             <body>
             <ui:composition template="../../templates/template.jspx">
             <ui:define name="corpo">
             <h:form
             id="formulario"
             onkeypress="return desabilitaEnter(event);">
             <center><h:panelGroup style="width:760px; height: 30px;">
             <h:panelGrid width="600">
             <r:panel header="#{msg.tituloValidades}">
             <r:dataTable
             id="minhaTabela"
             value=""
             align="center"
             columns="2"
             styleClass="sembordas"
             width="700">
             <r:columnGroup>
             <r:column
             styleClass="sembordas"
             width="40%">
             <h:outputLabel value="#{msg.labelCEF}" />
             </r:column>
             <r:column styleClass="sembordas">
             <r:calendar
             converterMessage="#{msg.msgErroDataInvalida}"
             datePattern="dd/MM/yyyy"
             inputSize="8"
             id="dataValidadeCEF"
             inputStyle="height:20px;"
             locale="#{ControleApp.locale}"
             enableManualInput="true"
             value="#{ManterConfig.dataValidadeCEF}" />
             <h:outputText
             value="#{msg.labelObrigatorio}"
             styleClass="campoObrigatorio" />
             </r:column>
             </r:columnGroup>
             <r:columnGroup>
             <r:column styleClass="sembordas">
             <h:outputLabel value="#{msg.labelTJDFT}" />
             </r:column>
             <r:column
             styleClass="sembordas"
             colspan="3">
             <h:inputText
             id="prazoValidadeCertTJDFT"
             size="2"
             style="text-align:center;height:20px;"
             maxlength="2"
             onkeypress="submitJSFViaEnter(event, 'botaoConfirmar');"
             value="#{ManterConfig.prazoValidadeCertTJDFT}" />
             <h:outputText
             value="#{msg.labelObrigatorio}"
             styleClass="campoObrigatorio" />
             </r:column>
             </r:columnGroup>
             </r:dataTable>
             </r:panel>
             </h:panelGrid>
             <h:panelGrid width="600">
             <r:panel header="#{msg.tituloPrazos}">
             <r:dataTable
             id="minhaTabela2"
             value=""
             align="center"
             columns="2"
             styleClass="sembordas"
             width="700">
             <r:columnGroup>
             <r:column styleClass="sembordas">
             <h:outputLabel value="#{msg.labelPrazoAvisoDocCefInf}" />
             </r:column>
             <r:column styleClass="sembordas">
             <h:inputText
             id="prazoAvisoDocCefInf"
             size="2"
             style="text-align:center;"
             maxlength="2"
             onkeypress="submitJSFViaEnter(event, 'botaoConfirmar');"
             value="#{ManterConfig.prazoAvisoDocCefInf}" />
             <h:outputText
             value="#{msg.labelObrigatorio}"
             styleClass="campoObrigatorio" />
             </r:column>
             </r:columnGroup>
             <r:columnGroup>
             <r:column
             styleClass="sembordas"
             width="40%">
             <h:outputLabel value="#{msg.labelDataEtapa1}" />
             </r:column>
             <r:column styleClass="sembordas">
             <h:inputText
             id="prazoAvisoDocMagCef"
             size="2"
             style="text-align:center;"
             maxlength="2"
             onkeypress="submitJSFViaEnter(event, 'botaoConfirmar');"
             value="#{ManterConfig.prazoAvisoDocMagCef}" />
             <h:outputLabel value="#{msg.labelDataPosEtapa1}" />
             <h:outputText
             value="#{msg.labelObrigatorio}"
             styleClass="campoObrigatorio" />
             </r:column>
             </r:columnGroup>
             <r:columnGroup>
             <r:column styleClass="sembordas">
             <h:outputLabel value="#{msg.labelDataEtapa2}" />
             </r:column>
             <r:column styleClass="sembordas">
             <h:inputText
             id="prazoAvisoDocInfMag"
             size="2"
             style="text-align:center;"
             maxlength="2"
             onkeypress="submitJSFViaEnter(event, 'botaoConfirmar');"
             value="#{ManterConfig.prazoAvisoDocInfMag}" />
             <h:outputLabel value="#{msg.labelDataPosEtapa2}" />
             <h:outputText
             value="#{msg.labelObrigatorio}"
             styleClass="campoObrigatorio" />
             </r:column>
             </r:columnGroup>
             <r:columnGroup>
             <r:column styleClass="sembordas">
             <h:outputLabel value="#{msg.labelDataEtapa3}" />
             </r:column>
             <r:column styleClass="sembordas">
             <h:inputText
             id="prazoAvisoDocInfCef"
             size="2"
             style="text-align:center;"
             maxlength="2"
             onkeypress="submitJSFViaEnter(event, 'botaoConfirmar');"
             value="#{ManterConfig.prazoAvisoDocInfCef}" />
             <h:outputLabel value="#{msg.labelDataPosEtapa3}" />
             <h:outputText
             value="#{msg.labelObrigatorio}"
             styleClass="campoObrigatorio" />
             </r:column>
             </r:columnGroup>
             <r:columnGroup>
             <r:column styleClass="sembordas">
             <h:outputLabel value="#{msg.labelPrazoEmissaoAviso}" />
             </r:column>
             <r:column styleClass="sembordas">
             <h:inputText
             id="prazoParaAviso"
             size="2"
             style="text-align:center;"
             maxlength="2"
             onkeypress="submitJSFViaEnter(event, 'botaoConfirmar');"
             value="#{ManterConfig.prazoParaAviso}" /> antes de um prazo limite
             <h:outputText
             value="#{msg.labelObrigatorio}"
             styleClass="campoObrigatorio" />
             </r:column>
             </r:columnGroup>
             </r:dataTable>
             </r:panel>
             </h:panelGrid>
             <h:panelGrid width="600">
             <r:panel header="#{msg.tituloQuantitativo}">
             <r:dataTable
             id="minhaTabela3"
             value=""
             align="center"
             columns="2"
             styleClass="sembordas"
             width="700">
             <r:columnGroup>
             <r:column
             styleClass="sembordas"
             width="40%">
             <h:outputLabel value="#{msg.labelMagistrados}" />
             </r:column>
             <r:column styleClass="sembordas">
             <h:inputText
             id="quantMagistrados"
             size="3"
             style="text-align:center;"
             maxlength="3"
             onkeypress="submitJSFViaEnter(event, 'botaoConfirmar');"
             value="#{ManterConfig.quantMagistrados}" />
             <h:outputText
             value="#{msg.labelObrigatorio}"
             styleClass="campoObrigatorio" />
             </r:column>
             </r:columnGroup>
             <r:columnGroup>
             <r:column styleClass="sembordas">
             <h:outputLabel value="#{msg.labelServidores}" />
             </r:column>
             <r:column styleClass="sembordas">
             <h:inputText
             id="quantServidores"
             size="4"
             style="text-align:center;"
             maxlength="4"
             onkeypress="submitJSFViaEnter(event, 'botaoConfirmar');"
             value="#{ManterConfig.quantServidores}" />
             <h:outputText
             value="#{msg.labelObrigatorio}"
             styleClass="campoObrigatorio" />
             </r:column>
             </r:columnGroup>
             </r:dataTable>
             </r:panel>
             </h:panelGrid>
             </h:panelGroup>
             <h:panelGrid>
             <a4j:commandButton
             value="Confirmar"
             id="botaoConfirmar"
             action="#{ManterConfig.confirmar}"
             reRender="panel" />
             </h:panelGrid></center>
             </h:form>
             <script type="text/javascript">
             document.getElementById('formulario:minhaTabela:0:dataValidadeCEF').focus;
            </script>
             </ui:define>
             </ui:composition>
             </body>
            </jsp:root>
            


            • 3. Re: Google Chrome support working ?
              Ilya Shaikovsky Master

              outputPanel produces span element in head. I believe that this is completely wrong.

              • 4. Re: Google Chrome support working ?
                Flavio Henrique Newbie

                 

                "ilya_shaikovsky" wrote:
                outputPanel produces span element in head. I believe that this is completely wrong.


                Hi Ilya,

                after your comment I remove all code from head (leaving only the meta and title tags) and the error gone.

                but Google Chrome refuses to display labels/messages/etc, explicit typed or retrieved from my resource bundle, with accents.

                I got this message, e.g.:
                This page contains the following errors:
                
                error on line 92 at column 26: Entity 'eacute' not defined
                
                Below is a rendering of the page up to the first error.
                


                removing the accent from the offending text, all works (at least the page got displayed and no errors on screen).

                can you tell me if this is a Chrome bug or something that I'm missing?

                thank you again for the precious help.

                Hwoarang

                • 5. Re: Google Chrome support working ?
                  Ilya Shaikovsky Master

                  I meant only to remove

                   <a4j:outputPanel ajaxRendered="true">
                  


                  tag from head.

                  • 6. Re: Google Chrome support working ?
                    Flavio Henrique Newbie

                     

                    "ilya_shaikovsky" wrote:
                    I meant only to remove
                     <a4j:outputPanel ajaxRendered="true">
                    


                    tag from head.


                    Sorry, my mystake writing. I forgot to say. I tried.
                    Removing only outputPanel didn't work either.
                    I started to transfer tag by tag, from head to another <ui:include> tag, to see which was causing the error. After removing all them the error still there. So I removed the head tag and the error gone, but the 'Entity' one started to show up.
                    I can live without head tag, but not without accents.
                    Any word about that?

                    Thank you.


                    • 7. Re: Google Chrome support working ?
                      Ilya Shaikovsky Master

                      include

                      body
                      right after head but not in one of your inserts.

                      • 8. Re: Google Chrome support working ?
                        Flavio Henrique Newbie

                         

                        "ilya_shaikovsky" wrote:
                        include
                        body
                        right after head but not in one of your inserts.


                        Hi Ilya,
                        despite my old code don't have the
                        body
                        inside any inserts, I removed the body from pages that use template and put it on template.
                        the first error reported by me only occurs if I use .
                        if I remove the the page starts to show up, but any accent that I have causes the second error.
                        I know that it works, because I'm testing with fiji-demo on Google Chrome and works. I'm just trying to figure out what makes Chrome refuses to display my pages.

                        thank you again.

                        • 9. Re: Google Chrome support working ?
                          Flavio Henrique Newbie

                          err...
                          Just trying this code:

                          <?xml version="1.0" encoding="UTF-8"?>
                          <jsp:root
                           xmlns:jsp="http://java.sun.com/JSP/Page"
                           xmlns:h="http://java.sun.com/jsf/html"
                           xmlns:f="http://java.sun.com/jsf/core"
                           xmlns:ui="http://java.sun.com/jsf/facelets"
                           xmlns:r="http://richfaces.org/rich"
                           xmlns:a4j="http://richfaces.org/a4j"
                           version="2.0">
                           <head>
                           </head>
                           <body>
                           </body>
                          </jsp:root>
                          


                          Google Chrome complains with error:

                          This page contains the following errors:
                          
                          error on line 5 at column 1: Extra content at the end of the document
                          Below is a rendering of the page up to the first error.
                          
                          window.RICH_FACES_EXTENDED_SKINNING_ON=true;
                          


                          I noticed that page code source has a closing tag 'html' but not opening (the last tag)... I think this is the problem. Look:

                          
                          <head>
                          <link
                           class='component'
                           rel='stylesheet'
                           type='text/css'
                           href='/Certificado/a4j/s/3_2_2.GAorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf' />
                          <link
                           class='component'
                           rel='stylesheet'
                           type='text/css'
                           href='/Certificado/a4j/s/3_2_2.GAorg/richfaces/renderkit/html/css/extended_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf'
                           media='rich-extended-skinning' />
                          <script type='text/javascript'>
                           window.RICH_FACES_EXTENDED_SKINNING_ON = true;
                          </script>
                          <script
                           type='text/javascript'
                           src='/Certificado/a4j/g/3_2_2.GAorg/richfaces/renderkit/html/scripts/skinning.js.jsf'></script>
                          </head>
                          <body>
                          </body>
                          </html>
                          


                          The same code works with Firefox and IE.
                          Removing the 'head' tag no error on Chrome.
                          Got errors with 3.2.2 and 3.3.1-beta2.

                          What could be wrong ?
                          Thank you in advance.

                          • 10. Re: Google Chrome support working ?
                            Flavio Henrique Newbie

                            I forgot to post in the previous post:

                            Removing the 'head' tag from code, I got this code source (note the opening 'html' tag now):

                            
                            <html xmlns="http://www.w3.org/1999/xhtml">
                            <head>
                            <link
                             class="component"
                             href="/Certificado/a4j/s/3_3_1-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf"
                             rel="stylesheet"
                             type="text/css" />
                            <link
                             class="component"
                             href="/Certificado/a4j/s/3_3_1-SNAPSHOTorg/richfaces/renderkit/html/css/extended_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf"
                             media="rich-extended-skinning"
                             rel="stylesheet"
                             type="text/css" />
                            <script type="text/javascript">
                             window.RICH_FACES_EXTENDED_SKINNING_ON = true;
                            </script>
                            <script
                             src="/Certificado/a4j/g/3_3_1-SNAPSHOTorg/richfaces/renderkit/html/scripts/skinning.js.jsf"
                             type="text/javascript"></script>
                            </head>
                            <body>
                            </body>
                            </html>
                            


                            and no errors in Google Chrome.

                            Thank you.

                            • 11. Re: Google Chrome support working ?
                              Ilya Shaikovsky Master

                              add doctype declaration to your main template.