| java.lang.Object org.directwebremoting.ScriptBuffer
ScriptBuffer | public class ScriptBuffer (Code) | | A ScriptBuffer is like a StringBuffer except that it is used to create
Javascript commands. There are 2 version of the append() method:
The first is
ScriptBuffer.appendScript(String) which assumes that the
parameter is to be inserted literally into the output.
The second is
ScriptBuffer.appendData(String) (and variants for Object and
primitive types) which assumes that the parameter is a variable which should
be properly converted, escaped and quoted.
author: Joe Walker [joe at getahead dot ltd dot uk] |
Constructor Summary | |
public | ScriptBuffer() Create an empty ScriptBuffer. | public | ScriptBuffer(String str) Create a ScriptBuffer with some initial content. |
Method Summary | |
public ScriptBuffer | appendAll(ScriptBuffer buffer) Parameters: buffer - The ScriptBuffer to merge into this script this. | public ScriptBuffer | appendCall(String funcName) Call a named function with no parameters.
Parameters: funcName - The name of the function to call this. | public ScriptBuffer | appendCall(String funcName, Object param1) Call a named function with one parameter.
Parameters: funcName - The name of the function to call Parameters: param1 - The first parameter to the above function this. | public ScriptBuffer | appendCall(String funcName, Object param1, Object param2) Call a named function with one parameter.
Parameters: funcName - The name of the function to call Parameters: param1 - The first parameter to the above function Parameters: param2 - The second parameter to the above function this. | public ScriptBuffer | appendCall(String funcName, Object param1, Object param2, Object param3) Call a named function with one parameter.
Parameters: funcName - The name of the function to call Parameters: param1 - The first parameter to the above function Parameters: param2 - The second parameter to the above function Parameters: param3 - The third parameter to the above function this. | public ScriptBuffer | appendCall(String funcName, Object param1, Object param2, Object param3, Object param4) Call a named function with one parameter.
Parameters: funcName - The name of the function to call Parameters: param1 - The first parameter to the above function Parameters: param2 - The second parameter to the above function Parameters: param3 - The third parameter to the above function Parameters: param4 - The fourth parameter to the above function this. | public ScriptBuffer | appendCall(String funcName, Object param1, Object param2, Object param3, Object param4, Object param5) Call a named function with one parameter.
Parameters: funcName - The name of the function to call Parameters: param1 - The first parameter to the above function Parameters: param2 - The second parameter to the above function Parameters: param3 - The third parameter to the above function Parameters: param4 - The fourth parameter to the above function Parameters: param5 - The fifth parameter to the above function this. | public ScriptBuffer | appendCall(String funcName, Object param1, Object param2, Object param3, Object param4, Object param5, Object param6) Call a named function with one parameter.
Parameters: funcName - The name of the function to call Parameters: param1 - The first parameter to the above function Parameters: param2 - The second parameter to the above function Parameters: param3 - The third parameter to the above function Parameters: param4 - The fourth parameter to the above function Parameters: param5 - The fifth parameter to the above function Parameters: param6 - The sixth parameter to the above function this. | public ScriptBuffer | appendCall(String funcName, Object param1, Object param2, Object param3, Object param4, Object param5, Object param6, Object param7) Call a named function with one parameter.
Parameters: funcName - The name of the function to call Parameters: param1 - The first parameter to the above function Parameters: param2 - The second parameter to the above function Parameters: param3 - The third parameter to the above function Parameters: param4 - The fourth parameter to the above function Parameters: param5 - The fifth parameter to the above function Parameters: param6 - The sixth parameter to the above function Parameters: param7 - The seventh parameter to the above function this. | public ScriptBuffer | appendCall(String funcName, Object param1, Object param2, Object param3, Object param4, Object param5, Object param6, Object param7, Object param8) Call a named function with one parameter.
Parameters: funcName - The name of the function to call Parameters: param1 - The first parameter to the above function Parameters: param2 - The second parameter to the above function Parameters: param3 - The third parameter to the above function Parameters: param4 - The fourth parameter to the above function Parameters: param5 - The fifth parameter to the above function Parameters: param6 - The sixth parameter to the above function Parameters: param7 - The seventh parameter to the above function Parameters: param8 - The eighth parameter to the above function this. | public ScriptBuffer | appendCall(String funcName, Object param1, Object param2, Object param3, Object param4, Object param5, Object param6, Object param7, Object param8, Object param9) Call a named function with one parameter.
Parameters: funcName - The name of the function to call Parameters: param1 - The first parameter to the above function Parameters: param2 - The second parameter to the above function Parameters: param3 - The third parameter to the above function Parameters: param4 - The fourth parameter to the above function Parameters: param5 - The fifth parameter to the above function Parameters: param6 - The sixth parameter to the above function Parameters: param7 - The seventh parameter to the above function Parameters: param8 - The eighth parameter to the above function Parameters: param9 - The ninth parameter to the above function this. | public ScriptBuffer | appendCall(String funcName, Object param1, Object param2, Object param3, Object param4, Object param5, Object param6, Object param7, Object param8, Object param9, Object param10) Call a named function with one parameter.
Parameters: funcName - The name of the function to call Parameters: param1 - The first parameter to the above function Parameters: param2 - The second parameter to the above function Parameters: param3 - The third parameter to the above function Parameters: param4 - The fourth parameter to the above function Parameters: param5 - The fifth parameter to the above function Parameters: param6 - The sixth parameter to the above function Parameters: param7 - The seventh parameter to the above function Parameters: param8 - The eighth parameter to the above function Parameters: param9 - The ninth parameter to the above function Parameters: param10 - The tenth parameter to the above function this. | public ScriptBuffer | appendData(boolean b) Parameters: b - The boolean to add to the script this. | public ScriptBuffer | appendData(char c) Parameters: c - The char to add to the script this. | public ScriptBuffer | appendData(double d) Parameters: d - The double to add to the script this. | public ScriptBuffer | appendData(float f) Parameters: f - The float to add to the script this. | public ScriptBuffer | appendData(int i) Parameters: i - The int to add to the script this. | public ScriptBuffer | appendData(long l) Parameters: l - The long to add to the script this. | public ScriptBuffer | appendData(Object obj) Parameters: obj - The Object to add to the script this. | public ScriptBuffer | appendData(String str) Parameters: str - The String to add to the script this. | public ScriptBuffer | appendScript(String str) Parameters: str - The String to add to the script this. | public List<? extends Object> | getParts() For DWR use only - This method is not part of the public API. | public String | toString() |
ScriptBuffer | public ScriptBuffer()(Code) | | Create an empty ScriptBuffer.
|
ScriptBuffer | public ScriptBuffer(String str)(Code) | | Create a ScriptBuffer with some initial content.
ScriptBuffer.appendScript(String) is called with the passed string
Parameters: str - The initial string to place in the buffer |
appendCall | public ScriptBuffer appendCall(String funcName, Object param1, Object param2)(Code) | | Call a named function with one parameter.
Parameters: funcName - The name of the function to call Parameters: param1 - The first parameter to the above function Parameters: param2 - The second parameter to the above function this. To allow buffer.append(x).append(y).append(z); See Also: ScriptProxy.addFunctionCall(StringObjectObject) |
appendCall | public ScriptBuffer appendCall(String funcName, Object param1, Object param2, Object param3)(Code) | | Call a named function with one parameter.
Parameters: funcName - The name of the function to call Parameters: param1 - The first parameter to the above function Parameters: param2 - The second parameter to the above function Parameters: param3 - The third parameter to the above function this. To allow buffer.append(x).append(y).append(z); See Also: ScriptProxy.addFunctionCall(StringObjectObjectObject) |
appendCall | public ScriptBuffer appendCall(String funcName, Object param1, Object param2, Object param3, Object param4)(Code) | | Call a named function with one parameter.
Parameters: funcName - The name of the function to call Parameters: param1 - The first parameter to the above function Parameters: param2 - The second parameter to the above function Parameters: param3 - The third parameter to the above function Parameters: param4 - The fourth parameter to the above function this. To allow buffer.append(x).append(y).append(z); See Also: ScriptProxy.addFunctionCall(StringObjectObjectObjectObject) |
appendCall | public ScriptBuffer appendCall(String funcName, Object param1, Object param2, Object param3, Object param4, Object param5)(Code) | | Call a named function with one parameter.
Parameters: funcName - The name of the function to call Parameters: param1 - The first parameter to the above function Parameters: param2 - The second parameter to the above function Parameters: param3 - The third parameter to the above function Parameters: param4 - The fourth parameter to the above function Parameters: param5 - The fifth parameter to the above function this. To allow buffer.append(x).append(y).append(z); See Also: ScriptProxy.addFunctionCall(StringObjectObjectObjectObjectObject) |
appendCall | public ScriptBuffer appendCall(String funcName, Object param1, Object param2, Object param3, Object param4, Object param5, Object param6)(Code) | | Call a named function with one parameter.
Parameters: funcName - The name of the function to call Parameters: param1 - The first parameter to the above function Parameters: param2 - The second parameter to the above function Parameters: param3 - The third parameter to the above function Parameters: param4 - The fourth parameter to the above function Parameters: param5 - The fifth parameter to the above function Parameters: param6 - The sixth parameter to the above function this. To allow buffer.append(x).append(y).append(z); See Also: ScriptProxy.addFunctionCall(StringObjectObjectObjectObjectObjectObject) |
appendCall | public ScriptBuffer appendCall(String funcName, Object param1, Object param2, Object param3, Object param4, Object param5, Object param6, Object param7)(Code) | | Call a named function with one parameter.
Parameters: funcName - The name of the function to call Parameters: param1 - The first parameter to the above function Parameters: param2 - The second parameter to the above function Parameters: param3 - The third parameter to the above function Parameters: param4 - The fourth parameter to the above function Parameters: param5 - The fifth parameter to the above function Parameters: param6 - The sixth parameter to the above function Parameters: param7 - The seventh parameter to the above function this. To allow buffer.append(x).append(y).append(z); See Also: ScriptProxy.addFunctionCall(StringObjectObjectObjectObjectObjectObjectObject) |
appendCall | public ScriptBuffer appendCall(String funcName, Object param1, Object param2, Object param3, Object param4, Object param5, Object param6, Object param7, Object param8)(Code) | | Call a named function with one parameter.
Parameters: funcName - The name of the function to call Parameters: param1 - The first parameter to the above function Parameters: param2 - The second parameter to the above function Parameters: param3 - The third parameter to the above function Parameters: param4 - The fourth parameter to the above function Parameters: param5 - The fifth parameter to the above function Parameters: param6 - The sixth parameter to the above function Parameters: param7 - The seventh parameter to the above function Parameters: param8 - The eighth parameter to the above function this. To allow buffer.append(x).append(y).append(z); See Also: ScriptProxy.addFunctionCall(StringObjectObjectObjectObjectObjectObjectObject) |
appendCall | public ScriptBuffer appendCall(String funcName, Object param1, Object param2, Object param3, Object param4, Object param5, Object param6, Object param7, Object param8, Object param9)(Code) | | Call a named function with one parameter.
Parameters: funcName - The name of the function to call Parameters: param1 - The first parameter to the above function Parameters: param2 - The second parameter to the above function Parameters: param3 - The third parameter to the above function Parameters: param4 - The fourth parameter to the above function Parameters: param5 - The fifth parameter to the above function Parameters: param6 - The sixth parameter to the above function Parameters: param7 - The seventh parameter to the above function Parameters: param8 - The eighth parameter to the above function Parameters: param9 - The ninth parameter to the above function this. To allow buffer.append(x).append(y).append(z); See Also: ScriptProxy.addFunctionCall(StringObjectObjectObjectObjectObjectObjectObject) |
appendCall | public ScriptBuffer appendCall(String funcName, Object param1, Object param2, Object param3, Object param4, Object param5, Object param6, Object param7, Object param8, Object param9, Object param10)(Code) | | Call a named function with one parameter.
Parameters: funcName - The name of the function to call Parameters: param1 - The first parameter to the above function Parameters: param2 - The second parameter to the above function Parameters: param3 - The third parameter to the above function Parameters: param4 - The fourth parameter to the above function Parameters: param5 - The fifth parameter to the above function Parameters: param6 - The sixth parameter to the above function Parameters: param7 - The seventh parameter to the above function Parameters: param8 - The eighth parameter to the above function Parameters: param9 - The ninth parameter to the above function Parameters: param10 - The tenth parameter to the above function this. To allow buffer.append(x).append(y).append(z); See Also: ScriptProxy.addFunctionCall(StringObjectObjectObjectObjectObjectObjectObject) |
getParts | public List<? extends Object> getParts()(Code) | | For DWR use only - This method is not part of the public API.
Do not use it without understanding the implications for future proofing.
The list of parts of the final output script |
|
|