0
在一個非常簡單的方法裏所要求outputLabel沒有標記,這裏是一個複合:號碼:當目標輸入是複合
<ui:component
xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:cc="http://xmlns.jcp.org/jsf/composite"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:fn="http://xmlns.jcp.org/jsp/jstl/functions"
xmlns:p="http://primefaces.org/ui"
>
<cc:interface>
<cc:attribute name="value" />
<cc:attribute name="required" />
<cc:editableValueHolder name="calendar" />
</cc:interface>
<cc:implementation>
<p:calendar id="calendar" value="#{cc.attrs.value}" required="#{cc.attrs.required}" showOn="button"/>
</cc:implementation>
</ui:component>
在這裏,我如何使用它:
<p:outputLabel for="rat:calendar" value="Hello" />
<my:calendar id="rat" required="true"/>
一個必需=應該顯示真正的圖標,但不是。在OutputLabelRenderer中看起來很好,除了第118行外,input.isRequired()在我明確設置true時返回false。我不認爲這是關係到Primefaces但看起來像一個JSF的問題(我用鑽嘴魚科2.2.13和2.2.4的MyFaces轉載以及)由MyFaces的提供
問題實際上是在PrimeFaces中。 – BalusC
據他們說,這不是PF問題https://github.com/primefaces/primefaces/issues/1633 – Rapster
此外,我用'h:outputText'重現了這個問題 – Rapster