You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Paul Benedict (JIRA)" <ji...@apache.org> on 2007/08/22 08:38:34 UTC

[jira] Closed: (STR-1732) [taglib] Add format and formatKey attributes to html tags

     [ https://issues.apache.org/struts/browse/STR-1732?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Benedict closed STR-1732.
------------------------------

    Resolution: Won't Fix
      Assignee:     (was: Struts Developers)

JSTL is the appropriate tag library for this request.

> [taglib] Add format and formatKey attributes to html tags
> ---------------------------------------------------------
>
>                 Key: STR-1732
>                 URL: https://issues.apache.org/struts/browse/STR-1732
>             Project: Struts 1
>          Issue Type: Improvement
>          Components: Taglibs
>    Affects Versions: 1.1.0
>         Environment: Operating System: All
> Platform: All
>            Reporter: Jim Krygowski
>            Priority: Minor
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.