Results 1 to 3 of 3

Thread: Detecting a command object in the session

  1. #1
    Join Date
    Jul 2008
    Location
    Canada
    Posts
    15

    Default Detecting a command object in the session

    Does anyone know how to detect if a command object has been stored in the session? I'm using an AbstractFormWizardController and in my formBackingObject method I need to detect if there is a command object associated with the session.

    My Code is;

    Code:
    	protected Object formBackingObject(HttpServletRequest request)
    			throws Exception {
    		int page = request.getParameterMap().containsKey("page") ? ServletRequestUtils.getIntParameter(request, "page") : -1;
    		Object command = null;
    		
    		if (page >= 0 && page <= (getPageCount() - 1)) {	 
    			command = getCommand(request);
    		} else {
    			// create a new command object
    		}
    		
    		return registration;
    	}

  2. #2
    Join Date
    Dec 2006
    Posts
    311

    Default

    getFormSessionAttributeName() - used to get key command is stored with.

    but if you have sessionForm = false command will not be in there anyway.

  3. #3
    Join Date
    Jul 2008
    Location
    Canada
    Posts
    15

    Default

    Thanks for your help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •