struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From roger <roger.var...@googlemail.com>
Subject Problem with @ConversionErrorFieldValidator
Date Thu, 22 Sep 2011 07:56:28 GMT
Hi

In my struts 2 action I'm using the @VistorFieldValidator

@VisitorFieldValidator(message="",appendPrefix=true)
public Rma getRma() {
	return rma;
}

and within the RMA class I'm using 

	@ConversionErrorFieldValidator(message = "Serial Number must be numeric",
shortCircuit=true) 
	public void setSerialNumber(int serialNumber) {
		this.serialNumber = serialNumber;
	}

When I try to enter a non-numeric value into the serialNumber in my .jsp
page I'm getting two
fielderror messages returned.

"Invalid Field Value for field 'rma.serialNumber.'" and "Serial Number must
be numeric". I'm assuming that the first message is generated by the inbuilt
conversion routines. Is it possible to suppress the generation of this
message or am I going to have to override getFieldErrors() in my action to
remove them?

Regards


--
View this message in context: http://struts.1045723.n5.nabble.com/Problem-with-ConversionErrorFieldValidator-tp4829326p4829326.html
Sent from the Struts - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message