Post by alex2008In my small project (hibernate-spring-wicket) without JPA I have this big
@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()
java.lang.IllegalStateException: bean of type [service.PersoneList] not
found
.........
The PersonList is injected with spring annotation.
a) you do not need a setter for dependencies
b) you do not need init method in a page
c) you do not need injectorholder line in your constructor, that is
only needed for non-component classes
d) you need to add addComponentInstantiationListener(new
SpringComponentInjector(this)); to your application's init
Post by alex2008I 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. :,(
really??? oh no! i dont think we have interest in keeping users who
cry. everything i have told you has been clearly outlined in the
spring wiki page and in the example code. if you cannot be bothered to
read and follow examples i do not think you will make it far with
wicket anyways.
-igor
Post by alex2008Post by Nino Saturnino Martinez Vazquez WaelYes 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
http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Iolite
Is it possible use this version of wicket with a service injected on spring
by annotations?
--
-Wicket for love
Nino Martinez Wael
http://www.jayway.dk
+45 2936 7684
---------------------------------------------------------------------
--
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: users-***@wicket.apache.org
For additional commands, e-mail: users-***@wicket.apache.org