I am currently trying to localize some binary constraints, which seems plain impossible. All descendants of AbstractBinaryConstraint (e.g. EqualTo, LessThan, GreatherThan, ...) are not localized via the Spring-RCP mechanisms.
I wrote a exact copy of the class (deriving was impossible due to the structure of the original class), which implements TypeResolvable. Anyway, this had no effect on the error message. I then overwrote the toString-method, which brought my hardcoded messageKey into the GUI:
In combination with the pet clinic sample [add("birthDate", lt(new Date()))], this will bring the string "test.string.foo.bar" into the error message (in front of the current date).Code:public class LessThanI18n extends ComparisonBinaryPredicate implements BinaryConstraint { [...] public String toString() { return "test.string.foo.bar"; } public String getType() { return "test.gettype.foo.bar"; } [...] }
Anyway, entering a value for this key into the resource bundle had no effect. So I'm stuck right now, seems like I should file a bug report - or did I overlook something anyone of you already knows?


Reply With Quote
