-1 if the corresponding getString() does also a trim. Even if my 
vote may not count. Having getString() be different to 
setProperties() also would be ugly...

The reason is that (leading/trailing) spaces may be required (e.g.
A text field with an initial indented paragraph, etc. I could come
up with many more such cases...)

The correct dealing must be done in the bean itself (in your example
the User instance class). In the worst case you would need to wrap 
it into another class that does the right preprocessing.

:) Christoph

Jason van Zyl wrote:
> 
> > By trim I you mean take off leading and trailing whitespace?
> >
> > If so, then I'm +1 - but would prefer it if getString did it rather than
> > setProperties. The design principle behind setProperties is it should
> > behave exactly like an explicit list of
> > bean.setXXX(params.getXXX("paramname")) statements. I wouldn't like to
> > see setProperties doing any magic that wasn't done by the equivalent
> > getXXX method of ParameterParser.
> 
> Yes, by trim I mean remove the leading and trailing whitespace.
> 
> What I would like to be able to do is:
> 
> User user = TurbineSecurity.getUserInstance();
> data.getParameters().setProperties(user);
> 
> Yes, I agree that getString() should do it. I should
> have been more clear.
> 
> Should we have an option in TR.props to specify
> that we want automatic trimming of whitespace?
> 
> jvz.


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to