01: /*
02: * Copyright 2008 Gerd Ziegler (www.gerdziegler.de)
03: * Licensed under the Apache License, Version 2.0 (the "License");
04: * you may not use this file except in compliance with the License.
05: * You may obtain a copy of the License at
06: * http://www.apache.org/licenses/LICENSE-2.0
07: * Unless required by applicable law or agreed to in writing,
08: * software distributed under the License is distributed on an
09: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
10: * either express or implied. See the License for the specific
11: * language governing permissions and limitations under the License.
12: * @author www.gerdziegler.de
13: */
14: package org.ztemplates.render;
15:
16: import java.lang.annotation.ElementType;
17: import java.lang.annotation.Retention;
18: import java.lang.annotation.RetentionPolicy;
19: import java.lang.annotation.Target;
20:
21: /**
22: * Annotation for specifiying <sript>> tags that are needed by the
23: * template, especially JavaScript needed by Ajax applications. ztemplates
24: * collects all declarations and makes them available as "$script" to the
25: * template. Duplicates are removed and the order from the ZScript annotations
26: * is preserved.
27: *
28: * @return
29: */
30: @Retention(RetentionPolicy.RUNTIME)
31: @Target({ElementType.TYPE})
32: public @interface ZScript {
33: /**
34: * one or many paths relative to the contextPath or absolute pointing to
35: * scripts needed by this view
36: */
37: ZJavaScript[] javaScript() default {};
38:
39: /**
40: * one or many paths relative to the contextPath or absolute pointing to
41: * scripts needed by this view
42: */
43: ZCss[] css() default {};
44: }
|