uk.co.weft.htform
Class QueryByExampleList
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
uk.co.weft.maybeupload.MaybeUploadServlet
uk.co.weft.htform.Servlet
uk.co.weft.htform.WithExceptionHandlerServlet
uk.co.weft.htform.Page
uk.co.weft.htform.Form
uk.co.weft.htform.AuthenticatedForm
uk.co.weft.htform.List
uk.co.weft.htform.QueryByExampleList
- All Implemented Interfaces:
- DocumentGenerator, ResourceConsumer, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
- public class QueryByExampleList
- extends List
a list which enables query-by-example. In the long run this probably
replaces the existing List servlet, as it is more powerful /and/ simpler.
Note that the query_template parameter from List
cannot be used; instead, the store and
keymust be used. In addition to the configuration
parameters known to List, this class knows about
-
key
-
String: the name of the key field in my store; optional, defaults to the
value of action_field
-
store
-
String: the name of my data store. The store must exist in the database
indicated by db_url in the service time context, although this need not be
an SQL database. In an SQL database, it may be either a table or a view.
Not optional, no default.
- See Also:
- Serialized Form
|
Field Summary |
protected boolean |
exact
do I require an exact match? |
protected java.lang.String |
key
the name of the keyfield in my data store |
static java.lang.String |
KEYCONFIGTOKEN
a token upon which I shall look in my configuration for the name of the
keyfield in my data store |
protected java.lang.String |
store
the name of my data store |
static java.lang.String |
STORECONFIGTOKEN
a token upon which I shall look in my configuration for the name of my
data store |
| Fields inherited from class uk.co.weft.htform.List |
action, actionField, ACTIONFIELDCONFIGTOKEN, ACTIONLABELCONFIGTOKEN, ACTIONURLCONFIGTOKEN, canAdd, CANADDBEFORECONFIGTOKEN, CANADDCONFIGTOKEN, CANSEARCHCONFIGTOKEN, clickToOrder, CLICKTOORDERCONFIGTOKEN, formatter, FORMATTERCLASSCONFIGTOKEN, formatterName, linkField, LINKFIELDCONFIGTOKEN, listQueryTemplate, lowerFn, LOWERFNCONFIGTOKEN, matchDelimEnd, matchDelimStart, matchOp, noDefaultList, NODEFAULTLISTCONFIGTOKEN, orderBy, ORDERBYMAGICTOKEN, QUERYTEMPLATECONFIGTOKEN, recogniseLinks, RECOGNISELINKSCONFIGTOKEN, RESULTSMAXROWSMAGICTOKEN, RESULTSOFFSETMAGICTOKEN, SEARCHEXACTCONFIGTOKEN, searchField, SEARCHFIELDCONFIGTOKEN, searchHelp, SEARCHHELPCONFIGTOKEN, searchPrompt, SEARCHPROMPTCONFIGTOKEN, SEARCHSETCOOKIECONFIGTOKEN, searchSize, SEARCHSIZECONFIGTOKEN, searchToken, SEARCHTOKENCONFIGTOKEN, searchw, showCanAddBefore, showHeaders, SHOWHEADERSCONFIGTOKEN, showId, SHOWIDCONFIGTOKEN, slots, SORTDIRECTIONMAGICTOKEN, SORTORDERDESCENDINGMAGICVALUE |
| Fields inherited from class uk.co.weft.htform.Form |
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.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 |
|
Method Summary |
protected Contexts |
fetch(Context context)
Specialisation: use dbutil match operator instead of SQL. |
void |
init(Context config)
Specialisation: set up my additional configuration paramaters; reject
configuration which contains query template |
| Methods inherited from class uk.co.weft.htform.Form |
addAuxiliary, addWidget, defaultActionHandler, doBody, doHead, doHeadBodySep, fixupMagicValues, generate, getLayout, getNextActionURL, getSelectedWidgetSet, getTransformURL, getWidgetSetByName, handleAction, hasWidgets, makeReady, postProcess, preForm, preProcess, selectNextWidgetSet, 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.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 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 |
STORECONFIGTOKEN
public static final java.lang.String STORECONFIGTOKEN
- a token upon which I shall look in my configuration for the name of my
data store
- See Also:
- Constant Field Values
KEYCONFIGTOKEN
public static final java.lang.String KEYCONFIGTOKEN
- a token upon which I shall look in my configuration for the name of the
keyfield in my data store
- See Also:
- Constant Field Values
key
protected java.lang.String key
- the name of the keyfield in my data store
store
protected java.lang.String store
- the name of my data store
exact
protected boolean exact
- do I require an exact match?
QueryByExampleList
public QueryByExampleList()
fetch
protected Contexts fetch(Context context)
throws DataStoreException
- Specialisation: use dbutil match operator instead of SQL.
- Overrides:
fetch in class List
- Parameters:
context - the service context
- Returns:
- the matching rows
- Throws:
DataStoreException- See Also:
List.fetch(uk.co.weft.dbutil.Context)
init
public void init(Context config)
throws InitialisationException
- Specialisation: set up my additional configuration paramaters; reject
configuration which contains query template
- Specified by:
init in interface DocumentGenerator- Overrides:
init in class List
- Parameters:
config -
- Throws:
InitialisationException- See Also:
List.init(uk.co.weft.dbutil.Context)