ICEfaces
  1. ICEfaces
  2. ICE-5543

ICEfaces2.0 htmlunit tests cause javascript error reading property "deltaSubmit"

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Alpha3
    • Fix Version/s: 2.0-Alpha3, 2.0.0
    • Component/s: Bridge
    • Labels:
      None
    • Environment:
      jsf2.0, ICEfaces-2.0

      Description

      The following exception is found for rev 21048 of glimmer, for the following jsf2.0 tests
      -- com.sun.faces.composite.CompositecomponentsTestCase.testNesting05
      -- com.sun.faces.composite.CompositecomponentsTestCase.testNesting08
      also within this same test cast:-
      testCCParentExpressionEvaluationWithNestingLevels
      (all tests regarding composite components)


      TypeError: Cannot read property "deltaSubmit" from undefined (http://localhost:8080/jsf-systest/faces/javax.faces.resource/bridge.js?a2034173004#1574)
          [junit] ======= EXCEPTION START ========
          [junit] EcmaError: lineNumber=[1574] column=[0] lineSource=[null] name=[TypeError] sourceName=[http://localhost:8080/jsf-systest/faces/javax.faces.resource/bridge.js?a2034173004] message=[TypeError: Cannot read property "deltaSubmit" from undefined (http://localhost:8080/jsf-systest/faces/javax.faces.resource/bridge.js?a2034173004#1574)]
          [junit] com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot read property "deltaSubmit" from undefined (http://localhost:8080/jsf-systest/faces/javax.faces.resource/bridge.js?a2034173004#1574)
          [junit] at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:513)
          [junit] at org.mozilla.javascript.Context.call(Context.java:515)
          [junit] at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:507)
          [junit] at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:444)
          [junit] at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:961)
          [junit] at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeEventHandler(EventListenersContainer.java:152)
          [junit] at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeBubblingListeners(EventListenersContainer.java:165)
          [junit] at com.gargoylesoftware.htmlunit.javascript.host.Node.fireEvent(Node.java:576)
          [junit] at com.gargoylesoftware.htmlunit.html.HtmlElement$2.run(HtmlElement.java:916)
          [junit] at org.mozilla.javascript.Context.call(Context.java:515)
          [junit] at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:507)
          [junit] at com.gargoylesoftware.htmlunit.html.HtmlElement.fireEvent(HtmlElement.java:921)
          [junit] at com.gargoylesoftware.htmlunit.html.HtmlElement.fireEvent(HtmlElement.java:896)
          [junit] at com.gargoylesoftware.htmlunit.html.HtmlForm.submit(HtmlForm.java:103)
          [junit] at com.gargoylesoftware.htmlunit.html.HtmlSubmitInput.doClickAction(HtmlSubmitInput.java:78)
          [junit] at com.gargoylesoftware.htmlunit.html.ClickableElement.click(ClickableElement.java:148)
          [junit] at com.gargoylesoftware.htmlunit.html.ClickableElement.click(ClickableElement.java:107)
          [junit] at com.gargoylesoftware.htmlunit.html.ClickableElement.click(ClickableElement.java:76)
          [junit] at com.sun.faces.composite.CompositeComponentsTestCase.testNesting05(CompositeComponentsTestCase.java:446)
          [junit] Caused by: org.mozilla.javascript.EcmaError: TypeError: Cannot read property "deltaSubmit" from undefined (http://localhost:8080/jsf-systest/faces/javax.faces.resource/bridge.js?a2034173004#1574)
          [junit] at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3654)
          [junit] at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3632)
          [junit] at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3660)
          [junit] at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3679)
          [junit] at org.mozilla.javascript.ScriptRuntime.undefReadError(ScriptRuntime.java:3692)
          [junit] at org.mozilla.javascript.ScriptRuntime.getObjectPropNoWarn(ScriptRuntime.java:1454)
          [junit] at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3021)
          [junit] at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2487)
          [junit] at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
          [junit] at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398)
          [junit] at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:192)
          [junit] at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)
          [junit] at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
          [junit] at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:472)
          [junit] at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$6.doRun(JavaScriptEngine.java:437)
          [junit] at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:507)
          [junit] Enclosed exception:
          [junit] org.mozilla.javascript.EcmaError: TypeError: Cannot read property "deltaSubmit" from undefined (http://localhost:8080/jsf-systest/faces/javax.faces.resource/bridge.js?a2034173004#1574)
          [junit] at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3654)
          [junit] at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3632)
          [junit] at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3660)
          [junit] at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3679)
          [junit] at org.mozilla.javascript.ScriptRuntime.undefReadError(ScriptRuntime.java:3692)
          [junit] at org.mozilla.javascript.ScriptRuntime.getObjectPropNoWarn(ScriptRuntime.java:1454)
          [junit] at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3021)
          [junit] at script(http://localhost:8080/jsf-systest/faces/javax.faces.resource/bridge.js?a2034173004:1574)
          [junit] at script(http://localhost:8080/jsf-systest/faces/javax.faces.resource/bridge.js?a2034173004:1704)
          [junit] at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2487)
          [junit] at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
          [junit] at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398)
          [junit] at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:192)
          [junit] at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)
          [junit] at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:162)
          [junit] at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:472)
          [junit] at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$6.doRun(JavaScriptEngine.java:437)
          [junit] at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:507)
          [junit] at org.mozilla.javascript.Context.call(Context.java:515)
          [junit] at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:507)
          [junit] at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:444)
          [junit] at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:961)
          [junit] at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeEventHandler(EventListenersContainer.java:152)
          [junit] at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeBubblingListeners(EventListenersContainer.java:165)
          [junit] at com.gargoylesoftware.htmlunit.javascript.host.Node.fireEvent(Node.java:576)
          [junit] at com.gargoylesoftware.htmlunit.html.HtmlElement$2.run(HtmlElement.java:916)
          [junit] at org.mozilla.javascript.Context.call(Context.java:515)
          [junit] at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:507)
          [junit] at com.gargoylesoftware.htmlunit.html.HtmlElement.fireEvent(HtmlElement.java:921)
          [junit] at com.gargoylesoftware.htmlunit.html.HtmlElement.fireEvent(HtmlElement.java:896)
          [junit] at com.gargoylesoftware.htmlunit.html.HtmlForm.submit(HtmlForm.java:103)
          [junit] at com.gargoylesoftware.htmlunit.html.HtmlSubmitInput.doClickAction(HtmlSubmitInput.java:78)
          [junit] at com.gargoylesoftware.htmlunit.html.ClickableElement.click(ClickableElement.java:148)
          [junit] at com.gargoylesoftware.htmlunit.html.ClickableElement.click(ClickableElement.java:107)
          [junit] at com.gargoylesoftware.htmlunit.html.ClickableElement.click(ClickableElement.java:76)
          [junit] at com.sun.faces.composite.CompositeComponentsTestCase.testNesting05(CompositeComponentsTestCase.java:446)
          [junit] == CALLING JAVASCRIPT ==
          [junit] function () {
          [junit] submit(event, element);
          [junit] f.onsubmit = none;
          [junit] return false;
          [junit] }
          [junit] ======= EXCEPTION END ========

        Issue Links

          Activity

          Hide
          Judy Guglielmin added a comment -

          these tests all involved the composite component with ez prefix:-
          <!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:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:ez="http://java.sun.com/jsf/composite/composite">
          <h:head>
          <title>Nesting 05</title>
          </h:head>
          <body>
          <ez:nesting6 id="nesting6" bean="#

          {compositeBean}

          " />
          </body>
          </html>

          These 3 tests all get a reference to a command button and try to click them (from the composite component), there is no property available for "deltaSubmit" for the action to complete

          Show
          Judy Guglielmin added a comment - these tests all involved the composite component with ez prefix:- <!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:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:ez="http://java.sun.com/jsf/composite/composite"> <h:head> <title>Nesting 05</title> </h:head> <body> <ez:nesting6 id="nesting6" bean="# {compositeBean} " /> </body> </html> These 3 tests all get a reference to a command button and try to click them (from the composite component), there is no property available for "deltaSubmit" for the action to complete
          Hide
          Judy Guglielmin added a comment -

          This problem seems to stem from any view page that has a <body> tag instead of a <h:body> tag in it. Changing any calls in BridgeSetup class, renderView(....), for root. addComponentResource(context,output,"body") to root.addComponentResource(context,output,"head"), takes care of this issue. It also takes care of problems in other of the ajax tests as well as non-ajax tests for jsf2.0 junit/htmlunit tests.

          It seems that determination has to be made as to whether the <body> tag will be allowed--in which case several of the jsf2 tests will not pass. Also, a warning message should be made for users to know what the problem is. Otherwise, the <body> tag would have to be supported in some way (??).

          Show
          Judy Guglielmin added a comment - This problem seems to stem from any view page that has a <body> tag instead of a <h:body> tag in it. Changing any calls in BridgeSetup class, renderView(....), for root. addComponentResource(context,output,"body") to root.addComponentResource(context,output,"head"), takes care of this issue. It also takes care of problems in other of the ajax tests as well as non-ajax tests for jsf2.0 junit/htmlunit tests. It seems that determination has to be made as to whether the <body> tag will be allowed--in which case several of the jsf2 tests will not pass. Also, a warning message should be made for users to know what the problem is. Otherwise, the <body> tag would have to be supported in some way (??).
          Hide
          Judy Guglielmin added a comment -

          Figured this out with Ted's help, but you will want to talk with Ted and Deryk to determine how this should be handled. For the time being, I will keep my own version of BridgeSetup which doesn't try to add scripts to the <h:body> tag.

          Show
          Judy Guglielmin added a comment - Figured this out with Ted's help, but you will want to talk with Ted and Deryk to determine how this should be handled. For the time being, I will keep my own version of BridgeSetup which doesn't try to add scripts to the <h:body> tag.
          Hide
          Deryk Sinotte added a comment -

          Linking to core case.

          Show
          Deryk Sinotte added a comment - Linking to core case.
          Hide
          Deryk Sinotte added a comment -

          Resolved by fix to ICE-5613.

          Show
          Deryk Sinotte added a comment - Resolved by fix to ICE-5613 .

            People

            • Assignee:
              Deryk Sinotte
              Reporter:
              Judy Guglielmin
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: