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.party;
18:
19: import org.ofbiz.entity.GenericDelegator;
20: import org.ofbiz.entity.GenericEntityException;
21:
22: import com.sourcetap.sfa.event.GenericWebEventProcessor;
23: import com.sourcetap.sfa.ui.UICache;
24: import com.sourcetap.sfa.ui.UIScreenSection;
25: import com.sourcetap.sfa.ui.UIWebScreenSection;
26: import com.sourcetap.sfa.util.UserInfo;
27:
28: /**
29: * DOCUMENT ME!
30: *
31: */
32: public class PartyIdentifierSelectWEP 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: PartyIdentifierSelectWSS partyIdentifierSelectWSS = null;
57:
58: if (uiScreenSection == null) {
59:
60: partyIdentifierSelectWSS = new PartyIdentifierSelectWSS(
61: userInfo, screenName, sectionName, delegator,
62: uiCache);
63: uiCache.putUiScreenSection(screenName, sectionName,
64: userInfo.getPartyId(),
65: (UIScreenSection) partyIdentifierSelectWSS);
66: } else {
67:
68: partyIdentifierSelectWSS = (PartyIdentifierSelectWSS) uiScreenSection;
69: }
70:
71: return (UIWebScreenSection) partyIdentifierSelectWSS;
72: }
73: }
|