Aw: Re: Find a component corresponding to entity

2016-09-27 Thread Per Newgro
Thank you both for your statement.
Per

> Gesendet: Mittwoch, 28. September 2016 um 08:34 Uhr
> Von: "Ernesto Reinaldo Barreiro" 
> An: "users@wicket.apache.org" 
> Betreff: Re: Find a component corresponding to entity
>
> Per,
> 
> I normally do it the static factory way.. but Spring might give you the
> advantage for testing (e.g in some situation just pass something that
> creates an empty panels, or anything else). As Martin said, this is not
> something Wicket cares about.
> 
> On Wed, Sep 28, 2016 at 8:04 AM, Per Newgro  wrote:
> 
> > Hello *,
> >
> > I'm looking for an elegant solution to determine a component for an entity.
> >
> > Example:
> > There is a person and two sub-types of it - Manager and Sportsman.
> > The Manager can be listed in a listview by using a ManagerViewItem
> > and the Sportsman by using a SportsmanViewItem.
> >
> > Currently I'm using a factory producing the appropriate viewitems. But
> > this factory is injected by using spring.
> > I would like to reduce the coupling to spring within my component classes
> > (e.g. Page).
> >
> > So i'm looking for a "wicket way" to determine which component is required
> > to list all persons.
> >
> > Thanks for your ideas.
> > Per
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
> 
> 
> -- 
> Regards - Ernesto Reinaldo Barreiro
> 

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Find a component corresponding to entity

2016-09-27 Thread Ernesto Reinaldo Barreiro
Per,

I normally do it the static factory way.. but Spring might give you the
advantage for testing (e.g in some situation just pass something that
creates an empty panels, or anything else). As Martin said, this is not
something Wicket cares about.

On Wed, Sep 28, 2016 at 8:04 AM, Per Newgro  wrote:

> Hello *,
>
> I'm looking for an elegant solution to determine a component for an entity.
>
> Example:
> There is a person and two sub-types of it - Manager and Sportsman.
> The Manager can be listed in a listview by using a ManagerViewItem
> and the Sportsman by using a SportsmanViewItem.
>
> Currently I'm using a factory producing the appropriate viewitems. But
> this factory is injected by using spring.
> I would like to reduce the coupling to spring within my component classes
> (e.g. Page).
>
> So i'm looking for a "wicket way" to determine which component is required
> to list all persons.
>
> Thanks for your ideas.
> Per
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Regards - Ernesto Reinaldo Barreiro


Re: Find a component corresponding to entity

2016-09-27 Thread Martin Grigorov
Hi,

Wicket doesn't prescribe any way for this.
You could use Spring, ServiceLoader, OSGi, static factory, ... Anything
that makes sense in your application.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Wed, Sep 28, 2016 at 8:04 AM, Per Newgro  wrote:

> Hello *,
>
> I'm looking for an elegant solution to determine a component for an entity.
>
> Example:
> There is a person and two sub-types of it - Manager and Sportsman.
> The Manager can be listed in a listview by using a ManagerViewItem
> and the Sportsman by using a SportsmanViewItem.
>
> Currently I'm using a factory producing the appropriate viewitems. But
> this factory is injected by using spring.
> I would like to reduce the coupling to spring within my component classes
> (e.g. Page).
>
> So i'm looking for a "wicket way" to determine which component is required
> to list all persons.
>
> Thanks for your ideas.
> Per
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Find a component corresponding to entity

2016-09-27 Thread Per Newgro
Hello *,

I'm looking for an elegant solution to determine a component for an entity.

Example:
There is a person and two sub-types of it - Manager and Sportsman.
The Manager can be listed in a listview by using a ManagerViewItem
and the Sportsman by using a SportsmanViewItem.

Currently I'm using a factory producing the appropriate viewitems. But this 
factory is injected by using spring.
I would like to reduce the coupling to spring within my component classes (e.g. 
Page).

So i'm looking for a "wicket way" to determine which component is required to 
list all persons.

Thanks for your ideas.
Per

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org