|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.smartgwt.client.widgets.BaseWidget
com.smartgwt.client.widgets.Canvas
com.smartgwt.client.widgets.layout.Layout
com.smartgwt.client.widgets.form.FilterBuilder
public class FilterBuilder
A form that allows the user to input advanced search criteria, including operators on field values such as "less than", and sub-clauses using "AND" and "OR" operators.
A FilterBuilder produces an ${isc.DocUtils.linkForRef('object:AdvancedCriteria')} object, which the DataSource
subsystem can use to filter datasets, including the ability to perform such filtering within
the browser for datasets that are completely loaded.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
Field Summary |
---|
Fields inherited from class com.smartgwt.client.widgets.BaseWidget |
---|
config, configOnly, id, isElementSet |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
FilterBuilder()
|
|
FilterBuilder(com.google.gwt.core.client.JavaScriptObject jsObj)
|
Method Summary | |
---|---|
HandlerRegistration |
addFilterChangedHandler(FilterChangedHandler handler)
Add a filterChanged handler. |
void |
clearCriteria()
Clear all current criteria. |
protected com.google.gwt.core.client.JavaScriptObject |
create()
|
java.lang.Boolean |
getAllowEmpty()
If set to false, the last clause cannot be removed. |
AdvancedCriteria |
getCriteria()
Initial criteria. |
DataSource |
getDataSource()
The DataSource that this component should bind to for default fields and for performing DSRequest . |
static FilterBuilder |
getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
|
java.lang.String |
getRangeSeparator()
For operators that check that a value is within a range, text to show between the start and end input fields for specifying the limits of the range. |
java.lang.Boolean |
getSaveOnExit()
If true, when the user hits the Enter key while focussed in a text-item in this FilterBuilder, we automatically invoke the user-supplied com.smartgwt.client.widgets.form.FilterBuilder#search method. |
java.lang.Boolean |
getShowAddButton()
If set, a button will be shown underneath all current clauses allowing a new clause to be added. |
java.lang.Boolean |
getShowFieldTitles()
If true (the default), show field titles in the drop-down box used to select a field for querying. If false, show actual field names instead. |
java.lang.Boolean |
getShowRemoveButton()
If set, a button will be shown for each clause allowing it to be removed. |
java.lang.Boolean |
getShowSubClauseButton()
Whether to show a button that allows the user to add subclauses. |
LogicalOperator |
getTopOperator()
Default logical operator for all top-level clauses in the FilterBuilder. |
void |
setAllowEmpty(java.lang.Boolean allowEmpty)
If set to false, the last clause cannot be removed. |
void |
setCriteria(AdvancedCriteria criteria)
Initial criteria. |
void |
setDataSource(DataSource dataSource)
DataSource this filter should use for field definitions and available ${isc.DocUtils.linkForRef('object:Operator')}s. |
void |
setRangeSeparator(java.lang.String rangeSeparator)
For operators that check that a value is within a range, text to show between the start and end input fields for specifying the limits of the range. |
void |
setSaveOnExit(java.lang.Boolean saveOnExit)
If true, when the user hits the Enter key while focussed in a text-item in this FilterBuilder, we automatically invoke the user-supplied com.smartgwt.client.widgets.form.FilterBuilder#search method. |
void |
setShowAddButton(java.lang.Boolean showAddButton)
If set, a button will be shown underneath all current clauses allowing a new clause to be added. |
void |
setShowFieldTitles(boolean showFieldTitles)
If true (the default), show field titles in the drop-down box used to select a field for querying. |
void |
setShowFieldTitles(java.lang.Boolean showFieldTitles)
If true (the default), show field titles in the drop-down box used to select a field for querying. If false, show actual field names instead. |
void |
setShowRemoveButton(java.lang.Boolean showRemoveButton)
If set, a button will be shown for each clause allowing it to be removed. |
void |
setShowSubClauseButton(java.lang.Boolean showSubClauseButton)
Whether to show a button that allows the user to add subclauses. |
void |
setTopOperator(LogicalOperator topOperator)
Default logical operator for all top-level clauses in the FilterBuilder. |
void |
setTopOperatorAppearance(TopOperatorAppearance topOperatorAppearance)
How to display and edit the topOperator for
this FilterBuilder. |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
doAttachChildren, doDetachChildren, getParent, isAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setPixelSize, setSize, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkEvents, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
---|
fireEvent |
Constructor Detail |
---|
public FilterBuilder()
public FilterBuilder(com.google.gwt.core.client.JavaScriptObject jsObj)
Method Detail |
---|
public static FilterBuilder getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)
protected com.google.gwt.core.client.JavaScriptObject create()
create
in class Layout
public void setSaveOnExit(java.lang.Boolean saveOnExit) throws java.lang.IllegalStateException
com.smartgwt.client.widgets.form.FilterBuilder#search
method.
saveOnExit
- saveOnExit Default value is null
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getSaveOnExit()
com.smartgwt.client.widgets.form.FilterBuilder#search
method.
public void setShowFieldTitles(java.lang.Boolean showFieldTitles) throws java.lang.IllegalStateException
showFieldTitles
- showFieldTitles Default value is true
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getShowFieldTitles()
public void setShowRemoveButton(java.lang.Boolean showRemoveButton) throws java.lang.IllegalStateException
showRemoveButton
- showRemoveButton Default value is true
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getShowRemoveButton()
public void setShowAddButton(java.lang.Boolean showAddButton) throws java.lang.IllegalStateException
showAddButton
- showAddButton Default value is true
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getShowAddButton()
public void setAllowEmpty(java.lang.Boolean allowEmpty) throws java.lang.IllegalStateException
allowEmpty
- allowEmpty Default value is false
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getAllowEmpty()
public void setTopOperator(LogicalOperator topOperator)
May be able to be changed by the user via the UI, according to com.smartgwt.client..TopOperatorAppearance
.
Programmatically change the topOperator
for this FilterBuilder.
topOperator
- new top-level operator. Default value is "and"public LogicalOperator getTopOperator()
May be able to be changed by the user via the UI, according to com.smartgwt.client..TopOperatorAppearance
.
public void setRangeSeparator(java.lang.String rangeSeparator) throws java.lang.IllegalStateException
rangeSeparator
- rangeSeparator Default value is "and"
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.String getRangeSeparator()
public void setShowSubClauseButton(java.lang.Boolean showSubClauseButton) throws java.lang.IllegalStateException
com.smartgwt.client..TopOperatorAppearance
is "radio", true in all other cases.
showSubClauseButton
- showSubClauseButton Default value is See Description
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getShowSubClauseButton()
com.smartgwt.client..TopOperatorAppearance
is "radio", true in all other cases.
public void clearCriteria()
public HandlerRegistration addFilterChangedHandler(FilterChangedHandler handler)
Handler fired when there is a change() event fired on any FormItem within the filterBuilder.
addFilterChangedHandler
in interface HasFilterChangedHandlers
handler
- the filterChanged handler
HandlerRegistration
used to remove this handlerpublic void setShowFieldTitles(boolean showFieldTitles) throws java.lang.IllegalStateException
showFieldTitles
- showFieldTitles default is true
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic void setDataSource(DataSource dataSource)
dataSource
- dataSource Default value is nullpublic DataSource getDataSource()
DSRequest
. Can be specified as either a DataSource instance or the String ID of a DataSource.
public void setTopOperatorAppearance(TopOperatorAppearance topOperatorAppearance) throws java.lang.IllegalStateException
topOperator
for
this FilterBuilder. See TopOperatorAppearance
for a list of options.
topOperatorAppearance
- topOperatorAppearance Default value is "bracket"
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic void setCriteria(AdvancedCriteria criteria) throws java.lang.IllegalStateException
When initialized with criteria, appropriate clauses for editing the provided criteria will be automatically generated.
Note that empty or partial criteria are allowed, for example, criteria that
specify fieldName
only will generate an expression with the
operator not chosen yet, and a ${isc.DocUtils.linkForRef('object:Criterion')} with a logical operator ("and" or
"or") but not ${isc.DocUtils.linkForRef('criteria.criteria','subcriteria')} defined will generate an empty
subclause. Set new criteria for editing.
An interface for editing the provided criteria will be generated
identically to what happens when initialized with Criteria
.
Any existing criteria entered by the user will be discarded.
criteria
- new criteria. Pass null or {} to effectively reset the
filterBuilder to it's initial state when no criteria are
specified. Default value is null
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic AdvancedCriteria getCriteria()
When initialized with criteria, appropriate clauses for editing the provided criteria will be automatically generated.
Note that empty or partial criteria are allowed, for example, criteria that
specify fieldName
only will generate an expression with the
operator not chosen yet, and a ${isc.DocUtils.linkForRef('object:Criterion')} with a logical operator ("and" or
"or") but not ${isc.DocUtils.linkForRef('criteria.criteria','subcriteria')} defined will generate an empty
subclause.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |