SimpleServlets v5.5.0

com.simpleservlets.pageprocessor
Class GenericReloadPage

java.lang.Object
  extended by com.simpleservlets.pageprocessor.HTMLObjectsPageHandler
      extended by com.simpleservlets.pageprocessor.GenericReloadPage
All Implemented Interfaces:
PageHandler, ReloadPageHandler

public class GenericReloadPage
extends HTMLObjectsPageHandler
implements ReloadPageHandler

Page shown (by default) when reload/refresh or submission of an old page occurs. Developers are free to override this default by using the PageProcessor.setReloadPage(ReloadPageHandler).

Author:
Paul Hyde

Field Summary
 
Fields inherited from class com.simpleservlets.pageprocessor.HTMLObjectsPageHandler
defaultPageBackgroundColor, defaultTitle
 
Constructor Summary
GenericReloadPage()
          Builds a "reload warning" page.
 
Method Summary
 void processRequest(PageContext pc, HTMLElement con)
          This method is called whenever there is a request aimed at this page.
 void processRequest(PageContext pc, HTMLElement con, String continuePage)
           
 void processRequest(PageContext pc, String continuePage)
          Requests that the reload/refresh warning page be shown.
 
Methods inherited from class com.simpleservlets.pageprocessor.HTMLObjectsPageHandler
createFooter, createHeader, getPageBackgroundColor, getTitle, processRequest, sendPage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.simpleservlets.pageprocessor.PageHandler
processRequest
 

Constructor Detail

GenericReloadPage

public GenericReloadPage()
Builds a "reload warning" page.

Method Detail

processRequest

public void processRequest(PageContext pc,
                           String continuePage)
                    throws PageProcessorException
Description copied from interface: ReloadPageHandler
Requests that the reload/refresh warning page be shown. The continuePage indicates the page that the "no reload" page should provide a link to for the user to "continue" on to after reading the warning.

Specified by:
processRequest in interface ReloadPageHandler
Parameters:
pc - context of the current request/response cycle
continuePage - the page to link to from the warning page. If null is passed in, then the link will be to the original requested page that was part of the reload triggering.
Throws:
PageProcessorException

processRequest

public void processRequest(PageContext pc,
                           HTMLElement con)
                    throws PageProcessorException
Description copied from class: HTMLObjectsPageHandler
This method is called whenever there is a request aimed at this page. Subclasses override this method and fill up the specified container: con with the main content of the page. The subclass should then call HTMLObjectsPageHandler.sendPage(PageContext, HTMLElement) to deliver this page to the browser.

This class' implementation (when not overridden) always throws a PageProcessorException to indicate that the page is not permitted to be accessed directly. Subclasses override this method to allow a page to be directly requested.

Overrides:
processRequest in class HTMLObjectsPageHandler
Parameters:
pc - the context of the request/response cycle
con - the container to fill up with the page's content
Throws:
PageProcessorException - can be optionally thrown to indicate that the page could not be created.

processRequest

public void processRequest(PageContext pc,
                           HTMLElement con,
                           String continuePage)
                    throws PageProcessorException
Throws:
PageProcessorException

SimpleServlets v5.5.0

Copyright © 2001-2007 Programix Incorporated. All rights reserved. SimpleServlets is free and is OSI Certified Open Source Software under the BSD license.