protected void load(final List<Instance> _instance)
        throws EFapsException
    {
        if (CollectionUtils.isNotEmpty(_instance)) {
            /** The factories. */
            final Map<Long, JSField> jsFields = new HashMap<>();

            final MultiPrintQuery multi = new MultiPrintQuery(_instance);
            for (final GridColumn column : this.columns) {
                final Field field = column.getField();
                if (field.getSelect() != null) {
                    multi.addSelect(field.getSelect());
                } else if (field.getAttribute() != null) {
                    multi.addAttribute(field.getAttribute());
                } else if (field.getPhrase() != null) {
                    multi.addPhrase(field.getName(), field.getPhrase());
                } else if (field.getMsgPhrase() != null) {
                    multi.addMsgPhrase(new SelectBuilder(getBaseSelect4MsgPhrase(field)), field.getMsgPhrase());
                }
                if (field.getSelectAlternateOID() != null) {
                    multi.addSelect(field.getSelectAlternateOID());
                }
                if (field.containsProperty(UITableFieldProperty.SORT_SELECT)) {
                    multi.addSelect(field.getProperty(UITableFieldProperty.SORT_SELECT));
                } else if (field.containsProperty(UITableFieldProperty.SORT_PHRASE)) {
                    multi.addPhrase(field.getProperty(UITableFieldProperty.SORT_PHRASE), field.getProperty(
                                    UITableFieldProperty.SORT_PHRASE));
                } else if (field.containsProperty(UITableFieldProperty.SORT_MSG_PHRASE)) {
                    multi.addMsgPhrase(field.getProperty(UITableFieldProperty.SORT_MSG_PHRASE));
                }
            }
            multi.executeWithoutAccessCheck();
            while (multi.next()) {
                final GridRow row = new GridRow(multi.getCurrentInstance());
                this.values.add(row);
                for (final GridColumn column : this.columns) {
                    final Field field = column.getField();
                    final Instance instance = evaluateFieldInstance(multi, field);
                    Object value = null;
                    Object sortValue = null;
                    Attribute attr = null;
                    if (field.getSelect() != null) {
                        value = multi.<Object>getSelect(field.getSelect());
                        attr = multi.getAttribute4Select(field.getSelect());
                    } else if (field.getAttribute() != null) {
                        value = multi.<Object>getAttribute(field.getAttribute());
                        attr = multi.getAttribute4Attribute(field.getAttribute());
                    } else if (field.getPhrase() != null) {
                        value = multi.getPhrase(field.getName());
                    } else if (field.getMsgPhrase() != null) {
                        value = multi.getMsgPhrase(new SelectBuilder(getBaseSelect4MsgPhrase(field)), field
                                        .getMsgPhrase());
                    }
                    if (field.containsProperty(UITableFieldProperty.SORT_SELECT)) {
                        sortValue = multi.getSelect(field.getProperty(UITableFieldProperty.SORT_SELECT));
                    } else if (field.containsProperty(UITableFieldProperty.SORT_PHRASE)) {
                        sortValue = multi.getPhrase(field.getProperty(UITableFieldProperty.SORT_PHRASE));
                    } else if (field.containsProperty(UITableFieldProperty.SORT_MSG_PHRASE)) {
                        sortValue = multi.getMsgPhrase(field.getProperty(UITableFieldProperty.SORT_MSG_PHRASE));
                    }

                    final UIValue uiValue = UIValue.get(field, attr, value)
                                    .setInstance(instance)
                                    .setRequestInstances(multi.getInstanceList())
                                    .setCallInstance(getCallInstance());

                    final GridCell cell = getCell(column, uiValue, sortValue, jsFields);
                    if (column.getFieldConfig().getField().getReference() != null) {
                        cell.setInstance(instance);
                    }
                    row.add(cell);
                }
            }
        }
    }
protected void load(final List<Instance> _instance)
        throws EFapsException
    {
        if (CollectionUtils.isNotEmpty(_instance)) {
            
            final Map<Long, JSField> jsFields = new HashMap<>();

            final MultiPrintQuery multi = new MultiPrintQuery(_instance);
            for (final GridColumn column : this.columns) {
                final Field field = column.getField();
                if (field.getSelect() != null) {
                    multi.addSelect(field.getSelect());
                } else if (field.getAttribute() != null) {
                    multi.addAttribute(field.getAttribute());
                } else if (field.getPhrase() != null) {
                    multi.addPhrase(field.getName(), field.getPhrase());
                } else if (field.getMsgPhrase() != null) {
                    multi.addMsgPhrase(new SelectBuilder(getBaseSelect4MsgPhrase(field)), field.getMsgPhrase());
                }
                if (field.getSelectAlternateOID() != null) {
                    multi.addSelect(field.getSelectAlternateOID());
                }
                if (field.containsProperty(UITableFieldProperty.SORT_SELECT)) {
                    multi.addSelect(field.getProperty(UITableFieldProperty.SORT_SELECT));
                } else if (field.containsProperty(UITableFieldProperty.SORT_PHRASE)) {
                    multi.addPhrase(field.getProperty(UITableFieldProperty.SORT_PHRASE), field.getProperty(
                                    UITableFieldProperty.SORT_PHRASE));
                } else if (field.containsProperty(UITableFieldProperty.SORT_MSG_PHRASE)) {
                    multi.addMsgPhrase(field.getProperty(UITableFieldProperty.SORT_MSG_PHRASE));
                }
            }
            multi.executeWithoutAccessCheck();
            while (multi.next()) {
                final GridRow row = new GridRow(multi.getCurrentInstance());
                this.values.add(row);
                for (final GridColumn column : this.columns) {
                    final Field field = column.getField();
                    final Instance instance = evaluateFieldInstance(multi, field);
                    Object value = null;
                    Object sortValue = null;
                    Attribute attr = null;
                    if (field.getSelect() != null) {
                        value = multi.<Object>getSelect(field.getSelect());
                        attr = multi.getAttribute4Select(field.getSelect());
                    } else if (field.getAttribute() != null) {
                        value = multi.<Object>getAttribute(field.getAttribute());
                        attr = multi.getAttribute4Attribute(field.getAttribute());
                    } else if (field.getPhrase() != null) {
                        value = multi.getPhrase(field.getName());
                    } else if (field.getMsgPhrase() != null) {
                        value = multi.getMsgPhrase(new SelectBuilder(getBaseSelect4MsgPhrase(field)), field
                                        .getMsgPhrase());
                    }
                    if (field.containsProperty(UITableFieldProperty.SORT_SELECT)) {
                        sortValue = multi.getSelect(field.getProperty(UITableFieldProperty.SORT_SELECT));
                    } else if (field.containsProperty(UITableFieldProperty.SORT_PHRASE)) {
                        sortValue = multi.getPhrase(field.getProperty(UITableFieldProperty.SORT_PHRASE));
                    } else if (field.containsProperty(UITableFieldProperty.SORT_MSG_PHRASE)) {
                        sortValue = multi.getMsgPhrase(field.getProperty(UITableFieldProperty.SORT_MSG_PHRASE));
                    }

                    final UIValue uiValue = UIValue.get(field, attr, value)
                                    .setInstance(instance)
                                    .setRequestInstances(multi.getInstanceList())
                                    .setCallInstance(getCallInstance());

                    final GridCell cell = getCell(column, uiValue, sortValue, jsFields);
                    if (column.getFieldConfig().getField().getReference() != null) {
                        cell.setInstance(instance);
                    }
                    row.add(cell);
                }
            }
        }
    }
protected void load ( final List < Instance > _instance ) throws EFapsException { if ( CollectionUtils . isNotEmpty ( _instance ) ) { /** The factories. */ final Map < Long , JSField > jsFields = new HashMap <> ( ) ; final MultiPrintQuery multi = new MultiPrintQuery ( _instance ) ; for ( final GridColumn column : this . columns ) { final Field field = column . getField ( ) ; if ( field . getSelect ( ) != null ) { multi . addSelect ( field . getSelect ( ) ) ; } else if ( field . getAttribute ( ) != null ) { multi . addAttribute ( field . getAttribute ( ) ) ; } else if ( field . getPhrase ( ) != null ) { multi . addPhrase ( field . getName ( ) , field . getPhrase ( ) ) ; } else if ( field . getMsgPhrase ( ) != null ) { multi . addMsgPhrase ( new SelectBuilder ( getBaseSelect4MsgPhrase ( field ) ) , field . getMsgPhrase ( ) ) ; } if ( field . getSelectAlternateOID ( ) != null ) { multi . addSelect ( field . getSelectAlternateOID ( ) ) ; } if ( field . containsProperty ( UITableFieldProperty . SORT_SELECT ) ) { multi . addSelect ( field . getProperty ( UITableFieldProperty . SORT_SELECT ) ) ; } else if ( field . containsProperty ( UITableFieldProperty . SORT_PHRASE ) ) { multi . addPhrase ( field . getProperty ( UITableFieldProperty . SORT_PHRASE ) , field . getProperty ( UITableFieldProperty . SORT_PHRASE ) ) ; } else if ( field . containsProperty ( UITableFieldProperty . SORT_MSG_PHRASE ) ) { multi . addMsgPhrase ( field . getProperty ( UITableFieldProperty . SORT_MSG_PHRASE ) ) ; } } multi . executeWithoutAccessCheck ( ) ; while ( multi . next ( ) ) { final GridRow row = new GridRow ( multi . getCurrentInstance ( ) ) ; this . values . add ( row ) ; for ( final GridColumn column : this . columns ) { final Field field = column . getField ( ) ; final Instance instance = evaluateFieldInstance ( multi , field ) ; Object value = null ; Object sortValue = null ; Attribute attr = null ; if ( field . getSelect ( ) != null ) { value = multi . < Object > getSelect ( field . getSelect ( ) ) ; attr = multi . getAttribute4Select ( field . getSelect ( ) ) ; } else if ( field . getAttribute ( ) != null ) { value = multi . < Object > getAttribute ( field . getAttribute ( ) ) ; attr = multi . getAttribute4Attribute ( field . getAttribute ( ) ) ; } else if ( field . getPhrase ( ) != null ) { value = multi . getPhrase ( field . getName ( ) ) ; } else if ( field . getMsgPhrase ( ) != null ) { value = multi . getMsgPhrase ( new SelectBuilder ( getBaseSelect4MsgPhrase ( field ) ) , field . getMsgPhrase ( ) ) ; } if ( field . containsProperty ( UITableFieldProperty . SORT_SELECT ) ) { sortValue = multi . getSelect ( field . getProperty ( UITableFieldProperty . SORT_SELECT ) ) ; } else if ( field . containsProperty ( UITableFieldProperty . SORT_PHRASE ) ) { sortValue = multi . getPhrase ( field . getProperty ( UITableFieldProperty . SORT_PHRASE ) ) ; } else if ( field . containsProperty ( UITableFieldProperty . SORT_MSG_PHRASE ) ) { sortValue = multi . getMsgPhrase ( field . getProperty ( UITableFieldProperty . SORT_MSG_PHRASE ) ) ; } final UIValue uiValue = UIValue . get ( field , attr , value ) . setInstance ( instance ) . setRequestInstances ( multi . getInstanceList ( ) ) . setCallInstance ( getCallInstance ( ) ) ; final GridCell cell = getCell ( column , uiValue , sortValue , jsFields ) ; if ( column . getFieldConfig ( ) . getField ( ) . getReference ( ) != null ) { cell . setInstance ( instance ) ; } row . add ( cell ) ; } } } }
Load.

@param _instances the instances
@throws EFapsException the eFaps exception
Load .