You can use jakarta unstandard taglib to "bind" a variable to the static fiedl YES
<us:bind var="YES" type="com.mycompany.YesNoEnum" field="YES"/> <html:checkbox value="${YES.enumCode}">
Nico.
Vinicius Caldeira Carvalho a écrit :
Hello there! I'm using enum types in my app and I'd like to use combine them with struts tags.
My enum class hierarchy descends to PersistenEnum (the example on hibernate)
a method called getEnumCode() returns a Serializable that represents the code for that enum :P
So far what I'm doing is:
<%String code = String.valueOf(YesNoEnum.YES.getEnumCode())%> <html:checkbox value="<%=code%>">
This of course s**** cuz I have to import the enum and also adds scriptlets to my jsp. So I tried the struts-el using:
value="{YesNoEnum.YES.enumCode}"
not working either.
Anyone has a good experience with that?
Thanks
Vinicius
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]