Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

Wicket will search all resource files with the names equal to the components in your component hierarchy,

...

starting from application level at top to component defaults as a last resort.

So when Wickets wants to look up a message used in MyPanel, where MyPanel is contained within MyPage, and the application is called MyApplication, Wicket will look in:
1. MyPanelMyApplication_locale.properties, ..., and then MyPanelMyApplication.properties (..)
2. MyPage_locale.properties, ..., and then MyPage.properties
3. MyApplicationMyPanel_locale.properties, ..., and then MyApplicationMyPanel.properties (..)

Actually, it even goes two steps further. Wicket will also look at property files for the base classes of MyPanel, MyPage and MyApplication.
When MyPanel inherites directly from Panel, MyPage directly from Page and MyApplication directly from Application, Wicket will look in:
1. MyPanelApplication_locale.properties, ..., and then MyPanelApplication.properties (..)
2. PanelMyApplication_locale.properties, ..., and then PanelMyApplication.properties (..)
3. MyPagePage_locale.properties, ..., and then MyPagePage.properties
4. PageMyPage_locale.properties, ..., and then PageMyPage.properties
5. MyApplicationPanel_locale.properties, ..., and then MyApplicationPanel.properties (..)
6. ApplicationMyPanel_locale.properties, ..., and finally ApplicationMyPanel.properties (..)

In conclusion: you can use MyApplication.properties for site wide messages and override these in any of the other properties files.

...