[STRUTS] ActionForm and Date fields

Discussion in 'Java' started by Hamvil, Apr 16, 2005.

  1. Hamvil

    Hamvil Guest

    Hello,

    I have a problem in developing an application that use the struts frameswork.

    Basically I have a formBean with some properties that are Date object:

    public class PersonBean
    extends ValidatorForm {

    private String name;
    private Date birthDate;

    ....

    }

    When the associated form is submitted the following exception is raised:

    java.lang.IllegalArgumentException: argument type mismatch

    What's wrong with this form?

    Thanks in advance.
    Hamvil, Apr 16, 2005
    #1
    1. Advertising

  2. Hamvil

    Wendy S Guest

    "Hamvil" <> wrote
    >
    > I have a problem in developing an application that use the struts
    > frameswork.
    >
    > Basically I have a formBean with some properties that are Date object:
    >


    Use Strings for your form properties. Otherwise how will you validate and
    re-display incorrect user input?

    --
    Wendy
    Wendy S, Apr 16, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Pratap Das
    Replies:
    2
    Views:
    2,027
    Pratap Das
    Apr 5, 2004
  2. sp

    Struts and actionForm

    sp, Jul 12, 2004, in forum: Java
    Replies:
    1
    Views:
    557
    Sudsy
    Jul 12, 2004
  3. ShadowMan
    Replies:
    2
    Views:
    2,104
    ShadowMan
    Jul 12, 2004
  4. Replies:
    1
    Views:
    2,723
    shawnews
    Nov 1, 2005
  5. loris_p
    Replies:
    2
    Views:
    680
    loris_p
    Jun 7, 2007
Loading...

Share This Page