I'm using jstl tags whereever I can. I want to i18n my buttons, and so I tried this:
<%@ taglib uri="/WEB-INF/lib/struts-html-el.tld" prefix="html" %>
<html:form action="/details">
<!-- other fields-->
<html:submit value="${<fmt:message key="todo.editSaveButton bundle=${loc}/>}"/>
</html:form>


I get:
/WEB-INF/pages/details.jsp(4,69) equal symbol expected
Lose the ${} I get the same error.
No ${} escape the inner " like so:
<html:submit value="<fmt:message key=\"todo.editSaveButton\" bundle=${loc}/>}"/>
my button has the label <fmt:message key= , not what I was looking for.


I have a work-around as follows:
<%@ taglib uri="/WEB-INF/lib/struts-html-el.tld" prefix="html" %>
<c:set var="saveCaption" scope="page">
<fmt:message key="todo.editSaveButton" bundle="${loc}"/>
</c:set>
 <html:form action="/details" method="post" focus="activity">
<html:submit value="${saveCaption}"/>
 </html:form>

Somehow this seems like too much work. Is there a simpler way to get localized values for submit and reset buttons?





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to