Package com.iisigroup.cap.base.model

Examples of com.iisigroup.cap.base.model.I18n


                config.getProperty("systemType"));
        for (Function code : list) {
            MenuItem item = new MenuItem();
            item.setCode(code.getCode());
            // 改為從 i18n table 取得字串
            I18n i18n = menuI18n.get("menu." + code.getCode());
            item.setName(i18n == null ? CapAppContext.getMessage("menu."
                    + code.getCode()) : i18n.getCodeDesc());
            item.setUrl(code.getPath());
            menuMap.put(item.getCode(), item);

            MenuItem pItem = menuMap.get(code.getParent());
            if (pItem == null) {
View Full Code Here


        function.setUpdater(CapSecurityContext.getUserId());
        function.setUpdateTime(CapDate.getCurrentTimestamp());
        functionDao.save(function);
        // insert menu i18n
        String i18nKey = "menu." + function.getCode();
        I18n i18n = i18nDao.findByCodeTypeAndCodeValue("menu", i18nKey,
                SimpleContextHolder.get(CapWebUtil.localeKey).toString());
        if (i18n == null) {
            i18n = new I18n();
        }
        i18n.setCodeDesc(function.getName());
        i18n.setCodeOrder(function.getSequence());
        i18n.setCodeType("menu");
        i18n.setCodeValue(i18nKey);
        i18n.setLocale(SimpleContextHolder.get(CapWebUtil.localeKey).toString());
        i18n.setUpdater(CapSecurityContext.getUserId());
        i18n.setUpdateTime(CapDate.getCurrentTimestamp());
        i18nDao.save(i18n);
    }// ;
View Full Code Here

TOP

Related Classes of com.iisigroup.cap.base.model.I18n

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.