I have made a bug report http://issues.apache.org/jira/browse/WICKET-137
If any have an idea where to look to fix this, I would like to try. On 12/4/06, Erik van Oosten <[EMAIL PROTECTED]> wrote: > Hi Jesper, > > I agree and also think this is not correct. You can create a JIRA issue > here: http://issues.apache.org/jira/browse/WICKET > Its more likely to get fixed quickly if you have a patch. > > Please add a link to the issue on the wiki page. > > Regards, > Erik. > > Jesper Preuss schreef: > > Now I have testet it again. > > > > The layout on the Page.html: > > Page > > Form id="formId" > > <wicket:message > > key="theform.messagedata">[testdata]</wicket:message> > > <div wicket:id="theform.resourcedata" /> > > > > Checking order using: > > Using --> <wicket:message > > key="theform.messagedata">[testdata]</wicket:message> > > or > > Using --> new ResourceModel("theform.resourcedata", "defaultValue") > > where we use defaultValue it will output "defaultValue" > > instead of [testdata] > > Looking for theform.messagedata it will use this order of checking: > > 1. Page.properties, theform.messagedata > > 2. Page.properties, formId.theform.messagedata (tries to add id = formId ) > > 3. Form.properties, theform.messagedata > > 4. Application.properties, theform.messagedata > > 5. Application.properties, formId.theform.messagedata > > 6. does not find anything and will not change the [testdata] or > > "defaultValue" if using defaultValue in ResourceModel > > > > Checking order using: <div wicket:id="theform.resourcedata" /> > > Using --> new StringResourceModel("theform.resourcedata", form, null) > > Looking for theform.resourcedata it will use this order of checking: > > 1. Page.properties, theform.resourcedata > > 2. Page.properties, formId.theform.resourcedata (tries to add id = formId ) > > 3. Form.properties, theform.resourcedata > > 4. Application.properties, theform.resourcedata > > 5. Application.properties, formId.theform.messagedata > > 6. Will throw an exception --> java.util.MissingResourceException: > > Unable to find resource: theform.resourcedata for component: loginForm > > > > Checking order using: <div wicket:id="theform.resourcedata" /> > > Using --> new ResourceModel("theform.resourcedata") > > Looking for theform.resourcedata > > 1. Page.properties, theform.resourcedata > > 2. Page.properties, formId.theform.resourcedata (tries to add id = formId ) > > 3. Form.properties, theform.resourcedata > > 4. Application.properties, theform.resourcedata > > 6. Will throw an exception --> java.util.MissingResourceException: > > Unable to find resource: theform.resourcedata for component: loginForm > > > > I have testet with a locale or with only default locale. This is very > > advanced, there is many things to lookout for. I have found out it > > will fir search for Page_locale.properties and then if it's not found > > look for Page.properties. > > > > But what I'm asking for is, if Wicket is looking for "user.version" > > and it finds the file Page_locale.properties. And the "user.version" > > is not in this file it will never look in Page.properties for the > > property. I would think it should. > > > > Why does it ignore Page.properties if the property is not in > > Page_locale.properties ? It will try to use Page.properties only if it > > does not find Page_locale.properties ? > > > > On 12/4/06, Erik van Oosten <[EMAIL PROTECTED]> wrote: > > > >> Interesting. Can you see what happens if the *_en.properties file is not > >> there? > >> Perhaps we need to change the text on the wiki, or else we should file > >> an issue in Jira. > >> > >> Regards, > >> Erik. > >> > >> > >> Jesper Preuss schreef: > >> > >>> I have a question about what Wicket should traverse properties files > >>> and what it does. > >>> > >>> Take a look in > >>> http://cwiki.apache.org/WICKET/i18n-and-resource-boundles.html > >>> here it says Wicket will look in properties files according to this: > >>> 1. MyPanel_locale.properties > >>> 2. then MyPanel.properties > >>> 3. MyPage_locale.properties > >>> 4. then MyPage.properties > >>> 5. MyApplication_locale.properties > >>> 6. then MyApplication.properties > >>> > >>> According to my tests (with "en" english locale) it will only traverse > >>> the properties with locale english. Not the default locale. > >>> > >>> Have I misunderstood anything? > >>> > > > > -- > Erik van Oosten > http://www.day-to-day-stuff.blogspot.com/ > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Wicket-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/wicket-user > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user
