tags:

views:

40

answers:

1

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 id for datatables is the same 'j_idt55:0:bar' but for panelGroups it grows (as should): 'j_idt55:0:foo', 'j_idt55:1:foo'. Why is it so?

+3  A: 

Because it's a bug in UIData#getClientId(). I've reported it as issue 1830.

BalusC
Cool, thanks for inspecting and reporting it. It occurs already with Mojarra 2.0.2, so maybe change that to the ticket.
Tuukka Mustonen
The version is just the max version wherein the occurrence is confirmed.
BalusC
Ah, right, of course... dumb me.
Tuukka Mustonen
No problem, you're welcome.
BalusC