了解jsfc属性

时间:2011-07-08 17:29:53

标签: html css jsf-2 facelets

我需要有关Facelets的帮助,特别是HTML标记中的jsfc属性。如果以下内容有效,我很难理解。

<head jsfc="h:head">
    <ui:insert name="head"/>
    <base href="http://localhost:8080/Jerel-Baker/"/>
        <link jsfc="h:link" rel='stylesheet' type='text/css' href='styles/style.css'/>
        <link jsfc="h:link" rel='stylesheet' media='screen and (max-width: 700px)' href='styles/narrow.css'
              type="text/css"/>
        <link rel='stylesheet' media='screen and (min-width: 701px) and (max-width: 900px)'
              href='styles/medium.css' type="text/css"/>
        <link rel='stylesheet' media='screen and (min-width: 901px)' href="styles/wide.css" type="text/css"/>
        <title>#{msg.title}</title>
</head>

当我在每个链接元素中放置jsfc="h:link"时,不会呈现css。我非常感谢任何帮助。

1 个答案:

答案 0 :(得分:3)

我不确定在普通的vanilla输出组件中使用jsfc是多么有用。至少,HTML <link rel="stylesheet">是由<h:link>代表的JSF 而不是,而是<h:outputStylesheet><h:link>呈现HTML <a>元素。从技术上讲,您应该使用jsfc="h:ouputStylesheet"代替。我只是摆脱了属性,因为它在这里没有增加任何额外的东西。