I am currently trying to create a html:select
tag from an enum so it could be set in a specific object:
class someClass {
SomeEnum someProperties = null;
public getSomeProperties() { return someProperties; }
public setSomeProperties(SomeEnum e) { someProperties = e; }
The JSP with Struts tags:
<html:select name="someForm" property="someInstance.someProperties" >
<html:option value="${someEnum.STANDARD}"><bean:message key="i18nkeystd"/>
<html:option value="${someEnum.PREVENTIVE} "><bean:message key="i18nkeyprev"/>
</html:select>
But I am currently getting a "Cannot invoke someClass.setProperties - argument type mismatch" exception.
Is there a way to use an enum in a Struts select tag.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With