5 Replies Latest reply on Jul 10, 2008 3:01 PM by j-pro

    calendar+a4j:support+ajaxSingle=empty page

    j-pro

      Good afternoon, dear RichFaces gurus.

      I've wanted to refresh bean value of calendar date on blur and change events and wrote this code for it:

      <h:panelGroup>
       <a4j:region id="calendar_orderCreatedDateEdit" layout="block">
       <rich:calendar id="orderCreatedEditDate" value="#{amBean.order.createdDate}"
       enableManualInput="#{amBean.calendarEnableManualInput}" popup="#{amBean.calendarPopup}" locale="#{amBean.calendarLocale}"
       datePattern="#{amBean.calendarPattern}" showInput="#{amBean.calendarShowInput}" required="true"
       requiredMessage="#{constMan.requiredMessage}" >
       <a4j:support event="onchanged" ajaxSingle="true"/> <!-- to update amBean variable -->
       <a4j:support event="oninputblur" ajaxSingle="true"/> <!-- to update amBean variable -->
       </rich:calendar>
       </a4j:region>
       <rich:message styleClass="rich_error_message" for="orderCreatedEditDate">
       <f:facet name="passedMarker">
       <h:graphicImage value="images/valid_ok.gif" />
       </f:facet>
       <f:facet name="errorMarker">
       <h:graphicImage value="images/valid_err.gif" />
       </f:facet>
       </rich:message>
      </h:panelGroup>


      But when one of these events happens, page reloads and only white background appears with "< /html >" in the page code, even without open tag.

      Here is server log starting from the moment I had cursor in calendar input field and changed focus to one of other fields in the form: http://rafb.net/p/xxost398.html

      Am I doing something wrong, or is it a bug?

      Thanks in advance for your reply.

        • 1. Re: calendar+a4j:support+ajaxSingle=empty page
          j-pro

          Sorry for forgetting specifying environment:

          RF version: v.3.2.1.GA SVN $Revision: 7513 $ $Date: 2008-04-01 04:05:05 +0300 $
          JBoss version: 4.2.2.GA
          OS: Windows XP SP2
          Browser: Mozilla Firefox 2.0.0.14

          • 2. Re: calendar+a4j:support+ajaxSingle=empty page
            j-pro

            In addition: just tried the same in IE 7. The page remained the same, but a4j:log gave me this:

            debug[19:01:40,859]: Have Event [object Object] with properties: target: undefined, srcElement: [object], type: blur
            debug[19:01:40,859]: NEW AJAX REQUEST !!! with form :registerNewWorker_form
            debug[19:01:40,875]: Append hidden control registerNewWorker_form with value [registerNewWorker_form] and value attribute [registerNewWorker_form]
            debug[19:01:40,875]: Append hidden control registerNewWorker_form:j_id91 with value [true] and value attribute [true]
            debug[19:01:40,875]: Append text control registerNewWorker_form:matricolNrEdit with value [63255200817271418] and value attribute [63255200817271418]
            debug[19:01:40,875]: Append text control registerNewWorker_form:contractNrEdit with value [68255200817271446] and value attribute [68255200817271446]
            debug[19:01:40,875]: Append select-one control registerNewWorker_form:employeeProfessionEdit with value [1$$$#$$$2$$$#$$$-1$$$#$$$2$$$#$$$1$$$#$$$1$$$#$$$Претендент$$$#$$$null$$$#$$$] and value attribute [1$$$#$$$2$$$#$$$-1$$$#$$$2$$$#$$$1$$$#$$$1$$$#$$$Претендент$$$#$$$null$$$#$$$]
            debug[19:01:40,875]: Append select-one control registerNewWorker_form:employeeDepartmentEdit with value [7$$$#$$$4$$$#$$$-1$$$#$$$8$$$#$$$1$$$#$$$1$$$#$$$�нкета$$$#$$$Spisok anket$$$#$$$] and value attribute [7$$$#$$$4$$$#$$$-1$$$#$$$8$$$#$$$1$$$#$$$1$$$#$$$�нкета$$$#$$$Spisok anket$$$#$$$]
            debug[19:01:40,875]: Append text control registerNewWorker_form:hoursPerDayEdit with value [8] and value attribute [8]
            debug[19:01:40,875]: Append select-one control registerNewWorker_form:employeeGradeEdit with value [44$$$#$$$12$$$#$$$5$$$#$$$40$$$#$$$1$$$#$$$1$$$#$$$�икто$$$#$$$null$$$#$$$] and value attribute [44$$$#$$$12$$$#$$$5$$$#$$$40$$$#$$$1$$$#$$$1$$$#$$$�икто$$$#$$$null$$$#$$$]
            debug[19:01:40,890]: Append text control registerNewWorker_form:salPerMonthEdit with value [] and value attribute []
            debug[19:01:40,890]: Append hidden control registerNewWorker_form:j_id159 with value [true] and value attribute [true]
            debug[19:01:40,890]: Append select-one control registerNewWorker_form:orderBlackEdit with value [0] and value attribute [0]
            debug[19:01:40,890]: Append select-one control registerNewWorker_form:orderTypeEdit with value [46$$$#$$$13$$$#$$$2$$$#$$$45$$$#$$$1$$$#$$$1$$$#$$$Приём на работу$$$#$$$null$$$#$$$] and value attribute [46$$$#$$$13$$$#$$$2$$$#$$$45$$$#$$$1$$$#$$$1$$$#$$$Приём на работу$$$#$$$null$$$#$$$]
            debug[19:01:40,890]: Append text control registerNewWorker_form:orderNrEdit with value [33862008191276] and value attribute [33862008191276]
            debug[19:01:40,890]: Append text control registerNewWorker_form:orderCreatedEditDateInputDate with value [08.07.2008] and value attribute [08.07.2008]
            debug[19:01:40,890]: Append hidden control registerNewWorker_form:orderCreatedEditDateInputCurrentDate with value [07/2008] and value attribute [07/2008]
            debug[19:01:40,890]: Append text control registerNewWorker_form:orderStartDateEditInputDate with value [08.07.2008] and value attribute [08.07.2008]
            debug[19:01:40,890]: Append hidden control registerNewWorker_form:orderStartDateEditInputCurrentDate with value [07/2008] and value attribute [07/2008]
            debug[19:01:40,906]: Append text control registerNewWorker_form:orderEndDateEditInputDate with value [] and value attribute []
            debug[19:01:40,906]: Append hidden control registerNewWorker_form:orderEndDateEditInputCurrentDate with value [07/2008] and value attribute [07/2008]
            debug[19:01:40,906]: Append text control registerNewWorker_form:orderCommentEdit with value [] and value attribute []
            debug[19:01:40,921]: Append hidden control javax.faces.ViewState with value [j_id1] and value attribute [j_id1]
            debug[19:01:40,921]: Append text control registerNewWorker_form:orderCreatedEditDateInputDate with value [08.07.2008] and value attribute [08.07.2008]
            debug[19:01:40,921]: parameter registerNewWorker_form:j_id189 with value registerNewWorker_form:j_id189
            debug[19:01:40,921]: parameter ajaxSingle with value registerNewWorker_form:orderCreatedEditDate
            debug[19:01:40,921]: Start XmlHttpRequest
            debug[19:01:40,921]: Reqest state : 1
            debug[19:01:40,937]: QueryString: AJAXREQUEST=registerNewWorker_form%3Acalendar_orderCreatedDateEdit&registerNewWorker_form=registerNewWorker_form&registerNewWorker_form%3Aj_id91=true&registerNewWorker_form%3AworkType_radio=0&registerNewWorker_form%3AsalaryType_radio=1&registerNewWorker_form%3AmatricolNrEdit=63255200817271418&registerNewWorker_form%3AcontractNrEdit=68255200817271446&registerNewWorker_form%3AemployeeProfessionEdit=1%24%24%24%23%24%24%242%24%24%24%23%24%24%24-1%24%24%24%23%24%24%242%24%24%24%23%24%24%241%24%24%24%23%24%24%241%24%24%24%23%24%24%24%D0%9F%D1%80%D0%B5%D1%82%D0%B5%D0%BD%D0%B4%D0%B5%D0%BD%D1%82%24%24%24%23%24%24%24null%24%24%24%23%24%24%24&registerNewWorker_form%3AemployeeDepartmentEdit=7%24%24%24%23%24%24%244%24%24%24%23%24%24%24-1%24%24%24%23%24%24%248%24%24%24%23%24%24%241%24%24%24%23%24%24%241%24%24%24%23%24%24%24%D0%90%D0%BD%D0%BA%D0%B5%D1%82%D0%B0%24%24%24%23%24%24%24Spisok%20anket%24%24%24%23%24%24%24&registerNewWorker_form%3AhoursPerDayEdit=8&registerNewWorker_form%3AemployeeGradeEdit=44%24%24%24%23%24%24%2412%24%24%24%23%24%24%245%24%24%24%23%24%24%2440%24%24%24%23%24%24%241%24%24%24%23%24%24%241%24%24%24%23%24%24%24%D0%9D%D0%B8%D0%BA%D1%82%D0%BE%24%24%24%23%24%24%24null%24%24%24%23%24%24%24&registerNewWorker_form%3AsalPerMonthEdit=&registerNewWorker_form%3Aj_id159=true&registerNewWorker_form%3AorderBlackEdit=0&registerNewWorker_form%3AorderTypeEdit=46%24%24%24%23%24%24%2413%24%24%24%23%24%24%242%24%24%24%23%24%24%2445%24%24%24%23%24%24%241%24%24%24%23%24%24%241%24%24%24%23%24%24%24%D0%9F%D1%80%D0%B8%D1%91%D0%BC%20%D0%BD%D0%B0%20%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D1%83%24%24%24%23%24%24%24null%24%24%24%23%24%24%24&registerNewWorker_form%3AorderNrEdit=33862008191276&registerNewWorker_form%3AorderCreatedEditDateInputDate=08.07.2008&registerNewWorker_form%3AorderCreatedEditDateInputDate=08.07.2008&registerNewWorker_form%3AorderCreatedEditDateInputCurrentDate=07%2F2008&registerNewWorker_form%3AorderStartDateEditInputDate=08.07.2008&registerNewWorker_form%3AorderStartDateEditInputCurrentDate=07%2F2008&registerNewWorker_form%3AorderEndDateEditInputDate=&registerNewWorker_form%3AorderEndDateEditInputCurrentDate=07%2F2008&registerNewWorker_form%3AorderCommentEdit=&javax.faces.ViewState=j_id1&registerNewWorker_form%3Aj_id189=registerNewWorker_form%3Aj_id189&ajaxSingle=registerNewWorker_form%3AorderCreatedEditDate&
            debug[19:01:41,015]: Reqest state : 2
            debug[19:01:41,015]: Reqest state : 3
            debug[19:01:41,031]: Reqest state : 4
            debug[19:01:41,031]: Reqest end with state 4
            debug[19:01:41,031]: Response with content-type: text/html;charset=UTF-8
            debug[19:01:41,031]: Full response content: </html>
            debug[19:01:41,031]: Header Ajax-Response not found, search in <meta>
            debug[19:01:41,031]: Header Ajax-Expired not found, search in <meta>
            warn[19:01:41,031]: No ajax response header
            debug[19:01:41,031]: Header Location not found, search in <meta>
            debug[19:01:41,031]: replace all page content with response
            debug[19:01:41,031]: setup custom document.open method
            debug[19:01:41,062]: exception during write page content undefined
            error[19:01:41,093]: Error parsing responseXML Parsing Error: End tag was not expected at this location.
            Location: Line Number 1, Column 3:</html>---^
            debug[19:01:41,093]: page content has been replaced


            So I guess that could help.

            • 3. Re: calendar+a4j:support+ajaxSingle=empty page
              mail.micke

              I have no idea what is going on, but you might learn more by using FireBug and looking at the actual data sent and received. You'll find that in the Console tab.

              • 4. Re: calendar+a4j:support+ajaxSingle=empty page
                j-pro

                Here is what FireBug says:

                Response headers:

                Response Headers
                Server Apache-Coyote/1.1
                X-Powered-By Servlet 2.4; JBoss-4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)/Tomcat-5.5, JSF/1.2
                Content-Type text/html;charset=UTF-8
                Date Wed, 09 Jul 2008 14:21:58 GMT
                Transfer-Encoding chunked
                Request Headers
                Host localhost:8080
                User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.15) Gecko/20080623 Firefox/2.0.0.15
                Accept text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
                Accept-Language en-us,en;q=0.5
                Accept-Encoding gzip,deflate
                Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
                Keep-Alive 300
                Connection keep-alive
                Content-Type application/x-www-form-urlencoded; charset=UTF-8
                Referer http://localhost:8080/AHRS/pretenders.jsf;jsessionid=4696F7F50EF0A02C4F50108484BD0534
                Content-Length 2344
                Pragma no-cache
                Cache-Control no-cache


                Post:
                AJAXREQUEST=registerNewWorker_form%3Acalendar_orderCreatedDateEdit&registerNewWorker_form=registerNewWorker_form
                &registerNewWorker_form%3Aj_id91=true&registerNewWorker_form%3AworkType_radio=0&registerNewWorker_form
                %3AsalaryType_radio=1&registerNewWorker_form%3AmatricolNrEdit=63255200817271418&registerNewWorker_form
                %3AcontractNrEdit=68255200817271446&registerNewWorker_form%3AemployeeProfessionEdit=1%24%24%24%23%24
                %24%242%24%24%24%23%24%24%24-1%24%24%24%23%24%24%242%24%24%24%23%24%24%241%24%24%24%23%24%24%241%24%24
                %24%23%24%24%24%D0%9F%D1%80%D0%B5%D1%82%D0%B5%D0%BD%D0%B4%D0%B5%D0%BD%D1%82%24%24%24%23%24%24%24null
                %24%24%24%23%24%24%24&registerNewWorker_form%3AemployeeDepartmentEdit=7%24%24%24%23%24%24%244%24%24%24
                %23%24%24%24-1%24%24%24%23%24%24%248%24%24%24%23%24%24%241%24%24%24%23%24%24%241%24%24%24%23%24%24%24
                %D0%90%D0%BD%D0%BA%D0%B5%D1%82%D0%B0%24%24%24%23%24%24%24Spisok%20anket%24%24%24%23%24%24%24&registerNewWorker_form
                %3AhoursPerDayEdit=8&registerNewWorker_form%3AemployeeGradeEdit=44%24%24%24%23%24%24%2412%24%24%24%23
                %24%24%245%24%24%24%23%24%24%2440%24%24%24%23%24%24%241%24%24%24%23%24%24%241%24%24%24%23%24%24%24%D0
                %9D%D0%B8%D0%BA%D1%82%D0%BE%24%24%24%23%24%24%24null%24%24%24%23%24%24%24&registerNewWorker_form%3AsalPerMonthEdit
                =&registerNewWorker_form%3Aj_id159=true&registerNewWorker_form%3AorderBlackEdit=0&registerNewWorker_form
                %3AorderTypeEdit=46%24%24%24%23%24%24%2413%24%24%24%23%24%24%242%24%24%24%23%24%24%2445%24%24%24%23%24
                %24%241%24%24%24%23%24%24%241%24%24%24%23%24%24%24%D0%9F%D1%80%D0%B8%D1%91%D0%BC%20%D0%BD%D0%B0%20%D1
                %80%D0%B0%D0%B1%D0%BE%D1%82%D1%83%24%24%24%23%24%24%24null%24%24%24%23%24%24%24&registerNewWorker_form
                %3AorderNrEdit=996200817215067&registerNewWorker_form%3AorderCreatedEditDateInputDate=09.07.2008&registerNewWorker_form
                %3AorderCreatedEditDateInputDate=09.07.2008&registerNewWorker_form%3AorderCreatedEditDateInputCurrentDate
                =07%2F2008&registerNewWorker_form%3AorderStartDateEditInputDate=09.07.2008&registerNewWorker_form%3AorderStartDateEditInputCurrentDate
                =07%2F2008&registerNewWorker_form%3AorderEndDateEditInputDate=&registerNewWorker_form%3AorderEndDateEditInputCurrentDate
                =07%2F2008&registerNewWorker_form%3AorderCommentEdit=&javax.faces.ViewState=j_id2&registerNewWorker_form
                %3Aj_id189=registerNewWorker_form%3Aj_id189&ajaxSingle=registerNewWorker_form%3AorderCreatedEditDate
                &


                Response:
                </html>



                Btw: while I was writing this message, my Dr. Web antivirus was always alerting:
                ...Application Data\Mozilla\Firefox\Profiles\1kq50573.default\sessionstore-1.js - probably infected with BATCH.Virus
                ;)

                • 5. Re: calendar+a4j:support+ajaxSingle=empty page
                  j-pro

                  The problem is solved: RF developers just fixed some bug and starting from version

                  v.3.2.2-SNAPSHOT SVN $Revision: 8947 $ $Date: 2008-06-07 08:39:49 -0400 (Sat, 07 Jun 2008) $
                  the subj is gone.

                  Thanks!