isis-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chuangyu <zhu.chuan...@gmail.com>
Subject Re: how to replace register my implementation of LocaleProviderAPI
Date Thu, 12 Nov 2015 01:43:10 GMT
Hi Dan,

It can work.

Thanks a lot,

James,Chu.

2015-11-11 19:29 GMT+08:00 Dan Haywood <dan@haywood-associates.co.uk>:

> On 11 November 2015 at 10:55, Chuangyu <zhu.chuangyu@gmail.com> wrote:
>
> > Hi,
> >
> > I  create myLocaleProvider want to replace LocaleProviderWicket;
> >
> > But it always instance of LocaleProviderWicket injected.
> >
> >
>
>
> @DomainService(
>         nature = NatureOfService.DOMAIN
> )
> @DomainServiceLayout(
>         menuOrder = "1"
> )
> public class MyLocaleProvider implements LocaleProvider {
>
>     @Override
>     public Locale getLocale() {
>         return ...
>     }
>
> }
>
>
>
> The critical bit is the @DomainServiceLayout(menuOrder="1"); this will
> cause it to be injected in preference to the default LocaleProviderWicket.
>
> In 1.10.0 it is possible to inject lists of services, eg:
>
>     List<LocaleProvider> localeProviders;
>
> If you do this then you would see both MyLocaleProvider and then
> LocaleProviderWicket in the list, with MyLocaleProvider first.
>
>
>
>
>
> > And I also find key 'isis.services' disappear within isis.properties
> v1.9.0
> >
>
> isis.services is still supported, but in the archetype we've removed it and
> replaced it with the newer "AppManifest" approach.  For details see the
> migration notes [1]
>
>
> thx
> Dan
>
>
> [1]
> http://isis.apache.org/migration-notes.html#bootstrapping-using-appmanifest
>
>
>
>
>
> > .
> >
> > What can I do ?
> >
> > Thanks.
> >
> > James,Chu
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message