Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to inject values to a wicket page using spring?

Tags:

spring

wicket

Is it possible to inject a value to a wicket page using spring?

With @Value it's possible to inject values to a spring bean.

I know the @SpringBean annotation, but this is only for beans.

My workaround is to wrap the value with a spring bean and then inject this with @SpringBean to my wicket page. Is there a better way to do this?

like image 599
Cengiz Avatar asked Oct 07 '14 09:10

Cengiz


1 Answers

We have solved this problem using getter & setter in our custom child of WebApplication. This child is standard Spring bean and is configured in spring's configuration.

Otherwise you have to create some "config" bean.

like image 132
Petr Újezdský Avatar answered Oct 21 '22 12:10

Petr Újezdský