I have a java class named Test which has an attribute Integer id
(auto-increment). It's initialized with value 1.
In my xhtml file I want to give every column I create, the id from the java bean class.
And in another class (java bean class) named AnotherClass with annotation :
@ManagedBean(name = "myClass")
@ApplicationScoped
And I have a list of Test in this class.
This is what I tried to do, but it doesn't recognize integers as value for id attributes. In the documentation it says that only strings are allowed. How can I proceed ?
<c:forEach items="#{myclass.list}" var="test">
<p:column id="#{test.id}" headerText="#{test.header}">
</c:forEach>