java.util.Properties as Form Model

2013-10-18 Thread Andy Van Den Heuvel
Hey, I'm trying to create a form with a CompoundPropertyModel to fill a java.util.Properties object dynamically. FormProperties form = new Form(form, new CompoundPropertyModel(properties)); form.add(new TextFieldString(host)); form.add(new TextFieldString(port)); This works correct when I start

Re: java.util.Properties as Form Model

2013-10-18 Thread Marios Skounakis
An idea is to wrap the Properties object in a class of your own implementing Map as follows: class MyProps implements MapString, String { Properties props; public void put(String key, String value) { if (value == null) props.remove(key); else props.put(key, value); } This does sound

Re: java.util.Properties as Form Model

2013-10-18 Thread Andy Van Den Heuvel
This indeed solves the trick. I'm not sure this is a bug, since the propertyresolver is a general system and Hashtable is just an exception to normal javabean rules. On Fri, Oct 18, 2013 at 2:01 PM, Marios Skounakis msc...@gmail.com wrote: An idea is to wrap the Properties object in a class