01: package org.ztemplates.tutorial.yui.overlay;
02:
03: import org.ztemplates.render.ZExpose;
04: import org.ztemplates.render.ZRenderer;
05: import org.ztemplates.render.velocity.ZVelocityRenderer;
06: import org.ztemplates.yui.YScript;
07: import org.ztemplates.yui.YTrigger;
08: import org.ztemplates.yui.YTriggerId;
09: import org.ztemplates.yui.overlay.YOverlay;
10:
11: @ZRenderer(value=ZVelocityRenderer.class)
12: public class OverlayTutorialView {
13: private YOverlay overlay1;
14:
15: private YOverlay overlay2;
16:
17: public OverlayTutorialView() {
18: overlay1 = new YOverlay("overlayId1", "show1", new YTriggerId(
19: "show1", YTrigger.EVENT_mouseover), new YTriggerId(
20: "show1", YTrigger.EVENT_mouseout));
21: overlay1.setContent("katzeklo");
22:
23: overlay2 = new YOverlay("overlayId2", "show2", new YTriggerId(
24: "show2", YTrigger.EVENT_mouseover), new YTrigger(
25: new YScript("document"), YTrigger.EVENT_mousedown));
26: }
27:
28: @ZExpose(render=true)
29: public YOverlay getOverlay1Rendered() {
30: return overlay1;
31: }
32:
33: @ZExpose
34: public YOverlay getOverlay1() {
35: return overlay1;
36: }
37:
38: @ZExpose(render=true)
39: public YOverlay getOverlay2Rendered() {
40: return overlay2;
41: }
42:
43: @ZExpose
44: public YOverlay getOverlay2() {
45: return overlay2;
46: }
47:
48: @ZExpose
49: public String getOverlayUrl() throws Exception {
50: // return IndexAction.createUrl();
51: // return YTreeViewTutorialAction.createUrl();
52: return OverlayTutorialContentAction.createUrl();
53: }
54: }
|