Sorry, I have been having huge troubles with my email lately. I am using Struts 1.2.4, is this wrong?
Thanks again, Corey On Sun, 21 Nov 2004 23:18:44 -0500, David G. Friedman <[EMAIL PROTECTED]> wrote: > Corey, > > We get it that you're resending it! Now, on to helping mode... > > What version of Struts are you using? > > > > -----Original Message----- > From: Corey Scott [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 17, 2004 12:37 PM > To: [EMAIL PROTECTED] > Subject: [Validation] and local string insertion > > Hi, > > I have been trying to achieve the same in my validate method to the > following extract from me validation.xml > <form name="UpdateTaskForm"> > <field property="txtTaskSummary" > depends="required"> > <msg > name="required" > key="stdError.missing"/> > > <arg0 key="UpdateTaskForm.txtTaskSummary"/> > </field> > </form> > > Extract from my message bundle: > stdError.required.field=Please enter/choose a {0} > UpdateTaskForm.txtTaskSummary=Task Summary > > My validate method: > public ActionErrors validate( > ActionMapping mapping, > HttpServletRequest request) > { > ActionErrors errors = new ActionErrors(); > > if ((this.txtTaskSummary == null) > || (this.txtTaskSummary.length() == 0)) > { > MessageResources resources = this.getServlet().getInternal(); > > errors.add( > "txtTaskSummary", > new ActionMessage( > "stdError.required.field", > resources.getMessage( request.getLocale(), > "UpdateTaskForm.txtTaskSummary"))); > } > > return errors; > } > > Hopefully it is clear that I am trying get an output similar to: > Please enter/choose a Task Summary > > But all I can get is: > Please enter/choose a {0} // without the whole get resources stuff > or > Please enter/choose a null //code above > > I am getting the impression I am very much off track, any help would be > great. > > Thanks, > Corey > > --------------------------------------------------------------------- > 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]