tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew J Snodgrass <a...@pointlander.info>
Subject [PATCH] jasper - enum support for tag libs
Date Fri, 14 Sep 2007 00:24:52 GMT
The attached patch adds 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);


Andrew J Snodgrass

Mime
View raw message