You could try the wicket-spring library. It allows a very nice integration
using a SpringBean annotation, similar to Autowired from spring.

Alex


Umanga wrote:
> 
> Thanks Pierre,
> 
> yes,that was a problem with web.xml ,
> 
> I forgot to change the filter setting :
> 
> <init-param>
>             <param-name>applicationFactoryClassName</param-name>
>             
> <param-value>org.apache.wicket.spring.SpringWebApplicationFactory</param-value>
>         </init-param>
> 
> Now everything works fine.
> 
> Pierre Goupil wrote:
>> Maybe it comes from the web.xml : can we ses it, please?
>>
>> Regards,
>>
>> Pierre
>>
>>
>> On Wed, Jan 20, 2010 at 7:41 AM, Ashika Umanga Umagiliya <
>> auma...@biggjapan.com> wrote:
>>
>>   
>>> Greetings all,
>>>
>>> I followed the easy 'Application Object Approach' to integrate Spring
>>> with
>>> my Wicket app. (
>>> http://cwiki.apache.org/WICKET/spring.html#Spring-ApplicationObjectApproach)
>>>
>>> In my application class :
>>>
>>> public class NihonBareApplication extends WebApplication
>>> {     private CommonService commonService;
>>>   public CommonService getCommonService() {
>>>       return commonService;
>>>   }
>>>   public void setCommonService(CommonService cs) {
>>> this.commonService = cs;         }
>>> }
>>>
>>>
>>> And in my pages :
>>>
>>> public class FamiliesPage extends WebPage {
>>>  public CommonService getCommonService(){
>>>       System.out.println(">>>"+
>>> ((NihonBareApplication)getApplication()).getCommonService());
>>>       return
>>> ((NihonBareApplication)getApplication()).getCommonService();
>>>   }
>>> }
>>>
>>>
>>> But eventhough the bean injected into 'NihonbareApplication' object, the
>>> getCommonService() method of my page returns null for the bean.
>>>
>>> What could be the problem?
>>>
>>> Thanks in advance.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>>     
>>
>>
>>   
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Wicket-1.4.5-%3A-Spring-integration-problem--tp27237445p27238481.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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

Reply via email to