01: /*
02: *
03: * Copyright (c) 2004 SourceTap - www.sourcetap.com
04: *
05: * The contents of this file are subject to the SourceTap Public License
06: * ("License"); You may not use this file except in compliance with the
07: * License. You may obtain a copy of the License at http://www.sourcetap.com/license.htm
08: * Software distributed under the License is distributed on an "AS IS" basis,
09: * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
10: * the specific language governing rights and limitations under the License.
11: *
12: * The above copyright notice and this permission notice shall be included
13: * in all copies or substantial portions of the Software.
14: *
15: */
16:
17: package com.sourcetap.sfa.opportunity;
18:
19: import com.sourcetap.sfa.event.GenericWebEventProcessor;
20: import com.sourcetap.sfa.ui.UICache;
21: import com.sourcetap.sfa.ui.UIScreenSection;
22: import com.sourcetap.sfa.ui.UIWebScreenSection;
23: import com.sourcetap.sfa.util.UserInfo;
24:
25: import org.ofbiz.entity.GenericDelegator;
26: import org.ofbiz.entity.GenericEntityException;
27:
28: /**
29: * DOCUMENT ME!
30: *
31: */
32: public class OpportunityContactSelectWEP extends
33: GenericWebEventProcessor {
34: public static final String module = OpportunityContactSelectWEP.class
35: .getName();
36:
37: /**
38: * DOCUMENT ME!
39: *
40: * @param userInfo
41: * @param screenName
42: * @param sectionName
43: * @param delegator
44: * @param uiCache
45: *
46: * @return
47: *
48: * @throws GenericEntityException
49: */
50: protected UIWebScreenSection getUiWebScreenSection(
51: UserInfo userInfo, String screenName, String sectionName,
52: GenericDelegator delegator, UICache uiCache)
53: throws GenericEntityException {
54: // This method is here so a child class can specify a different screen section class.
55:
56: UIScreenSection uiScreenSection = uiCache.getUiScreenSection(
57: screenName, sectionName, userInfo.getPartyId());
58: OpportunityContactSelectWSS opportunityContactSelectWSS = null;
59:
60: if (uiScreenSection == null) {
61:
62: opportunityContactSelectWSS = new OpportunityContactSelectWSS(
63: userInfo, screenName, sectionName, delegator,
64: uiCache);
65: uiCache.putUiScreenSection(screenName, sectionName,
66: userInfo.getPartyId(),
67: (UIScreenSection) opportunityContactSelectWSS);
68: } else {
69:
70: opportunityContactSelectWSS = (OpportunityContactSelectWSS) uiScreenSection;
71: }
72:
73: return (UIWebScreenSection) opportunityContactSelectWSS;
74: }
75: }
|