【发布时间】:2013-04-05 07:55:00
【问题描述】:
我正在“国际化”我的应用程序,它基于 SEAM 2 / JSF 1.2
让我烦恼的一件事是在消息包中有 HTML 标记,如果可能,我想避免这种情况,例如我有以下 HTML
<p>Click <span class="link" id="trigCl">here</span> to register your account.</p>
我想将其分解为以下内容:
<h:outputFormat escape="false" value="#{messages['registerAccountText']}">
<f:param value="<span class='link' id='trigCl'>#{messages['here']}</span>" />
</h:outputFormat>
使用以下捆绑条目:
registerAccountText=Click {0} to register your account.
但正如你猜到的那样,我得到以下内容......
The value of attribute "value" associated with an element type "f:param" must not contain the '<' character.
是否有 a) 解决此问题的方法,或 b) 解决此问题的更好方法(不涉及完全重写标记)?
【问题讨论】:
-
不确定这里是否有更好的方法,但这听起来像是开发新组件的绝佳机会?
-
我怕有人这么说!您能推荐我可以使用的任何好的资源/示例(JSF 1.2)吗?
标签: jsf internationalization seam jsf-1.2