【发布时间】:2017-05-17 08:59:50
【问题描述】:
我需要一些占位符来自动填充我的资源包。
我的应用程序的用户有两种可能的配置,例如“1”和“2”。根据此配置,应返回具有正确值的条目。
我知道,条件是可能的:
currentConfig=The configuration is currently the {0,choice,0#first|1#second}
在我的 faces-config.xml 中,资源包配置为在 JSF 中访问。
现在,我想在不指定参数的情况下在 JSF 中获取这个值:
<h:outputText value="#{res.currentConfig}"/>
如果用户配置了“1”,则返回第一个值,否则返回第二个值。
with configuration "1": The configuration is currently the first.
with configuration "2": The configuration is currently the second.
这可以独立于 JSF 页面实现吗?
【问题讨论】:
标签: jsf jakarta-ee jsf-2 resourcebundle