On 14/09/06, Oleg Kalnichevski <[EMAIL PROTECTED]> wrote:
On Thu, 2006-09-14 at 18:09 +0100, sebb wrote:
[...]
> There could be an additional "_type" property for values that aren't
> Strings. e.g.
>
> http.socket.timeout=1000
> _type.http.socket.timeout=Integer
>
> Some conversions might be trickier than others...
>
It just thought that a map of parameter names to a corresponding
instance of java.beans.PropertyEditor might be the most elegant solution
to this problem.
Map paramEditorMap = new HashMap();
paramEditorMap.put("type.http.socket.timeout", new IntegerEditor());
Not sure I understand how to use the IntegerEditor() here - I thought
the PropertyEditor classes were intended for GUIs only?
Also, this means knowing all the (non-String) property names in
advance, even if they are not needed...
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]