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.activity;
18:
19: import org.ofbiz.base.util.Debug;
20: import org.ofbiz.entity.GenericDelegator;
21: import org.ofbiz.entity.GenericEntityException;
22:
23: import com.sourcetap.sfa.event.GenericWebEventProcessor;
24: import com.sourcetap.sfa.ui.UICache;
25: import com.sourcetap.sfa.ui.UIScreenSection;
26: import com.sourcetap.sfa.ui.UIWebScreenSection;
27: import com.sourcetap.sfa.util.UserInfo;
28:
29: /**
30: * DOCUMENT ME!
31: *
32: */
33: public class ActivityContactSelectWEP extends GenericWebEventProcessor {
34: public static final String module = ActivityContactSelectWEP.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: Debug.logVerbose(
56: "-->[ActivityContactSelectWEP.getUiWebScreenSection()] Looking in "
57: + "cache for UIScreenSection", module);
58:
59: UIScreenSection uiScreenSection = uiCache.getUiScreenSection(
60: screenName, sectionName, userInfo.getPartyId());
61: ActivityContactSelectWSS activityContactSelectWSS = null;
62:
63: if (uiScreenSection == null) {
64: Debug.logVerbose(
65: "-->[ActivityContactSelectWEP.getUiWebScreenSection()] Screen section "
66: + "not found in cache. Creating", module);
67:
68: activityContactSelectWSS = new ActivityContactSelectWSS(
69: userInfo, screenName, sectionName, delegator,
70: uiCache);
71: uiCache.putUiScreenSection(screenName, sectionName,
72: userInfo.getPartyId(),
73: (UIScreenSection) activityContactSelectWSS);
74: } else {
75: Debug
76: .logVerbose(
77: "-->[ActivityContactSelectWEP.getUiWebScreenSection()] Screen section found in cache",
78: module);
79:
80: activityContactSelectWSS = (ActivityContactSelectWSS) uiScreenSection;
81: }
82:
83: return (UIWebScreenSection) activityContactSelectWSS;
84: }
85: }
|