src/main/java/org/efaps/ui/wicket/models/objects/UITable.java
private void execute4NoInstance()
        throws EFapsException
    {
        final List<Field> fields = getUserSortedColumns();
        final List<Integer> userWidthList = getUserWidths();
        int i = 1;
        for (final Field field : fields) {
            if (field.hasAccess(getMode(), getInstance(), getCommand(), getInstance())
                            && !field.isNoneDisplay(getMode()) && !field.isHiddenDisplay(getMode())) {
                SortDirection sortdirection = SortDirection.NONE;
                if (field.getName().equals(getSortKey())) {
                    sortdirection = getSortDirection();
                }
                final FieldConfiguration fieldConfig = new FieldConfiguration(field.getId());
                final UITableHeader headermodel = new UITableHeader(this, fieldConfig, sortdirection, null);
                headermodel.setSortable(false);
                headermodel.setFilter(false);
                getHeaders().add(headermodel);
                if (!fieldConfig.isFixedWidth()) {
                    if (userWidthList != null
                                    && (isShowCheckBoxes() && i + 1 < userWidthList.size()
                                                    || !isShowCheckBoxes() && i < userWidthList.size())) {
                        if (isShowCheckBoxes()) {
                            headermodel.setWidth(userWidthList.get(i + 1));
                        } else {
                            headermodel.setWidth(userWidthList.get(i));
                        }
                    }
                    setWidthWeight(getWidthWeight() + fieldConfig.getWidthWeight());
                }
                i++;
            }
        }
        final Type type = getTypeFromEvent();
        final UIRow row = new UIRow(this);
        Attribute attr = null;

        for (final Field field : fields) {
            if (field.hasAccess(getMode(), getInstance(), getCommand(), getInstance())
                            && !field.isNoneDisplay(getMode())) {
                attr = null;
                if (type != null) {
                    if (field.getAttribute() != null) {
                        attr = type.getAttribute(field.getAttribute());
                    } else if (field.getSelect() != null) {
                        final PrintQuery print = new PrintQuery(Instance.get(type, 0));
                        print.addSelect(field.getSelect());
                        print.dryRun();
                        attr = print.getAttribute4Select(field.getSelect());
                    }
                }
                final UIField uiField = new UIField(this, null,  UIValue.get(field, attr, null)
                                .setInstance(getInstance()).setClassObject(this).setCallInstance(getInstance()));
                if (field.isHiddenDisplay(getMode())) {
                    row.addHidden(uiField);
                } else {
                    row.add(uiField);
                }
            }
        }
        this.values.add(row);

        if (getSortKey() != null) {
            sort();
        }
    }
private void execute4NoInstance()
        throws EFapsException
    {
        final List<Field> fields = getUserSortedColumns();
        final List<Integer> userWidthList = getUserWidths();
        int i = 1;
        for (final Field field : fields) {
            if (field.hasAccess(getMode(), getInstance(), getCommand(), getInstance())
                            && !field.isNoneDisplay(getMode()) && !field.isHiddenDisplay(getMode())) {
                SortDirection sortdirection = SortDirection.NONE;
                if (field.getName().equals(getSortKey())) {
                    sortdirection = getSortDirection();
                }
                final FieldConfiguration fieldConfig = new FieldConfiguration(field.getId());
                final UITableHeader headermodel = new UITableHeader(this, fieldConfig, sortdirection, null);
                headermodel.setSortable(false);
                headermodel.setFilter(false);
                getHeaders().add(headermodel);
                if (!fieldConfig.isFixedWidth()) {
                    if (userWidthList != null
                                    && (isShowCheckBoxes() && i + 1 < userWidthList.size()
                                                    || !isShowCheckBoxes() && i < userWidthList.size())) {
                        if (isShowCheckBoxes()) {
                            headermodel.setWidth(userWidthList.get(i + 1));
                        } else {
                            headermodel.setWidth(userWidthList.get(i));
                        }
                    }
                    setWidthWeight(getWidthWeight() + fieldConfig.getWidthWeight());
                }
                i++;
            }
        }
        final Type type = getTypeFromEvent();
        final UIRow row = new UIRow(this);
        Attribute attr = null;

        for (final Field field : fields) {
            if (field.hasAccess(getMode(), getInstance(), getCommand(), getInstance())
                            && !field.isNoneDisplay(getMode())) {
                attr = null;
                if (type != null) {
                    if (field.getAttribute() != null) {
                        attr = type.getAttribute(field.getAttribute());
                    } else if (field.getSelect() != null) {
                        final PrintQuery print = new PrintQuery(Instance.get(type, 0));
                        print.addSelect(field.getSelect());
                        print.dryRun();
                        attr = print.getAttribute4Select(field.getSelect());
                    }
                }
                final UIField uiField = new UIField(this, null,  UIValue.get(field, attr, null)
                                .setInstance(getInstance()).setClassObject(this).setCallInstance(getInstance()));
                if (field.isHiddenDisplay(getMode())) {
                    row.addHidden(uiField);
                } else {
                    row.add(uiField);
                }
            }
        }
        this.values.add(row);

        if (getSortKey() != null) {
            sort();
        }
    }
Executes this model for the case that no instance is given. Currently
only create!

@throws EFapsException on error