[ https://issues.apache.org/struts/browse/WW
-1748?page=com.atlassian.jira.plugin.system.issuetabpanels:c
omment-tabpanel#action_42447 ]
vigor edited comment on WW-1748 at 10/24/07 6:01 AM:
-----------------------------------------------------------
Hello Im try to use this feature and add
struts.xworkTextProvider=karakas.struts.RicoTextProvider
but in ActionSupport i see
private final transient TextProvider textProvider = new
TextProviderFactory().createInstance(getClass(), this);
and in TextProviderFactory (XWork v2.1.0) i see
public class TextProviderFactory {
private TextProvider textProvider;
Inject
public void setTextProvider(TextProvider textProvider)
{
this.textProvider = textProvider;
}
protected TextProvider getTextProvider() {
if (this.textProvider == null) {
return new TextProviderSupport();
} else {
return textProvider;
}
}
public TextProvider createInstance(Class clazz,
LocaleProvider provider) {
TextProvider instance = getTextProvider();
if (instance instanceof ResourceBundleTextProvider)
{
((ResourceBundleTextProvider)
instance).setClazz(clazz);
((ResourceBundleTextProvider)
instance).setLocaleProvider(provider);
}
return instance;
}
......
ANd i always recieve TextProviderSupport();!!!
was (Author: vigor):
Hello Imtry touse this feature and add
struts.xworkTextProvider=karakas.struts.RicoTextProvider
but in ActionSupport i see
private final transient TextProvider textProvider = new
TextProviderFactory().createInstance(getClass(), this);
and in TextProviderFactory (XWork v2.1.0) i see
public class TextProviderFactory {
private TextProvider textProvider;
Inject
public void setTextProvider(TextProvider textProvider)
{
this.textProvider = textProvider;
}
protected TextProvider getTextProvider() {
if (this.textProvider == null) {
return new TextProviderSupport();
} else {
return textProvider;
}
}
public TextProvider createInstance(Class clazz,
LocaleProvider provider) {
TextProvider instance = getTextProvider();
if (instance instanceof ResourceBundleTextProvider)
{
((ResourceBundleTextProvider)
instance).setClazz(clazz);
((ResourceBundleTextProvider)
instance).setLocaleProvider(provider);
}
return instance;
}
......
ANd i always recieve TextProviderSupport();!!!
> Configure XWork TextProvider with struts.properties
(requires XWork 2.0.1)
>
------------------------------------------------------------
--------------
>
> Key: WW-1748
> URL: https
://issues.apache.org/struts/browse/WW-1748
> Project: Struts 2
> Issue Type: Improvement
> Components: Configuration
> Affects Versions: 2.0.6
> Reporter: Oleg Gorobets
> Assignee: Rene Gielen
> Fix For: 2.0.8, 2.1.0
>
> Attachments: struts2_TextProvider.patch
>
>
> Export configuration of XWork TextProvider to
struts.properties and use TextProviderFactory.getInstance()
instead of TextProviderSupport class directly to get XWork
text provider. Submitted patch allows flexible configuration
of i18n message source for struts2/xwork. See corresponding
XWork jira issue for reference: http://jir
a.opensymphony.com/browse/XW-475
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue
online.
|