On Fri, 2006-01-20 at 11:22 +0100, Enrique Medina wrote: > I have been implementing the dynamic creation of my tree component as > you mentioned, i.e. adding all the components to their parents before > calling getClientId(). > > But it seems that there is something more to do, looking at the > generated code: > > <input id="tablaEdicionPuntuaciones0_0:_id30_0:_input"
The extra _0 is because this input component is in the 0th row of a table. A table is also a naming container. In order to get the id for a component in a particular row of a table, call tableComponent.setRowIndex(index); someChildComponentOfTable.getClientId(facesContext); Normally the above is not necessary, as it's done implicitly by the framework; the renderer for some component in a table is called once for each row of the table, and the component's clientId is set at that time. That's the normal JSF way of rendering: let the framework make calls into the renderer with everything configured correctly. If you're somehow driving rendering while bypassing the normal flow you'll need to ensure the rowIndex is set correctly. If you're not getting the "_0" row bit, then clearly your rendering code is not being called in the "normal rendering flow". Regards, Simon