struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kibo <>
Subject Validate associate Map
Date Sat, 16 Aug 2008 10:05:00 GMT

Hi konference

How can I validate classes which are associated in collection.
The class "Page" contents Map with "PageText" classes:
private Map<LanguageName, PageText> texts = new HashMap();

 ... getter / setter
private String description;

@StringLengthFieldValidator(message="Length too short",
key="validate.minLength.6", trim=true, mimLength = "6")
    public void setDescription(String description) {
        this.description = description;
private Page page; 

//it work but I need validate all classes in Map, not only ['en']
 @Validations( visitorFields = {
                message = "Default message", key = "i18n.key",
                fieldName= "page.texts['en']", appendPrefix = false) } 
    public String execute() throws Exception{                                            

        return Action.SUCCESS;


When I set: fieldName= "page.texts['en']" it work, but in Map are a lots of
I need validate all class in collection.
When I set only: fieldName= "page.texts" it dont work.
I need set something of : fieldName= "page.texts[*]" but it dont work.

How can I determine in attribute fieldName as to validate all classes in
"page.texts" ?
Is it possible or I must resolve it otherwise?

Thanks a lot

Tomas Jurman
Czech Republic
View this message in context:
Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message