UIComponent columnComp = null;
String value = null;
Object eventVal = null;
values = getColumnPropertyValues(ctx, desc, COLUMN_VALUE_KEY, parent);
int idx = 0;
ComponentUtil compUtil = ComponentUtil.getInstance(ctx);
for (LayoutComponent columnDesc : columns) {
columnComp = compUtil.createChildComponent(
ctx, columnDesc, comp);
value = "" + values.get(idx++);
eventVal = desc.dispatchHandlers(ctx,
CreateChildEvent.EVENT_TYPE,
new CreateChildEvent(columnComp, value));
if ((eventVal != null) && (eventVal instanceof UIComponent)) {
// Add the child created during the event.
columnComp.getChildren().add((UIComponent) eventVal);
} else {
// Create the column (value) child
// The child of each TableColumn will be a LayoutStaticText for now...
compUtil.createChildComponent(ctx,
new LayoutStaticText(columnDesc,
columnDesc.getUnevaluatedId() + CHILD_SUFFIX, value),
columnComp);
}
}