public boolean getRendersChildren() {
return true;
}
public void encodeChildren(FacesContext context, UIComponent component) throws IOException {
final UIRepeat repeater = (UIRepeat) component;
try {
DataVisitor visitor = new DataVisitor() {
public DataVisitResult process(FacesContext context, Object rowKey, Object argument) {
repeater.setRowKey(context, rowKey);
if (repeater.isRowAvailable()) {
if (repeater.getChildCount() > 0) {
try {
for (UIComponent child : repeater.getChildren()) {
child.encodeAll(context);
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
return DataVisitResult.CONTINUE;
}
};
repeater.walk(context, visitor, null);
} finally {
repeater.setRowKey(context, null);
}
}