0

I My xhtml code is this:

<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:f="http://xmlns.jcp.org/jsf/core"
    xmlns:p="http://primefaces.org/ui"
     xmlns:c="http://java.sun.com/jsp/jstl/core"
    xmlns:h="http://xmlns.jcp.org/jsf/html">

    <p:column headerText="Student">
              <p:repeat value="#{student.convertList()}" var="item" varStatus="index">
                    <h:outputText value="#{item.nameStudent}" id="#{index}" />
               </p:repeat>
            </p:column>

The method student.converList() is used because my Students are in a Set so I need to convert set in List:

public List<Student> convertList() {    
        return new ArrayList<Autori>(this.setStudent);
    }

it gives me:

Empty id attribute is not allowed

Anyone can help me?

Postilla
  • 161
  • 1
  • 1
  • 8
  • So this fails too? `` And if you can't use it, do you get an error or WW3 or? And don't do any work in getters... https://stackoverflow.com/questions/2090033/why-jsf-calls-getters-multiple-times and https://stackoverflow.com/questions/5765853/how-and-when-should-i-load-the-model-from-database-for-hdatatable – Kukeltje Jul 11 '19 at 09:02
  • Try my comment... Does that work... it will, so you **can** use the varStatus for an index... – Kukeltje Jul 11 '19 at 09:04
  • yes it gives me " Empty id attribute is not allowed" – Postilla Jul 11 '19 at 09:04
  • Tried the output text from my initial comment? And a searhengine already gives you the answer: https://www.google.com/search?client=firefox-b-d&q=jsf+Empty+id+attribute+is+not+allowed+repeat – Kukeltje Jul 11 '19 at 09:08

0 Answers0