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

Add format and formatKey attributes to html tags

           Summary: Add format and formatKey attributes to html tags
           Product: Struts
           Version: 1.1 Final
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Custom Tags
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


I've seen this issue kicking around in the struts-user discussion group and I
think there is a lot of value in adding format and formatKey attributes to some
of the html tags.  The motivation is to get the formatting activities out of the
Action and back into the view (JSP/Tags) where they belong.

Specific tags that would benefit are:

html:text
html:checkbox
html:multibox
html:radio
html:options
html:optionsCollection

One would need to consider the format string and how it could affect the cycle
of copying data from the request and into the Model.  

If a developer is following the Conventional Wisdom of only using String
objects, the format of the string is moot until the values are copied from the
generic String and into some type specific Model property.  Typically such
copying is done in an Action execute() via BeanUtils and can take advantage of
the ConvertUtils.  Exceptions caused by bad formatting can be caught and the
Action can annotate ActionErrors appropriately and forward to a JSP where the
user can resolve the formatting issues.

If the developer is using objects with types other than String in the JSP page
more work will need to be done via javascript validations to be sure that the
correct format is submitted so that no exceptions are thrown while the request
is being copied into the Model by BeanUtils. 

I’m willing to write the patch that would add this feature to the aforementioned
tags.  But, I’d like to get a sense of whether or not the committers think it’s
worth doing.

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

Reply via email to