⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 uiscreensectioneventprocessor.java

📁 国外的一套开源CRM
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
                        isOuterJoinedOrig);
                    uiScreenSectionEntityGV.set("hasSequenceKey",
                        hasSequenceKeyOrig);

                    delegator.create(uiScreenSectionEntityGV);
                }
            } catch (GenericEntityException e) {
                Debug.logError(
                    "[UIDisplayObjectWebEventProcessor.postInsert] Error looking for original " +
                    "screen section entities: " + e.getLocalizedMessage(), module);
            }

            //////////
            // Copy all the screen section infos (fields) from the original screen section.
            //////////
            HashMap uiScreenSectionInfoFindMap = new HashMap();
            uiScreenSectionInfoFindMap.put("sectionId", sectionIdOrig);

            try {
                // Get the List of original screen section infos.
                List uiScreenSectionInfoGVLOrig = delegator.findByAnd("UiScreenSectionInfo",
                        uiScreenSectionInfoFindMap);
                Iterator uiScreenSectionInfoGVIOrig = uiScreenSectionInfoGVLOrig.iterator();
                ModelEntity uiScreenSectionInfoME = delegator.getModelEntity(
                        "UiScreenSectionInfo");

                while (uiScreenSectionInfoGVIOrig.hasNext()) {
                    GenericValue uiScreenSectionInfoGVOrig = (GenericValue) uiScreenSectionInfoGVIOrig.next();
                    String partyIdOrig = (uiScreenSectionInfoGVOrig.getString(
                            "partyId") == null) ? ""
                                                : uiScreenSectionInfoGVOrig.getString(
                            "partyId");
                    String attributeIdOrig = (uiScreenSectionInfoGVOrig.getString(
                            "attributeId") == null) ? ""
                                                    : uiScreenSectionInfoGVOrig.getString(
                            "attributeId");

                    // Get values from the original screen section info.
                    String displayObjectIdOrig = (uiScreenSectionInfoGVOrig.getString(
                            "displayObjectId") == null) ? ""
                                                        : uiScreenSectionInfoGVOrig.getString(
                            "displayObjectId");
                    String maxLengthOrig = (uiScreenSectionInfoGVOrig.getString(
                            "maxLength") == null) ? ""
                                                  : uiScreenSectionInfoGVOrig.getString(
                            "maxLength");
                    String isMandatoryOrig = (uiScreenSectionInfoGVOrig.getString(
                            "isMandatory") == null) ? ""
                                                    : uiScreenSectionInfoGVOrig.getString(
                            "isMandatory");
                    String isReadOnlyOrig = (uiScreenSectionInfoGVOrig.getString(
                            "isReadOnly") == null) ? ""
                                                   : uiScreenSectionInfoGVOrig.getString(
                            "isReadOnly");
                    String isVisibleOrig = (uiScreenSectionInfoGVOrig.getString(
                            "isVisible") == null) ? ""
                                                  : uiScreenSectionInfoGVOrig.getString(
                            "isVisible");
                    String isSearchableOrig = (uiScreenSectionInfoGVOrig.getString(
                            "isSearchable") == null) ? ""
                                                     : uiScreenSectionInfoGVOrig.getString(
                            "isSearchable");
                    String displayOrderOrig = (uiScreenSectionInfoGVOrig.getString(
                            "displayOrder") == null) ? ""
                                                     : uiScreenSectionInfoGVOrig.getString(
                            "displayOrder");
                    String displayLabelOrig = (uiScreenSectionInfoGVOrig.getString(
                            "displayLabel") == null) ? ""
                                                     : uiScreenSectionInfoGVOrig.getString(
                            "displayLabel");
                    String displayLengthOrig = (uiScreenSectionInfoGVOrig.getString(
                            "displayLength") == null) ? ""
                                                      : uiScreenSectionInfoGVOrig.getString(
                            "displayLength");
                    String colSpanOrig = (uiScreenSectionInfoGVOrig.getString(
                            "colSpan") == null) ? ""
                                                : uiScreenSectionInfoGVOrig.getString(
                            "colSpan");
                    String rowSpanOrig = (uiScreenSectionInfoGVOrig.getString(
                            "rowSpan") == null) ? ""
                                                : uiScreenSectionInfoGVOrig.getString(
                            "rowSpan");
					String startOnNewRowOrig = (uiScreenSectionInfoGVOrig.getString(
							"startOnNewRow") == null) ? ""
													 : uiScreenSectionInfoGVOrig.getString(
							"startOnNewRow");

                    // Create the new screen section entity using the new section ID.
                    GenericValue uiScreenSectionInfoGV = new GenericValue(uiScreenSectionInfoME);
                    uiScreenSectionInfoGV.setDelegator(delegator);
                    uiScreenSectionInfoGV.set("sectionId", sectionId);
                    uiScreenSectionInfoGV.set("partyId", partyIdOrig);
                    uiScreenSectionInfoGV.set("attributeId", attributeIdOrig);
                    uiScreenSectionInfoGV.set("displayObjectId",
                        displayObjectIdOrig);
                    uiScreenSectionInfoGV.set("maxLength",
                        Long.valueOf(maxLengthOrig));
                    uiScreenSectionInfoGV.set("isMandatory", isMandatoryOrig);
                    uiScreenSectionInfoGV.set("isReadOnly", isReadOnlyOrig);
                    uiScreenSectionInfoGV.set("isVisible", isVisibleOrig);
                    uiScreenSectionInfoGV.set("isSearchable", isSearchableOrig);
                    uiScreenSectionInfoGV.set("displayOrder",
                        Long.valueOf(displayOrderOrig));
                    uiScreenSectionInfoGV.set("displayLabel", displayLabelOrig);
                    uiScreenSectionInfoGV.set("displayLength",
                        Long.valueOf(displayLengthOrig));
                    uiScreenSectionInfoGV.set("colSpan",
                        Long.valueOf(colSpanOrig));
                    uiScreenSectionInfoGV.set("rowSpan",
                        Long.valueOf(rowSpanOrig));
					uiScreenSectionInfoGV.set("startOnNewRow", startOnNewRowOrig);

                    delegator.create(uiScreenSectionInfoGV);
                }
            } catch (GenericEntityException e) {
                Debug.logError(
                    "[UIDisplayObjectWebEventProcessor.postInsert] Error looking for original " +
                    "screen section infos: " + e.getLocalizedMessage(), module);
            }
        }

        return STATUS_CONTINUE;
    }

    /**
     * DOCUMENT ME!
     *
     * @param userInfo 
     * @param delegator 
     * @param originatingEntityName 
     * @param entityGV 
     *
     * @return 
     */
    public int deleteAllRelated(UserInfo userInfo, GenericDelegator delegator,
        String originatingEntityName, GenericValue entityGV) {

        int status = STATUS_CONTINUE;

        // Delete related screen section entities.
        status = deleteOneRelated(userInfo, delegator, entityGV, "",
                "UiScreenSectionEntity", originatingEntityName,
                new GenericEventProcessor());

        // Delete related screen section infos (fields).
        status = deleteOneRelated(userInfo, delegator, entityGV, "",
                "UiScreenSectionInfo", originatingEntityName,
                new GenericEventProcessor());

        return status;
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -