src/main/java/org/efaps/ui/wicket/models/objects/UIStructurBrowser.java
protected void executeTree(final Map<Instance, Boolean> _map,
                               final boolean _expand)
    {
        try {
            final List<Instance> instances = new ArrayList<>();
            for (final Instance inst : _map.keySet()) {
                instances.add(inst);
            }
            final ValueParser parser = new ValueParser(new StringReader(this.valueLabel));
            final ValueList valuelist = parser.ExpressionString();
            final MultiPrintQuery print = new MultiPrintQuery(instances);
            valuelist.makeSelect(print);
            print.execute();
            while (print.next()) {
                Object value = null;
                final Instance instance = print.getCurrentInstance();
                value = valuelist.makeString(getInstance(), print, getMode());
                final UIStructurBrowser child = getNewStructurBrowser(instance, this);
                this.children.add(child);
                child.setDirection(_map.get(instance));
                child.setLabel(value.toString());
                child.setAllowChildren(checkForAllowChildren(instance));
                if (isAllowChildren()) {
                    child.setParent(checkForChildren(instance));
                }
                child.setImage(Image.getTypeIcon(instance.getType()) != null ? Image.getTypeIcon(instance.getType())
                                .getName() : null);
            }
        } catch (final EFapsException e) {
            throw new RestartResponseException(new ErrorPage(e));
        } catch (final ParseException e) {
            throw new RestartResponseException(new ErrorPage(e));
        }
        sortModel();
        expand(_expand);
        super.setInitialized(true);
    }
protected void executeTree(final Map<Instance, Boolean> _map,
                               final boolean _expand)
    {
        try {
            final List<Instance> instances = new ArrayList<>();
            for (final Instance inst : _map.keySet()) {
                instances.add(inst);
            }
            final ValueParser parser = new ValueParser(new StringReader(this.valueLabel));
            final ValueList valuelist = parser.ExpressionString();
            final MultiPrintQuery print = new MultiPrintQuery(instances);
            valuelist.makeSelect(print);
            print.execute();
            while (print.next()) {
                Object value = null;
                final Instance instance = print.getCurrentInstance();
                value = valuelist.makeString(getInstance(), print, getMode());
                final UIStructurBrowser child = getNewStructurBrowser(instance, this);
                this.children.add(child);
                child.setDirection(_map.get(instance));
                child.setLabel(value.toString());
                child.setAllowChildren(checkForAllowChildren(instance));
                if (isAllowChildren()) {
                    child.setParent(checkForChildren(instance));
                }
                child.setImage(Image.getTypeIcon(instance.getType()) != null ? Image.getTypeIcon(instance.getType())
                                .getName() : null);
            }
        } catch (final EFapsException e) {
            throw new RestartResponseException(new ErrorPage(e));
        } catch (final ParseException e) {
            throw new RestartResponseException(new ErrorPage(e));
        }
        sortModel();
        expand(_expand);
        super.setInitialized(true);
    }
protected void executeTree ( final Map < Instance , Boolean > _map , final boolean _expand ) { try { final List < Instance > instances = new ArrayList <> ( ) ; for ( final Instance inst : _map . keySet ( ) ) { instances . add ( inst ) ; } final ValueParser parser = new ValueParser ( new StringReader ( this . valueLabel ) ) ; final ValueList valuelist = parser . ExpressionString ( ) ; final MultiPrintQuery print = new MultiPrintQuery ( instances ) ; valuelist . makeSelect ( print ) ; print . execute ( ) ; while ( print . next ( ) ) { Object value = null ; final Instance instance = print . getCurrentInstance ( ) ; value = valuelist . makeString ( getInstance ( ) , print , getMode ( ) ) ; final UIStructurBrowser child = getNewStructurBrowser ( instance , this ) ; this . children . add ( child ) ; child . setDirection ( _map . get ( instance ) ) ; child . setLabel ( value . toString ( ) ) ; child . setAllowChildren ( checkForAllowChildren ( instance ) ) ; if ( isAllowChildren ( ) ) { child . setParent ( checkForChildren ( instance ) ) ; } child . setImage ( Image . getTypeIcon ( instance . getType ( ) ) != null ? Image . getTypeIcon ( instance . getType ( ) ) . getName ( ) : null ) ; } } catch ( final EFapsException e ) { throw new RestartResponseException ( new ErrorPage ( e ) ) ; } catch ( final ParseException e ) { throw new RestartResponseException ( new ErrorPage ( e ) ) ; } sortModel ( ) ; expand ( _expand ) ; super . setInitialized ( true ) ; }
This method is called in case of a Tree from the {@link #execute()}method
to fill this StructurBrowserModel with live.

@param _map      List of Object
@param _expand   inside an expand
This method is called in case of a Tree from the { @link #execute () } method to fill this StructurBrowserModel with live .