move InjectorHolder.getInjector().inject(this); to the init() method
*AFTER* the addComponentInstantiatonListener call.

Martijn

On Wed, Aug 13, 2008 at 5:22 PM, alex2008 <[EMAIL PROTECTED]> wrote:
>
> In my small project (hibernate-spring-wicket) without JPA I have this big
> problem:
>
>
>   @SpringBean
>    private PersoneList personeList;
>    public void setPersoneList(PersoneList personeList) {
>        this.personeList = personeList;
>    }
>
>     public void init() {
>
>            addComponentInstantiationListener(this);
>            //mount("/Home", PackageName.forClass(Home.class));
>    }
>
>    /**
>     * Constructor
>     */
>    public Home() {
>        InjectorHolder.getInjector().inject(this);
> ................
>
> WicketMessage: Can't instantiate page using constructor public
> wicketapp.Home()
>
> Root cause:
>
> java.lang.IllegalStateException: bean of type [service.PersoneList] not
> found
> .........
>
> The PersonList is injected with spring annotation.
>
> I am very discouraged I can not proceed, every time I have to stop for a
> problem, if it continues so I fear that I will leave wicket. :,(
>
>
> Nino.Martinez wrote:
>>
>> Yes it are possible, theres the wicket-spring annot project..
>>
>>
>> look in the wiki
>> http://cwiki.apache.org/WICKET/spring.html
>>
>> And you can also just use the Wicket Iolite archetype, it has spring and
>> jpa setup for you:
>>
>> http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Iolite
>>
>> alex2008 wrote:
>>> Is it possible use this version of wicket with a service injected on
>>> spring
>>> by annotations?
>>>
>>
>> --
>> -Wicket for love
>>
>> Nino Martinez Wael
>> Java Specialist @ Jayway DK
>> http://www.jayway.dk
>> +45 2936 7684
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Wicket-1.3.4-and-Spring-annotations-tp18962935p18965346.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.4 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to