The validation methods are the correct place to change values.  You could also 
put a formatter on the inputs that trims spaces.


Chuck



On 2013-07-07, at 7:05 AM, Kieran Kelleher wrote:

> I would put it in validation method for that attribute. I use validation to 
> validate and throw, or if it makes sense, coerce a value to an acceptable 
> value in a way that would not surprise the user.
> 
> On Jul 7, 2013, at 3:13 AM, Theodore Petrosky <tedp...@yahoo.com> wrote:
> 
>> Where do you put this logic?
>> 
>> I want to trim() text before it is saved to the backend. In the past I would 
>> put an accessor method on my EO that returned the associated text trimmed. 
>> But I thought I would ask.
>> 
>> Do you trim before you save or handle it after the fact? I have cases that 
>> after a text area has been edited 100 times over  months/years, there may be 
>> quite a few extra cr/lfs at the end of the text. This makes formatting pdfs 
>> in Jasper Reports unhappy.
>> 
>> Ted
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/webobjects-dev/kelleherk%40gmail.com
>> 
>> This email sent to kelleh...@gmail.com
> 
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
> 
> This email sent to ch...@global-village.net

-- 
Chuck Hill             
Executive Managing Partner, VP Development and Technical Services

Practical WebObjects - for developers who want to increase their overall 
knowledge of WebObjects or who are trying to solve specific problems.    
http://www.global-village.net/gvc/practical_webobjects

Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing 
Companies in B.C! 

Global Village Consulting ranks 44th in 25th annual PROFIT 500 ranking of 
Canada’s Fastest-Growing Companies by PROFIT Magazine!













 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to