@Override
    @SuppressWarnings("unchecked")
    public void onOpen(OpenEvent<I> event) {

        I target = event.getTarget();
        if (target.getLoadState() == CmsLazyTreeItem.LoadState.UNLOADED) {
            // in case the first level is not yet loaded
            super.onOpen(event);
        } else if (target.getChildCount() > 0) {
            // load second level
            int c = target.getChildCount();
            for (int i = 0; i < c; i++) {
                I child = (I)target.getChild(i);
                if (child.getLoadState() != CmsLazyTreeItem.LoadState.UNLOADED) {
                    continue;
                }
                child.onStartLoading();
                child.setOpen(false);
                load(child);
            }
        }
    }
@ Override @ SuppressWarnings ( "unchecked" ) public void onOpen ( OpenEvent < I > event ) { I target = event . getTarget ( ) ; if ( target . getLoadState ( ) == CmsLazyTreeItem . LoadState . UNLOADED ) { super . onOpen ( event ) ; } else if ( target . getChildCount ( ) > 0 ) { int c = target . getChildCount ( ) ; for ( int i = 0 ; i < c ; i ++ ) { I child = ( I ) target . getChild ( i ) ; if ( child . getLoadState ( ) != CmsLazyTreeItem . LoadState . UNLOADED ) { continue ; } child . onStartLoading ( ) ; child . setOpen ( false ) ; load ( child ) ; } } }
@see org.opencms.gwt.client.ui.tree.I_CmsLazyOpenHandler#onOpen(com.google.gwt.event.logical.shared.OpenEvent)