struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alberto A. Flores" <aaflo...@gmail.com>
Subject Re: How to change automatic type conversion error message
Date Fri, 16 May 2008 11:37:37 GMT
Read the section "Type Conversion Error Handling" in:

http://struts.apache.org/2.x/docs/type-conversion.html

You need to define an "invalid.fieldvalue.<your property>" to do custom 
type conversion error.

Arpan Debroy wrote:
> In my application  "id" attribute is int type of "Group" bean.
> 
> In my JSP I have written like that :-
> 
> <s:textfield name="group.id" value="%{group.id}"/>
> 
> Now if user puts a string into this text field, then error message come like
> that
> 
> *invalid value for the field group.id
> 
> But I want to show the error message with only "id" not "group.id".
> 
> Is there anybody, who can show me any example how to do that.
> *
> 

-- 

Alberto A. Flores
http://www.linkedin.com/in/aflores



Mime
View raw message