01: package de.webman.config.eventhandler;
02:
03: import java.util.*;
04:
05: import com.teamkonzept.web.*;
06: import com.teamkonzept.webman.*;
07: import com.teamkonzept.lib.*;
08: import com.teamkonzept.webman.mainint.*;
09: import com.teamkonzept.webman.mainint.events.*;
10:
11: /**
12: Displays a frameset with a list of users on the left and an empty page to the right
13: * @author $Author: alex $
14: * @version $Revision: 1.2 $
15: */
16: public class COWorkflowFrameHandler extends DefaultEventHandler
17: implements ParameterTypes, DatabaseDefaults, FrameConstants {
18: private COWorkflowFrameHandler() {
19: }
20:
21: private static COWorkflowFrameHandler instance = new COWorkflowFrameHandler();
22:
23: public static COWorkflowFrameHandler getInstance() {
24: return instance;
25: }
26:
27: public void handleEvent(TKEvent evt) throws TKException {
28: try {
29: WebManEvent.checkEvent(evt.getRemoteUser(), evt.getName(),
30: ContextConstants.CUSTOMIZE_PROPERTIES); // check if event is allowed
31: TKHTMLTemplate t = evt
32: .getPrepHTMLTemplate("f_co_workflow.tmpl");
33: HTMLUtils.fillFrameSet(t, LEFT_FRAME_WIDTH,
34: "CO_WORKFLOW_LIST", "EMPTY");
35: WebManEvent.fillEventsIntoTemplate(evt.getRemoteUser(), t,
36: CUSTOMIZE_PROPERTIES);
37: evt.finishTemplate(t);
38: } catch (Throwable e) {
39: throw WebmanExceptionHandler.getException(e);
40: }
41: }
42:
43: public boolean isHandler(TKEvent evt) {
44: return evt.getName().equalsIgnoreCase("CO_WORKFLOW_FRAME");
45: }
46:
47: }
|