You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Michael Mehrle <mi...@ask.com> on 2008/03/04 20:39:20 UTC
Textfield length validator?
Is there a validator in wicket that constrains the input length?
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
RE: Textfield length validator?
Posted by "Wang, Yuesong" <yw...@fedcsc.com>.
StringValidator
-----Original Message-----
From: Michael Mehrle [mailto:michael.mehrle@ask.com]
Sent: Tuesday, March 04, 2008 2:39 PM
To: users@wicket.apache.org
Subject: Textfield length validator?
Is there a validator in wicket that constrains the input length?
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
The old setOutputMarkupId() problem
Posted by Michael Mehrle <mi...@ask.com>.
I'm getting that error although all my panels that are being updated
have the id set. I assume I don't have to add call setOutputMarkupId()
on any components inside of the parent panel that I am updating?
This stuff keeps happening often and is a huge timesink - wished there
was a more elegant way...
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Textfield length validator?
Posted by Ryan Sonnek <ry...@gmail.com>.
I agree. There's already a JIRA filed for this enhancement. Please
vote for this issue if you want to see it fixed! hopefully it'll make
it into 1.4?
https://issues.apache.org/jira/browse/WICKET-1310
On Sat, Mar 8, 2008 at 10:27 AM, Johan Compagner <jc...@gmail.com> wrote:
> 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 <ma...@gmail.com>
> 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 <sc...@gmail.com> 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 <mi...@ask.com>
> > wrote:
> > > > Is there a validator in wicket that constrains the input length?
> > > >
> > > > Michael
> > > >
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > > For additional commands, e-mail: users-help@wicket.apache.org
> > > >
> > > >
> > >
> > >
> > >
> > >
> > > --
> > > Scott Swank
> > > reformed mathematician
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> >
> >
> > --
> > 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: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Textfield length validator?
Posted by Johan Compagner <jc...@gmail.com>.
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 <ma...@gmail.com>
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 <sc...@gmail.com> 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 <mi...@ask.com>
> wrote:
> > > Is there a validator in wicket that constrains the input length?
> > >
> > > Michael
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> >
> >
> >
> >
> > --
> > Scott Swank
> > reformed mathematician
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
>
> --
> 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: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
Re: Textfield length validator?
Posted by Martijn Dashorst <ma...@gmail.com>.
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 <sc...@gmail.com> 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 <mi...@ask.com> wrote:
> > Is there a validator in wicket that constrains the input length?
> >
> > Michael
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
>
>
>
> --
> Scott Swank
> reformed mathematician
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
--
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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Textfield length validator?
Posted by Scott Swank <sc...@gmail.com>.
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 <mi...@ask.com> wrote:
> Is there a validator in wicket that constrains the input length?
>
> Michael
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
--
Scott Swank
reformed mathematician
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org