No fuss, just confusion. Thanks for the clarification, which helps not only to me.
Cheers! --- On Fri, 10/2/09, Martijn Dashorst <martijn.dasho...@gmail.com> wrote: > From: Martijn Dashorst <martijn.dasho...@gmail.com> > Subject: Re: Can Wicket automatically remove beginning and trailing spaces in > a text field? > To: users@wicket.apache.org > Date: Friday, October 2, 2009, 9:19 AM > Not sure what the fuzz is all about: > wicket trims the whitespace > before and after the input by default (like Marat already > mentioned in > this thread). > > Marat's code example is taken *directly* from Wicket's > FormComponent. > You don't have to do anything. > > Martijn > > On Fri, Oct 2, 2009 at 3:06 PM, David Chang <david_q_zh...@yahoo.com> > wrote: > > For this to work, I have to overwrite this method > either for each form or write a custom class extending > FormComponent. Correct? > > > > If yes, then it is not what I hope to get. I dont want > to do it for each form or a custom class. > > > > I came from Spring MVC camp. This task is very easy in > Spring. > > > > Cheers. > > > > --- On Fri, 10/2/09, Marat Radchenko <slonopotamusor...@gmail.com> > wrote: > > > >> From: Marat Radchenko <slonopotamusor...@gmail.com> > >> Subject: Re: Can Wicket automatically remove > beginning and trailing spaces in a text field? > >> To: users@wicket.apache.org > >> Date: Friday, October 2, 2009, 4:00 AM > >> It already does that. > >> FormComponent: > >> > >> protected T convertValue(String[] value) throws > >> ConversionException > >> { > >> return (T)(value != null && value.length > > 0 > >> && value[0] != null ? > >> trim(value[0]) : null); > >> } > >> > >> 2009/10/2 David Chang <david_q_zh...@yahoo.com> > >> > >> > How to set it up in a Wicket application? I > would like > >> to set it up in the > >> > application level. > >> > > >> > Thanks! > >> > > >> > > >> > > >> > > >> > > >> > --------------------------------------------------------------------- > >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > >> > For additional commands, e-mail: users-h...@wicket.apache.org > >> > > >> > > >> > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > > > > -- > Become a Wicket expert, learn from the best: http://wicketinaction.com > Apache Wicket 1.4 increases type safety for web > applications > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.0 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org