src/main/java/org/efaps/ui/wicket/models/objects/UIStructurBrowser.java
protected void initialise()
        throws EFapsException
    {
        final AbstractCommand command = getCommand();
        if (command != null && command.getTargetTable() != null) {
            setTableUUID(command.getTargetTable().getUUID());
            this.browserFieldName = command.getTargetStructurBrowserField();
            setShowCheckBoxes(command.isTargetShowCheckBoxes());
        } else if (getInstance() != null) {
            final String tmplabel = Menu.getTypeTreeMenu(getInstance().getType()).getLabel();
            this.valueLabel = DBProperties.getProperty(tmplabel);
        }

        // set default sort
        if (command.getTargetTableSortKey() != null) {
            setSortKeyInternal(command.getTargetTableSortKey());
            setSortDirection(command.getTargetTableSortDirection());
        }

        // get the User specific Attributes if exist overwrite the defaults
        try {
            if (Context.getThreadContext().containsUserAttribute(
                            getCacheKey(UITable.UserCacheKey.SORTKEY))) {
                setSortKeyInternal(Context.getThreadContext().getUserAttribute(
                                getCacheKey(UITable.UserCacheKey.SORTKEY)));
            }
            if (Context.getThreadContext().containsUserAttribute(
                            getCacheKey(UITable.UserCacheKey.SORTDIRECTION))) {
                setSortDirection(SortDirection.getEnum(Context.getThreadContext()
                                .getUserAttribute(getCacheKey(UITable.UserCacheKey.SORTDIRECTION))));
            }
        } catch (final EFapsException e) {
            // we don't throw an error because this are only Usersettings
            UIStructurBrowser.LOG.error("error during the retrieve of UserAttributes", e);
        }
    }
protected void initialise()
        throws EFapsException
    {
        final AbstractCommand command = getCommand();
        if (command != null && command.getTargetTable() != null) {
            setTableUUID(command.getTargetTable().getUUID());
            this.browserFieldName = command.getTargetStructurBrowserField();
            setShowCheckBoxes(command.isTargetShowCheckBoxes());
        } else if (getInstance() != null) {
            final String tmplabel = Menu.getTypeTreeMenu(getInstance().getType()).getLabel();
            this.valueLabel = DBProperties.getProperty(tmplabel);
        }

        // set default sort
        if (command.getTargetTableSortKey() != null) {
            setSortKeyInternal(command.getTargetTableSortKey());
            setSortDirection(command.getTargetTableSortDirection());
        }

        // get the User specific Attributes if exist overwrite the defaults
        try {
            if (Context.getThreadContext().containsUserAttribute(
                            getCacheKey(UITable.UserCacheKey.SORTKEY))) {
                setSortKeyInternal(Context.getThreadContext().getUserAttribute(
                                getCacheKey(UITable.UserCacheKey.SORTKEY)));
            }
            if (Context.getThreadContext().containsUserAttribute(
                            getCacheKey(UITable.UserCacheKey.SORTDIRECTION))) {
                setSortDirection(SortDirection.getEnum(Context.getThreadContext()
                                .getUserAttribute(getCacheKey(UITable.UserCacheKey.SORTDIRECTION))));
            }
        } catch (final EFapsException e) {
            // we don't throw an error because this are only Usersettings
            UIStructurBrowser.LOG.error("error during the retrieve of UserAttributes", e);
        }
    }
protected void initialise ( ) throws EFapsException { final AbstractCommand command = getCommand ( ) ; if ( command != null && command . getTargetTable ( ) != null ) { setTableUUID ( command . getTargetTable ( ) . getUUID ( ) ) ; this . browserFieldName = command . getTargetStructurBrowserField ( ) ; setShowCheckBoxes ( command . isTargetShowCheckBoxes ( ) ) ; } else if ( getInstance ( ) != null ) { final String tmplabel = Menu . getTypeTreeMenu ( getInstance ( ) . getType ( ) ) . getLabel ( ) ; this . valueLabel = DBProperties . getProperty ( tmplabel ) ; } // set default sort if ( command . getTargetTableSortKey ( ) != null ) { setSortKeyInternal ( command . getTargetTableSortKey ( ) ) ; setSortDirection ( command . getTargetTableSortDirection ( ) ) ; } // get the User specific Attributes if exist overwrite the defaults try { if ( Context . getThreadContext ( ) . containsUserAttribute ( getCacheKey ( UITable . UserCacheKey . SORTKEY ) ) ) { setSortKeyInternal ( Context . getThreadContext ( ) . getUserAttribute ( getCacheKey ( UITable . UserCacheKey . SORTKEY ) ) ) ; } if ( Context . getThreadContext ( ) . containsUserAttribute ( getCacheKey ( UITable . UserCacheKey . SORTDIRECTION ) ) ) { setSortDirection ( SortDirection . getEnum ( Context . getThreadContext ( ) . getUserAttribute ( getCacheKey ( UITable . UserCacheKey . SORTDIRECTION ) ) ) ) ; } } catch ( final EFapsException e ) { // we don't throw an error because this are only Usersettings UIStructurBrowser . LOG . error ( "error during the retrieve of UserAttributes" , e ) ; } }
Method used to initialize this StructurBrowserModel.

@throws EFapsException on error
Method used to initialize this StructurBrowserModel .