or don't use cpm On Jan 10, 2012 11:10 AM, "Sven Meier" <s...@meiers.net> wrote:
> Write you own model: > > public class PropertiesModel extends AbstractReadOnlyModel<String> { > > private Properties properties; > > private String key; > > // constructor ... > > public String getObject() { > return properties.get(key); > } > } > > You can implement IComponentInheritedModel if you want to have the same > magic supported by CompoundPropertyModel, e.g.: > > Form form = new Form("form", new MyPropertiesModel(properties))**; > form.add(new TextField<String>("body.**background-color")); > > Hope this helps > Sven > > Am 10.01.2012 15:44, schrieb Decebal Suiu: > >> Hello >> >> I have a form with new CompoundPropertyModel<**ValueMap>(properties) as >> model >> where properties are loaded from a properties file (legacy). My problem is >> that in properties file I have keys like x.y >> and I cannot use form.add(new TextField<String>("body.** >> background-color")); >> >> How do I solve this problem? >> >> Thanks, >> Decebal >> >> -- >> View this message in context: http://apache-wicket.1842946.** >> n4.nabble.com/PropertyModel-**with-x-y-as-property-name-** >> from-a-properties-file-**tp4282146p4282146.html<http://apache-wicket.1842946.n4.nabble.com/PropertyModel-with-x-y-as-property-name-from-a-properties-file-tp4282146p4282146.html> >> Sent from the Users forum mailing list archive at Nabble.com. >> >> ------------------------------**------------------------------**--------- >> To unsubscribe, e-mail: >> users-unsubscribe@wicket.**apache.org<users-unsubscr...@wicket.apache.org> >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > ------------------------------**------------------------------**--------- > To unsubscribe, e-mail: > users-unsubscribe@wicket.**apache.org<users-unsubscr...@wicket.apache.org> > For additional commands, e-mail: users-h...@wicket.apache.org > >