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

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

public class DefaultProfileUpdateHandler
extends java.lang.Object
implements Handler

Creates or updates a DefaultProfile. It expects a formpart for each profile attribute that needs to be updated. For updates the profile of the user is retrieved based on username. A first attempt is made to retrieve the username from the searchUsername parameter and a second attempt is made for the username under the GX_username sessionkey.

Variable Type Mode Default Description
insertuser Parameter Optional false If set to 'true', the a user is created and the profile is inserted rather than updated.
searchUsername Parameter Optional -- If set the profile of this user is updated.
username Parameter Optional -- The username of the user.
password Parameter Optional -- The password of the user.
generatedPassword Parameter Optional -- The generatedPassword of the user.
firstName Parameter Optional -- The firstName of the user.
prefix Parameter Optional -- The prefix of the user.
lastName Parameter Optional -- The lastName of the user.
address Parameter Optional -- The address of the user.
housenumber Parameter Optional -- The housenumber of the user.
zipcode Parameter Optional -- The zipcode of the user.
residence Parameter Optional -- The residence of the user.
email Parameter Optional -- The email of the user.
birthDate Parameter Optional -- The birthDate of the user.
gender Parameter Optional -- The gender of the user.
mobile Parameter Optional -- The mobile of the user.
telephone Parameter Optional -- The telephone of the user.
lastVisit Parameter Optional -- The lastVisit of the user.
numberOfVisits Parameter Optional -- The numberOfVisits of the user.
hasConfirmed Parameter Optional -- The hasConfirmed of the user.
confirmCode Parameter Optional -- The confirmCode of the user.
Example usage:


Constructor Summary
DefaultProfileUpdateHandler()
           
 
Method Summary
 void doHandle(FormDefinition form, State formState, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Processes the form.
 void init(FormComponentConfig config)
          Passes the initialization parameters to the component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultProfileUpdateHandler

public DefaultProfileUpdateHandler()
Method Detail

init

public void init(FormComponentConfig config)
          throws InitializationException
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 req,
                     javax.servlet.http.HttpServletResponse res)
              throws HandleException
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
req - The http request
res - The http response
Throws:
HandleException - If the form values could not be handled correctly


Copyright © 2007-2011 GX Software BV. All Rights Reserved.