Hello,

I have an issue with the way Stripes handles fields localization: it makes 
me create many duplicate items in the resource bundle.


Let's say I have a TruckEntity having a ColorEntity and a CarEntity having a 
ColorEntity.
I have two actionBeans, one to manage a TruckEntity, and one to manage a 
CarEntity, which is a pretty common case.


class ManageTruckActionBean {
    @ValidateNested(
        @validate(field="color", required="true")
    )
    private TruckEntity myTruck;
}

class ManageCarActionBean {
    @ValidateNested(
       @validate(field="color", required="true")
    )
    private CarEntity myCar;
}


My StripesResources.properties will have to contain:

#main label, used in jsp
color=color
#duplicated used for ManageTruckActionBean validation
myTruck.color=Color
#duplicate used for ManageCarActionBean validation
myCar.color=Color
....

As ne name attribute of @Validate is not Localized, I can't use it.

Is there a way to avoid having ten times each label because of @validation ?

It would be great if getLocalizedFieldName could look for:
-beanClassFQN.fieldName
-actionPath.fieldName
-fieldName (as said by the documentation)
-"real"  fieldName (=after last dot)

Is there another way to avoid duplicated ?

thanks 




------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to