1 2 Previous Next 18 Replies Latest reply on Dec 4, 2007 8:10 AM by fmarwede

    a4j:push and firefox

    cybeer

      Hello!

      When i use a4j:push whith firefox 2.0.0.9 i take error:

      Ошибка: uncaught exception: [Exception... "Not enough arguments" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: http://127.0.0.1:8090/pilot-web/a4j_3_1_3-SNAPSHOTorg.ajax4jsf.javascript.AjaxScript.jsf :: anonymous :: line 55" data: no]

      But with opera and ie its ok. And using a4j:poll instead solve this problem.

      This error repeats whith 3.1.2 to.

      Any solutions?

      Sorry for my english.

        • 1. Re: a4j:push and firefox
          ilya_shaikovsky

          Unfortunatelly can't reproduce this.. I'm checking under 3.2.0. could you please check also under this version.

          • 2. Re: a4j:push and firefox
            cybeer

            With 3.2.0 same error repeats.

            Ошибка: uncaught exception: [Exception... "Not enough arguments" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: http://127.0.0.1:8090/pilot-web/a4j_3_2_0-SNAPSHOTorg.ajax4jsf.javascript.AjaxScript.jsf :: anonymous :: line 62" data: no]

            • 3. Re: a4j:push and firefox
              ilya_shaikovsky

              Describe other libs versions and server

              • 4. Re: a4j:push and firefox
                cybeer

                server: apache-tomcat-5.5.23

                libs:
                facelets 1.1.11
                jsf 1.2_04-b10-p01
                tomahawk 1.1.6

                • 5. Re: a4j:push and firefox
                  cybeer

                  and also jsf-unit

                  • 6. Re: a4j:push and firefox
                    cybeer

                    i create small test application on basis of Facelets StarterKit.

                    in firefox i have error:
                    Ã�žÑˆÃ�¸Ã�±Ã�ºÃ�°: uncaught exception: [Exception... "Not enough arguments" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: http://127.0.0.1:8100/push-test/a4j_3_1_3-SNAPSHOTorg.ajax4jsf.javascript.AjaxScript.jsf :: anonymous :: line 55" data: no]

                    in ie all ok.

                    web.xml:

                    <?xml version="1.0" encoding="UTF-8"?>
                    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
                     <description>Facelets StarterKit</description>
                     <display-name>push-test</display-name>
                     <context-param>
                     <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
                     <param-value>.xhtml</param-value>
                     </context-param>
                     <context-param>
                     <param-name>facelets.REFRESH_PERIOD</param-name>
                     <param-value>2</param-value>
                     </context-param>
                     <context-param>
                     <param-name>facelets.DEVELOPMENT</param-name>
                     <param-value>true</param-value>
                     </context-param>
                     <context-param>
                     <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                     <param-value>server</param-value>
                     </context-param>
                     <context-param>
                     <param-name>com.sun.faces.validateXml</param-name>
                     <param-value>false</param-value>
                     </context-param>
                     <context-param>
                     <param-name>com.sun.faces.verifyObjects</param-name>
                     <param-value>false</param-value>
                     </context-param>
                     <context-param>
                     <param-name>org.richfaces.SKIN</param-name>
                     <param-value>DEFAULT</param-value>
                     </context-param>
                     <context-param>
                     <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
                     <param-value>com.sun.facelets.FaceletViewHandler</param-value>
                     </context-param>
                     <filter>
                     <display-name>Ajax4jsf Filter</display-name>
                     <filter-name>ajax4jsf</filter-name>
                     <filter-class>org.ajax4jsf.Filter</filter-class>
                     <init-param>
                     <param-name>enable-cache</param-name>
                     <param-value>false</param-value>
                     </init-param>
                     </filter>
                     <filter-mapping>
                     <filter-name>ajax4jsf</filter-name>
                     <servlet-name>Faces Servlet</servlet-name>
                     <dispatcher>REQUEST</dispatcher>
                     <dispatcher>FORWARD</dispatcher>
                     <dispatcher>INCLUDE</dispatcher>
                     </filter-mapping>
                     <servlet>
                     <servlet-name>Faces Servlet</servlet-name>
                     <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                     <load-on-startup>1</load-on-startup>
                     </servlet>
                     <servlet-mapping>
                     <servlet-name>Faces Servlet</servlet-name>
                     <url-pattern>*.jsf</url-pattern>
                     </servlet-mapping>
                     <login-config>
                     <auth-method>BASIC</auth-method>
                     </login-config>
                    </web-app>
                    


                    faces-config.xml:
                    <?xml version="1.0" encoding="UTF-8"?>
                    <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
                     xmlns:xi="http://www.w3.org/2001/XInclude"
                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
                     <managed-bean>
                     <managed-bean-name>person</managed-bean-name>
                     <managed-bean-class>demo.Person</managed-bean-class>
                     <managed-bean-scope>session</managed-bean-scope>
                     <managed-property>
                     <property-name>name</property-name>
                     <value/>
                     </managed-property>
                     </managed-bean>
                     <navigation-rule>
                     <from-view-id>/pages/inputname.xhtml</from-view-id>
                     <navigation-case>
                     <from-outcome>greeting</from-outcome>
                     <to-view-id>/pages/greeting.xhtml</to-view-id>
                     </navigation-case>
                     </navigation-rule>
                     <application>
                     <locale-config/>
                     </application>
                     <factory/>
                     <lifecycle/>
                    </faces-config>
                    


                    greeting.xhtml:
                    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                    <html xmlns="http://www.w3.org/1999/xhtml"
                     xmlns:ui="http://java.sun.com/jsf/facelets"
                     xmlns:h="http://java.sun.com/jsf/html"
                     xmlns:f="http://java.sun.com/jsf/core"
                     xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
                     xmlns:rich="http://richfaces.ajax4jsf.org/rich">
                    
                     <f:loadBundle basename="resources" var="msg" />
                     <ui:composition template="/templates/common.xhtml">
                     <ui:define name="pageTitle">JSF 1.2 and Facelets under Tomcat. KickStart Application</ui:define>
                     <ui:define name="pageHeader">Greeting Page</ui:define>
                     <ui:define name="body">
                     #{msg.greeting} #{person.name}!
                     <a4j:form>
                     <a4j:region>
                     <a4j:push id="test_push" interval="500" enabled="true" reRender="test_inp" eventProducer="#{person.addListener}"/>
                     </a4j:region>
                     <h:inputText id="test_inp" value="#{person.name}"></h:inputText>
                     <a4j:commandButton value="Push!!" action="#{person.push}" ajaxSingle="true"/>
                     </a4j:form>
                     </ui:define>
                     </ui:composition>
                    </html>
                    


                    person.java:
                    /*******************************************************************************
                     * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
                     * Distributed under license by Red Hat, Inc. All rights reserved.
                     * This program is made available under the terms of the
                     * Eclipse Public License v1.0 which accompanies this distribution,
                     * and is available at http://www.eclipse.org/legal/epl-v10.html
                     *
                     * Contributors:
                     * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
                     ******************************************************************************/
                    package demo;
                    
                    import java.util.EventListener;
                    import java.util.EventObject;
                    
                    import org.ajax4jsf.event.PushEventListener;
                    
                    /**
                     * @author sim
                     *
                     */
                    public class Person {
                     private String name;
                    
                     public Person() {
                     }
                    
                     public String getName() {
                     return name;
                     }
                    
                     public void setName(String name) {
                     this.name = name;
                     }
                    
                    
                     class MyPushEventListener implements PushEventListener{
                    
                    
                     public void onEvent(EventObject evt){
                     }
                    
                     }
                    
                     private PushEventListener listener = new MyPushEventListener();
                    
                     public void addListener(EventListener listener) {
                     synchronized (listener) {
                     if (this.listener != listener) {
                     this.listener = (PushEventListener) listener;
                     }
                     }
                     }
                    
                     public void push() {
                     this.setName("pushed");
                     synchronized (this.listener) {
                     this.listener.onEvent(new EventObject(this));
                     }
                     }
                    }
                    


                    • 7. Re: a4j:push and firefox
                      ilya_shaikovsky

                      please add to your web.xml:

                       <context-param>
                      <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
                       <param-value>true</param-value>
                       </context-param>
                      


                      And inform about js exception you'll get after.

                      Thanks!

                      • 8. Re: a4j:push and firefox
                        cybeer

                        After adding context-param the same error occers.

                        Ошибка: uncaught exception: [Exception... "Not enough arguments" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: http://127.0.0.1:8100/push-test/a4j_3_1_3-SNAPSHOTorg.ajax4jsf.javascript.AjaxScript.jsf :: anonymous :: line 55" data: no]

                        • 9. Re: a4j:push and firefox
                          ilya_shaikovsky

                          seems you didn't cleared browser cache. Becuase the error reported in the same line..

                          • 10. Re: a4j:push and firefox
                            cybeer

                            This param is true by default. If i set it to false i got next error

                            Ошибка: uncaught exception: [Exception... "Not enough arguments" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: http://127.0.0.1:8100/push-test/a4j_3_1_3-SNAPSHOTorg.ajax4jsf.javascript.AjaxScript.jsf :: anonymous :: line 1170" data: no]

                            • 11. Re: a4j:push and firefox
                              cybeer

                              If i set this param to false i got error:

                              Ошибка: uncaught exception: [Exception... "Not enough arguments" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: http://127.0.0.1:8100/push-test/a4j_3_1_3-SNAPSHOTorg.ajax4jsf.javascript.AjaxScript.jsf :: anonymous :: line 1170" data: no]

                              • 12. Re: a4j:push and firefox
                                ilya_shaikovsky

                                Unfortunatelly still can't reproduce. My code is the same. And all is ok under 2.0.0.8 and 2.0.0.9.

                                Could yuo please use fireBug for fireFox and explore with script debuger the source of the problem..

                                Thanks!

                                • 13. Re: a4j:push and firefox
                                  cybeer

                                  Very strange situation. Firebug was disabled. Discribed error occurs. If i turn firebug on - all ok. No errors at all. Can you reproduce error whith disabled firebug?
                                  Thanks!

                                  • 14. Re: a4j:push and firefox
                                    ilya_shaikovsky

                                    http://jira.jboss.com/jira/browse/RF-1441

                                    Thanks! Now we can explore this.

                                    1 2 Previous Next