Cufon font isn't applied for link generated with JSF EL expression when use message bundling
I'm trying to use Cufon js lib. to display specific font on web page.
jQuery is used also.<script language="javascript" src="resources/js/cufon-yui.js"/>
<script language="javascript" src="resources/js/Salaryman_400.font.js"/>
<script type="text/javascript">
Cufon.replace('.menu-text');
</script>
if link text obtained with EL #{m.decoys}
,which mean that it's value got from properties file in order to support i18n,that it doesn't work:
<h:outputLink value="#{request.contextPath}/decoys.jsf" class="menu-text">
<f:verbatim>#{m.decoys}</f:verbatim>
</h:outputLink>
after this text within <a>
wasn't displayed at all.
here is i18n setting in faces-config,they work without Cufon:
<applicatio开发者_如何学运维n>
<resource-bundle>
<base-name>msg_ru</base-name>
<var>m</var>
</resource-bundle>
</application>
if link text is obtained with other EL, eg. #{request.contextPath}
,that it's OK:
<h:outputLink value="#{request.contextPath}/decoys.jsf" class="menu-text">
<f:verbatim>#{request.contextPath}</f:verbatim>
</h:outputLink>
There's no such attribute "class" for h:outputLink. You should use "styleClass":
<h:outputLink value="#{request.contextPath}/decoys.jsf" styleClass="menu-text" id="cufId">
精彩评论