-
1. Re: a4j:push and firefox
ilya_shaikovsky Nov 27, 2007 5:17 AM (in response to cybeer)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 Nov 27, 2007 8:32 AM (in response to 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 Nov 27, 2007 8:40 AM (in response to cybeer)Describe other libs versions and server
-
4. Re: a4j:push and firefox
cybeer Nov 27, 2007 9:34 AM (in response to cybeer)server: apache-tomcat-5.5.23
libs:
facelets 1.1.11
jsf 1.2_04-b10-p01
tomahawk 1.1.6 -
-
6. Re: a4j:push and firefox
cybeer Nov 27, 2007 10:30 AM (in response to 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 Nov 28, 2007 5:16 AM (in response to cybeer)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 Nov 28, 2007 5:37 AM (in response to 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 Nov 28, 2007 6:27 AM (in response to cybeer)seems you didn't cleared browser cache. Becuase the error reported in the same line..
-
10. Re: a4j:push and firefox
cybeer Nov 28, 2007 6:43 AM (in response to 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 Nov 28, 2007 6:49 AM (in response to 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 Nov 28, 2007 8:04 AM (in response to cybeer)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 Nov 28, 2007 8:20 AM (in response to 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 Nov 28, 2007 8:33 AM (in response to cybeer)http://jira.jboss.com/jira/browse/RF-1441
Thanks! Now we can explore this.