Whatever message this page gives is out now! Go check it out!
public abstract interface Response |
| Returns | Syntax | Description |
Query | addQuery(String name, String[] columns) | Adds a query to the calling template. |
void | SetVariable(String name{{, String}} value) | Sets a variable in the calling template. |
void | write(String output) | Outputs text back to the user. |
void | writeDebug(String output) | Writes text output into the debug stream. |
public Query addQuery(String name, String[] columns) |
| Parameter | Description |
name | The name of the query to add to the template |
columns | The column names to use in the query |
// Create string array with column names (also track columns indexes) String[] columns = { "FirstName", "LastName" } ; int iFirstName = 1, iLastName = 2 ; // Create a query which contains these columns Query query = response.addQuery( "People", columns ) ; // Add data to the query int iRow = query.addRow() ; query.setData( iRow, iFirstName, "John" ) ; query.setData( iRow, iLastName, "Smith" ) ; iRow = query.addRow() ; query.setData( iRow, iFirstName, "Jane" ) ; query.setData( iRow, iLastName, "Doe" ) ; |
public void setVariable(String name, String value) |
| Parameter | Description |
name | The name of the variable to set |
value | The value to set the variable to |
boolean bMessageSent ; ...attempt to send the message... if ( bMessageSent == true ) { response.setVariable( "MessageSent", "Yes" ) ; } else { response.setVariable( "MessageSent", "No" ) ; } |
public void write(String output) |
| Parameter | Description |
output | Text to output |
response.write( "DESTINATION = " + request.getAttribute("DESTINATION") ) ; |
public void writeDebug(String output) |
| Parameter | Description |
output | The text to output |
if ( request.debug() ) { response.writeDebug( "debug info" ) ; } |