2013-06-28 35 views
2

我有JSF 2.2應用UI:重複JSF 2.2是工作,但呈現

和我渲染麗列表這樣

<ui:repeat var="item" value="#{handler.list}"> 
    <li><h:outputLink value="#{urlHandler.getUrl(item)}">#{item.title}</h:outputLink></li> 
</ui:repeat> 

但不知何故,它呈現給

<ul class="breadcrumbs"> 
    <ui:repeat><li><a href="xxx">l1</a></li></ui:repeat> 
    <ui:repeat><li><a href="xxx">123</a></li></ui:repeat> 
</ul> 

我正在使用

<dependency> 
     <groupId>com.sun.faces</groupId> 
     <artifactId>jsf-api</artifactId> 
     <version>2.2.0</version> 
    </dependency> 
    <dependency> 
     <groupId>com.sun.faces</groupId> 
     <artifactId>jsf-impl</artifactId> 
     <version>2.2.0</version> 
    </dependency> 

任何想法爲什麼呢?

編輯命名空間:

<html xmlns="http://www.w3.org/1999/xhtml" 
xmlns:ui="http://xmlns.jcp.org/jsf/facelets" 
xmlns:f="http://xmlns.jcp.org/jsf/core" 
xmlns:h="http://xmlns.jcp.org/jsf/html" 
xmlns:p="http://primefaces.org/ui" 
xmlns:fn="http://xmlns.jcp.org/jsp/jstl/functions" 
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> 
+0

您使用哪一種XML命名空間'ui'一個錯誤? – BalusC

+2

如果使用原始的'http:// java.sun.com/jsf/facelets' XML命名空間怎麼辦? (將其他人更改爲'java.sun.com'域)到目前爲止,您並不是第一個遇到新XML命名空間的奇怪問題的人。 – BalusC

+0

確定舊ns一切正常,我應該在所有html文件中使用舊的ns? – wutzebaer

回答

2

這是現在固定在最新的2.2.2-SNAPSHOT

+0

我現在可以在任何地方使用新的命名空間嗎?還是存在已知的問題? – wutzebaer

+0

我正在使用最新的2.2.2快照開發我的項目,我強烈建議您等待。我不斷遇到錯誤。我建議等到MyFaces發佈後,至少你有一個選擇,如果你被阻止;) –

+0

好吧,我已經回滾到2.1,因爲缺少支持primefaces – wutzebaer