3

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?

Tuukka Mustonen
  • 4,722
  • 9
  • 49
  • 79
  • might be a bug. Try upgrading to the latest releasy – Bozho Oct 07 '10 at 11:44
  • Running Mojarra 2.0.2, I actually bumped into a possible (blocker) bug with Mojarra 2.0.3 (https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1825). Guess I should try this with a clean project? – Tuukka Mustonen Oct 07 '10 at 11:59

1 Answers1

5

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

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555