nl.gx.webmanager.handler.forms.handling
Class XslQueryArgumentsHandler

java.lang.Object
  extended by nl.gx.webmanager.handler.forms.foundation.FormHandlerBase
      extended by nl.gx.webmanager.handler.forms.handling.XslQueryArgumentsHandler
All Implemented Interfaces:
FormComponent, Handler

public class XslQueryArgumentsHandler
extends FormHandlerBase
implements Handler

Executes a query (often an UPDATE statement) that has parameters. These parameters can contain XSL expressions or plain data. The XSL expressions transform the XML that is formed by the contents of the session keys and the current form flow. The parameters 'table' and 'paramcolumns' are used to determine the data types of the arguments in the query.

Variable Type Mode Default Description
sessionkey Multiple Parameter Optional - One or more session keys to translate the XSL into XML. The value stored under these keys should be XML.
xslexpr Multiple Parameter Required - XSL expressions to generate string values to pass as arguments to the query.
connectionname Parameter Required - The connection name for the database.
query Parameter Required - A query that has parameters. The number of arguments of the query should match the number of XSL expressions.
table Parameter Required - Table that contains the 'paramcolumns'.
paramcolumns Parameter Required - This parameter is used for determining the data types of the parameters of the SQL query. This is a comma separated string of SQL table column names. The order should match the order of the XSL expressions and 'query' parameters.
Example usage:


Field Summary
 
Fields inherited from class nl.gx.webmanager.handler.forms.foundation.FormHandlerBase
DEFAULT_STATEMENT_TIMEOUT, log, staticlog
 
Constructor Summary
XslQueryArgumentsHandler()
           
 
Method Summary
 void doHandle(FormDefinition form, State formState, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Processes the form.
 void init(FormComponentConfig config)
          Passes the initialization parameters to the component.
 
Methods inherited from class nl.gx.webmanager.handler.forms.foundation.FormHandlerBase
close, close, close, executeInsertWithIdentityMSSQLMYSQL, executeInsertWithIdentityOracle, executeIntegerQuery, executeIntegerQuery, executeIntegersQuery, executeIntegersQuery, executeQuery, executeStringQuery, executeUpdate, fillValues, getDataSource, setArguments, setArguments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XslQueryArgumentsHandler

public XslQueryArgumentsHandler()
Method Detail

init

public void init(FormComponentConfig config)
          throws InitializationException
Description copied from interface: FormComponent
Passes the initialization parameters to the component.

Specified by:
init in interface FormComponent
Parameters:
config - The FormComponentConfig object that contains configutation information for this component.
Throws:
InitializationException - If initialization failed

doHandle

public void doHandle(FormDefinition form,
                     State formState,
                     javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response)
              throws HandleException
Description copied from interface: Handler
Processes the form.

Specified by:
doHandle in interface Handler
Parameters:
form - The definition of the form for which the submitted values should be handled.
formState - The session values for the form
request - The http request
response - The http response
Throws:
HandleException - If the form values could not be handled correctly


Copyright © 2007-2010 GX creative online development BV. All Rights Reserved.