[ http://issues.apache.org/jira/browse/BEEHIVE-407?page=history ] Daryl Olander resolved BEEHIVE-407: -----------------------------------
Resolution: Fixed This is fixed. I broke focus when I changed the tagId/name/id refactorying. What should (and now does) happen is that when you set focus, the id/name is generated for the form. This is the reason that it worked when you set a tagId on the Form. Now what happens is that we generate a name for the form and once that happens the focus works. > form must have tagId set to use focus attribute > ----------------------------------------------- > > Key: BEEHIVE-407 > URL: http://issues.apache.org/jira/browse/BEEHIVE-407 > Project: Beehive > Type: Bug > Components: NetUI > Versions: V1 > Reporter: Krista Baker > Assignee: Daryl Olander > > The focus attribute on the netui:form html tag generates JavaScript errors in > Firefox and IE when the form tag does not have a tagId > JSP Test Code: > <netui:form action="begin" focus="buttonTag"> > <netui:button action="begin" tagId="buttonTag">Focus</netui:button> > </netui:form> > Expected results: > The focus attribute and generated javaScript should work the same whether the > form tag has a tagId or not. > Actual results: > The following JavaScript error is output (firefox): > Error: document.forms.Netui_Form_0 has no properties > Actual JavaScript: > <script language="JavaScript" type="text/JavaScript"> > // set the focus on a field within the named form > if (document.forms["Netui_Form_0"]["actionOverride:begin"].type != "hidden") > document.forms["Netui_Form_0"]["actionOverride:begin"].focus(); > Working JavaScript with form tagId="one": > // set the focus on a field within the named form > if (document.forms["one"]["actionOverride:begin"].type != "hidden") > document.forms["one"]["actionOverride:begin"].focus(); -- 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 - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira