Why doesn't h: dataTable inside ui: repeat get the correct ID?

the code:

<ui:repeat var="obj" value="#{demo2Bean.someList}">
    <h:panelGroup id="foo" />
    <h:dataTable id="bar" />
</ui:repeat>

Result:

<span id="j_idt55:0:foo"></span>
<table id="j_idt55:0:bar"><tbody><tr><td></td></tr></tbody></table>
<span id="j_idt55:1:foo"></span>
<table id="j_idt55:0:bar"><tbody><tr><td></td></tr></tbody></table>

As you can see, the identifier for datatables is the same "j_idt55: 0: bar", but for panel groups it grows (as it should): "j_idt55: 0: foo", "j_idt55: 1: foo". Why is this so?

+3
source share
1 answer

Because this is a mistake UIData#getClientId(). I reported this as issue 1830 .

+5
source

All Articles