@Override
    protected List<CmsListItem> getListItems() throws CmsException {

        List<CmsListItem> ret = new ArrayList<CmsListItem>();
        List<CmsRole> roles = getRoles();
        Locale locale = getCms().getRequestContext().getLocale();
        Map<String, String> dependencies = new HashMap<String, String>();
        for (CmsRole role : roles) {
            for (CmsRole child : role.getChildren(true)) {
                String deps = dependencies.get(child.getRoleName());
                if (deps == null) {
                    deps = "";
                } else {
                    deps += ", ";
                }
                deps += role.getName(locale);
                dependencies.put(child.getRoleName(), deps);
            }
        }
        for (CmsRole role : roles) {
            CmsListItem item = getList().newItem(role.getGroupName());

            item.set(LIST_COLUMN_NAME, role.getName(locale));
            String dependency = dependencies.get(role.getRoleName());
            if (dependency == null) {
                dependency = "";
            }
            item.set(LIST_COLUMN_DEPENDENCY, dependency);
            item.set(LIST_COLUMN_HIDDEN_NAME, "" + (1000 + dependency.length()));
            item.set(LIST_COLUMN_GROUP_NAME, role.getGroupName());
            ret.add(item);
        }
        return ret;
    }
@ Override protected List < CmsListItem > getListItems ( ) throws CmsException { List < CmsListItem > ret = new ArrayList < CmsListItem > ( ) ; List < CmsRole > roles = getRoles ( ) ; Locale locale = getCms ( ) . getRequestContext ( ) . getLocale ( ) ; Map < String , String > dependencies = new HashMap < String , String > ( ) ; for ( CmsRole role : roles ) { for ( CmsRole child : role . getChildren ( true ) ) { String deps = dependencies . get ( child . getRoleName ( ) ) ; if ( deps == null ) { deps = "" ; } else { deps += ", " ; } deps += role . getName ( locale ) ; dependencies . put ( child . getRoleName ( ) , deps ) ; } } for ( CmsRole role : roles ) { CmsListItem item = getList ( ) . newItem ( role . getGroupName ( ) ) ; item . set ( LIST_COLUMN_NAME , role . getName ( locale ) ) ; String dependency = dependencies . get ( role . getRoleName ( ) ) ; if ( dependency == null ) { dependency = "" ; } item . set ( LIST_COLUMN_DEPENDENCY , dependency ) ; item . set ( LIST_COLUMN_HIDDEN_NAME , "" + ( 1000 + dependency . length ( ) ) ) ; item . set ( LIST_COLUMN_GROUP_NAME , role . getGroupName ( ) ) ; ret . add ( item ) ; } return ret ; }
@see org.opencms.workplace.list.A_CmsListDialog#getListItems()