Cemal,
  I think I have to respectfully disagree with you here.  I describe what I
feel is a better solution, and a little bit of why in this blog post from a
few months ago:

http://www.jeremythomerson.com/blog/2008/11/06/wicket-the-power-of-nested-models/

  Basically, doing it the way you suggested isn't reusable across many
components - you have to create overridden variants of each type of input.
Also, a converter (or more specifically, an implementation of IConverter) is
supposed to be for transforming a type of object to a string usable in the
browser / form post / etc, as it's javadoc mentions.

  Anyway, as the saying goes "there are many ways to skin a cat" - although
the saying isn't that great, I think it applies - there are multiple ways of
accomplishing the same thing.

-- 
Jeremy Thomerson
http://www.wickettraining.com


On Wed, Mar 4, 2009 at 12:04 PM, jWeekend <[email protected]>wrote:

>
> Leszek,
>
> ... or, probably the most "Wicket-way" of doing this is to make a TextField
> subclass that overrides getConverter to return your special IConverter
> implementation which performs the capitalisation in its convertToObject.
>
> Regards - Cemal
> http://jWeekend.com jWeekend
>
>
> Leszek Gawron-2 wrote:
> >
> > Hello,
> >
> > one of my customers has this weird requirement that all data should be
> > input/shown uppercase. I can easily add
> >
> > input {
> >    text-transform: uppercase;
> > }
> >
> > to my css rules, but this does not change the fact that data written
> > into database will still be case sensitive.
> >
> > How can I create a behavior for TextField so that the dat is uppercased
> > before being written to the model?
> >
> > my regards
> >
> > --
> > Leszek Gawron
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Uppercasing-inputs-tp22332360p22335650.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to