01: package de.webman.template.eventhandler;
02:
03: import com.teamkonzept.webman.mainint.events.*;
04: import com.teamkonzept.webman.mainint.*;
05: import com.teamkonzept.webman.*;
06: import com.teamkonzept.web.*;
07: import com.teamkonzept.lib.*;
08:
09: /**
10: *
11: * Maske zum Erzeugen einer Presentation = neues Template
12: *
13: * @author $Author: alex $
14: * @version $Revision: 1.2 $
15: */
16: public class TENewHandler extends DefaultEventHandler {
17: private TENewHandler() {
18: }
19:
20: private static TENewHandler instance = new TENewHandler();
21:
22: public static TENewHandler getInstance() {
23: return instance;
24: }
25:
26: public void handleEvent(TKEvent evt) throws TKException {
27: try {
28: TKHTMLTemplate t = evt
29: .getPrepHTMLTemplate("te_renameTmpl.tmpl");
30: WebManEvent.fillEventsIntoTemplate(evt.getRemoteUser(), t,
31: ContextConstants.TEMPLATES);
32: evt.finishTemplate(t);
33: } catch (Throwable e) {
34: throw WebmanExceptionHandler.getException(e);
35: }
36: }
37:
38: public boolean isHandler(TKEvent evt) {
39: return evt.getName().equalsIgnoreCase("TE_NEW");
40: }
41: }
|