Hi Martin, okay I am going to change it this way. :-)
kind regards Tobias > Am 26.02.2017 um 21:28 schrieb Martin Grigorov <[email protected]>: > > Hi Tobias, > > Looks much clear with the imports! Thank you! > > What is the issue with the non-static context creation > in MyContextLoaderListener ? > I think it should be OK with code like: > > public class MyContextLoaderListener extends ContextLoaderListener { > public MyContextLoaderListener() { > super(createContext()); > } > > private static ApplicationContext createContext() { > AnnotationConfigWebApplicationContext context = new > AnnotationConfigWebApplicationContext(); > context.scan("com.my.package"); > context.refresh(); > return context; > } > } > > > Martin Grigorov > Wicket Training and Consulting > https://twitter.com/mtgrigorov > > On Sat, Feb 25, 2017 at 1:34 PM, Tobias Soloschenko < > [email protected]> wrote: > >> Hi Martin, >> >> I provided a patch Andrea applied to the example page. (thanks again to be >> so kind) I think all your feedback points are covered with this change >> >> * Imports >> * getRequiredWebApplicationContext >> >> I also added the bean and the example page to show how it is going to be >> injected. >> >> kind regards >> >> Tobias >> >>> Am 24.02.2017 um 09:12 schrieb Martin Grigorov <[email protected]>: >>> >>> Hi Tobias, >>> >>> Thank you for the article! >>> >>> Minor feedback from me: >>> - either add imports at the top or use fully qualified class names. As a >>> user it is very annoying to try to guess what imports are needed to be >> able >>> to use the snippets. >>> - instead of using static initalization for the Spring application >> context >>> you can initialize it in the constructor and >>> use org.springframework.web.context.support.WebApplicationContextUtils# >> getRequiredWebApplicationContext(ServletContext) >>> to get it in #init() >>> >>> Martin Grigorov >>> Wicket Training and Consulting >>> https://twitter.com/mtgrigorov >>> >>> On Wed, Feb 22, 2017 at 6:17 PM, Tobias Soloschenko < >>> [email protected]> wrote: >>> >>>> Hi all, >>>> >>>> it’s online, now. >>>> >>>> https://wicket.apache.org/learn/examples/servlet3x.html < >>>> https://wicket.apache.org/learn/examples/servlet3x.html> >>>> >>>> kind regards >>>> >>>> Tobias >>>> >>>>> Am 22.02.2017 um 10:57 schrieb Francois Meillet < >>>> [email protected]>: >>>>> >>>>> nice ! >>>>> >>>>> François >>>>> >>>>> >>>>> >>>>>> Le 22 févr. 2017 à 09:37, Tobias Soloschenko < >>>> [email protected]> a écrit : >>>>>> >>>>>> Hi, >>>>>> >>>>>> I am going to provide an example with Servlet 3.x and Spring Framework >>>> without any XML definitions to the site this afternoon. >>>>>> >>>>>> Maybe we can link it on the Wicket's Twitter account, too. >>>>>> >>>>>> kind regards >>>>>> >>>>>> Tobias >>>>> >>>> >>>> >> >>
