Package org.joget.apps.userview.model

Examples of org.joget.apps.userview.model.UserviewSetting


            JSONObject userviewObj = new JSONObject(json);
            userview.setProperties(PropertyUtil.getPropertiesValueFromJson(userviewObj.getJSONObject("properties").toString()));

            //set Setting
            JSONObject settingObj = userviewObj.getJSONObject("setting");
            UserviewSetting setting = new UserviewSetting();
            setting.setProperties(PropertyUtil.getPropertiesValueFromJson(settingObj.getJSONObject("properties").toString()));

            //set theme & permission
            try {
                JSONObject themeObj = settingObj.getJSONObject("properties").getJSONObject("theme");
                UserviewTheme theme = (UserviewTheme) pluginManager.getPlugin(themeObj.getString("className"));
                theme.setProperties(PropertyUtil.getPropertiesValueFromJson(themeObj.getJSONObject("properties").toString()));
                theme.setRequestParameters(requestParameters);
                theme.setUserview(userview);
                setting.setTheme(theme);
            } catch (Exception e) {
                LogUtil.debug(getClass().getName(), "set theme error.");
            }
            try {
                JSONObject permissionObj = settingObj.getJSONObject("properties").getJSONObject("permission");
                UserviewPermission permission = null;
                String permissionClassName = permissionObj.getString("className");
                if (permissionClassName != null && !permissionClassName.isEmpty()) {
                    permission = (UserviewPermission) pluginManager.getPlugin(permissionClassName);
                }
                if (permission != null) {
                    permission.setProperties(PropertyUtil.getPropertiesValueFromJson(permissionObj.getJSONObject("properties").toString()));
                    permission.setRequestParameters(requestParameters);
                    permission.setCurrentUser(currentUser);
                    setting.setPermission(permission);
                }
            } catch (Exception e) {
                LogUtil.debug(getClass().getName(), "set permission error.");
            }
            userview.setSetting(setting);
View Full Code Here


        map.addAttribute("userviewId", userviewId);
        map.addAttribute("userview", userview);
        map.addAttribute("json", PropertyUtil.propertiesJsonLoadProcessing(userviewJson));

        map.addAttribute("setting", new UserviewSetting());
        map.addAttribute("category", new UserviewCategory());

        Map basicRequestParams = new HashMap();
        basicRequestParams.put("appId", appId);
        basicRequestParams.put("appVersion", appVersion);
View Full Code Here

                + contextPath + "/js/json/util.js\n"
                + contextPath + "/mobile/jqm/images/ajax-loader.gif\n"
                + contextPath + "/css/form.css\n"
                + contextPath + "/plugin/org.joget.apps.form.model.Section/js/section.js\n";

        UserviewSetting setting = userview.getSetting();
        String backgroundUrl = setting.getPropertyString("mobileViewBackgroundUrl");
        String logoUrl = setting.getPropertyString("mobileViewLogoUrl");
        if (backgroundUrl != null && !backgroundUrl.trim().isEmpty()) {
            manifest += backgroundUrl + "\n";
        }
        if (logoUrl != null && !logoUrl.trim().isEmpty()) {
            manifest += logoUrl + "\n";
View Full Code Here

TOP

Related Classes of org.joget.apps.userview.model.UserviewSetting

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.