[prev in list] [next in list] [prev in thread] [next in thread]
List: struts-dev
Subject: [jira] [Created] (WW-4482) Conversion annotation ignored for ServletAction parameter
From: "Jasper Rosenberg (JIRA)" <jira () apache ! org>
Date: 2015-03-21 12:12:38
Message-ID: JIRA.12783857.1426939934000.166340.1426939958670 () Atlassian ! JIRA
[Download RAW message or body]
Jasper Rosenberg created WW-4482:
------------------------------------
Summary: Conversion annotation ignored for ServletAction parameter
Key: WW-4482
URL: https://issues.apache.org/jira/browse/WW-4482
Project: Struts 2
Issue Type: Bug
Components: Expression Language, Value Stack
Affects Versions: 2.3.20
Reporter: Jasper Rosenberg
Priority: Critical
This definitely worked before 2.3.20, but unfortunately I haven't been able to track \
down the actual source of the bug introduced for 2.3.20. My best guess is that it \
was introduced when the code was refactored to support Collections.
Basically I have an Action, with a setter and getter for state that uses a custom \
type convertor like so:
{code:java}
/** @return the state. */
@TypeConversion(converter = "com.myco.typeconvertor.RegionTypeConvertor")
public RegionI getState() {
return state;
}
{code}
When I submit the action, this type convertor is correctly used to turn the "state" \
post parameter into a RegionI object which is injected into the Action. So far so \
good.
However, the result looks like:
{code:xml}
<result name="selfSignupFlow" type="redirectAction">
<param name="actionName">confirmAccount</param>
<param name="streetAddress">${streetAddress}</param>
<param name="city">${city}</param>
<param name="state">${state}</param>
<param name="postalCode">${postalCode}</param>
...
</result>
{code}
And in the latest release, when it evaluates $\{state} it uses the default type \
convertor (in this case for an enum because the concrete class is a USState enum), \
rather than the com.myco.typeconvertor.RegionTypeConvertor specified on both the \
getter and setter for state in the action.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic