and thats why it would be nice to look into that a Validator can also be a
Behavior
so that it can set the max length attribute of a text input..

johan

On Sat, Mar 8, 2008 at 1:30 PM, Martijn Dashorst <[EMAIL PROTECTED]>
wrote:

> This restricts the input field to a max length, but doesn't check the
> input on the server side. To be sure the input is not longer than max
> length, you should also add the length validator. You could check that
> in the database layer, but somehow I find validation feedback messages
> easier to interpret than a SQL exception :-)
>
> Martijn
>
> On 3/5/08, Scott Swank <[EMAIL PROTECTED]> wrote:
> > We have the following on our base TextField
> >
> >         public void setMaxLength(int maxLength)
> >         {
> >                 this.maxLength = maxLength;
> >                 if (maxLength > 0)
> >                         add(new AttributeModifier("maxlength", true, new
> Model(maxLength)));
> >
> >         }
> >
> >  On Tue, Mar 4, 2008 at 11:39 AM, Michael Mehrle <[EMAIL PROTECTED]>
> wrote:
> >  > Is there a validator in wicket that constrains the input length?
> >  >
> >  >  Michael
> >  >
> >  >
> >  >
>  ---------------------------------------------------------------------
> >  >  To unsubscribe, e-mail: [EMAIL PROTECTED]
> >  >  For additional commands, e-mail: [EMAIL PROTECTED]
> >  >
> >  >
> >
> >
> >
> >
> > --
> >  Scott Swank
> >  reformed mathematician
> >
> >
> >  ---------------------------------------------------------------------
> >  To unsubscribe, e-mail: [EMAIL PROTECTED]
> >  For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Buy Wicket in Action: http://manning.com/dashorst
> Apache Wicket 1.3.1 is released
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.1
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to