@Override
    public void actionCommit() {

        try {
            // validate the resource type info
            if (OpenCms.getResourceManager().hasResourceType(m_resInfo.getName())) {
                throw new CmsException(
                    Messages.get().container(Messages.ERR_RESOURCE_TYPE_ALREADY_EXISTS_1, m_resInfo.getName()));
            }
            if (OpenCms.getResourceManager().hasResourceType(m_resInfo.getId())) {
                throw new CmsException(
                    Messages.get().container(
                        Messages.ERR_RESOURCE_TYPE_ID_ALREADY_IN_USE_1,
                        String.valueOf(m_resInfo.getId())));
            }

            getJsp().getRequest().setAttribute(ATTR_RESOURCE_TYPE_INFO, m_resInfo);
            Map<String, String[]> params = new HashMap<String, String[]>();
            params.put(PARAM_CLOSELINK, new String[] {getParamCloseLink()});
            params.put(PARAM_STYLE, new String[] {CmsToolDialog.STYLE_NEW});
            getToolManager().jspForwardPage(this, ADD_TYPE_REPORT, params);
        } catch (Exception e) {
            LOG.error(e.getLocalizedMessage(), e);
            setCommitErrors(Collections.<Throwable> singletonList(e));
        }

    }
@ Override public void actionCommit ( ) { try { if ( OpenCms . getResourceManager ( ) . hasResourceType ( m_resInfo . getName ( ) ) ) { throw new CmsException ( Messages . get ( ) . container ( Messages . ERR_RESOURCE_TYPE_ALREADY_EXISTS_1 , m_resInfo . getName ( ) ) ) ; } if ( OpenCms . getResourceManager ( ) . hasResourceType ( m_resInfo . getId ( ) ) ) { throw new CmsException ( Messages . get ( ) . container ( Messages . ERR_RESOURCE_TYPE_ID_ALREADY_IN_USE_1 , String . valueOf ( m_resInfo . getId ( ) ) ) ) ; } getJsp ( ) . getRequest ( ) . setAttribute ( ATTR_RESOURCE_TYPE_INFO , m_resInfo ) ; Map < String , String [ ] > params = new HashMap < String , String [ ] > ( ) ; params . put ( PARAM_CLOSELINK , new String [ ] { getParamCloseLink ( ) } ) ; params . put ( PARAM_STYLE , new String [ ] { CmsToolDialog . STYLE_NEW } ) ; getToolManager ( ) . jspForwardPage ( this , ADD_TYPE_REPORT , params ) ; } catch ( Exception e ) { LOG . error ( e . getLocalizedMessage ( ) , e ) ; setCommitErrors ( Collections . < Throwable > singletonList ( e ) ) ; } }
@see org.opencms.workplace.CmsWidgetDialog#actionCommit()