001: package org.apache.jsp;
002:
003: import javax.servlet.*;
004: import javax.servlet.http.*;
005: import javax.servlet.jsp.*;
006: import org.apache.jasper.runtime.*;
007: import com.sourcetap.sfa.ui.UIScreenSection;
008: import com.sourcetap.sfa.ui.UIQuery;
009: import com.sourcetap.sfa.util.UserInfo;
010: import com.sourcetap.sfa.util.Preference;
011: import com.sourcetap.sfa.ui.UIScreenSection;
012:
013: public class lead_jsp extends HttpJspBase {
014:
015: private static java.util.Vector _jspx_includes;
016:
017: static {
018: _jspx_includes = new java.util.Vector(1);
019: _jspx_includes.add("/includes/getScreenPreference.jsp");
020: }
021:
022: public java.util.List getIncludes() {
023: return _jspx_includes;
024: }
025:
026: public void _jspService(HttpServletRequest request,
027: HttpServletResponse response) throws java.io.IOException,
028: ServletException {
029:
030: JspFactory _jspxFactory = null;
031: javax.servlet.jsp.PageContext pageContext = null;
032: HttpSession session = null;
033: ServletContext application = null;
034: ServletConfig config = null;
035: JspWriter out = null;
036: Object page = this ;
037: JspWriter _jspx_out = null;
038:
039: try {
040: _jspxFactory = JspFactory.getDefaultFactory();
041: response.setContentType("text/html;charset=ISO-8859-1");
042: pageContext = _jspxFactory.getPageContext(this , request,
043: response, null, true, 8192, true);
044: application = pageContext.getServletContext();
045: config = pageContext.getServletConfig();
046: session = pageContext.getSession();
047: out = pageContext.getOut();
048: _jspx_out = out;
049:
050: out.write("\r\n");
051: out.write("\r\n");
052: out.write("\r\n");
053: out.write("\r\n");
054: out.write("\r\n\r\n");
055: org.ofbiz.entity.GenericDelegator delegator = null;
056: synchronized (application) {
057: delegator = (org.ofbiz.entity.GenericDelegator) pageContext
058: .getAttribute("delegator",
059: PageContext.APPLICATION_SCOPE);
060: if (delegator == null) {
061: throw new java.lang.InstantiationException(
062: "bean delegator not found within scope");
063: }
064: }
065: out.write("\r\n\r\n");
066:
067: String action = request.getParameter("action");
068: if ((action == null) || (action.length() < 1)) {
069: Preference pref = Preference.getInstance(delegator);
070: UserInfo userInfo = (UserInfo) session
071: .getAttribute("userInfo");
072: action = pref.getPreference(userInfo.getPartyId(),
073: userInfo.getAccountId(), "SCREEN_ACTION",
074: UIScreenSection.ACTION_SHOW_INSERT);
075: }
076:
077: out.write("\r\n\r\n");
078:
079: String leadId = "";
080: if (request.getParameter("leadId") != null) {
081: leadId = request.getParameter("leadId");
082: }
083:
084: out.write("\r\n");
085: out
086: .write("<FRAMESET ROWS=\"365, *\" BORDER=\"0\" FRAMEBORDER=\"no\" FRAMESPACING=\"0\">\r\n");
087: if (!leadId.equals("")) {
088: out.write("\r\n ");
089: out
090: .write("<FRAME NAME=\"headerFrame\" MARGINWIDTH=\"0\" MARGINHEIGHT=\"0\" SCROLLING=\"AUTO\" SRC=\"leadHeader?leadId=");
091: out.print(leadId);
092: out.write("&action=");
093: out.print(UIScreenSection.ACTION_SHOW);
094: out.write("\">\r\n");
095: } else {
096: out.write("\r\n ");
097: out
098: .write("<FRAME NAME=\"headerFrame\" MARGINWIDTH=\"0\" MARGINHEIGHT=\"0\" SCROLLING=\"AUTO\" SRC=\"leadHeader?action=");
099: out.print(action);
100: out.write("\">\r\n");
101: }
102: out
103: .write("\r\n This application requires Internet Explorer 5.0 or greater\r\n ");
104: out.write("</FRAME>\r\n");
105: if (leadId.equals("")) {
106: out.write("\r\n ");
107: out
108: .write("<FRAME NAME=\"contentFrame\" MARGINWIDTH=\"0\" MARGINHEIGHT=\"0\" SCROLLING=\"AUTO\" SRC=\"leadList?action=");
109: out.print(UIScreenSection.ACTION_QUERY);
110: out.write("&savedQueryName=");
111: out.print(UIQuery.LAST_QUERY_NAME_URL_ENCODED);
112: out.write("\">\r\n");
113: } else {
114: out.write("\r\n ");
115: out
116: .write("<FRAME NAME=\"contentFrame\" MARGINWIDTH=\"0\" MARGINHEIGHT=\"0\" SCROLLING=\"NO\" SRC=\"leadTabs?leadId=");
117: out.print(leadId);
118: out.write("\">\r\n");
119: }
120: out.write("\r\n ");
121: out.write("</FRAME>\r\n");
122: out.write("</FRAMESET>\r\n\r\n");
123: } catch (Throwable t) {
124: out = _jspx_out;
125: if (out != null && out.getBufferSize() != 0)
126: out.clearBuffer();
127: if (pageContext != null)
128: pageContext.handlePageException(t);
129: } finally {
130: if (_jspxFactory != null)
131: _jspxFactory.releasePageContext(pageContext);
132: }
133: }
134: }
|