Results 1 to 3 of 3

Thread: Personalization of binding error messages

  1. #1
    Join Date
    Aug 2004
    Location
    France - Saint Nazaire
    Posts
    79

    Default Personalization of binding error messages

    Hi,

    I want to personalize errors messages that occur during the binding of form fields into beans.
    Here is the kind of messages:

    Failed to convert property value of type [java.lang.String] to required type [int] for property 'champ2'; nested exception is java.lang.NumberFormatException: For input string: "132f"

    Thanks for your help.
    Thierry

  2. #2

    Default

    Someone tell me few day ago :

    <<<
    For customize the error message that appears when the conversion is not successful. This is done by adding messages to your messages.properties (or whatever it is named) file like this:

    typeMismatch.java.util.Date=The value must be a date in the form 'dd/MM/yyyy'.
    >>>

    + d'infos : http://www.springframework.org/docs/...sResolver.html.

    Good luck,

    Fabien.

  3. #3
    Join Date
    Aug 2004
    Location
    France - Saint Nazaire
    Posts
    79

    Default Personalization of binding error messages

    Hello,

    I try it and it works fine
    Thanks for your help...
    Thierry

Similar Threads

  1. Enum binding not showing default
    By ge0ffrey in forum Swing
    Replies: 3
    Last Post: Jan 23rd, 2006, 09:08 AM
  2. Replies: 7
    Last Post: Sep 13th, 2005, 01:45 AM
  3. Stop validation if binding fails.
    By sherihan in forum Web
    Replies: 0
    Last Post: Feb 8th, 2005, 03:18 AM
  4. Replies: 0
    Last Post: Jan 6th, 2005, 08:19 AM
  5. Replies: 2
    Last Post: Aug 17th, 2004, 04:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •