You can use the name-value parameter of your Change Passord button (Submit
Button) in your Form bean to find out which button was pressed.  Once you
have that information you can write the logic based on it.


Anshuman Nanda

-----Original Message-----
From: Shamdasani Nimmi-ANS004 [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 19, 2001 2:02 PM
To: '[EMAIL PROTECTED]'
Subject: REPOST: How to handle an extra button on login page


Hi,

I want to add an extra button 'Change Password' on my logon screen, which
should take me instead to the 'changePassword.jsp' screen where I would
enter the username, password, new password fields .

I want a suggestion on how to handle this. Should I have the same form bean
for both logon.jsp and changePassword.jsp? If yes then the validate method
of the form bean cannot do validations like,e.g. check for the new password
and confirm new password fields to be non-blank because these fields are not
on logon form.

Also the validate() method of the form bean would get called when I click on
'Change Password' button and since username and password would be null at
that time it would return errors.

I would really appreciate if someone could tell me how they handled such a
situation.

Thanks in advance.

-Nimmi

Reply via email to