Package org.json

Examples of org.json.JSONObject.accumulate()


            }
        }

        jsonObject.accumulate("total", employmentDao.getTotalEmploymentsNotInDepartment(name, orgId, deptId));
        jsonObject.accumulate("start", start);
        jsonObject.accumulate("sort", sort);
        jsonObject.accumulate("desc", desc);

        if (callback != null && callback.trim().length() != 0) {
            writer.write(StringEscapeUtils.escapeHtml(callback) + "(" + jsonObject + ");");
        } else {
View Full Code Here


        }

        jsonObject.accumulate("total", employmentDao.getTotalEmploymentsNotInDepartment(name, orgId, deptId));
        jsonObject.accumulate("start", start);
        jsonObject.accumulate("sort", sort);
        jsonObject.accumulate("desc", desc);

        if (callback != null && callback.trim().length() != 0) {
            writer.write(StringEscapeUtils.escapeHtml(callback) + "(" + jsonObject + ");");
        } else {
            jsonObject.write(writer);
View Full Code Here

                data.put("user.lastName", employment.getUser().getLastName());
                data.put("employeeCode", employment.getEmployeeCode());
                data.put("role", employment.getRole());
                data.put("department.name", (employment.getDepartment() != null) ? employment.getDepartment().getName() : "");
                data.put("grade.name", (employment.getGrade() != null) ? employment.getGrade().getName() : "");
                jsonObject.accumulate("data", data);
            }
        }

        jsonObject.accumulate("total", employmentDao.getTotalEmploymentsNotInGrade(name, orgId, gradeId));
        jsonObject.accumulate("start", start);
View Full Code Here

                data.put("grade.name", (employment.getGrade() != null) ? employment.getGrade().getName() : "");
                jsonObject.accumulate("data", data);
            }
        }

        jsonObject.accumulate("total", employmentDao.getTotalEmploymentsNotInGrade(name, orgId, gradeId));
        jsonObject.accumulate("start", start);
        jsonObject.accumulate("sort", sort);
        jsonObject.accumulate("desc", desc);

        if (callback != null && callback.trim().length() != 0) {
View Full Code Here

                jsonObject.accumulate("data", data);
            }
        }

        jsonObject.accumulate("total", employmentDao.getTotalEmploymentsNotInGrade(name, orgId, gradeId));
        jsonObject.accumulate("start", start);
        jsonObject.accumulate("sort", sort);
        jsonObject.accumulate("desc", desc);

        if (callback != null && callback.trim().length() != 0) {
            writer.write(StringEscapeUtils.escapeHtml(callback) + "(" + jsonObject + ");");
View Full Code Here

            }
        }

        jsonObject.accumulate("total", employmentDao.getTotalEmploymentsNotInGrade(name, orgId, gradeId));
        jsonObject.accumulate("start", start);
        jsonObject.accumulate("sort", sort);
        jsonObject.accumulate("desc", desc);

        if (callback != null && callback.trim().length() != 0) {
            writer.write(StringEscapeUtils.escapeHtml(callback) + "(" + jsonObject + ");");
        } else {
View Full Code Here

        }

        jsonObject.accumulate("total", employmentDao.getTotalEmploymentsNotInGrade(name, orgId, gradeId));
        jsonObject.accumulate("start", start);
        jsonObject.accumulate("sort", sort);
        jsonObject.accumulate("desc", desc);

        if (callback != null && callback.trim().length() != 0) {
            writer.write(StringEscapeUtils.escapeHtml(callback) + "(" + jsonObject + ");");
        } else {
            jsonObject.write(writer);
View Full Code Here

            httpResponse.sendError(HttpServletResponse.SC_UNAUTHORIZED);
            return;
        }

        JSONObject jsonObject = new JSONObject();
        jsonObject.accumulate("username", WorkflowUtil.getCurrentUsername());
     
        boolean isAdmin = WorkflowUtil.isCurrentUserInRole(WorkflowUtil.ROLE_ADMIN);
        if (isAdmin) {
            jsonObject.accumulate("isAdmin", "true");
        }
View Full Code Here

        JSONObject jsonObject = new JSONObject();
        jsonObject.accumulate("username", WorkflowUtil.getCurrentUsername());
     
        boolean isAdmin = WorkflowUtil.isCurrentUserInRole(WorkflowUtil.ROLE_ADMIN);
        if (isAdmin) {
            jsonObject.accumulate("isAdmin", "true");
        }

        writeJson(writer, jsonObject, callback);
    }
View Full Code Here

                FormStoreBinder mainBinder = form.getStoreBinder();
                FormRowSet rows = formData.getStoreBinderData(mainBinder);
               
                for (FormRow row : rows) {
                    for (Object o : row.keySet()) {
                        jsonResult.accumulate(o.toString(), row.get(o));
                    }
                    Map<String, String> tempFilePathMap = row.getTempFilePathMap();
                    if (tempFilePathMap != null && !tempFilePathMap.isEmpty()) {
                        jsonResult.put(FormUtil.PROPERTY_TEMP_FILE_PATH, tempFilePathMap);
                    }
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.