Also just found this in StringResourceModel javadoc... So I guess you can certainly do what I mentioned earlier.
* <li>parameters - The parameters parameter allows an array of objects to be passed for * substitution on the found string resource (see below) using a standard * <code>java.text.MessageFormat</code> object. Each parameter may be an ordinary Object, in which * case it will be processed by the standard formatting rules associated with * <code>java.text.MessageFormat</code>. Alternatively, the parameter may be an instance of * <code>IModel</code> in which case the <code>getObject()</code> method will be applied prior * to the parameter being passed to the <code>java.text.MessageFormat</code>. This allows such * features dynamic parameters that are obtained using a <code>PropertyModel</code> object or even * nested string resource models. Ritesh Trivedi wrote: > > I havent tried this myself, but if its not working I guess you could pass > getString("property.maxWidth") value as a parameter to however you are > accessing myProperty (possibly StringResourceModel). > > Hope that helps. > > > > Martin Makundi wrote: >> >> Hi! >> >> Sometimes I think it would be useful to refer properties from >> properties. Example: >> >> WicketApplication.properties -file: >> myProperty=The maximum width allowed is ${property.maxWidth} pixels >> property.maxWidth=30 >> >> Now I would like to use the maxWidth simultaneously for both >> validation purposes and to display an instruction message that changes >> according to the parameter maxWidth. But Wicket does not seem to have >> the smarts of referring to a property from within a property. >> >> Has someone figured out a simple workaround trick or pattern to >> accomplish this, or does it require a serious add-on 'hack' on Wicket? >> >> ** >> Martin >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > > -- View this message in context: http://www.nabble.com/Property-that-references-property-tp19241680p19243889.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]