currently i am developing small web app. Here comes the requirement.
I have a user input screen with 2 textboxes and 1 dropdown.And it has 2 buttons called Add and Update
both buttons will navitage to same scrren.
Once the user clicks on ADD button i have to do some validations like, make sure the three filelds combination should not exist in the table, if it passes the validationm i am dispalying a screnn which contains textboxes.
Once the user clicks on UPDATE button, i have to validate to make sure should exist in the table, If it passes the validation i am navigationg to the next screen, which is same as ADD Screen, as a difference, all the textboxe values are prepopulateed with the existing data. This i s my requirement.
But the problems, at any point of time one button is carrying the parameters to the action,
how to carry the values to action. i am using struts. Here is my first JSP.
if i click on ADD i am able to pass these values to Action, but if i click on Update i am getting nulls in Action
if the user clicks on ADD button in the first scrren and navigates to the second scrren, on which we have 2 buttons called COnfirm ADD and Confirm Update. I have to disable the ConfirmUpdate button, vice versa to ConfirmAdd buuton is be disable when user come thru update button in the firs scren. How to achieve this.
Any help is greatly appreciated.