Re: trimming text before save???
Re: trimming text before save???
- Subject: Re: trimming text before save???
- From: Kieran Kelleher <email@hidden>
- Date: Sun, 07 Jul 2013 10:05:51 -0400
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 <email@hidden> 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 (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden