Hello:

I have a simple scenario that I need help with. While a user is adding or 
editing information on a data entry screen (it is the same ActionForm and 
Action) - to click a button to save the information as the defaults for any
subsequent new data entry screen. This saving of the default values would be 
done without running the data validation code. Yet I would like to make sure 
that when the user hits the 'Submit' or 'Save' button - the system does the 
appropriate data validation before saving the information away.

My question is how do I do this with Struts? I am trying to use the 'Wintec' 
validation routines (but I think this would be the same problem if I was 
using them or not) - but I am not sure how to do 'sometimes data validation' 
on a data entry screen. I started off with a button on the screen:
<html:submit>
  <bean:message key="button.setDefault"/>
</html:submit>
but I could not get this to work. I could not get the button to do anything 
other than trying to submit the information (but that is probably another 
issue).

Since I could not get the 'button' to work - I was then trying to use a 
link:
<html:link SomeForm.do?action=setDefault/>. This would at least call the 
'peform()' method with the correct action, but I had to turn off the 
validation in 'struts-config.xml'.

Any help or suggestions would get greatly appreciated.

Regards,
Kurt


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

Reply via email to