}
@Override
public Widget cloneDisplay(Map<String, Object> data) {
FlowPanel display = new FlowPanel();
FBFormItem subItem = (FBFormItem) loopBlock.getWidget();
Object input = getInputValue(data);
String inputName = getInput() == null ? null : getInput().getName();
if (subItem != null && input != null && inputName != null) {
Map<String, Object> subData = new HashMap<String, Object>();
if (input.getClass().isArray()) {
Object[] arr = (Object[]) input;
for (Object obj : arr) {
subData.put(inputName, obj);
display.add(subItem.cloneDisplay(subData));
}
} else if (input instanceof Collection) {
Collection<?> col = (Collection<?>) input;
for (Object obj : col) {
subData.put(inputName, obj);
display.add(subItem.cloneDisplay(subData));
}
} else if (input instanceof Map) {
Map<?,?> map = (Map<?,?>) input;
for (Object obj : map.entrySet()) {
subData.put(inputName, obj);
display.add(subItem.cloneDisplay(subData));
}
}
}
display.setSize(getWidth(), getHeight());
super.populateActions(display.getElement());