struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roland McIntosh (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-4188) In struts tag lib, required attribute removed in latest version ie 2.3.15.1
Date Wed, 11 Sep 2013 13:40:53 GMT

    [ https://issues.apache.org/jira/browse/WW-4188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13764302#comment-13764302
] 

Roland McIntosh commented on WW-4188:
-------------------------------------

I too was surprised at this.  I guess I'll have to live with it, but for what it's worth,
I liked "required" as being a boolean attribute.  The name "requiredLabel" implies a String
attribute.  To make matters worse, setting "required=true" in 2.3.15.1 actually does output
the "*" on the fields.  Changing it to "requiredLabel" is confusing because it brings the
tag attributes further away from the "under-the-covers" implementation.

Note this snippet from UIBean.java line 681 from 2.3.15.1:
{code}
if (requiredLabel != null) {
   addParameter("required", findValue(requiredLabel, Boolean.class));
}
{code}

See how the "addParameter" call's first argument is the string "required", but the conditional
checks "requiredLabel"?  Very confusing.
                
> In struts tag lib, required attribute removed in latest version ie 2.3.15.1
> ---------------------------------------------------------------------------
>
>                 Key: WW-4188
>                 URL: https://issues.apache.org/jira/browse/WW-4188
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Other
>    Affects Versions: 2.3.15.1
>         Environment: All
>            Reporter: mahendran
>            Priority: Blocker
>              Labels: struts-tags-required-attribute
>
> we are using struts 2.0.5 and 2.3.4.1 in our applications. And we decided to migrate
to 2.3.15.1 to get the security fixes.
> we use struts tags to render UI components and using 'required' attribute to get the
'*' along with the components.
> In the version 2.3.15.1, the attribute required is dropped, and we need to change to
requiredLabel to get the same effect, this increases migration&testing effort for a application
which has 1000+pages
> Hence we require a backward compatibility for 'required' attribute in struts tags.
> Also nowhere in the migration document this information is specified. This makes the
struts migration as block-box. Hence we require a proper migration document which should specify
what are all the changes required in the application to migrate the struts.
> But we managed to get the '*' in UI by replacing UIBean.class,AbsctactUITag.class and
struts.tld from 2.3.4.1 version.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message