private DataModel<?> createDataModel() {
        Object value = getValue();

        if (value == null) {
            return EMPTY_MODEL;
        }
        else if (value instanceof DataModel) {
            return (DataModel<?>) value;
        }
        else if (value instanceof List) {
            return new ListDataModel<>((List<?>) value);
        }
        else if (OBJECT_ARRAY_CLASS.isAssignableFrom(value.getClass())) {
            return new ArrayDataModel<>((Object[]) value);
        }
        else if (value instanceof Collection) {
            return new CollectionDataModel<>((Collection<?>) value);
        }
        else if (value instanceof Iterable) {
            return new IterableDataModel<>((Iterable<?>) value);
        }
        else if (value instanceof ResultSet) {
            return new ResultSetDataModel((ResultSet) value);
        }
        else if (value instanceof Map) {
            return new IterableDataModel<>(((Map<?, ?>) value).entrySet());
        }
        else {
            return new ScalarDataModel<>(value);
        }
    }
Handle case where this table is nested inside another table. See method getDataModel for more details.
<p>
Key: parentClientId (aka rowId when nested within a parent table) Value: DataModel
primefaces/src/main/java/org/primefaces/component/api/UITabPanel.java