I'm trying to do something I would expect to be relatively easy. Essentially I have an object that looks like this:
public class Attribute {
public UIInput getInput();
public void setInput(UIInput input);
public String getName();
public void setName(String name);
}
I have a List of these on a bean, and I'm trying to iterate through the list and display it.
Here's an example (I've also tried p:dataTable)
<ui:repeat value="#{someBean.attributes}" var="a">
<div>#{a.name} <ui:fragment binding="#{a.input}" /> </div>
</ui:repeat>
However ui:fragment doesn't work that way, it is binded before the Request Value stage (apparently). I've also tried creating a backing DataTable and adding data that way, but it seems like I can't add custom rows with this methodology:
for (Attribute attr : bean.getAttributes) {
Row r = new Row();
r.setCell(0, attr.getName());
r.setCell(1, attr.getInput());
table.getRows().add( r );
}
I've searched this to death, and I can't find anything! I wanted to avoid writing my own Component which is just a wrapper to another component... but If I have to go down that road I will.