📄 uiscreenlist_jsp.java
字号:
try {
eventProcessor = (com.sourcetap.sfa.event.GenericEventProcessor) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "com.sourcetap.sfa.event.GenericEventProcessor");
} catch (ClassNotFoundException exc) {
throw new InstantiationException(exc.getMessage());
} catch (Exception exc) {
throw new ServletException("Cannot create bean of class " + "com.sourcetap.sfa.event.GenericEventProcessor", exc);
}
pageContext.setAttribute("eventProcessor", eventProcessor, PageContext.APPLICATION_SCOPE);
}
}
out.write("\r\n");
com.sourcetap.sfa.ui.UICache uiCache = null;
synchronized (application) {
uiCache = (com.sourcetap.sfa.ui.UICache) pageContext.getAttribute("uiCache", PageContext.APPLICATION_SCOPE);
if (uiCache == null){
try {
uiCache = (com.sourcetap.sfa.ui.UICache) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "com.sourcetap.sfa.ui.UICache");
} catch (ClassNotFoundException exc) {
throw new InstantiationException(exc.getMessage());
} catch (Exception exc) {
throw new ServletException("Cannot create bean of class " + "com.sourcetap.sfa.ui.UICache", exc);
}
pageContext.setAttribute("uiCache", uiCache, PageContext.APPLICATION_SCOPE);
}
}
out.write("\r\n\r\n");
out.write("<!-- [oldFunctions.jsp] Begin -->\r\n");
out.write("\r\n");
out.write("<!-- [oldFunctions.jsp] End -->\r\n\r\n");
out.write("\r\n");
out.write("<!-- [oldDeclarations.jsp] Start -->\r\n\r\n");
GenericValue userLogin = (GenericValue)session.getAttribute("_USER_LOGIN_");
out.write("\r\n");
UserInfo userInfo = (UserInfo) session.getAttribute("userInfo");
out.write("\r\n\r\n");
String partyId = "";
if (userLogin != null )
partyId = userLogin.getString("partyId");
out.write("\r\n\r\n");
DecimalFormat decimalFormat = new DecimalFormat("#,###.##");
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MM/dd/yyyy");
SimpleDateFormat simpleTimeFormat = new SimpleDateFormat("K:mm a");
out.write("\r\n\r\n");
String controlPath=(String)request.getAttribute("_CONTROL_PATH_");
out.write("\r\n");
String contextRoot=(String)request.getAttribute("_CONTEXT_ROOT_");
out.write("\r\n\r\n");
String pageName = UtilFormatOut.checkNull((String)pageContext.getAttribute("PageName"));
out.write("\r\n\r\n");
String companyName = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "company.name");
out.write("\r\n");
String companySubtitle = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "company.subtitle");
out.write("\r\n");
String headerImageUrl = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "header.image.url");
out.write("\r\n\r\n");
String headerBoxBorderColor = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "header.box.border.color", "black");
out.write("\r\n");
String headerBoxBorderWidth = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "header.box.border.width", "1");
out.write("\r\n");
String headerBoxTopColor = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "header.box.top.color", "#336699");
out.write("\r\n");
String headerBoxBottomColor = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "header.box.bottom.color", "#cccc99");
out.write("\r\n");
String headerBoxBottomColorAlt = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "header.box.bottom.alt.color", "#eeeecc");
out.write("\r\n");
String headerBoxTopPadding = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "header.box.top.padding", "4");
out.write("\r\n");
String headerBoxBottomPadding = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "header.box.bottom.padding", "2");
out.write("\r\n\r\n");
String boxBorderColor = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "box.border.color", "black");
out.write("\r\n");
String boxBorderWidth = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "box.border.width", "1");
out.write("\r\n");
String boxTopColor = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "box.top.color", "#336699");
out.write("\r\n");
String boxBottomColor = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "box.bottom.color", "white");
out.write("\r\n");
String boxBottomColorAlt = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "box.bottom.alt.color", "white");
out.write("\r\n");
String boxTopPadding = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "box.top.padding", "4");
out.write("\r\n");
String boxBottomPadding = UtilProperties.getPropertyValue(contextRoot + "/WEB-INF/sfa.properties", "box.bottom.padding", "4");
out.write("\r\n");
String userStyleSheet = "/sfa/includes/maincss.css";
out.write("\r\n");
String alphabet[]={"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "*"};
out.write("\r\n\r\n");
out.write("<!-- [oldDeclarations.jsp] End -->\r\n\r\n");
out.write("\r\n\r\n");
out.write("<HTML>\r\n");
out.write("<HEAD>\r\n\r\n");
String clientRequest = (String)session.getAttribute("_CLIENT_REQUEST_");
//out.write("Client request: " + clientRequest + "<BR>");
String hostName = "";
if (clientRequest!=null && clientRequest.indexOf("//") > 0) {
int startPos = clientRequest.indexOf("//") + 2;
int endPos = clientRequest.indexOf(":", startPos);
if ( endPos < startPos )
endPos = clientRequest.indexOf("/", startPos);
if ( endPos < startPos )
hostName = clientRequest.substring(startPos);
else
hostName = clientRequest.substring(startPos, endPos);
} else {
hostName = "";
}
//out.write("Host name: " + hostName + "<BR>");
out.write("\r\n\r\n");
out.write("<title>");
out.print(hostName);
out.write(" - Sales Force Automation - ");
out.print(companyName);
out.write("</title>\r\n\r\n");
out.write("\r\n");
out.write("<!-- [userStyle.jsp] Start -->\r\n\r\n");
//------------ Get the style sheet
String styleSheetId = null;
ModelEntity entityStyleUser = delegator.getModelEntity("UiUserTemplate");
HashMap hashMapStyleUser = new HashMap();
if ( userLogin != null ) {
String ulogin = userLogin.getString("userLoginId");
hashMapStyleUser.put("userLoginId", ulogin);
} else {
hashMapStyleUser.put("userLoginId", "Default");
}
GenericPK stylePk = new GenericPK(entityStyleUser, hashMapStyleUser);
GenericValue userTemplate = delegator.findByPrimaryKey(stylePk);
if ( userTemplate != null ) {
styleSheetId = userTemplate.getString("styleSheetId");
}
if (styleSheetId == null){
hashMapStyleUser.put("userLoginId", "Default");
stylePk = new GenericPK(entityStyleUser, hashMapStyleUser);
userTemplate = delegator.findByPrimaryKey(stylePk);
if ( userTemplate != null ) {
styleSheetId = userTemplate.getString("styleSheetId");
}
}
if (styleSheetId != null){
ModelEntity entityStyle = delegator.getModelEntity("UiStyleTemplate");
HashMap hashMapStyle = new HashMap();
hashMapStyle.put("styleSheetId", styleSheetId);
stylePk = new GenericPK(entityStyle, hashMapStyle);
GenericValue styleTemplate = delegator.findByPrimaryKey(stylePk);
userStyleSheet = styleTemplate.getString("styleSheetLoc");
if ( userStyleSheet == null ){
userStyleSheet = "/sfa/includes/maincss.css";
}
}
out.write("\r\n");
out.write("<link rel=\"stylesheet\" href=\"");
out.print(userStyleSheet);
out.write("\" type=\"text/css\">\r\n\r\n");
out.write("<!-- [userStyle.jsp] End -->\r\n\r\n");
out.write("\r\n");
out.write("<LINK rel=\"stylesheet\" type=\"text/css\" href=\"/sfa/css/gridstyles.css\">\r\n");
out.write("<script language=\"JavaScript\" >\r\n\r\n function sendDropDown(elementName, idName, fieldName, findClass, paramName, paramValue, frm, action)\r\n {\r\n var sUrl = '");
if (_jspx_meth_ofbiz_url_0(pageContext))
return;
out.write("?findMode=filter&fieldName=' +\r\n\t\t\tfieldName + '&idName=' + idName + '¶m_' + paramName + '=' + paramValue +\r\n\t\t\t'&formName=' + frm.name + '&elementName=' + elementName + '&findClass=' + findClass + '&action=' + action;\r\n document.anchors('searchA').href=sUrl;\r\n document.anchors('searchA').click();\r\n }\r\n\r\n\r\n function sendData(ele, frm, action){\r\n if(ele.tagName != 'SELECT'){\r\n if(ele.value.length > 0){\r\n entity = ele.getAttribute(\"entityName\");\r\n field = ele.getAttribute(\"fieldName\");\r\n idName = ele.getAttribute(\"idName\");\r\n findClass = ele.getAttribute(\"findClass\");\r\n findValue = ele.value;\r\n elementName = ele.name;\r\n var sUrl = '");
if (_jspx_meth_ofbiz_url_1(pageContext))
return;
out.write("?entityName=' + entity + '&fieldName=' +\r\n\t\t\tfield + '&idName=' + idName + '&findByLikeValue=' + findValue + '&formName=' + frm.name +\r\n\t\t\t'&elementName=' + elementName + '&findClass=' + findClass + '&action=' + action;\r\n document.anchors('searchA').href=sUrl;\r\n document.anchors('searchA').click();\r\n } else {\r\n //alert('Enter search criteria to find a value.');\r\n //frm.item(ele.name).value = 'Enter search criteria.';\r\n }\r\n }\r\n }\r\n\r\n function updateForm(){\r\n var innDoc = document.frames('searchIFrame').document;\r\n var innHtml = innDoc.body.innerHTML;\r\n if(innHtml.length > 0){\r\n var sDiv = innDoc.all('searchResultDiv');\r\n if(sDiv != null){\r\n var formName = sDiv.getAttribute(\"formName\");\r\n var fieldName = sDiv.getAttribute(\"fieldName\");\r\n var elementName = sDiv.getAttribute(\"elementName\");\r\n var findClass = sDiv.getAttribute(\"findClass\");\r\n var findMode = sDiv.getAttribute(\"findMode\");\r\n var showMultiple = sDiv.getAttribute(\"showMultiple\");\r\n");
out.write(" var nde = innDoc.all(elementName);\r\n var existingNode = document.all(elementName);\r\n if(nde != null){\r\n var frm = document.forms(formName);\r\n if(nde.tagName == 'SELECT'){\r\n var opts = nde.children.tags('OPTION');\r\n if ( findMode == 'filter')\r\n {\r\n\t\t\t\tvar oldOpts = existingNode.children.tags('OPTION');\r\n//\t\t\t\talert('oldOpts.length = ' + oldOpts.length);\r\n//\t\t\t\talert('opts.length = ' + opts.length);\r\n\t\t\t\tvar numOpt = existingNode.options.length;\r\n//\t\t\t\talert('numOpt = ' + numOpt);\r\n\t\t\t\tfor (var i=0; i");
out.write("<numOpt;i++)\r\n\t\t\t\t\texistingNode.options.remove(numOpt - 1 - i);\r\n\t\t\t\tfor (var i=0; i");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -