Hi Dan,

On Tue, Apr 7, 2015 at 11:38 AM, Dan Haywood <[email protected]>
wrote:

> Martin's probably right... the LocationLookupService isn't injected
> properly.
>
> Just wanted to say that injecting into Wicket panels and pages is the
> exceptional case, rather than the norm.
>

I was thinking about implementing a custom
org.apache.wicket.injection.Injector that will act as a composite for Guice
and Isis.
But reading your answer makes me think that this may be a bad practice.


>
> The more typical usage is injecting into domain objects (entities,
> services, view models) where injection happens automatically.  An example
> can be found in the ToDoItem class in the isis-app-todoapp [1].  The only
> requirement is annotating with @javax.inject.Inject.
>
> But if your code looks like this already then post a code snippet and we'll
> see if we can help debug.
>
> Cheers
> Dan
>
>
> [1]
>
> https://github.com/isisaddons/isis-app-todoapp/blob/468592629545ba1c817a1544697fe81e7ab2e5e4/dom/src/main/java/todoapp/dom/module/todoitem/ToDoItem.java#L967-L968
>
>
> On 7 April 2015 at 07:57, Martin Grigorov <[email protected]> wrote:
>
> > Hi,
> >
> > I seems LocationService isn't injected properly in your class, that's why
> > it is null when you attempt to use it.
> > In what class do you inject it? Is it a Wicket component like Panel or
> > Page? In this case you have to look it up "manually".
> > See
> >
> >
> https://github.com/apache/isis/blob/867188b865edaae77c4999c6059f79f0bc79b096/core/viewer-wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/PanelAbstract.java#L175
> >
> > Martin Grigorov
> > Freelancer, available for hire!
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Mon, Apr 6, 2015 at 3:33 PM, German Vivero <
> > [email protected]> wrote:
> >
> > > Hi all, I have a problem runnign gmap addon.
> > >
> > > I write an entity following documentation, the app show me a map but
> when
> > > do a lookup to get a Location ocurrs a null point exception, on
> > > locationService.lookup(address), and if set a location as
> > -10.1111;10.1111
> > > isn't saved,I can modify and save all other propertiesof my entity
> > >
> > > My app use securty module it can interfer with gmap??
> > >
> > > tnk
> > > German Vivero
> > >
> >
>

Reply via email to