Return-Path: X-Original-To: apmail-cayenne-user-archive@www.apache.org Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2581E10CAC for ; Tue, 11 Feb 2014 20:57:19 +0000 (UTC) Received: (qmail 83727 invoked by uid 500); 11 Feb 2014 20:57:18 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 83674 invoked by uid 500); 11 Feb 2014 20:57:18 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 83666 invoked by uid 99); 11 Feb 2014 20:57:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Feb 2014 20:57:18 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [209.85.220.178] (HELO mail-vc0-f178.google.com) (209.85.220.178) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Feb 2014 20:57:12 +0000 Received: by mail-vc0-f178.google.com with SMTP id ik5so6259689vcb.23 for ; Tue, 11 Feb 2014 12:56:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=9eY+K34PDob+mNbUiQ7zDoNAOjODbtxn0naNdXlkfN8=; b=UU2noJyjEnk+JK606QMia7WOrupox4VkH1iFVWD59Tw+iC+aoTFiTz2xSYMT6ugNQd n/ho19Er5th2xo2urfNeEY9yGHPZKRTEA4CEmEQ6GN9yjxeKb4gZ10vnUUMetTKz/AW+ lB46B3NCxBMHAY4NehAPy1Pcu+oesl/N73U4ykGFmLrIEX/HNuGulRdBzWAojxXvFf1Z 5+vguyWkoKVgq544vuwbxSxeS6GdLTCoVvqpcGkBwXrrtyIdzGXDpAsWe8GtDVGa318n 0pXRLCV8VP7wXtqciUsgIlulukMGmYZ5Q3frKp4/qYA5M2kpr/Pw/ukgkZWDUs4mlumz nFGw== X-Gm-Message-State: ALoCoQmOE+Nsjqnaye1wOpDX+c+RJpLmlH8YC48rLNlGJHSx+b07iHOGTVor4uBj7mLGEns2/o7M X-Received: by 10.52.188.41 with SMTP id fx9mr24707549vdc.19.1392152211308; Tue, 11 Feb 2014 12:56:51 -0800 (PST) MIME-Version: 1.0 Received: by 10.58.181.229 with HTTP; Tue, 11 Feb 2014 12:56:31 -0800 (PST) In-Reply-To: <52FA8303.80803@apache.org> References: <52FA75AB.6050402@apache.org> <52FA8303.80803@apache.org> From: Michael Gentry Date: Tue, 11 Feb 2014 15:56:31 -0500 Message-ID: Subject: Re: Trimming strings To: Cayenne Users Content-Type: multipart/alternative; boundary=bcaec5485ca0075f8504f227b202 X-Virus-Checked: Checked by ClamAV on apache.org --bcaec5485ca0075f8504f227b202 Content-Type: text/plain; charset=ISO-8859-1 I made a Gist for you to keep the list less cluttered and preserve formatting/etc (since the mailer would mess it up): https://gist.github.com/mrg/8943683 HTH, mrg On Tue, Feb 11, 2014 at 3:07 PM, Richard Frovarp wrote: > This is the wrong list, but how did you accomplish triming the form > inputs? Is there one of those wonderful hidden ways to do that everywhere > by default? That would accomplish my goals as well, as I am using Tapestry > too. > > > On 02/11/2014 01:54 PM, Michael Gentry wrote: > >> You could also use custom templates or, if a web application, hit it with >> a >> big hammer and trim all form inputs every submit (that's what I did in a >> Tapestry application). >> >> >> On Tue, Feb 11, 2014 at 2:31 PM, John Huss wrote: >> >> You can subclass CayenneDataObject and override writePropertyDirectly. >>> That should do it. >>> >>> >>> On Tue, Feb 11, 2014 at 1:10 PM, Richard Frovarp >> >>>> wrote: >>>> >>> >>> Upon insert I want to trim strings going into the database. Is there an >>>> easy way to configure this? >>>> >>>> I know I can override all of the appropriate functions for my settings >>>> >>> and >>> >>>> use StringUtils.trim(), then call super, but I would like an easier >>>> >>> method >>> >>>> that I'm less likely to forget to do. >>>> >>>> Thanks, >>>> Richard >>>> >>>> >>> >> > --bcaec5485ca0075f8504f227b202--