public class FacadeDataSource extends DataSource
DataSource
with the ability to queue requests made on it and
dispatch the queued requests on demand. To use, create a FacadeDataSource instance with the inheritsFrom
property set to the DataSource that you wish to
extend. This advanced class is intended to be used for testing data-bound components. This should not be used in production code.
See also the overview of the DataSource Facade pattern
.
config, factoryCreated, factoryProperties, id, scClassName
Constructor and Description |
---|
FacadeDataSource() |
FacadeDataSource(JavaScriptObject jsObj) |
Modifier and Type | Method and Description |
---|---|
void |
clearQueue()
Shorthand to clear the
request queue without
changing the value of queueRequests . |
JavaScriptObject |
create() |
static FacadeDataSource |
getOrCreateRef(JavaScriptObject jsObj) |
DSRequest[] |
getQueuedRequests()
|
boolean |
getQueueRequests()
Should requests be queued?
|
void |
setQueueRequests(boolean queueRequests)
Should requests be queued?
|
addData, addData, addData, addField, addHandleErrorHandler, applyFilter, applyFilter, canFlattenCriteria, cloneDSRequest, cloneDSResponse, combineCriteria, combineCriteria, combineCriteria, compareCriteria, compareCriteria, compareCriteria, compareDates, convertCriteria, convertCriteria, convertDataSourceCriteria, convertDataSourceCriteria, convertRelativeDates, convertRelativeDates, convertRelativeDates, convertRelativeDates, copyCriteria, copyRecord, copyRecords, downloadFile, downloadFile, downloadFile, evaluateCriterion, execute, exportClientData, exportClientDataStatic, exportData, exportData, exportData, exportData, fetchData, fetchData, fetchData, fetchData, fetchRecord, fetchRecord, fetchRecord, fieldMatchesFilter, fieldMatchesFilter, filterData, filterData, filterData, filterData, flattenCriteria, get, get, getAddGlobalId, getAdvancedCriteriaDescription, getAllowAdvancedCriteria, getAutoCacheAllData, getAutoConvertRelativeDates, getAutoDeriveTitles, getAutoTitle, getCacheAcrossOperationIds, getCacheAllData, getCacheAllOperationId, getCacheData, getCacheMaxAge, getCallbackParam, getCanMultiSort, getChildrenField, getClientOnly, getClientOnlyDataSource, getClientOnlyDataSource, getClientOnlyDataSource, getClientOnlyResponse, getCriteriaPolicy, getDataField, getDataFormat, getDataProtocol, getDataSource, getDataSource, getDataTransport, getDataURL, getDefaultParams, getDefaultTextMatchStyle, getDescriptionField, getDisplayValue, getDropExtraFields, getDropUnknownCriteria, getFetchDataURL, getFetchDataURL, getField, getFieldAutoTitle, getFieldCriterion, getFieldForDataPath, getFieldNames, getFieldNames, getFieldOperators, getFieldOperators, getFields, getFieldValue, getFieldValue, getFieldValue, getFieldValue, getFile, getFileURL, getFileURL, getFileURL, getGlobalNamespaces, getIconField, getIgnoreTextMatchStyleCaseSensitive, getInfoField, getInheritsFrom, getJsObj, getJsonPrefix, getJsonSuffix, getLegalChildTags, getLoaderURL, getOperationBindings, getPatternEscapeChar, getPatternMultiWildcard, getPatternMultiWildcardAsString, getPatternSingleWildcard, getPatternSingleWildcardAsString, getPluralTitle, getPreventHTTPCaching, getPrimaryKeyField, getPrimaryKeyFieldName, getPrimaryKeyFieldNames, getPrimaryKeyFields, getProgressiveLoading, getQualifyColumnNames, getRecordName, getRecordXPath, getRequestProperties, getRequiredMessage, getResultBatchSize, getResultSetClass, getResultTreeClass, getSchemaNamespace, getSendExtraFields, getSendParentNode, getServiceNamespace, getShowLocalFieldsOnly, getShowPrompt, getSortBy, getSortSpecifiers, getStrictSQLFiltering, getTagName, getTestData, getTitle, getTitleField, getTranslatePatternOperators, getTrimMilliseconds, getTypeOperators, getTypeOperators, getTypeOperators, getUseFlatFields, getUseHttpProxy, getUseLocalValidators, getUseOfflineStorage, getUseParentFieldOrder, getUseStrictJSON, getUseTestDataFetch, getValidateRelatedRecords, hasAllData, hasFile, invalidateCache, isCreated, isFlatCriteria, listFiles, load, load, load, loadWithParents, loadWithParents, loadWithParents, makeFileSpec, onInit, performCustomOperation, performCustomOperation, performCustomOperation, performCustomOperation, processResponse, recordsAreEqual, recordsAsText, recordsAsText, recordsFromText, recordsFromText, recordsFromXML, registerID, removeData, removeData, removeData, removeFile, removeFile, removeFile, renameFile, renameFile, saveFile, saveFile, setAddGlobalId, setAllowAdvancedCriteria, setAutoCacheAllData, setAutoConvertRelativeDates, setAutoDeriveTitles, setCacheAcrossOperationIds, setCacheAllData, setCacheAllOperationId, setCacheData, setCacheMaxAge, setCallbackParam, setCanMultiSort, setChildrenField, setClientOnly, setCriteriaPolicy, setDataField, setDataFormat, setDataProtocol, setDataTransport, setDataURL, setDefaultParams, setDefaultTextMatchStyle, setDescriptionField, setDropExtraFields, setDropUnknownCriteria, setEnumConstantProperty, setEnumOrdinalProperty, setEnumTranslateStrategy, setFields, setGlobalNamespaces, setHandleErrorCallback, setIconField, setID, setIgnoreTextMatchStyleCaseSensitive, setInfoField, setInheritsFrom, setInheritsFrom, setJsonPrefix, setJsonSuffix, setLoaderURL, setOperationBindings, setPatternEscapeChar, setPatternMultiWildcard, setPatternMultiWildcard, setPatternSingleWildcard, setPatternSingleWildcard, setPluralTitle, setPreventHTTPCaching, setProgressiveLoading, setQualifyColumnNames, setRecordName, setRecordXPath, setRequestProperties, setRequiredMessage, setResultBatchSize, setResultSetClass, setResultTreeClass, setSendExtraFields, setSendParentNode, setServiceNamespace, setShowLocalFieldsOnly, setShowPrompt, setStrictSQLFiltering, setTagName, setTestData, setTitle, setTitleField, setTranslatePatternOperators, setTrimMilliseconds, setTypeOperators, setTypeOperators, setUseFlatFields, setUseHttpProxy, setUseLocalValidators, setUseOfflineStorage, setUseParentFieldOrder, setUseStrictJSON, setUseTestDataFetch, setValidateRelatedRecords, setXmlNamespaces, splitCriteria, supportsAdvancedCriteria, supportsTextMatchStyle, transformRequest, transformResponse, updateCaches, updateCaches, updateData, updateData, updateData, useOfflineResponse, validateData, validateData, validateData, viewFile, viewFile, viewFile, xmlSerialize, xmlSerialize, xmlSerialize, xmlSerialize, xmlSerialize
applyFactoryProperties, asSGWTComponent, createJsObj, destroy, doAddHandler, doInit, error, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getClassName, getConfig, getHandlerCount, getID, getOrCreateJsObj, getRef, getScClassName, getTestInstance, hasAutoAssignedID, internalSetID, internalSetID, isFactoryCreated, onBind, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setFactoryCreated, setJavaScriptObject, setProperty, setProperty, setProperty, setProperty, setScClassName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
fireEvent
public FacadeDataSource()
public FacadeDataSource(JavaScriptObject jsObj)
public static FacadeDataSource getOrCreateRef(JavaScriptObject jsObj)
public JavaScriptObject create()
create
in class DataSource
public DSRequest[] getQueuedRequests() throws java.lang.IllegalStateException
executed
on
the underlying inherited
DataSource. When a DS request
is made on this FacadeDataSource, if queueRequests
is
true, then a new DS request is created based on the given DS request and added to this queue.
To clear the queue,
set queueRequests
to false or call clearQueue()
.
Note : This method should be called only after the underlying component has been created.
java.lang.IllegalStateException
- if the underlying component has not yet been created.public void setQueueRequests(boolean queueRequests)
When DS requests are made on the FacadeDataSource, a new, derived DS request on the
underlying inherited
DataSource is created. If queueRequests
is true, then the derived DS request is added to the queuedRequests
array. If false, then the derived DS request is executed
immediately on the inherited DataSource.
If this method is called after the component has been drawn/initialized:
Setter for queueRequests
.
queueRequests
- Default value is falsepublic boolean getQueueRequests()
When DS requests are made on the FacadeDataSource, a new, derived DS request on the
underlying inherited
DataSource is created. If queueRequests
is true, then the derived DS request is added to the queuedRequests
array. If false, then the derived DS request is executed
immediately on the inherited DataSource.
public void clearQueue()
request queue
without
changing the value of queueRequests
.