01: /*
02: * Created on 27/06/2005 00:20:38
03: */
04: package net.jforum.view.forum;
05:
06: import net.jforum.Command;
07: import net.jforum.JForumExecutionContext;
08:
09: /**
10: * Loads and parse javascript files with FTL statements.
11: *
12: * @author Rafael Steil
13: * @version $Id: JSAction.java,v 1.5 2006/08/20 12:19:16 sergemaslyukov Exp $
14: */
15: public class JSAction extends Command {
16: /**
17: * Loads and parses a javascript file.
18: * The filename should be into the "js" directory and should
19: * have the extension ".js".
20: * @see net.jforum.Command#list()
21: */
22: public void list() {
23: JForumExecutionContext.setContentType("text/javascript");
24:
25: String filename = this .request.getParameter("js");
26:
27: this .templateName = "js/" + filename + ".js";
28: }
29: }
|