Mike-
not understanding the situation you are presenting
can you show us your declared result types?
e.g.
.\classes\struts-actionchaining.xml
actionChain2
Martin
USCitizen(Contractor)
GMT+5
__
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business
of Sender. This transmission is of a confidential nature and Sender does not
endorse distribution to any party other than intended recipient. Sender does
not necessarily endorse content contained within this transmission.
> Subject: RE: Why is Validation not firing?
> Date: Wed, 4 Feb 2009 15:08:00 -0500
> From: michael.griff...@fda.hhs.gov
> To: user@struts.apache.org
>
> I hate it when I do this kind of thing. My input result was pointing to
> the wrong result. Me <-- My own worst enemy.
>
> -Original Message-
> From: Griffith, Michael * [mailto:michael.griff...@fda.hhs.gov]
> Sent: Wednesday, February 04, 2009 11:13 AM
> To: Struts Users Mailing List
> Subject: Why is Validation not firing?
>
> Hello all,
>
> I must be missing something subtle about my configuration. I'm using
> Struts 2.0.11 and want to use annotation based validation, but can't
> seem to get it working.
>
> My action class has an update method as such:
> @Validation
> public class ArtifactAction extends BaseAction implements
> ModelDriven, Preparable, ServletRequestAware {
>
> ...
>
> @Validations( visitorFields = {...@visitorfieldvalidator(message =
> "Validation Error", fieldName = "model", appendPrefix = false)})
> public String update() throws Exception {
> artifactService.saveArtifact(artifact);
> return SUCCESS;
> }
> }
>
> The model class is marked as such:
>
> @Entity
> @Table(name = "ART", schema = "x")
> @Validation
> public class Artifact implements Identifiable, java.io.Serializable {
>
> ...
> @Lob
> @Column(name = "DESCRIPTION", nullable = false)
> @RequiredStringValidator(message="Validation
> Error",key="validate.notEmpty", trim=true)
> public String getDescription() {
> return this.description;
> }
>
> }
>
> And my struts.xml is configured to use an interceptor stack that should
> include validations:
>
> class="...web.struts.interceptor.AcegiInterceptor" name="acegi"/>
>
>
>
>name="validation.validateAnnotatedMethodOnly">true
>
>
>
>
>
> When I submit the form:
>
>method="post">
>
>name="description" required="true" />
>
>
>
>
>
>
>
>
> No validations fire. The update action does have an input result
> defined. What am I missing?
>
>
> Any help would be appreciated!
>
> MG
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
_
Stay up to date on your PC, the Web, and your mobile phone with Windows Live.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/