📄 opportunitydetailaction.wml.jsp
字号:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//PHONE.COM//DTD WML 1.3//EN" "http://www.phone.com/dtd/wml13.dtd">
<%@ page contentType="text/vnd.wap.wml" %>
<%@ page import="java.util.*" %>
<%@ page import="java.text.*" %>
<%@ page import="org.ofbiz.entity.*" %>
<%@ page import="org.ofbiz.entity.model.*" %>
<jsp:useBean id="delegator" type="org.ofbiz.entity.GenericDelegator" scope="application" />
<%!
String getFieldValue(List l, String fieldName, String equalsValue, String returnFieldName){
Iterator i = l.iterator();
GenericEntity genericEntity = null;
String retVal = "";
while(i.hasNext()){
genericEntity = (GenericValue)i.next();
if(String.valueOf(genericEntity.get(fieldName)).equals(equalsValue))
retVal = String.valueOf(genericEntity.get(returnFieldName));
}
return retVal;
}
%>
<%
HashMap opportunityFields = new HashMap();
opportunityFields.put("dealId", request.getParameter("opportunityId"));
GenericValue opportunityDetail = delegator.findByPrimaryKey("Deal", opportunityFields);
List dealStageList = delegator.findAll("DealStage", null);
List dealStatusList = delegator.findAll("DealStatus", null);
DecimalFormat decimalFormat = new DecimalFormat("#,###.##");
%>
<wml>
<head>
<meta http-equiv="Cache-Control" content="max-age=0" forua="true"/>
</head>
<card id="opportunityDetail" title="m7 CRM">
<p>
<b>Name:</b><br/><%=opportunityDetail.get("dealName")%><br/>
<b>Amount:</b><br/>$$<%=decimalFormat.format(opportunityDetail.get("amount"))%><br/>
<b>Stage:</b><br/><%=getFieldValue(dealStageList, "stageId", String.valueOf(opportunityDetail.get("stageId")), "stageName") %><br/>
<b>Status:</b><br/><%=getFieldValue(dealStatusList, "dealStatusId", String.valueOf(opportunityDetail.get("dealStatusId")), "dealStatusName") %><br/>
<b>Projected Close Date:</b><br/><%=opportunityDetail.get("projectedCloseDate")%><br/>
</p>
<do type="accept" label="back">
<prev/>
</do>
</card>
</wml>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -