ComponentStringResourceLoader's javadoc is very helpful here:

assume a component hierarchy like page1.form1.input1 and your are requesting a key named 'Required'. Wicket will search the property in the following order: => form1.input1.Required => Required => input1.Required => Required => Required => page1.form1.input1.Required => Required

What it doesn't mention is that if the form component is nested in another container such as a border then the border id needs to be included in the key.

e.g. if I have page1.form1.border1.input1 then in the form's properties file I have to include the border component in the key - border1.input1.Required, it would be cleaner just to be able to use input1.Required.


On 18/mar/09, at 21:09, Gianni Doe wrote:

On 10/mar/09, at 15:55, Igor Vaynberg wrote:

jira, quickstart, you know the drill


On Tue, Mar 10, 2009 at 3:15 AM, gilberthuph <> wrote:

I'm having exactly the same problem after moving from 1.4-rc1 -> 1.4-rc2

Here's the extract from my properties file TaxiBookingPage.xml.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM " properties.dtd">
<entry key="generalDetails.numberOfVehiclesRequired.Required">You must
enter the number of vehicles</entry>
  .. snip ..

The key "generalDetails.numberOfVehiclesRequired.Required" is found
immediately and the appropriate message retrieved.

11:00:38.595 [http-8180-3] DEBUG org.apache.wicket.Session - Getting
page [path = 4:taxiBookingForm, versionNumber = 0]
11:00:38.609 [http-8180-3]     DEBUG
org.apache.wicket.resource.loader.ComponentStringResourceLoader - Found
resource from: com/rp/webapp/taxi/TaxiBookingPage.; key:

Does not attempt to look up
"generalDetails.numberOfVehiclesRequired.Required" but the key
"taxiBookingForm .numberOfVehiclesContainer .numberOfVehiclesRequiredBorder .generalDetails.numberOfVehiclesRequired.Required"
which is not found.

10:47:47.902 [http-8180-1] DEBUG org.apache.wicket.Localizer - Locate property: key: 'Required'; Component: '[MarkupContainer [Component id =
10:47:47.903 [http-8180-1]     DEBUG
org.apache.wicket.resource.loader.ComponentStringResourceLoader - component:
'[MarkupContainer [Component id =
generalDetails.numberOfVehiclesRequired]]'; key: 'Required'
10:47:47.903 [http-8180-1]     DEBUG
org.apache.wicket.resource.loader.ComponentStringResourceLoader - key: 'taxiBookingForm .numberOfVehiclesContainer .numberOfVehiclesRequiredBorder .generalDetails.numberOfVehiclesRequired.Required'; class: ''; locale: 'en_GB'; Style: 'null'
10:47:47.903 [http-8180-1]     DEBUG
org.apache.wicket.resource.loader.ComponentStringResourceLoader - Found properties file: 'com/rp/webapp/taxi/TaxiBookingPage.' but it doesn't
contain the property

So it seems the lookup algorithm hasn't changed but the message key.

Is this a bug or should we now be using the full form-relative key as shown

Alexander Lohse wrote:

I could not find any reported changes concerning validation message
keys from version 1.4-m3 to 1.4-rc2, but I have the following
"required" key in my application resources that does not work anymore.
.. trim ..

View this message in context:
Sent from the Wicket - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to