repeat « Datatable « JSF Q&A

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


<ui:repeat var="obj" value="#{demo2Bean.someList}">
    <h:panelGroup id="foo" />
    <h:dataTable id="bar" />
<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 ...

2. h:dataTable nested in ui:repeat, updating of inputText values not working

I render an ArrayList (menu.specifications) containing custom objects (POJOs) in several h:dataTables on the same page. Each h:dataTable contains a different range of the elements of the ArrayList. One column contains ...

3. h:dataTable inside ui:repeat, how specify render id from f:ajax?

I have:

<ui:repeat id="projectsTable" var="project" value="#{projectsBacking.projectList}">
  <h:dataTable id="usersAssignedToProject#{}" var="appUser" value="#{projectsBacking.getAllUsersAssignedToProject(project)}">
      <h:outputText value="#{appUser.getUsername()}"/>