How to display @ScriptAssert message in Spring Velocity view?
pI have a class called Member, and it has this at the top:/p
precode@ScriptAssert( lang = MiscConstants.JAVASCRIPT, script =
(_this.password != null amp;amp; _this.passwordConfirmation != null
amp;amp; _this.password.equals(_this.passwordConfirmation)), message =
TranslationConstants.PASSWORDS_MUST_MATCH ) /code/pre pThis class is used
in form binding in Spring MVC./p pThe rule itself is working, strongbut
I'm not seeing what I hoped as an error message in my Velocity
view/strong./p pWhat I see in red is: ScriptAssert. What I hoped to see
was the translation of this key:
TranslationConstants.PASSWORDS_MUST_MATCH./p pThis is in my Velocity view
file:/p precode#springBind(signupForm) #if($status.errors.hasErrors())
#foreach($e in $status.errorCodes) lt;div class=form-errorgt; lt;div
class=alert alert-errorgt;$elt;/divgt; lt;/divgt;
No comments:
Post a Comment