id of ui:repeat
Asked Answered
M

1

7

How can i set the id of ui:repeat

Structure of my code is

Tabview
  ui : repeat 
     dattable
       column
          checkbox

I am getting the id of checkbox as

tabViewId:0:j_idt45:0:dataTableId:0:checkBoxId

It contains 7 things which are

id of tabview
active tab
ui:repeat id
index of ui:repeat
id of dattable
row of dattable
id of checkbox

i want to assign id of ui:repeat so that it does not chooses it on its own.

How can i set the id of ui:repeat, say

repeatId

instead of j_idt45

Mciver answered 29/3, 2012 at 7:17 Comment(0)
E
10

You should try:

<ui:repeat id="repeatId" ...

(it is undocumented but it works in both Mojarra and MyFaces).

Elihu answered 29/3, 2012 at 8:51 Comment(5)
Thanks Adam :) :) :) . It worked. But this kind of things should be properly documented.Mciver
Just to note: I've tried to use this combined with <ui:repeat varStatus="val">. In one of the components inside <ui:repeat> i had id="value#{val.index}". Unfortunately the ValueExpression is not evaluated and the result is only value.Botheration
Nice idea. But did not work in Primefaces 6.0 (JSF 2.2)? Any help please?Alible
This also works in MyFaces. I edited to add that fact.Rhiannonrhianon
Whoa. Nice one. Works in JSF 2.2 using PF 7.0.Bernina

© 2022 - 2024 — McMap. All rights reserved.