我有JSF-2.0模板機制的問題。我實現了一些包含在模板文件中的代碼段 。但我的一個片段包含動態內容。更改通過JSF-2.0模板包含的代碼片段的動態部分
我沒有收到錯誤。但是我的snipplet中沒有任何東西被替換! 結果只包含「找不到鏈接列表」字符串。有人知道爲什麼嗎?
感謝
的代碼片段
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets">
<div>
<ui:insert name="linkList">No link list could be found</ui:insert>
</div>
© MyCompany
</ui:composition>
模板代碼
...
<div class="footer">
<ui:insert name="footer">Footer</ui:insert>
</div>
...
其中指定模板內容
...
<ui:define name="footer">
<ui:include src="/snippets/footer.xhtml" />
</ui:define>
...
<ui:define name="linkList">
link structure for the footer
</ui:define>
相關:http://stackoverflow.com/questions/4792862/how-to-include-another-xhtml-in-xhtml-using-jsf-2-0-facelets''需要一個' '。 –
BalusC