5 Replies Latest reply on Apr 1, 2009 8:57 PM by Nick Belaevski

    Calendar rerender issue in Safari

    Alchemy Alchemy Newbie

      Hi there,

      We are having an issue with rerendering the calendar in Safari with RichFaces 3.3.0 GA.

      We have page that displays a list of reports (in a tree). When a user clicks on a report, a panel is populated with input controls for the report parameters. This panel is rerendered via a4j calls.

      Some of the reports require date parameters, for which we use the HtmlCalendar.

      When viewing the page in Safari, it works correctly the first time, but if we then revisit the page clicking on reports that require date inputs does not populate the parameter panel. The process seems to fail sliently.

      We believe it is related to this issue: https://jira.jboss.org/jira/browse/RF-4806.

      Has anyone had any success finding a work around for this issue, and has any work been done on solving this issue?

      Thanks



        • 1. Re: Calendar rerender issue in Safari
          Nick Belaevski Master

          Hello,

          As a workaround you can try switching between XHTML/HTML modes (try setting <f:view contentType="text/html"> or <f:view contentType="application/xhtml+xml">); probably this will work ok in one of the modes. Also we've recently fixed one Safari AJAX issue; so you can try 3.3.1.BETA2.

          • 2. Re: Calendar rerender issue in Safari
            Alchemy Alchemy Newbie

            Hi

            Just an update.

            We have tried both of your suggestions and sadly neither seemed to resolve the problem.

            One thing we weren't sure about though only the richfaces-ui-3.3.1.BETA2.jar appeared to be available for download, does this matter? Do we need the API and IMPL jars as well?

            Also any clue as to whether RF-4806 will be addressed in the near future?

            Thanks.

            • 3. Re: Calendar rerender issue in Safari
              Nick Belaevski Master

              Yes, API and IMPL .jar files are necessary too. You can obtain them from Maven repository: http://repository.jboss.org/maven2/org/richfaces/framework/.

              • 4. Re: Calendar rerender issue in Safari
                Alchemy Alchemy Newbie

                Hi

                We have tried the latest BETA now. Sorry to say it did not work.

                We have ended up with a workaround for now. We have extended the class org.ajax4jsf.Filter. We are using that to detect the Safari browser and disable caching for certain pages and resources. This is by no means ideal but we can live with it for now.

                Would really be helpful to know if you have any updates on RF-4806 as this sounds like it may be similar problem.

                Thanks.

                • 5. Re: Calendar rerender issue in Safari
                  Nick Belaevski Master

                  I've just tried this JSP page with 3.3.1.BETA2:

                  <?xml version="1.0" encoding="UTF-8"?>
                  
                  <jsp:root version="2.1" xmlns:jsp="http://java.sun.com/JSP/Page"
                   xmlns:c="http://java.sun.com/jsp/jstl/core"
                   xmlns:f="http://java.sun.com/jsf/core"
                   xmlns:h="http://java.sun.com/jsf/html"
                   xmlns:rich="http://richfaces.org/rich"
                   xmlns:a4j="http://richfaces.org/a4j">
                  
                   <jsp:directive.page contentType="text/html;charset=UTF-8"
                   pageEncoding="UTF-8" />
                   <jsp:output omit-xml-declaration="no" doctype-root-element="html"
                   doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
                   doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
                  
                   <f:view>
                   <html xmlns="http://www.w3.org/1999/xhtml">
                   <body>
                  
                   <h:form>
                   <h:panelGrid columns="2">
                   <rich:calendar id="calendar" />
                   <a4j:commandButton value="Click Me!" reRender="calendar, time" />
                   </h:panelGrid>
                  
                   <h:panelGroup id="time">
                   <h:outputText value="#{forum5Bean.time}" />
                   </h:panelGroup>
                   </h:form>
                  
                   <a4j:log popup="false" />
                  
                   </body>
                   </html>
                  
                   </f:view>
                  </jsp:root>

                  According to log and visual observations it's working ok with Safari 3.2.2 and Chrome. Strange, but
                  <jsp:directive.page contentType="application/xhtml+xml;charset=UTF-8"
                   pageEncoding="UTF-8" />
                  
                  breaks calendar at all.

                  So, I have two questions: what is Safari version and what is full page code?