Pranav wrote:
Ok then following your expert advice I think I want to use the second approach now where I define my own TextProvider instance.
Q.1) The ActionSupport class uses TextProviderSupport class which internally calls the LocalizedTextUtil class. Is that right understanding?
Q.2) What I have to do is provide an implementation similar to TextProviderSupport but instead of calling LocalizedTextUtil.findText(clazz, key, getLocale(), defaultValue, args); followed by LocalizedTextUtil.findText(bundle, key, getLocale(), defaultValue, args);
I have to call LocalizedTextUtil.findText(bundle, key, getLocale(),
defaultValue, args) first and if that returns null then call
LocalizedTextUtil.findText(clazz, key, getLocale(), defaultValue, args); Is
that correct approach? Here bundle would represent the name of customer
specific resource bundle that I would like to look up.
Please guide me on this.
Yes, that's the approach I'd take. Write a unit test first though! Do
exactly what you described with some example resource bundles setup the
way you expect and convince yourself that it meets your need.
LocalizeTextUtils can be used outside the struts environment so you use
it directly in your test.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]