복합 구성 요소를 사용하여 자체 selectManyCheckbox를 만들려고합니다. 그러나 내 자신의 selectItem 구성 요소를 사용하려고하면 항목이 렌더링되지 않습니다.f : 복합 구성 요소 내에서 selectItem
selectItem.xhtml :
<cc:implementation>
<f:selectItem rendered="true" id="#{cc.attrs.id}"
itemDescription="#{cc.attrs.itemDescription}"
itemDisabled="#{cc.attrs.itemDisabled}"
itemLabel="#{cc.attrs.itemLabel}" itemValue="#{cc.attrs.itemValue}"
value="#{cc.attrs.value}">
</f:selectItem>
</cc:implementation>
selectManyCheckbox.xhtml : 나는
<mycomps:selectManyCheckbox id="abc" labelString="Example">
<mycomps:selectItem itemValue="1" itemLabel="One" />
</mycomps:selectManyCheckbox>
를 사용하는 경우
<!--Some other stuff like label -->
<h:selectManyCheckbox styleClass="#{cc.attrs.styleClass}"
id="#{cc.attrs.id}_checkbox" value="#{cc.attrs.value}"
layout="pageDirection">
<cc:insertChildren />
</h:selectManyCheckbox>
그것은 작동하지 않습니다. 하지만 내가 사용할 때
<mycomps:selectManyCheckbox id="abc" labelString="Example">
<f:selectItem itemValue="1" itemLabel="One" />
</mycomps:selectManyCheckbox>
그렇습니다! 아무도 내가이 문제를 어떻게 해결할 수 있을지 생각해?
감사합니다.
그런 복합 구성 요소에서''1 : 1을 래핑하는 것이 어렵습니다. 여기서 정확하게 개선 된 부분은 무엇입니까? –
BalusC
다른 코드를 생략했습니다 – Zinnsoldat