Package org.guvnor.common.services.shared.metadata.model

Examples of org.guvnor.common.services.shared.metadata.model.CategoryItem


    private void loadChildCategories(String category, CategoryItem vfsCategoryItem) {
        String[] categories = jcrRepositoryCategoryService.loadChildCategories(category);

        for(String c : categories) {
          String categoryPath = getItemPath(c, vfsCategoryItem.getFullPath());
          CategoryItem categoryItem = vfsCategoryItem.addChildren(c, "");
            loadChildCategories(categoryPath,categoryItem);
        }
    }
View Full Code Here


   
    private void loadChildCategories(String category, CategoryItem vfsCategoryItem) {
        String[] categories = jcrRepositoryCategoryService.loadChildCategories(category);
        for(String c : categories) {
          String categoryPath = getItemPath(c, vfsCategoryItem.getFullPath());
          CategoryItem categoryItem = vfsCategoryItem.addChildren(c, "");

          String[] childrenCategories = jcrRepositoryCategoryService.loadChildCategories(categoryItem.getFullPath());
          if(childrenCategories.length != 0) {
            loadChildCategories(c,  categoryItem);
          }         
        }    
    }
View Full Code Here

        ( (CategoryItem) navTreeWidget.getSelectedItem().getUserObject() ).setName( name );
        navTreeWidget.getSelectedItem().setHTML( AbstractImagePrototype.create( ImageResources.INSTANCE.categorySmall() ).getHTML() + h( name ) );
    }

    public void removeSelected() {
        final CategoryItem parent = ( (CategoryItem) navTreeWidget.getSelectedItem().getUserObject() ).getParent();
        if ( parent != null ) {
            parent.removeChildren( getSelectedCategory().getName() );
        } else {
            categories.removeChildren( getSelectedCategory().getName() );
        }
        navTreeWidget.getSelectedItem().remove();
    }
View Full Code Here

    }

    public void addChildren( final CategoryItem parent,
                             final String name,
                             final String description ) {
        final CategoryItem child = parent.addChildren( name, description );

        final TreeItem parentTree;
        if ( getSelectedCategory() == null ) {
            parentTree = navTreeWidget.getItem( 0 );
        } else {
View Full Code Here

        ( (CategoryItem) navTreeWidget.getSelectedItem().getUserObject() ).setName( name );
        navTreeWidget.getSelectedItem().setHTML( AbstractImagePrototype.create( ImageResources.INSTANCE.categorySmall() ).getHTML() + h( name ) );
    }

    public void removeSelected() {
        final CategoryItem parent = ( (CategoryItem) navTreeWidget.getSelectedItem().getUserObject() ).getParent();
        if ( parent != null ) {
            parent.removeChildren( getSelectedCategory().getName() );
        } else {
            categories.removeChildren( getSelectedCategory().getName() );
        }
        navTreeWidget.getSelectedItem().remove();
    }
View Full Code Here

    }

    public void addChildren( final CategoryItem parent,
                             final String name,
                             final String description ) {
        final CategoryItem child = parent.addChildren( name, description );

        final TreeItem parentTree;
        if ( getSelectedCategory() == null ) {
            parentTree = navTreeWidget.getItem( 0 );
        } else {
View Full Code Here

TOP

Related Classes of org.guvnor.common.services.shared.metadata.model.CategoryItem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.