Volodymyr Siedlecki created MYFACES-4575:
--------------------------------------------

             Summary: Uncaught TypeError: myfaces._impl is undefined
                 Key: MYFACES-4575
                 URL: https://issues.apache.org/jira/browse/MYFACES-4575
             Project: MyFaces Core
          Issue Type: Bug
          Components: General
    Affects Versions: 4.0.0-RC5
            Reporter: Volodymyr Siedlecki


Discovered via TCK: commandScript - spec613.xhtml 
[https://github.com/jakartaee/faces/blob/7d3edf6fd066b340746040460b63a79cc26aff3e/tck/faces23/commandScript/src/main/webapp/spec613.xhtml]
 

[https://github.com/jakartaee/faces/blob/7d3edf6fd066b340746040460b63a79cc26aff3e/tck/faces23/commandScript/src/test/java/ee/jakarta/tck/faces/test/javaee8/commandScript/Spec613IT.java#L78]
 

JavaScript Error: 


Uncaught TypeError: myfaces._impl is undefined 

Generated HTML code: 
{code:java}
<html lang="en" xmlns="http://www.w3.org/1999/xhtml";>
   <head>
      <title>Spec613IT - commandScript</title>
   </head>
   <body>
      <form id="j_id_7" name="j_id_7" method="post" 
action="/commandScript/spec613.xhtml" 
enctype="application/x-www-form-urlencoded">
         <script 
src="/commandScript/jakarta.faces.resource/faces.js.xhtml?ln=jakarta.faces"></script>
         <span id="j_id_7:j_id_8">
            <script>var foo = function(o){var o=(typeof 
o==='object')&&o?o:{};myfaces.ab('j_id_7:j_id_8',null,'action','','result')};myfaces._impl.core._Runtime.addOnLoad(window,foo);</script>
         </span>
         <span id="j_id_7:j_id_9">
            <script>var bar = function(o){var o=(typeof 
o==='object')&&o?o:{};myfaces.ab('j_id_7:j_id_9',null,'action','','result')}</script>
         </span>
         <input type="hidden" name="j_id_7_SUBMIT" value="1" /><input 
type="hidden" name="jakarta.faces.ViewState" 
id="j_id__v_0:jakarta.faces.ViewState:1" 
value="YTA0OTg5YWVkZTU2NDE2YTAwMDAwMDAx" autocomplete="off" />
      </form>
      <span id="result"></span>
   </body>
</html> {code}

Old scripts had a _onload_ function, but I don't see anything like that in the 
new scripts: 
        this.addOnLoad = function(target, func) {
            var oldonload = (target) ? target.onload : null;
            target.onload = (!oldonload) ? func : function() {
                try {
                    oldonload();
                } catch (e) {
                    throw e;
                } finally {
                    func();
                }
            };
        };



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to