You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Diego Díez (JIRA)" <ji...@apache.org> on 2011/02/10 23:11:58 UTC

[jira] Commented: (WW-3552) FileUploadInterceptor and TokenInterceptor should use the configured custom TextProvider

    [ https://issues.apache.org/jira/browse/WW-3552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12993237#comment-12993237 ] 

Diego Díez commented on WW-3552:
--------------------------------

Lately I've been trying to get i18n messages from a custom TextProvider implementation (messages from .xml instead .properties).
I've got messages (validation & conversion) correctly displayed from my xml,  but messages from FileUploadInterceptor and TokenInterceptor are still using the properties.
I think a way to solve this issue could be change the LocalizedTextUtil.findText call, to something similiar to the use of TextProvider in the ActionSupport class, "getTextProvider().getText(...)".

> FileUploadInterceptor and TokenInterceptor should use the configured custom TextProvider
> ----------------------------------------------------------------------------------------
>
>                 Key: WW-3552
>                 URL: https://issues.apache.org/jira/browse/WW-3552
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors
>    Affects Versions: 2.2.1
>            Reporter: Herbert
>            Assignee: Maurizio Cucchiara
>
> Struts2 supports the usage of a custom text provider by setting some environment constants in struts.xml:
> example:
> <bean class="test.CustomTextProvider" name="myTextProvider" type="com.opensymphony.xwork2.TextProvider" /> 
> <constant name="struts.xworkTextProvider" value="myTextProvider" />
> The struts2 core FileUploadInterceptor and the TokenInterceptor don't use this new custom TextProvider hence they use  XWork's LocalizedTextUtil class to lookup translations. Why the translations don't get resolved via an injected TextProvider?

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira