DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35127>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35127


[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[EMAIL PROTECTED]
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |




------- Additional Comments From [EMAIL PROTECTED]  2006-06-07 09:35 -------
The javascript for putting focus on a field still does not work in combination
with xhtml, when providing the 'styleId' attribute. (Struts 1.2.9)

The focus javascript still refers to the beanName.

This patch works for me:

--- FormTag.java.orig   2006-03-09 14:32:28.000000000 +0100
+++ FormTag.java        2006-06-07 11:30:56.104082800 +0200
@@ -663,7 +663,12 @@
         // Construct the control name that will receive focus.
         // This does not include any index.
         StringBuffer focusControl = new StringBuffer("document.forms[\"");
-        focusControl.append(beanName);
+        if (this.isXhtml() && getStyleId() != null) {
+            focusControl.append(getStyleId());
+        } else {
+            focusControl.append(beanName);
+        }
+
         focusControl.append("\"].elements[\"");
         focusControl.append(this.focus);
         focusControl.append("\"]");

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to