01: package de.webman.content.eventhandler;
02:
03: import com.teamkonzept.web.*;
04: import com.teamkonzept.webman.*;
05: import de.webman.acl.*;
06: import com.teamkonzept.webman.mainint.*;
07: import com.teamkonzept.webman.mainint.events.*;
08: import com.teamkonzept.lib.*;
09:
10: /**
11: * @author $Author: alex $
12: * @version $Revision: 1.4 $
13: */
14: public class CEFrameHandler extends DefaultEventHandler implements
15: ParameterTypes, FrameConstants {
16: private CEFrameHandler() {
17: }
18:
19: private static CEFrameHandler instance = new CEFrameHandler();
20:
21: public static CEFrameHandler getInstance() {
22: return instance;
23: }
24:
25: public void handleEvent(TKEvent evt) throws TKException {
26: try {
27: CEUtils.checkEvent(evt);
28: TKHTMLTemplate frame = evt.getPrepHTMLTemplate("f_ce.tmpl");
29: HTMLUtils.fillFrameSet(frame, LEFT_FRAME_WIDTH,
30: "CE_SHOWLIST", "CE_EMPTY");
31: // die liste der offenen nodes kommt ins template
32: TKVector openNodes = new TKVector();
33: if (evt.getParams().hasMultiple(PARAMETER, "OPEN_NODES")) {
34: openNodes = evt.getParams().getVector(PARAMETER,
35: "OPEN_NODES");
36: } else {
37: if (evt.getParameter(PARAMETER, "OPEN_NODES") != null)
38: openNodes.put(0, evt.getParameter(PARAMETER,
39: "OPEN_NODES"));
40: else
41: openNodes.put(0, "-1");
42: }
43:
44: TKStandardIterator iterator1 = new TKStandardIterator(
45: openNodes, frame.getListIterator(), "OPEN_NODES",
46: "OPEN_NODES");
47: frame.setListIterator(iterator1);
48: evt.finishTemplate(frame);
49: } catch (Throwable e) {
50: // TO DO : Analyze Exception !
51: throw WebmanExceptionHandler.getException(e);
52: }
53: }
54:
55: public boolean isHandler(TKEvent evt) {
56: return evt.getName().equalsIgnoreCase("CE_START");
57: }
58: }
|