[ http://issues.apache.org/jira/browse/TOMAHAWK-713?page=comments#action_12440546 ] Jeff Bischoff commented on TOMAHAWK-713: ----------------------------------------
Well, I spent the last few hours looking at this bug. I think I've identified two issues which are preventing the 1.1.5 tomahawk components from using AUTO_SCROLL on myfaces 1.1.4, and one of those issues also breaks AUTO_SCROLL for any core commandlinks *that are in the same form*. Issue #1 ------------ This probably only affects the tomahawk components. Most of the onclick javascript has been moved to functions which are declared just before the first commandlink. The following code was moved into this function: if(window.getScrolling!=undefined) { document.forms[formName].elements['autoScroll'].value=getScrolling(); } This code looks intended to maintain backwards compatibility for auto scrolling. It works fine for the core components, who use it in the onclick. Unfortunately, when it is used inside this function, the if statement will always return false. The getScrolling() function will never be defined for this javascript block, as it is defined in a separate javascript block at the end of the form. To verify this, I inserted some custom javascript into the page, containing this code without the "if" statement. The result when I used the line in a function in the same part of the page was a javascript error in the console "getScrolling() is not defined." But when I used it in an onclick, there was no error. Issue #2 ------------ I think this issue breaks auto scrolling for all components in the same form as a tomahawk commandLink, regardless of whether they are core or tomahawk components. <input type="hidden" name="autoScroll" /> This hidden input is generated to support auto scrolling. In Myfaces 1.1.4, it is generated at the end of the form. In Myfaces/Tomahawk 1.1.5, it is generated just after the first commandLink. When you mix Myfaces 1.1.4 with Tomahawk 1.1.5, you get two of these inputs per form in any form containing a t:commandLink. Such forms have autoscroll broken for *both* core components and tomahawk components. > Auto Scroll silently fails on Core 1.1.4 and Tomahawk nightly > ------------------------------------------------------------- > > Key: TOMAHAWK-713 > URL: http://issues.apache.org/jira/browse/TOMAHAWK-713 > Project: MyFaces Tomahawk > Issue Type: Bug > Affects Versions: 1.1.5-SNAPSHOT > Environment: MyFaces Core 1.1.4 and Tomahawk nightlies (dated > 2006-09-26 or 2006-09-27) > Tested in Firefox and Internet Explorer browsers > Reporter: Jeff Bischoff > Attachments: simple.war, simple2.war > > > When using MyFaces Core 1.1.4 and the latest Tomahawk nightlies (dated > 2006-09-26 or 2006-09-27), the Auto Scroll functionality fails. There is no > error message in the application logs nor in javascript console. This is > presumably related to the javascript changes made to ensure compatibility > with the RI. This is a major bug, since latest Tomahawk should be compatible > with the Core 1.1.4 release. > This breakage can be observed simply by taking the latest tomahawk-examples > nightly download, and substituting in the Core 1.1.4 jars. I will attach such > an example. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira