Re: final Page.onInitialize()
Hi, Clint Checketts wrote: I don't believe the goal of onInitiallize is to move all component creation from the constructor to onInitialize, since if you are adding the component to the parent in the onInitialize method then you are back to the problem of not being able to call getPage() in your components. I think it is the opposite: if I create and add components in their respective constructors I do not have access to getPage(): class MyPage { MyPage() { add(new MyPanel()); } } class MyPanel { MyPanel() { log.debug(getPage() = + getPage()); = null add(new Label(id, getString(resKey)); = does not resolve } } So at least in my panels and other containers I would keep creating components in onInitialize(). Is that right? Overridable factory methods in my base page (which should not be called from the constructor) are mainly there to create Components, so from where can they be called if I can't override onInitialize()? I would not like to go back to onBeforeRender and maintain a flag myself. Cheers Hans -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/final-Page-onInitialize-tp3250951p3298712.html Sent from the Forum for Wicket Core developers mailing list archive at Nabble.com.
Can't remember: way to add properties files for validators?
Someone asked today, and I can't remember I think the answer is no. Is there a way to add a properties file with messages for a validator? In other words, could we package a jar of validators with their messages to be reused by folks? -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org*
Re: Can't remember: way to add properties files for validators?
yes. added in both 1.4 and 1.5 i think. MyValidator.properties next to MyValidator.class -igor On Thu, Feb 10, 2011 at 9:58 AM, Jeremy Thomerson jer...@wickettraining.com wrote: Someone asked today, and I can't remember I think the answer is no. Is there a way to add a properties file with messages for a validator? In other words, could we package a jar of validators with their messages to be reused by folks? -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org*
Re: Can't remember: way to add properties files for validators?
Hmm just tried it in 1.4 and it worked in one example, and not in another. I'll look at it more tonight when I'm through with this training class and add a JIRA if it has a bug. Thanks! -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org* On Thu, Feb 10, 2011 at 12:30 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: yes. added in both 1.4 and 1.5 i think. MyValidator.properties next to MyValidator.class -igor On Thu, Feb 10, 2011 at 9:58 AM, Jeremy Thomerson jer...@wickettraining.com wrote: Someone asked today, and I can't remember I think the answer is no. Is there a way to add a properties file with messages for a validator? In other words, could we package a jar of validators with their messages to be reused by folks? -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org*
Where are 1.4-snapshot jars automatically built now?
Wicketstuff repo only has from last June. Where are the current snapshots? I just realized that my quickstart was pulling from old jars that don't even have onConfigure. -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org*
Re: final Page.onInitialize()
Hans, I'm agreeing. I'm just saying that if you start treating the onIniliaze() as the place to create your components then you are stuck with the same problem as before: class MyPage { MyPage() { } * onInitialize() Using onInitialize in the page doesn't give you anything, so that is why its 'final' add(new MyPanel()); }* } class MyPanel { MyPanel() { log.debug(getPage() = + getPage()); = null add(new Label(id, getString(resKey)); = does not resolve } } On Thu, Feb 10, 2011 at 2:08 AM, Hans Lesmeister 2 hans.lesmeis...@lessy-software.de wrote: Hi, Clint Checketts wrote: I don't believe the goal of onInitiallize is to move all component creation from the constructor to onInitialize, since if you are adding the component to the parent in the onInitialize method then you are back to the problem of not being able to call getPage() in your components. I think it is the opposite: if I create and add components in their respective constructors I do not have access to getPage(): class MyPage { MyPage() { add(new MyPanel()); } } class MyPanel { MyPanel() { log.debug(getPage() = + getPage()); = null add(new Label(id, getString(resKey)); = does not resolve } } So at least in my panels and other containers I would keep creating components in onInitialize(). Is that right? Overridable factory methods in my base page (which should not be called from the constructor) are mainly there to create Components, so from where can they be called if I can't override onInitialize()? I would not like to go back to onBeforeRender and maintain a flag myself. Cheers Hans -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/final-Page-onInitialize-tp3250951p3298712.html Sent from the Forum for Wicket Core developers mailing list archive at Nabble.com.
Re: Where are 1.4-snapshot jars automatically built now?
i wonder if hudson is publishing them somewhere... -igor On Thu, Feb 10, 2011 at 12:17 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Wicketstuff repo only has from last June. Where are the current snapshots? I just realized that my quickstart was pulling from old jars that don't even have onConfigure. -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org*
Re: Where are 1.4-snapshot jars automatically built now?
This one gets 1.4 and 1.5 snapshots regularly from somewhere: https://repository.apache.org/content/repositories/snapshots/org/apache/wicket/ https://repository.apache.org/content/repositories/snapshots/org/apache/wicket/ 2011/2/10 Igor Vaynberg igor.vaynb...@gmail.com i wonder if hudson is publishing them somewhere... -igor On Thu, Feb 10, 2011 at 12:17 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Wicketstuff repo only has from last June. Where are the current snapshots? I just realized that my quickstart was pulling from old jars that don't even have onConfigure. -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org*
Re: Where are 1.4-snapshot jars automatically built now?
Ah, thanks. I think we should probably add that as a repo for our quickstart. -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org* On Fri, Feb 11, 2011 at 12:38 AM, Attila Király kiralyattila...@gmail.comwrote: This one gets 1.4 and 1.5 snapshots regularly from somewhere: https://repository.apache.org/content/repositories/snapshots/org/apache/wicket/ https://repository.apache.org/content/repositories/snapshots/org/apache/wicket/ 2011/2/10 Igor Vaynberg igor.vaynb...@gmail.com i wonder if hudson is publishing them somewhere... -igor On Thu, Feb 10, 2011 at 12:17 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Wicketstuff repo only has from last June. Where are the current snapshots? I just realized that my quickstart was pulling from old jars that don't even have onConfigure. -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org*