1

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:

<application>
        <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>
4

1 回答 1

0

h:outputLink 没有这样的属性“类”。你应该使用“styleClass”:

<h:outputLink value="#{request.contextPath}/decoys.jsf" styleClass="menu-text" id="cufId">
于 2011-01-26T10:54:01.260 回答