I have JSP code like:
<div class="formRow"> <form:input id="email_email" name="email_email" title="XXXXX"/>" path="email" cssClass="input required email" /> <form:errors path="email" cssClass="error" /> </div>
I want to set the title
attribute with some tooltip text, supporting i18n. How would I do this?
I am looking to do something like this:
<div class="formRow"> <form:input id="email_email" name="email_email" title="<spring:message code="tooltip.text" />"/>" path="email" cssClass="input required email" /> <form:errors path="email" cssClass="error" /> </div>
<spring:message code="tooltip.text" var="variable1"/> <form:input id="email_email" name="email_email" title="${variable1}" path="email" cssClass="input required email" />
You can't use a tag inside an attribute: But you can use the above. It works fine.
You can't use a tag inside a tag, simply. You can do something like this,
<spring:message code="tooltip.text" var="i18nTooltip"/> <form:input id="email_email" name="email_email" title="${i18nTooltip}" path="email" cssClass="input required email" />
P.S. Better use ${i18nTooltip}
, instead of, i18nTooltip
, to avoid confusion.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With