01: package org.wings.header;
02:
03: import org.wings.URLResource;
04: import org.wings.resource.DefaultURLResource;
05:
06: /**
07: * Use this to add a JavaScript header to a frame.
08: * <code>
09: * frame.addHeader(new JavaScriptHeader("../myJavaScript.js"));
10: * </code>
11: */
12: public class JavaScriptHeader extends Script {
13: public JavaScriptHeader(String url) {
14: this (new DefaultURLResource(url));
15: }
16:
17: public JavaScriptHeader(URLResource resource) {
18: super ("text/javascript", resource);
19: }
20: }
|