jacquard 1.12.0 by The Web Engineering Factory and Toolworks

uk.co.weft.htform
Class AutoForm

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byuk.co.weft.maybeupload.MaybeUploadServlet
              extended byuk.co.weft.htform.Servlet
                  extended byuk.co.weft.htform.WithExceptionHandlerServlet
                      extended byuk.co.weft.htform.Page
                          extended byuk.co.weft.htform.Form
                              extended byuk.co.weft.htform.AuthenticatedForm
                                  extended byuk.co.weft.htform.TableWrapperForm
                                      extended byuk.co.weft.htform.AutoForm
All Implemented Interfaces:
DocumentGenerator, ResourceConsumer, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class AutoForm
extends TableWrapperForm

a form constructed by reading the servlets and widgets it requires from a database. Not yet finished, not yet stable, use at your own risk.

Version:
$Revision: 1.4.4.1 $ This revision: $Author: simon $
  $Log: AutoForm.java,v $
  Revision 1.4.4.1  2005/12/23 10:48:33  simon
  Brute force tidy up after CVS server crash: this time it should work.

  Revision 1.4  2004/05/05 15:09:19  simon
  bugfix: in recent changes in Form.handleAction() (revision 1.78 of Form), if there was no prior widget set
  the default action handler did NOT get called. Fixed, but this is such a critical bit of logic that any new bugs
  are likely to be in this area.

  Revision 1.3  2003/08/20 09:38:35  simon
  Code cleanup with eclipse; mostly removal of exccessive includes

  Revision 1.2  2002/03/18 10:02:38  simon
  Checkin for 1.6.6; replacement of ContextElement (now deprecated) with
  ContextElementGenerator.

  Revision 1.1  2001/05/03 14:52:53  simon
  Moved phoenix/AutoServlet to htform/AutoForm, because it depends on
  no-args constructurs for Widgets which I did not want to make
  public. Changes to widgets to support this, namely by adding protected
  no-args constructors. This functionality is not really yet ready for
  prime time and may change before becoming truely stable.


  
Author:
Simon Brooke
See Also:
Serialized Form

Field Summary
 
Fields inherited from class uk.co.weft.htform.TableWrapperForm
allowDelete, confirmBeforeDelete, confirmDeletionToken, CONFIRMDELETIONTOKEN, deletedToken, DELETEDTOKEN, deleteWidget, identField, identWidget, keyField, maybeDeleteWidgets, onDropRedirect, ONDROPREDIRECTCONFIGTOKEN, onStoreRedirect, ONSTOREREDIRECTCONFIGTOKEN, storedToken, STOREDTOKEN, STOREFAILEDTOKEN, storeFailToken, table, tableDescriptor, updateWidget
 
Fields inherited from class uk.co.weft.htform.AuthenticatedForm
allowLogout, ALLOWLOGOUTCONFIGTOKEN, AUTHENTICATEDUSERMAGICTOKEN, authenticator, AUTHENTICATORCLASSMAGICTOKEN, authentificationWidgets, logoutPrompt, LOGOUTPROMPTCONFIGTOKEN, logoutWidget, onLogoutRedirect
 
Fields inherited from class uk.co.weft.htform.Form
action, actionExecutedToken, ACTIONEXECUTEDTOKEN, auxiliaries, contextMenuMagicToken, CONTEXTMENUMAGICTOKEN, cssHelp, CSSHELP, cssPrompt, CSSPROMPT, defaultScriptBase, mandatoryPrompt, MIN_WIDGETS, onloadFunctionToken, ONLOADFUNCTIONTOKEN, optionalPrompt, selectedWidgetSetMagicToken, SELECTEDWIDGETSETMAGICTOKEN, showHeadline, submitMethod, SUBMITMETHODCONFIGTOKEN, SUBMITMETHODGET, SUBMITMETHODPOST, validationWhingeToken, VALIDATIONWHINGETOKEN, whingeHeader, widgets, widgetSets
 
Fields inherited from class uk.co.weft.htform.Page
DOCTYPECONFIGTOKEN, dynamicFootInclude, dynamicHeadInclude, footInclude, footIncludeURL, headInclude, headIncludeURL, imageUrlBase, layout, printStylesheet, PRINTSTYLESHEETCONFIGTOKEN, stylesheet, STYLESHEETCONFIGTOKEN, title, titleMagicToken, TITLEMAGICTOKEN
 
Fields inherited from class uk.co.weft.htform.WithExceptionHandlerServlet
EXCEPTIONHANDLERCLASSCONFIGTOKEN
 
Fields inherited from class uk.co.weft.htform.Servlet
calendar, conf, contentType, CONTENTTYPECONFIGTOKEN, cookieDomain, cookiePath, COOKIESCONFIGTOKEN, cookieTTL, dbPassword, dbUrl, dbUsername, debug, DEBUGCONFIGTOKEN, driverName, embedded, here, identity, localeMagicToken, LOCALEMAGICTOKEN, outputStreamMagicToken, OUTPUTSTREAMMAGICTOKEN, parsePathInfo, PATHINFOMAGICTOKEN, ready, redirectMagicToken, REDIRECTMAGICTOKEN, requestMagicToken, REQUESTMAGICTOKEN, resourceBundleName, responseMagicToken, RESPONSEMAGICTOKEN, servletMagicToken, SERVLETMAGICTOKEN, sessionMagicToken, SESSIONMAGICTOKEN, USEHTTPSCONFIGTOKEN, zone
 
Fields inherited from class uk.co.weft.maybeupload.MaybeUploadServlet
allowOverwrite, maxUpload, saveUploadedFilesToDisk, silentlyRename, uploadDir, uploadDirPath, uploadDirURL
 
Fields inherited from interface uk.co.weft.htform.ResourceConsumer
RESOURCEBUNDLEMAGICTOKEN
 
Constructor Summary
AutoForm()
           
 
Method Summary
 void init(Context config)
          Principally, set up my widgets
protected  void loadWidgetSet(Context context, WidgetSet widgetSet)
           
 WidgetSet selectNextWidgetSet(Context context, Context whinges)
          Return the widget set which puts in the highest bid.
 
Methods inherited from class uk.co.weft.htform.TableWrapperForm
defaultActionHandler, drop, drop, drop, fetch, getDescriptor, getTitle, identify, inferKey, logout, makeReady, store, store
 
Methods inherited from class uk.co.weft.htform.AuthenticatedForm
login
 
Methods inherited from class uk.co.weft.htform.Form
addAuxiliary, addWidget, doBody, doHead, doHeadBodySep, fixupMagicValues, generate, getLayout, getNextActionURL, getSelectedWidgetSet, getTransformURL, getWidgetSetByName, handleAction, hasWidgets, postForm, postProcess, preForm, preProcess, setContextMenuQuery
 
Methods inherited from class uk.co.weft.htform.Page
doFoot, doFoot, generateContent, getFootInclude, getFootIncludeURL, getFootIncludeURL, getHeadInclude, getHeadIncludeURL, getHeadIncludeURL, getStylesheet, getStylesheets, getTables, getTitle, outputRedirectBlock, readStringFromURL
 
Methods inherited from class uk.co.weft.htform.WithExceptionHandlerServlet
whinge, whinge, whinge
 
Methods inherited from class uk.co.weft.htform.Servlet
addCookie, addCookie, coerceCookiesToContext, coerceToContext, coerceToContext, coerceToContext, coerceToContext, coerceToUrl, createContext, doGet, doPost, getCalendar, getContentType, getDebug, getLocale, getOutputStream, getResource, getResourceString, getServletInfo, grs, grs, handleCookies, handleRedirect, init, setCookieValues, storeOnSession
 
Methods inherited from class uk.co.weft.maybeupload.MaybeUploadServlet
doDelete, doHead, doOptions, doPut, doTrace, getUploadDir, getUploadURL, service
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface uk.co.weft.domutil.DocumentGenerator
destroy
 

Constructor Detail

AutoForm

public AutoForm()
Method Detail

init

public void init(Context config)
          throws InitialisationException
Principally, set up my widgets

Specified by:
init in interface DocumentGenerator
Overrides:
init in class TableWrapperForm
Throws:
InitialisationException

loadWidgetSet

protected void loadWidgetSet(Context context,
                             WidgetSet widgetSet)
                      throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException

selectNextWidgetSet

public WidgetSet selectNextWidgetSet(Context context,
                                     Context whinges)
                              throws java.lang.Exception
Return the widget set which puts in the highest bid. Doesn't really throw an exception but things it calls may

Overrides:
selectNextWidgetSet in class Form
Parameters:
context - the context for this service
whinges - a context for collecting exceptions thrown by widgets; the keys should be the names of widgets throwing exceptions, the values the exceptions thrown
Returns:
the widget set to use next
Throws:
java.lang.Exception

jacquard 1.12.0 by The Web Engineering Factory and Toolworks