I replace:

// search up class hierarchy
String msg = findMessage(aClass, aTextName, indexedTextName,
         locale, args, null, valueStack);

with:

GetDefaultMessageReturnArg result = null;
        if (indexedTextName == null) {
            // Use a null for the defaultMessage to ensure
            // package check is done if not found. Will get dev messages if
            // not found in default packages.
            result = getDefaultMessage(aTextName, locale, valueStack, args,
                    null);
        }
        String msg = null;
        if (result == null) {
            // search up class hierarchy
            msg = findMessage(aClass, aTextName, indexedTextName, locale,
args,
                    null, valueStack);
        } else {
            msg = result.message;
        }

Guess I will have to continue this mod unless there is some way to override
the default search package nifty thing.

Cheers Greg

On 14 March 2017 at 14:27, Lukasz Lenart <[email protected]> wrote:

> 2017-03-14 15:24 GMT+01:00 Greg Huber <[email protected]>:
> > Initial tests look good.
> >
> > LocalizedTextUtil.java is now the only bespoke mod I do (to check the
> > default ApplicationResources.properties first and then do the package
> nifty
> > thing).
> >
> > I have looked in
> >
> > Struts-JDK7-pull-request/core/src/main/java/com/opensymphony/xwork2/util
> >
> > but seems not to be there has the package location changed?
> >
> > I can see it here though https://github.com/lukaszlenart/struts/tree....
> ..
>
> There is no more static LocalizedTextUtil, this class it's a bean
> right now called DefaultLocalizedTextProvider and implements
> LocalizedTextProvider interface. You can gain access to it via @Inject
> or via container.getInstance(LocalizedTextProvider.class)
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to