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

📄 sectiondetail.jsp

📁 国外的一套开源CRM
💻 JSP
📖 第 1 页 / 共 2 页
字号:
                <%}%>
             </td>
           </tr>

            <!-- Title Def -->
           <tr>
            <td width="20%" class="viewOneLabel">Title Definition</td>
            <td width="80%" colspan="3" class="viewOneField">
               <% name="titleDef";
                 if(action.equals("showUpdate")) { %>
                  <input type="text" name="<%=name%>" value='<%=(sectionDetails.getString(name) != null ? sectionDetails.getString(name) : "") %>'>
                <%} else {%>
                  <%=sectionDetails.getString(name)%>
                <%}%>
             </td>
           </tr>

            <!-- Button Action -->
           <tr>
            <td width="20%" class="viewOneLabel">Button Action</td>
            <td width="80%" colspan="3" class="viewOneField">
               <% name="buttonAction";
                 if(action.equals("showUpdate")) { %>
                  <input type="text" name="<%=name%>" value="<%=(String.valueOf(sectionDetails.get(name)) != null ? String.valueOf(sectionDetails.get(name)) : "") %>">
                <%} else {%>
                  <%=sectionDetails.getString(name)%>
                <%}%>
             </td>
           </tr>

            <!-- Button Target -->
           <tr>
            <td width="20%" class="viewOneLabel">Button Target</td>
            <td width="80%" colspan="3" class="viewOneField">
               <% name="buttonTarget";
                 if(action.equals("showUpdate")) { %>
                  <input type="text" name="<%=name%>" value="<%=(String.valueOf(sectionDetails.get(name)) != null ? String.valueOf(sectionDetails.get(name)) : "") %>">
                <%} else {%>
                  <%=sectionDetails.getString(name)%>
                <%}%>
             </td>
           </tr>

            <!--Detail Button Action -->
           <tr>
            <td width="20%" class="viewOneLabel">Detail Button Action</td>
            <td width="80%" colspan="3" class="viewOneField">
               <% name="detailButtonAction";
                 if(action.equals("showUpdate")) { %>
                  <input type="text" name="<%=name%>" value="<%=(String.valueOf(sectionDetails.get(name)) != null ? String.valueOf(sectionDetails.get(name)) : "") %>">
                <%} else {%>
                  <%=sectionDetails.getString(name)%>
                <%}%>
             </td>
           </tr>

            <!-- Detail Button Target -->
           <tr>
            <td width="20%" class="viewOneLabel">Detail Button Target</td>
            <td width="80%" colspan="3" class="viewOneField">
               <% name="detailButtonTarget";
                 if(action.equals("showUpdate")) { %>
                  <input type="text" name="<%=name%>" value="<%=(String.valueOf(sectionDetails.get(name)) != null ? String.valueOf(sectionDetails.get(name)) : "") %>">
                <%} else {%>
                  <%=sectionDetails.getString(name)%>
                <%}%>
             </td>
           </tr>

            <!-- Search Button Action -->
           <tr>
            <td width="20%" class="viewOneLabel">Search Button Action</td>
            <td width="80%" colspan="3" class="viewOneField">
               <% name="searchAction";
                 if(action.equals("showUpdate")) { %>
                  <input type="text" name="<%=name%>" value="<%=(String.valueOf(sectionDetails.get(name)) != null ? String.valueOf(sectionDetails.get(name)) : "") %>">
                <%} else {%>
                  <%=sectionDetails.getString(name)%>
                <%}%>
             </td>
           </tr>

            <!-- Search Button Target -->
           <tr>
            <td width="20%" class="viewOneLabel">Search Button Target</td>
            <td width="80%" colspan="3" class="viewOneField">
               <% name="searchTarget";
                 if(action.equals("showUpdate")) { %>
                  <input type="text" name="<%=name%>" value="<%=(String.valueOf(sectionDetails.get(name)) != null ? String.valueOf(sectionDetails.get(name)) : "") %>">
                <%} else {%>
                  <%=sectionDetails.getString(name)%>
                <%}%>
             </td>
           </tr>

            <!-- Search Attribute -->
           <tr>
            <td width="20%" class="viewOneLabel">Search Attribute</td>
            <td width="80%" colspan="3" class="viewOneField">
<%
			name="searchAttributeId";
			String searchAttributeId = sectionDetails.getString(name)==null ? "" : sectionDetails.getString(name);
			HashMap uiAttributeProps = new HashMap();
			uiAttributeProps.put("NAME", "searchAttributeId");
			uiAttributeProps.put("VALUE_FIELD", "attributeId" );
			uiAttributeProps.put("DISPLAY_FIELD", "attributeName" );
			uiAttributeProps.put("SELECTED", searchAttributeId);
			uiAttributeProps.put("EMPTY_FIRST", "");

			order = new ArrayList();
			order.add("attributeName");
			List uiAttributeList = delegator.findAll("UiAttribute", order);

			String UiAttributeIdDropDown = buildDropDown(uiAttributeList, uiAttributeProps );

%>
                <% if(action.equals("showUpdate")) { %>
					<%=UiAttributeIdDropDown%>
                <%} else {%>
                  <%=searchAttributeId%>
                <%}%>
             </td>
           </tr>

            <!-- Query Parameter List: for fields passed in to query list -->
           <tr>
            <td width="20%" class="viewOneLabel">Query Parameter List</td>
            <td width="80%" colspan="3" class="viewOneField">
               <% name="queryParameterList";
                 if(action.equals("showUpdate")) { %>
                  <input type="text" name="<%=name%>" value="<%=(String.valueOf(sectionDetails.get(name)) != null ? String.valueOf(sectionDetails.get(name)) : "") %>">
                <%} else {%>
                  <%=sectionDetails.getString(name)%>
                <%}%>
             </td>
           </tr>

            <%if(action.equals("showUpdate")) {%>
              <tr><td colspan="2" align="right"><input type="submit" value="update" ></td></tr>
            <% } %>
      </form>
      </tr></table>
  </table>

  <!-- Entities -->
  <table bgcolor="white" height="20"><tr><td></td></tr></table>
  <table width='100%' class=viewManyHeader><tr><td width='100%' height='100%'>
    <table width="100%" class=viewManyHeader><tr>
      <td>
        Entities
      </td>
      <td align="right">
        <a href="<ofbiz:url>/uiScreenSectionEntityAdd</ofbiz:url>?sectionId=<%=sectionId%>">New Entity</a>
      </td></tr>
    </table>
      <table width="100%" class=viewManyHeaderLabel>
        <tr>
          <td width="40%">Entity Name</td>
          <td width="15%">Updateable</td>
          <td align="right">Action</td>
        </tr>

       <% rowNum = 0;
          while(uiScreenSectionEntityIterator.hasNext()) {
              GenericValue uiScreenSectionEntityDetails = (GenericValue)uiScreenSectionEntityIterator.next();
              rowClass = (((rowNum++ % 2) != 0) ? "viewManyTR1" : "viewManyTR2");

          // For each screen section entity record, get the corresponding entity record.
          ModelEntity uiEntityEntity = delegator.getModelEntity("UiEntity");
          HashMap uiEntityMap = new HashMap();
          uiEntityMap.put("entityId", uiScreenSectionEntityDetails.getString("entityId"));
          GenericPK uiEntityPk = new GenericPK(uiEntityEntity, uiEntityMap);
          GenericValue uiEntityDetails = delegator.findByPrimaryKey(uiEntityPk);

        %>
        <tr class=<%=rowClass%> >
          <td>
            <a href="<ofbiz:url>/uiScreenSectionEntityDetail</ofbiz:url>?action=showUpdate&amp;sectionId=<%=uiScreenSectionEntityDetails.getString("sectionId")%>&amp;entityId=<%=uiScreenSectionEntityDetails.getString("entityId")%>">
              <%=uiEntityDetails.getString("entityName")%>
            </a>
          </td>

          <td><%=(uiScreenSectionEntityDetails.getString("isUpdateable")).equals("Y") ? "Yes" : "No"%></td>

          <td align="right">
            <a href="<ofbiz:url>/uiScreenSectionEntityDetail</ofbiz:url>?action=showUpdate&amp;sectionId=<%=uiScreenSectionEntityDetails.getString("sectionId")%>&amp;entityId=<%=uiScreenSectionEntityDetails.getString("entityId")%>">
              Edit
            </a>
          </td>

        </tr>
        <%
         }
        %>
       </table>
    </table>

  <!-- Attributes -->
  <table bgcolor="white" height="20"><tr><td></td></tr></table>
  <table width='100%' class=viewManyHeader><tr><td width='100%' height='100%'>
    <table width="100%" class=viewManyHeader><tr>
      <td>
        Attributes
      </td>
      <td align="right">
        <a href="<ofbiz:url>/sectionDetail</ofbiz:url>?action=<%=action%>&amp;sectionId=<%=sectionDetails.getString("sectionId")%>&amp;addAttributes=User">
            Add User Attributes
        </a>&nbsp
        <a href="<ofbiz:url>/sectionDetail</ofbiz:url>?action=<%=action%>&amp;sectionId=<%=sectionDetails.getString("sectionId")%>&amp;addAttributes=Default">
            Add Default Attributes
        </a>
      </td></tr>
    </table>
      <table width="100%" class=viewManyHeaderLabel>
        <tr>
          <td width="8%">Party ID</td>
          <td width="8%">Display Order</td>
          <td width="8%">Entity Name</td>
          <td width="25%">Attribute Name</td>
          <td width="20%">Display Object</td>
          <td width="12%">Mandatory</td>
          <td width="8%">Read<BR>Only</td>
          <td width="7%">Visible</td>
          <td width="7%" ALIGN=right>Max<BR>Length</td>
          <td width="8%" ALIGN=right>Display<BR>Length</td>
          <td align="right">Action</td>
        </tr>

       <%
          List uiEntityList = delegator.findAll("UiEntity", null);
          GenericValue uiEntityValues[] = (GenericValue[])uiEntityList.toArray(new GenericValue[0]);
          GenericValue uiEntityValue = null;
          HashMap entitiesMap = new HashMap();
          for(int i=0;i<uiEntityValues.length;i++){
            uiEntityValue = uiEntityValues[i];
            entitiesMap.put(uiEntityValue.getString("entityId"), uiEntityValue.getString("entityName"));
          }

          rowNum = 0;
          while(uiScreenSectionInfoIterator.hasNext()) {
              GenericValue uiScreenSectionInfoDetails = (GenericValue)uiScreenSectionInfoIterator.next();
              rowClass = (((rowNum++ % 2) != 0) ? "viewManyTR1" : "viewManyTR2");

          // For each screen section info record, get the corresponding attribute.
          ModelEntity uiAttributeEntity = delegator.getModelEntity("UiAttribute");
          HashMap uiAttributeMap = new HashMap();
          uiAttributeMap.put("attributeId", uiScreenSectionInfoDetails.getString("attributeId"));
          GenericPK uiAttributePk = new GenericPK(uiAttributeEntity, uiAttributeMap);
          GenericValue uiAttributeDetails = delegator.findByPrimaryKey(uiAttributePk);

          // For each screen section info record, get the corresponding display object.
          ModelEntity uiDisplayObjectEntity = delegator.getModelEntity("UiDisplayObject");
          HashMap uiDisplayObjectMap = new HashMap();
          uiDisplayObjectMap.put("displayObjectId", uiScreenSectionInfoDetails.getString("displayObjectId"));
          GenericPK uiDisplayObjectPk = new GenericPK(uiDisplayObjectEntity, uiDisplayObjectMap);
          GenericValue uiDisplayObjectDetails = delegator.findByPrimaryKey(uiDisplayObjectPk);
        %>
        <tr class=<%=rowClass%> >
          <td>
            <a href="<ofbiz:url>/uiScreenSectionInfoDetail</ofbiz:url>?action=showUpdate&amp;sectionId=<%=uiScreenSectionInfoDetails.getString("sectionId")%>&amp;partyId=<%=uiScreenSectionInfoDetails.getString("partyId")%>&amp;attributeId=<%=uiScreenSectionInfoDetails.getString("attributeId")%>">
              <%=uiScreenSectionInfoDetails.getString("partyId")%>
            </a>
          </td>

          <td><%=uiScreenSectionInfoDetails.getString("displayOrder")%></td>

          <td> <%=entitiesMap.get(uiAttributeDetails.getString("entityId"))%> </td>

          <td>
            <a href="<ofbiz:url>/uiScreenSectionInfoDetail</ofbiz:url>?action=showUpdate&amp;sectionId=<%=uiScreenSectionInfoDetails.getString("sectionId")%>&amp;partyId=<%=uiScreenSectionInfoDetails.getString("partyId")%>&amp;attributeId=<%=uiScreenSectionInfoDetails.getString("attributeId")%>">
              <%=uiAttributeDetails.getString("attributeName")%>
            </a>
          </td>

          <td><%=uiDisplayObjectDetails.getString("name")%></td>

          <td><%=String.valueOf(uiScreenSectionInfoDetails.get("isMandatory")).equals("Y") ? "Yes" : "No"%></td>
          <td><%=String.valueOf(uiScreenSectionInfoDetails.get("isReadOnly")).equals("Y") ? "Yes" : "No"%></td>
          <td><%=String.valueOf(uiScreenSectionInfoDetails.get("isVisible")).equals("Y") ? "Yes" : "No"%></td>
          <td align="right"><%=uiScreenSectionInfoDetails.getString("maxLength")%></td>
          <td align="right"><%=uiScreenSectionInfoDetails.getString("displayLength")%></td>

          <td align="right">
              <a href="<ofbiz:url>/uiScreenSectionInfoDetail</ofbiz:url>?action=showUpdate&amp;sectionId=<%=uiScreenSectionInfoDetails.getString("sectionId")%>&amp;partyId=<%=uiScreenSectionInfoDetails.getString("partyId")%>&amp;attributeId=<%=uiScreenSectionInfoDetails.getString("attributeId")%>">
                Edit
             </a>
          </td>

        </tr>
        <%
         }
        %>
       </table>
    </table>


   </td>
  </tr>
</table>


<%@ include file="/includes/footer.jsp" %>

⌨️ 快捷键说明

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