Package net.sf.json

Examples of net.sf.json.JSONObject.element()


           
            view.addWidget(new SimpleWidget(ZeroView.DIV_CONTENT, "user_userGroupEdit"));   
           
            JSONObject jUG = new JSONObject();
            jUG.element("groupKey", selectedUserGroup.getGroupKey());
            jUG.element("description", selectedUserGroup.getDescription());
            view.getJson().element("userGroup", jUG);
                       
        }
        return new ModelAndView(view, null);
    }
View Full Code Here


                        }

                        public Object getData(Object obj) {
                            if (obj instanceof Role) {
                                JSONObject jLink = new JSONObject();
                                jLink.element("url", "user/roleEdit.do?selected=" + ((Role) obj).getId());
                                jLink.element("text", "Edit");
                                return jLink;
                            }
                            return "";
                        }
View Full Code Here

                        public Object getData(Object obj) {
                            if (obj instanceof Role) {
                                JSONObject jLink = new JSONObject();
                                jLink.element("url", "user/roleEdit.do?selected=" + ((Role) obj).getId());
                                jLink.element("text", "Edit");
                                return jLink;
                            }
                            return "";
                        }
                    });
View Full Code Here

            JSONArray jmodules = new JSONArray();
            view.getJson().element("modules", jmodules);
            for (Module module : getModuleManager().getModules()) {
                JSONObject jmodule = new JSONObject();
                jmodules.element(jmodule);
                jmodule.element("name", module.getName());
                JSONArray jpermissions = new JSONArray();
                jmodule.element("permissions", jpermissions);
                List<PermissionTemplate> templates = module.getPermissionTemplates();
                Collections.sort(templates);
                for (PermissionTemplate permissionTemplate : templates) {
View Full Code Here

            for (Module module : getModuleManager().getModules()) {
                JSONObject jmodule = new JSONObject();
                jmodules.element(jmodule);
                jmodule.element("name", module.getName());
                JSONArray jpermissions = new JSONArray();
                jmodule.element("permissions", jpermissions);
                List<PermissionTemplate> templates = module.getPermissionTemplates();
                Collections.sort(templates);
                for (PermissionTemplate permissionTemplate : templates) {
                    JSONObject jPermission = new JSONObject();
                    jpermissions.element(jPermission);
View Full Code Here

                List<PermissionTemplate> templates = module.getPermissionTemplates();
                Collections.sort(templates);
                for (PermissionTemplate permissionTemplate : templates) {
                    JSONObject jPermission = new JSONObject();
                    jpermissions.element(jPermission);
                    jPermission.element("key", permissionTemplate.getKey());
                    jPermission.element("name", permissionTemplate.getName());
                    jPermission.element("highlight", permissionTemplate.isHighlight());
                    String code = "permissioninfo_" + permissionTemplate.getKey().toLowerCase();
                    jPermission.element("description", getMessages().getMessage(code, null, getLocale(request)));
View Full Code Here

                Collections.sort(templates);
                for (PermissionTemplate permissionTemplate : templates) {
                    JSONObject jPermission = new JSONObject();
                    jpermissions.element(jPermission);
                    jPermission.element("key", permissionTemplate.getKey());
                    jPermission.element("name", permissionTemplate.getName());
                    jPermission.element("highlight", permissionTemplate.isHighlight());
                    String code = "permissioninfo_" + permissionTemplate.getKey().toLowerCase();
                    jPermission.element("description", getMessages().getMessage(code, null, getLocale(request)));

                }
View Full Code Here

                for (PermissionTemplate permissionTemplate : templates) {
                    JSONObject jPermission = new JSONObject();
                    jpermissions.element(jPermission);
                    jPermission.element("key", permissionTemplate.getKey());
                    jPermission.element("name", permissionTemplate.getName());
                    jPermission.element("highlight", permissionTemplate.isHighlight());
                    String code = "permissioninfo_" + permissionTemplate.getKey().toLowerCase();
                    jPermission.element("description", getMessages().getMessage(code, null, getLocale(request)));

                }
            }
View Full Code Here

                    jpermissions.element(jPermission);
                    jPermission.element("key", permissionTemplate.getKey());
                    jPermission.element("name", permissionTemplate.getName());
                    jPermission.element("highlight", permissionTemplate.isHighlight());
                    String code = "permissioninfo_" + permissionTemplate.getKey().toLowerCase();
                    jPermission.element("description", getMessages().getMessage(code, null, getLocale(request)));

                }
            }

            view.getJson().element("funcSelect", "user/roleAddPermission.do");
View Full Code Here

            screen.element("calls", calls);
        }

        JSONObject jCall = new JSONObject();
        calls.element(jCall);
        jCall.element("functionName", call.getFunction());
        jCall.element("id", call.getId());
        if (call.getPopupInfo() != null) {
            jCall.element("popup", true);
            jCall.element("popupcaption", call.getPopupInfo().getPopupcaption());
            jCall.element("popuptype", call.getPopupInfo().getPopuptype());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.