0

I have no clue why the index of this example is always empty:

<ui:repeat value="#{data.weekdays}" varStatus="day" step="1">
                <tr>
                    <td>
                        <p:selectBooleanCheckbox id="#{day.index}" value="#{data.weekdays[day.index].value}">
                        </p:selectBooleanCheckbox>
...

What's wrong with that code?

GarfieldKlon
  • 11,170
  • 7
  • 31
  • 33
  • But it displays the index when I write #{day.index} ... So why can't I use it in selectBooleanCheckbox as id? The documentation says something about the scope -> This scoped variable has nested visibility. But what does that mean exactly? – GarfieldKlon Jul 05 '18 at 14:35
  • See accepted answer in https://stackoverflow.com/questions/15114086/ui-repeat-varstatus-not-working-in-compositecomponent. The important part, EL-expressions in id attribute must be available at build time. – ChristophS Jul 05 '18 at 14:38

0 Answers0