wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Grigorov <mgrigo...@apache.org>
Subject Re: FormValidators and messages property file
Date Thu, 02 Oct 2014 07:16:20 GMT
Hi,

As I said the simplest is to just use form.error("the.key"):

@Override
        public void validate(Form<?> form)
        {
                Date fromDate = fromDateFormComponent.getConvertedInput();
                Date toDate = toDateFormComponent.getConvertedInput();

                if (    fromDate != null
                         && toDate != null
                         && fromDate.after(toDate))
                {
                        form.error(getClass().getSimpleName() + "." +
"fromDateAfterToDate");
                }
        }


Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Thu, Oct 2, 2014 at 12:30 AM, msalman <mohammad_salman@yahoo.com> wrote:

> Well, I wanted these to be independent validation classes.  But now it
> seems
> like a bad idea.  I will make them part of the form.
>
> Martin, your comments and help are much appreciated.
>
> Thanks.
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/FormValidators-and-messages-property-file-tp4667767p4667790.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message