Bug 43400 - enum support for tag libs
Summary: enum support for tag libs
Status: RESOLVED WONTFIX
Alias: None
Product: Tomcat 6
Classification: Unclassified
Component: Jasper (show other bugs)
Version: unspecified
Hardware: All All
: P5 enhancement with 5 votes (vote)
Target Milestone: default
Assignee: Tomcat Developers Mailing List
URL: http://www.007names.com
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2007-09-14 11:53 UTC by Andrew Snodgrass
Modified: 2017-04-04 18:11 UTC (History)
0 users



Attachments
tag enum support patch (2.86 KB, patch)
2007-09-14 11:56 UTC, Andrew Snodgrass
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Snodgrass 2007-09-14 11:53:55 UTC
Support for the direct use of enums in the attributes of tags.

Assume there is the enum:

public enum LoginType {
  account, manager, reseller;
}

and a setter for a tag called 'page':

public void setLogin_required_type( LoginType login_required_type ) { ...

then the jsp code:

<ez:page login_required_type="account"/>

would result in the generation of the java code:

page_tag_instance.setLogin_required_type(LoginType.account);
Comment 1 Andrew Snodgrass 2007-09-14 11:56:56 UTC
Created attachment 20827 [details]
tag enum support patch
Comment 2 Mark Thomas 2017-04-04 18:11:49 UTC
This will work out of the box with Java 7 onwards.