Why JSF composite component doesn't work inside a ui:repeat?

65 views Asked by At

I have the following composite component:

<!-- INTERFACE -->
<cc:interface>
</cc:interface>

<!-- IMPLEMENTATION -->
<cc:implementation>
    <h:outputText id="noidhere_#{cc.id}" value="#{cc.id}" />
    <br />
</cc:implementation>

And it's usage:

<!-- Here works fine -->
<custom:example id="staticId" /> 
<ui:repeat varStatus="status" value="#{sampleBean.values}" var="val">
     <!-- but here doesn't -->
     <custom:example id="#{status.index}" /> :::: #{status.index}
</ui:repeat>

In this case the output will be the following:

staticId 
test_ :::: 0 
test_ :::: 1

As you can see, the composite component doesn't get rendered with the passed id attribute. My expected output would be something like this:

staticId 
test_0 :::: 0 
test_1 :::: 1

I also tried to use the val attribute to check if it is a problem with the status.index itself, but I had the same problem.

It was tested using Mojarra 2.2.7 Am I missing something, or is it a bug ?

0

There are 0 answers