001    /*
002     * This file is part of the Echo Point Project.  This project is a
003     * collection of Components that have extended the Echo Web Application
004     * Framework Version 3.
005     *
006     * Version: MPL 1.1
007     *
008     * The contents of this file are subject to the Mozilla Public License Version
009     * 1.1 (the "License"); you may not use this file except in compliance with
010     * the License. You may obtain a copy of the License at
011     * http://www.mozilla.org/MPL/
012     *
013     * Software distributed under the License is distributed on an "AS IS" basis,
014     * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
015     * for the specific language governing rights and limitations under the
016     * License.
017     */
018    package echopoint.command;
019    
020    import nextapp.echo.app.Command;
021    
022    /**
023     * <code>JavaScriptEval</code> can be used to <code>eval</code> some arbitary
024     * JavaScript on the client.
025     * <p>
026     * The javascript must be in a form ready for the eval() function.
027     * @author Brad Baker <p>Modified by Mikael Soderman 2009-04-28</p>
028     * @version $Id$
029    
030     */
031    public class JavaScriptEval implements Command {
032        private String javaScript;
033    
034            /**
035             * Constructs a <code>JavaScriptEval</code>
036             *
037             * @param javaScript - the JavaScript text to <code>eval</code>
038             */
039        public JavaScriptEval(String javaScript) {
040            this.javaScript = javaScript;
041        }
042    
043    
044            /**
045             * @return Returns the javaScript.
046             */
047        public String getJavaScript() {
048            return javaScript;
049        }
050    
051    
052            /**
053             * @param javaScript - The javaScript to set.
054             */
055        public void setJavaScript(String javaScript) {
056            this.javaScript = javaScript;
057        }
058    }