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.contact;
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 ContactRoleSelectWEP extends GenericWebEventProcessor {
33: private static final boolean DEBUG = false;
34:
35: /**
36: * DOCUMENT ME!
37: *
38: * @param userInfo
39: * @param screenName
40: * @param sectionName
41: * @param delegator
42: * @param uiCache
43: *
44: * @return
45: *
46: * @throws GenericEntityException
47: */
48: protected UIWebScreenSection getUiWebScreenSection(
49: UserInfo userInfo, String screenName, String sectionName,
50: GenericDelegator delegator, UICache uiCache)
51: throws GenericEntityException {
52: // This method is here so a child class can specify a different screen section class.
53:
54: UIScreenSection uiScreenSection = uiCache.getUiScreenSection(
55: screenName, sectionName, userInfo.getPartyId());
56: ContactRoleSelectWSS contactRoleSelectWSS = null;
57:
58: if (uiScreenSection == null) {
59:
60: contactRoleSelectWSS = new ContactRoleSelectWSS(userInfo,
61: screenName, sectionName, delegator, uiCache);
62: uiCache.putUiScreenSection(screenName, sectionName,
63: userInfo.getPartyId(),
64: (UIScreenSection) contactRoleSelectWSS);
65: } else {
66:
67: contactRoleSelectWSS = (ContactRoleSelectWSS) uiScreenSection;
68: }
69:
70: return (UIWebScreenSection) contactRoleSelectWSS;
71: }
72: }
|