Re: Multiple instances of pages and spring integration

2008-08-11 Thread Lorenzo Bolzani
Hi Igor, I tried your suggestion and it works but looks like a workaround more than a solution. I have many pages that need some configuration. This is server side configuration, for example how often a page should refresh itself. I tryed to pass in these parameters as PageParameters but in this

Re: Multiple instances of pages and spring integration

2008-08-11 Thread Michael Sparer
I'd say Igor's suggestion is a solution rather than workaround. There's just no point in configuring pages by means of XML or - worse - even a spring config. Passing in page specific parameters is exactly the way to go. I tryed to pass in these parameters as PageParameters but in this way I

Re: Multiple instances of pages and spring integration

2008-08-11 Thread Lorenzo Bolzani
Hi Michael, the point is that this is not a user provided parameter but a server-side page configuration parameter. In this specific case I need to tell the page how often it should auto-refresh. So it is not something that should be passed in from the client over the url but something defined at

Re: Multiple instances of pages and spring integration

2008-08-11 Thread Michael Sparer
Well if it's no dynamic parameter but a static one, different for each page ... why not subclassing a basepage with changed attributes? If the only problem you see is a missing overview, i.e. you'd like to control the different values at one place, you should consider setting the properties e.g.

Re: Multiple instances of pages and spring integration

2008-08-11 Thread Igor Vaynberg
then have your page look it up itself from the spring context using some registry class mypage extends webpage { @SpringBean private PageConfigRegistry registry; public mypage() { mydata data=(mydata)registry.getdatafor(getclass()); // do whatever with data // ^ or put that

Re: Multiple instances of pages and spring integration

2008-08-11 Thread Lorenzo Bolzani
2008/8/11 Igor Vaynberg [EMAIL PROTECTED]: then have your page look it up itself from the spring context using some registry class mypage extends webpage { @SpringBean private PageConfigRegistry registry; public mypage() { mydata data=(mydata)registry.getdatafor(getclass()); // do

Re: Multiple instances of pages and spring integration

2008-08-11 Thread Igor Vaynberg
On Mon, Aug 11, 2008 at 9:40 AM, Lorenzo Bolzani [EMAIL PROTECTED] wrote: So you are saying that wicket does not provide a standard way for page configuration. So I'll develop a custom solution based on spring or on property files. there is no one-way-fits-all way of configuring pages, this is

Re: Multiple instances of pages and spring integration

2008-08-06 Thread Igor Vaynberg
well normally you would just do class monitorpage extends webpage { public monitorpage(string deviceid) { .. do whatever with deviceid } } if you need your pages to be bookmarkable then just use class monitorpage extends webpage { public monitorpage(pageparameters params) {