Struts 1.2.4 Client-Side Validation Help

Discussion in 'Java' started by pbergan@cmdservices.com, Dec 17, 2004.

  1. Guest

    I'm trying to get client side validation working in Struts 1.2.4 (also
    using tiles) and have a question. I have an action

    <action
    path="/user"
    type="com.cmd.starfill.access.UserAction"
    name="userForm"
    scope="request"
    parameter="action" >
    <forward name="default" contextRelative="true"
    path="access.viewUser"/>
    <forward name="done" contextRelative="true"
    path="access.listUsers" redirect="true"/>
    <forward name="viewUser" contextRelative="true"
    path="access.viewUser"/>
    <forward name="editUser" contextRelative="true"
    path="access.editUser"/>
    </action>

    My form is

    <form-bean
    name="userForm"
    type="com.cmd.starfill.access.UserForm"/>

    I have a listing page that has a link to "/users.do?userName=XXX" which
    takes me to the "view" a user screen. When the the "Edit" button is
    clicked the "/user" action is called again to forward to the "edit" a
    user screen. The edit screen is the only screen that includes the
    onsubmit="validateUserForm(this);".

    When I go to the "view" screen I get an error saying there is no "input
    parameter in the /user action mapping". If I add the input parameter
    (see below), I end up going to the "edit" screen rather than the "view"
    screen.

    Do I have to create separate form-beans and actions for each mode? View
    and Edit?

    My original approach worked in Struts 1.1. Can anyone tell me what I'm
    doing wrong?
    , Dec 17, 2004
    #1
    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. Libs
    Replies:
    0
    Views:
    1,491
  2. Matt
    Replies:
    14
    Views:
    4,095
    Chad Z. Hower aka Kudzu
    Jan 30, 2004
  3. =?Utf-8?B?dmlkeWE=?=
    Replies:
    1
    Views:
    748
    Kevin Spencer
    Jun 2, 2005
  4. Boss302
    Replies:
    0
    Views:
    1,038
    Boss302
    Nov 21, 2006
  5. Bogdan
    Replies:
    2
    Views:
    648
    Bogdan
    Jun 9, 2008
Loading...

Share This Page