struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 25860] New: - html:cancel alteration to allow for default enter key form submission
Date Fri, 02 Jan 2004 08:44:35 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25860>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25860

html:cancel alteration to allow for default enter key form submission

           Summary: html:cancel alteration to allow for default enter key
                    form submission
           Product: Struts
           Version: 1.1 Final
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Custom Tags
        AssignedTo: struts-dev@jakarta.apache.org
        ReportedBy: marcus@breese.com


If you use the html taglib to create the submit and cancel tags, you have to be
careful of the order, as if you are in a form and you hit the enter key, the
form will be submitted or cancelled based upon the last submit/cancel tag used.

Meaning if the order is like this:

(Submit) (Cancel)

the form will be cancelled

if the order is:

(Cancel) (Submit)

the form will be submitted.

For pure aesthetic reasons, I prefer to put the cancel button last (also, that
is how most of my users like it), but I also like to hit the enter key to submit
forms... 

I've written the following patch to org.apache.struts.taglib.html.CancelTag to
rewrite the cancel submit button to be a combination of a "button" and a hidden
form field.

This requires NO CHANGE to current jsp pages.

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Mime
View raw message