This is what I have in my JSP already - to validate other fields of the form bean: <%-- Error Messages --%> <logic:messagesPresent> <Table class="btable"> <tr> <td> <bean:message key="errors.header"/> <ul> <html:messages id="error"> <li class="sched_input"><bean:write name="error"/></li> </html:messages> </ul> </td> </tr> </Table> <BR> </logic:messagesPresent>
I get those validations/messages from the 'Validate' method in the form bean along with the applicationResources.properties file. I have a check for the 'errors' object in my action class. 1. How can I write my delete-validation in a way that does not conflict with all of the above? 2. you mentioned 'Return an ActionError...'. Where would I return it to/from? How can I declare a new ActionError and add it to errors?? -----Original Message----- From: Mike Jasnowski [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 2:10 PM To: Struts Users Mailing List Subject: RE: Delete Validation -- with Vector displayed Return an ActionError with a message parameterized to include the names of the entities, then on the JSP, render that errors collection. -----Original Message----- From: Alawadhi, Mona [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 2:08 PM To: 'Struts Users Mailing List' Subject: Delete Validation -- with Vector displayed Hello Everyone, I have a 'Delete' button in my JSP (a submit button). As the button is submitted, a method gets called (from the Action class) to do the following: 1. checks if the field is NOT used by entities 2. Based on 1, either the field gets deleted, or the field does not get deleted and a Vector of entities using the field is returned. How can I validate/ display a message to the user in case the field is used and cannot be deleted? The error message should also include the entities using the field (which is a Vector, or a string). Thank you, Mona **************************************************************************** * The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this email are subject to the terms and conditions expressed in the governing KPMG client engagement letter. **************************************************************************** * --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ***************************************************************************** The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this email are subject to the terms and conditions expressed in the governing KPMG client engagement letter. ***************************************************************************** --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]