nl.gx.webmanager.handler.forms.foundation
Class FormHandler
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
nl.gx.webmanager.handler.forms.foundation.FormHandler
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public class FormHandler
- extends javax.servlet.http.HttpServlet
Servlet for handling webmanager form posts.
First the form defintion xml is retrieved and parsed. This results FormDefinition, which
contains a number of validators, prerouters, handlers and postrouters.
Init parameters
| Init parameter |
Description |
| acceptget |
If set to true then HTTP GET requests will be accepted and processed.
This option exists for migration purposes and should not be turned on for
security reasons. Optional, one of "true" or "false". Default is false. |
Request variables:
| Request variable |
Default value |
Description |
| formelement |
- |
|
| ff |
- |
formflow |
- See Also:
- Serialized Form
|
Method Summary |
protected void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
|
protected void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
|
static ConfigurationManagement |
getConfigurationManagement()
Returns the ConfigurationManagement service. |
static java.lang.String |
getTextValue(SessionFormFlow formValues,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpSession session,
java.lang.String stylesheet)
Processes a stylesheet using the xml from the client's contexts as xml input. |
static java.lang.String |
getTextValue(SessionFormFlow formValues,
javax.servlet.http.HttpSession session,
java.lang.String stylesheet)
Processes a stylesheet using the xml from the client's session as xml input. |
void |
init(javax.servlet.ServletConfig servletConfig)
|
| Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FormHandler
public FormHandler()
init
public void init(javax.servlet.ServletConfig servletConfig)
throws javax.servlet.ServletException
- Specified by:
init in interface javax.servlet.Servlet- Overrides:
init in class javax.servlet.GenericServlet
- Throws:
javax.servlet.ServletException
doGet
protected void doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws javax.servlet.ServletException,
java.io.IOException
- Overrides:
doGet in class javax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
java.io.IOException
doPost
protected void doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws javax.servlet.ServletException,
java.io.IOException
- Overrides:
doPost in class javax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
java.io.IOException
getTextValue
public static java.lang.String getTextValue(SessionFormFlow formValues,
javax.servlet.http.HttpSession session,
java.lang.String stylesheet)
- Processes a stylesheet using the xml from the client's session as xml input.
- Parameters:
formValues - The state of the formflow, which is used for retrieving the flowvalues, session etc.session - The http session for retrieving the relevant session xml values.stylesheet - The xsl stylesheet or simple parameter that should be processed.
- Returns:
- The value of the argument if the
stylesheet argument doesn't contain xsl.
Otherwise, an xml document is constructed which contains the session values in the
session keys starting with "GX_". The userinfo and shopcart xml are added to
this xml document aswell. The root element of the document is <handler>, so the path
the xml stored in the GX_test session, will be /handler/test.
getTextValue
public static java.lang.String getTextValue(SessionFormFlow formValues,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpSession session,
java.lang.String stylesheet)
- Processes a stylesheet using the xml from the client's contexts as xml input.
- Parameters:
formValues - The state of the formflow, which is used for retrieving the flowvalues, session etc.req - The request from which the context and the session will be retrieved.stylesheet - The xsl stylesheet or simple parameter that should be processed.
- Returns:
- The value of the argument if the
stylesheet argument doesn't contain xsl. Otherwise, an
xml document is constructed which contains the context values in the keys starting with "GX_".
The userinfo and shopcart xml are added to this xml document aswell. The root element of the document is
<handler>, so the path the xml stored in the GX_test session, will be /handler/test.
getConfigurationManagement
public static ConfigurationManagement getConfigurationManagement()
- Returns the ConfigurationManagement service.
- Returns:
- configuration management service
Copyright © 2007-2011 GX Software BV. All Rights Reserved.