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=24661>.
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=24661

Errors tag does not allow the user to customize the header/footer/prefix/suffix

           Summary: Errors tag does not allow the user to customize the
                    header/footer/prefix/suffix
           Product: Struts
           Version: Nightly Build
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Custom Tags
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: [EMAIL PROTECTED]


ENHANCEMENT IDEA:

We're currently using Struts 1.1 and we came across a problem where the header 
for our errors section was inappropriate for some of the pages in our 
application.

My idea is to modify the ErrorTag functionality such that the user can specify 
any, all, or none of the message keys that should be used for the header, 
footer, prefix, and suffix.

===========================
SOLUTION: 

I got the nightly code from 11-07-2003 and made enhancements to ErrorsTag.java  
to allow the user to specify headerKey, footerKey, prefixKey, and suffixKey.  
For each of those attributes, if the attribute is missing then the tag uses the 
default value (errors.header, errors.footer, errors.prefix, errors.suffix).  I 
also moved those default keys to static variables.

I think that this should work for both the html and the nested taglib, so I 
modified html.tld and nested.tld.  I couldn't find those files in the nightly 
download, so I modified copies that I have from Struts 1.1.  These files now 
have four new attributes for the errors tag, all of which are optional.

==============================================================================
DOCUMENTATION/ NOTES:

I modified the xml documentation for struts-html.xml and struts-nested.xml to 
include website documentation.  The documentation in this file is very similar 
to the javadoc that I added in ErrorTag.java.

I can be reached at [EMAIL PROTECTED] for questions/requests regarding this 
enhancement.

Thanks!

Jason Gola

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

Reply via email to