[
https://issues.apache.org/jira/browse/WW-3434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13174665#comment-13174665
]
Lukasz Lenart commented on WW-3434:
-----------------------------------
The code changed and now it checks if "model." exists in a key
{code}
sb.append(((validationAware instanceof ModelDriven) &&
fieldErrorKey.startsWith("model."))
? fieldErrorKey.substring(6)
: fieldErrorKey);
{code}
So it should work as well with OValValidationInterceptor now, could you confirm
?
> JSONValidationInterceptor thows exception used with OValValidationInterceptor
> -----------------------------------------------------------------------------
>
> Key: WW-3434
> URL: https://issues.apache.org/jira/browse/WW-3434
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - JSON
> Affects Versions: 2.1.8.1
> Environment: struts-json-plugin 2.1.8.1
> Reporter: Nicolas Bohorquez Gutierrez
> Labels: json, oval, s2, struts
> Fix For: 2.3.x
>
>
> in the method protected String buildResponse(ValidationAware validationAware)
> of org.apache.struts2.interceptor.validation.JSONValidationInterceptor line
> 149 the work around described in WW-2721 tries to remove "model." from
> fieldError.key. But when using OValValidationInterceptor the fieldError.key
> doesn't contains the substring "model." so, the code should be sometring like:
> sb.append(validationAware instanceof ModelDriven ? fieldError.getKey().
> replaceFirst("model\\.", "")
> : fieldError.getKey());
> thank you
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira