0 Replies Latest reply on Apr 22, 2014 5:20 PM by Bob McCallister

    "a4j is undefined" "Tree is undefined" - Web application migrated from WAS 6.1 to WAS

    Bob McCallister Newbie



      I have tried researching the following issue but there seem to be many different possible causes. So I will try to summarize what I think is most important to know.

      Thanks in advance for any assistance.


      Web application was running fine using Sun JSF 1.1, RichFaces 3.1.3, JDK 1.5 compliance, and hosted on WAS 6.1.

      We then took the code, performed the migration function in RAD 7.5.4 and changed the compliance level to JDK 1.6.


      Since WAS7 now comes packaged with appropriate implementation of Sun JSF, we removed the following files from our /WEB-INF/lib directory:




      We commented out the configure listener in web.xml per recommendations online that the listener was not necessary as it was handled by the implementation included with WAS7. (see web.xml)


      We took the following jars from WAS7 optional libraries and replaced the old versions in our project:




      We then updated jsf-facelets.jar from 1.1.14 to 1.1.15.


      Upon trying to browse the application, we are running into the following "javascript" errors:

      "a4j is undefined"

      "Tree is undefined"


      These were not appearing prior to our migration to WAS7+JDK1.6.



      web.xml is attached

      Here are the referenced lines of code from the errors:


      "a4j is undefined" - highlighted piece I beliveve is where javascript error is referencing

      <TD align="center"><input id="dwTemplateForm:selectButton" name="dwTemplateForm:selectButton" onclick="A4J.AJAX.Submit('dwTemplateForm',event,{'similarityGroupingId':'dwTemplateForm:selectButton','parameters':{'dwTemplateForm:selectButton':'dwTemplateForm:selectButton'} ,'containerId':'j_id_jsp_1840727882_0'} );return false;" value=" Select &gt;&gt; " type="button" /> <br>
      <input id="dwTemplateForm:removeButton" name="dwTemplateForm:removeButton" onclick="A4J.AJAX.Submit('dwTemplateForm',event,{'similarityGroupingId':'dwTemplateForm:removeButton','parameters':{'dwTemplateForm:removeButton':'dwTemplateForm:removeButton'} ,'containerId':'j_id_jsp_1840727882_0'} );return false;" value="&lt;&lt; Remove" type="button" /></TD>



      "Tree is undefined" - highlighted piece is where javascript error references

      <div id="FETWizard:tree:fetTree:X01F14|0|1221::gp:childs" style="display: none;" class="rich-tree-node-children"></div></div><input type="hidden" id="FETWizard:tree:fetTree:input" autocomplete="off" name="FETWizard:tree:fetTree:input" value="" /><script type="text/javascript">(function() {

                                                      var tree = new Tree("FETWizard:tree:fetTree", "FETWizard:tree:fetTree:input", "ajax",


                                                                                      onselect: "showTreeWaitImage();",

                                                                                      onexpand: "",

                                                                                      oncollapse: "",

                                                                                      oncontextmenu: ""


                                                                      function(event) {

                                                                                      var params = {'FETWizard:tree:fetTree:selectedNode':event.selectedNode,'ajaxSingle':'FETWizard:tree:fetTree'} ;

      if (!params.ajaxSingle && event.ajaxSingle) {

      1. params.ajaxSingle = event.ajaxSingle;


      A4J.AJAX.Submit('FETWizard:tree',event,{'similarityGroupingId':'FETWizard:tree:fetTree','oncomplete':event.oncomplete,'parameters':params,'containerId':'j_id_jsp_1840727882_0'} ); return false;




                                                      tree.drop = function(event,drag){var options = {'similarityGroupingId':'FETWizard:tree:fetTree','parameters':{'FETWizard:tree:fetTree':'FETWizard:tree:fetTree','ajaxSingle':'FETWizard:tree:fetTree'} ,'containerId':'j_id_jsp_1840727882_0'} ;options.parameters['dropTargetId'] = 'FETWizard:tree:fetTree';Object.extend(options.parameters, drag.getParameters());var dzOptions = this.getDropzoneOptions(); if (dzOptions.ondrop) { if (!dzOptions.ondrop.call(this, event)) return; };A4J.AJAX.Submit('FETWizard:tree',event,options);};

                                      }());</script><div id="FETWizard:tree:fetTree:script" class="rich-tree-h"><script type="text/javascript"></script></div>



      I noticed the following was *automatically* added to the faces-config.xml file. I am wondering why this was automatically added and if it is causing our issue:








      Thanks in advance for looking.