struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christoph Nenning (JIRA)" <>
Subject [jira] [Commented] (WW-4188) In struts tag lib, required attribute removed in latest version ie
Date Fri, 07 Nov 2014 09:56:34 GMT


Christoph Nenning commented on WW-4188:

Once in a while I came to feel that we are doing something wrong with adding the * within
the template. That given, how about reverting to a solely CSS driven solution with the semantics
of HTML5 required attribute?
So setting tag attribute


would render as

<label class="requiredLabel">...</label><input class="requiredField" required="required"
... />



would be completely omitted if the tag attribute is false.
For backward compatibility, we could recommend the following css based solution to re-gain
the "*" suffix behaviour:

This sounds good to me!

To preserve backwards compatibility with the same behavior could be applied to {{requiredLabel}}.

There might be issues that old browsers don't support CSS {{content}}

> In struts tag lib, required attribute removed in latest version ie
> ---------------------------------------------------------------------------
>                 Key: WW-4188
>                 URL:
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Other
>    Affects Versions:
>         Environment: All
>            Reporter: mahendran
>            Assignee: Lukasz Lenart
>              Labels: struts-tags-required-attribute
>             Fix For: 2.5
> we are using struts 2.0.5 and in our applications. And we decided to migrate
to 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, 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 version.

This message was sent by Atlassian JIRA

View raw message