At first glance everything would seems correctly configured (except
for that unnecessary RequiredFieldValidator).
Did you try it in a more recent version (like 2.2.1)?


2010/12/9 RogerV <roger.var...@googlemail.com>:
>
>
> Maurizio Cucchiara wrote:
>>
>> Sorry,
>> I meant annotated *classes*
>>
>
> Sure, BaseAction - all other actions extend this;
>
> @ParentPackage(value = "admin")
> @Result(name="start",location="add-new-user-flow.jsp")
> public class AddNewUserFlow extends ActionSupport implements SessionAware,
> Preparable,
>                                                                               
>                                  ValidationAware {
>
>        private static final long serialVersionUID = 1L;
>        private Map<String, Object> session;
>        private NewUserDTO newUserDto;
>
>       �...@override
>        public void prepare() throws Exception {
>                newUserDto = (NewUserDTO) session.get("NEWUSERDTO");
>        }
>
>       �...@action(value="start-create-user")
>        public String startConversation() {
>                newUserDto = new NewUserDTO();
>                session.put("NEWUSERDTO", newUserDto);
>                return "start";
>        }
>
>
>       �...@override
>        public void setSession(Map<String, Object> session) {
>                this.session = session;
>        }
>
>
>       �...@visitorfieldvalidator(appendPrefix=true, message="my message")
>        public NewUserDTO getNewUserDTO() {
>                return newUserDto;
>        }
>
>
>        public void setNewUserDto(NewUserDTO addNewUserDto) {
>                this.newUserDto = addNewUserDto;
>        }
>
>        public Map<String, Object> getSession() {
>                return session;
>        }
>
> }
>
>
> The NewUserDTO
>
> public class NewUserDTO {
>
>        private String userName;
>        private String email;
>        private int serialNumber;
>        private List<License> licenses;
>        private Authority authority;
>        private Password password;
>
>   �...@autowired
>    private UserJpaController userdao;
>
>    public NewUserDTO() {
>        this.licenses = new ArrayList<License>();
>    }
>
>        public String getUserName() {
>                return userName;
>        }
>       �...@requiredfieldvalidator(message="User Name is required")
>       �...@requiredstringvalidator(message="User Name is required")
>        public void setUserName(String userName) {
>                this.userName = userName;
>        }
>
> ... more getters & setters.
> --
> View this message in context: 
> http://old.nabble.com/%40VisitorFieldValidator-message-formatting-question.-tp30405050p30417733.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



-- 
Maurizio Cucchiara

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

Reply via email to