You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Adam Ruggles <a....@gmail.com> on 2007/04/14 07:49:45 UTC
Posting Java 5 Enum values
I have an object that contains a Java 5 enum class. I'm having problems
getting this to post back to my action. Is there any documentation on
how to do this? Do I need to create a custom type
converter/annotation/properties file?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Posting Java 5 Enum values
Posted by Adam Ruggles <a....@gmail.com>.
Thanks, yes that is what I wanted to do. I wrote a custom converter and
it works fine. I was just hoping that struts2 would have a built in
convert for this type since it's part of java 5. That might be a good
item to add to a future version of struts2. Of course it only took me
10 minutes to write one so no biggy.
Thanks for the feedback.
Laurie Harper wrote:
> Adam Ruggles wrote:
>> I have an object that contains a Java 5 enum class. I'm having
>> problems getting this to post back to my action. Is there any
>> documentation on how to do this? Do I need to create a custom type
>> converter/annotation/properties file?
>
> I'm not sure what you mean by 'getting this to post back to my
> action'. If you are trying to update a property whose type is an enum
> using a form POST or something similar the yes, you will need a custom
> converter for that. If that's not what you want to do, please post
> more details.
>
> L.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Posting Java 5 Enum values
Posted by Laurie Harper <la...@holoweb.net>.
Adam Ruggles wrote:
> I have an object that contains a Java 5 enum class. I'm having problems
> getting this to post back to my action. Is there any documentation on
> how to do this? Do I need to create a custom type
> converter/annotation/properties file?
I'm not sure what you mean by 'getting this to post back to my action'.
If you are trying to update a property whose type is an enum using a
form POST or something similar the yes, you will need a custom converter
for that. If that's not what you want to do, please post more details.
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org