Class FilterBuilder
- All Implemented Interfaces:
HasAttachHandlers
,HasHandlers
,EventListener
,HasVisibility
,IsWidget
,LogicalStructure
,HasClearHandlers
,HasClickHandlers
,HasDoubleClickHandlers
,HasDragMoveHandlers
,HasDragRepositionMoveHandlers
,HasDragRepositionStartHandlers
,HasDragRepositionStopHandlers
,HasDragResizeMoveHandlers
,HasDragResizeStartHandlers
,HasDragResizeStopHandlers
,HasDragStartHandlers
,HasDragStopHandlers
,HasDropHandlers
,HasDropMoveHandlers
,HasDropOutHandlers
,HasDropOverHandlers
,HasFocusChangedHandlers
,HasHoverHandlers
,HasHoverHiddenHandlers
,HasKeyDownHandlers
,HasKeyPressHandlers
,HasMouseDownHandlers
,HasMouseMoveHandlers
,HasMouseOutHandlers
,HasMouseOverHandlers
,HasMouseStillDownHandlers
,HasMouseUpHandlers
,HasMouseWheelHandlers
,HasMovedHandlers
,HasParentMovedHandlers
,HasResizedHandlers
,HasRightMouseDownHandlers
,HasRuleContextChangedHandlers
,HasScrolledHandlers
,HasShowContextMenuHandlers
,HasVisibilityChangedHandlers
,HasFilterChangedHandlers
,HasSearchHandlers
,HasMembersChangedHandlers
A FilterBuilder produces an 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.
The operators available for each field can be customized at the DataSource level via DataSourceField.validOperators
, DataSource.setTypeOperators()
and related APIs.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
-
Field Summary
Fields inherited from class com.smartgwt.client.widgets.BaseWidget
config, configOnly, factoryCreated, factoryProperties, id, nativeObject, scClassName
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addClause
(FilterClause filterClause) Add a newFilterClause
to this FilterBuilder.void
addCriterion
(Criterion criterion) Add a new criterion, including recursively adding sub-criteria for a criterion that contains other criteria.Add a filterChanged handler.addSearchHandler
(SearchHandler handler) Add a search handler.static void
changeAutoChildDefaults
(String autoChildName, Canvas defaults) Changes the defaults for Canvas AutoChildren namedautoChildName
.static void
changeAutoChildDefaults
(String autoChildName, FormItem defaults) Changes the defaults for FormItem AutoChildren namedautoChildName
.void
Clear all current criteria.protected JavaScriptObject
create()
An ImgButton that allows new clauses to be added ifshowAddButton
is set.The hover prompt text for the add button.List ofDataSources
to choose from when constructing a field or value sub-query ifallowAggregates
is enabled.Should aggregates be allowed as either the field or value?String[]
List of explicit fields for user field selection.If set to false, the last clause cannot be removed.Should related record criteria be allowed as either the field or value?Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists.VStack of all clauses that are part of this FilterBuilderInitial criteria.getCriteria
(boolean includeEmptyValues) Initial criteria.DataSource this filter should use for field definitions and availableOperator
s.DataSource this filter should use for field definitions and availableOperator
s.getEditorType
(DataSourceField field, OperatorId operatorId) Returns the type of editor to use for the field.If specified, the FilterBuilder will dynamically fetch DataSourceField definitions from this DataSource rather than usingdataSource
.Properties to combine with theFieldPicker
autoChild FormItem.The title for thefield-picker
select-item.Width for the field picker formItem displayed in clauses within this FilterBuilder.Width for the field picker formItem displayed in clauses within this FilterBuilder.The title for the window that opens when a field query is selected.Title for the "And Not" operator (only applicable to the "inline" appearance)Title for the "And" operator (only applicable to the "inline" appearance)Title for the "Or" operator (only applicable to the "inline" appearance)The hover prompt text for the remove button in the last remaining clause, whenallowEmpty
is false.Getter implementing theLogicalStructure
interface, which supports Eclipse's logical structure debugging facility.Title for the "Match All" (and) operator when usingtopOperatorAppearance
:"radio".Title for the "Match Any" (or) operator when usingtopOperatorAppearance
:"radio".Title for the "Match None" (not) operator when usingtopOperatorAppearance
:"radio".Canvas[]
An array of canvases that will be contained within this layout.The message to display next to fieldNames that do not exist in the available dataSource.Label to change between simple and advanced mode.Title for the "Advanced.." mode switcher label (only applicable to the "radio" appearance).Message displayed when switching to "radio" mode if the criteria will be logically changed.Title for the "Simple Mode.." mode switcher label (only applicable to the "bracket" appearance).Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists.Properties to combine with theoperatorPicker
autoChild FormItem.The title for the operator-picker select-item.Width for the operator picker formItem displayed in clauses within this FilterBuilder.Width for the operator picker formItem displayed in clauses within this FilterBuilder.static FilterBuilder
getOrCreateRef
(JavaScriptObject jsObj) WithTopOperatorAppearance
:"radio", form that appears above the stack of clauses and allows picking theLogicalOperator
for the overall FilterBuilder.HLayout of radioOperationForm and optional modeSwitcher.The title for the Operator RadioGroupItem displayed in theradioOperatorForm
.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.The removal ImgButton that appears before each clause ifshowRemoveButton
is set.The hover prompt text for the remove button.Dictates whether values entered by a user should be retained in the value fields when a different field is selected.If true, when the user hits the Enter key while focused in a text-item in this FilterBuilder, we automatically invoke the user-suppliedFilterBuilder.search()
method.Returns the list of this FilterBuilder's FilterClauses that are currently selected.If set, a button will be shown underneath all current clauses allowing a new clause to be added.If true (the default), show field titles in the drop-down box used to select a field for querying.By default only non-hidden fields are shown for selection.If set to false and showing clauseremove buttons
andthe last clause cannot be removed
the remove clause button will be hidden.When enabled allows FilterBuilder intopOperatorAppearance:"radio"
ortopOperatorAppearance:"bracket"
mode to be switch to the other view by the user.If set, a button will be shown for each clause allowing it to be removed.If true, causes a CheckboxItem to appear to the left of each clause in "inline"appearance
.Whether to show a button that allows the user to add subclauses.Should theFieldPicker
items be sorted alphabetically in the drop down list.CSS text to be added to the styling for Related Field and Aggregate selections in the field name picker.Button allowing the user to add subclauses grouped by aLogicalOperator
.The hover prompt text for the subClauseButton.The title of the subClauseButtonDefault logical operator for all top-level clauses in the FilterBuilder.How to display and edit thetop-level operator
for this FilterBuilder.WithTopOperatorAppearance
"bracket" and "inline", a form that appears to the left of the stack of clauses and allows picking theLogicalOperator
for the overall FilterBuilder (or for that specific FilterClause, in the case of "inline")Automatically generated SelectItem autoChild shown in thetopOperatorForm
.int
Width for thetopOperatorItem
autoChild.Width for thetopOperatorItem
autoChild.Logical operators to allow forTopOperatorAppearance
s of "radio" and "bracket".The title for the left-aligned Operator selectItem in thetopOperatorForm
.If true (the default), validates each entered value when it changes, to make sure it is a a valid value of its type (valid string, number, and so on).getValueFieldProperties
(FieldType type, String fieldName, OperatorId operatorId, ValueItemType itemType, String fieldType) Override to return properties for the FormItem(s) used for the "value" field displayed within clauses within this filterBuilder.Width for the value-chooser formItem displayed in clauses within this FilterBuilder.Width for the value-chooser formItem displayed in clauses within this FilterBuilder.The hover prompt text for the dynamic value button.The prefix to be displayed before a aggregate valueQuery value in the clause.The hover prompt text for the dynamic value button.The prefix to be displayed before a related field valueQuery value in the clause.The title for the window that opens when a value query is selected.void
onInit()
protected void
void
removeClause
(FilterClause clause) Remove a clause this FilterBuilder is currently showing.setAddButtonPrompt
(String addButtonPrompt) The hover prompt text for the add button.setAggregationDataSources
(DataSource... aggregationDataSources) List ofDataSources
to choose from when constructing a field or value sub-query ifallowAggregates
is enabled.setAllowAggregates
(Boolean allowAggregates) Should aggregates be allowed as either the field or value?setAllowedFields
(String... allowedFields) List of explicit fields for user field selection.setAllowEmpty
(Boolean allowEmpty) If set to false, the last clause cannot be removed.setAllowRelatedRecordCriteria
(Boolean allowRelatedRecordCriteria) Should related record criteria be allowed as either the field or value?setCriteria
(AdvancedCriteria criteria) Initial criteria.void
setDataSource
(DataSource dataSource) DataSource this filter should use for field definitions and availableOperator
s.static void
setDefaultProperties
(FilterBuilder filterBuilderProperties) Class level method to set the default properties of this class.setFieldDataSource
(DataSource fieldDataSource) If specified, the FilterBuilder will dynamically fetch DataSourceField definitions from this DataSource rather than usingdataSource
.void
setFieldOperatorCustomizer
(FieldOperatorCustomizer customizer) This method installs a customizer that returns the set of OperatorIds applicable to the passed fieldNamesetFieldPickerProperties
(FormItem fieldPickerProperties) Properties to combine with theFieldPicker
autoChild FormItem.setFieldPickerTitle
(String fieldPickerTitle) The title for thefield-picker
select-item.setFieldPickerWidth
(Integer fieldPickerWidth) Width for the field picker formItem displayed in clauses within this FilterBuilder.setFieldPickerWidth
(String fieldPickerWidth) Width for the field picker formItem displayed in clauses within this FilterBuilder.setFieldQueryWindowTitle
(String fieldQueryWindowTitle) The title for the window that opens when a field query is selected.setIconBaseStyle
(String iconBaseStyle) setIconSize
(Integer iconSize) setInlineAndNotTitle
(String inlineAndNotTitle) Title for the "And Not" operator (only applicable to the "inline" appearance)setInlineAndTitle
(String inlineAndTitle) Title for the "And" operator (only applicable to the "inline" appearance)setInlineOrTitle
(String inlineOrTitle) Title for the "Or" operator (only applicable to the "inline" appearance)setLastClausePrompt
(String lastClausePrompt) The hover prompt text for the remove button in the last remaining clause, whenallowEmpty
is false.Setter implementing theLogicalStructure
interface, which supports Eclipse's logical structure debugging facility.setMatchAllTitle
(String matchAllTitle) Title for the "Match All" (and) operator when usingtopOperatorAppearance
:"radio".setMatchAnyTitle
(String matchAnyTitle) Title for the "Match Any" (or) operator when usingtopOperatorAppearance
:"radio".setMatchNoneTitle
(String matchNoneTitle) Title for the "Match None" (not) operator when usingtopOperatorAppearance
:"radio".setMissingFieldPrompt
(String missingFieldPrompt) The message to display next to fieldNames that do not exist in the available dataSource.setModeSwitcherAdvancedMessage
(String modeSwitcherAdvancedMessage) Title for the "Advanced.." mode switcher label (only applicable to the "radio" appearance).setModeSwitcherFlattenWarningMessage
(String modeSwitcherFlattenWarningMessage) Message displayed when switching to "radio" mode if the criteria will be logically changed.setModeSwitcherSimpleMessage
(String modeSwitcherSimpleMessage) Title for the "Simple Mode.." mode switcher label (only applicable to the "bracket" appearance).setOperatorPickerProperties
(FormItem operatorPickerProperties) Properties to combine with theoperatorPicker
autoChild FormItem.setOperatorPickerTitle
(String operatorPickerTitle) The title for the operator-picker select-item.setOperatorPickerWidth
(Integer operatorPickerWidth) Width for the operator picker formItem displayed in clauses within this FilterBuilder.setOperatorPickerWidth
(String operatorPickerWidth) Width for the operator picker formItem displayed in clauses within this FilterBuilder.setRadioOperatorTitle
(String radioOperatorTitle) The title for the Operator RadioGroupItem displayed in theradioOperatorForm
.setRangeSeparator
(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.setRemoveButtonPrompt
(String removeButtonPrompt) The hover prompt text for the remove button.setRetainValuesAcrossFields
(Boolean retainValuesAcrossFields) Dictates whether values entered by a user should be retained in the value fields when a different field is selected.setSaveOnEnter
(Boolean saveOnEnter) If true, when the user hits the Enter key while focused in a text-item in this FilterBuilder, we automatically invoke the user-suppliedFilterBuilder.search()
method.setShowAddButton
(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.setShowFieldTitles
(Boolean showFieldTitles) If true (the default), show field titles in the drop-down box used to select a field for querying.setShowHiddenFields
(Boolean showHiddenFields) By default only non-hidden fields are shown for selection.setShowLastRemoveButton
(Boolean showLastRemoveButton) If set to false and showing clauseremove buttons
andthe last clause cannot be removed
the remove clause button will be hidden.setShowModeSwitcher
(Boolean showModeSwitcher) When enabled allows FilterBuilder intopOperatorAppearance:"radio"
ortopOperatorAppearance:"bracket"
mode to be switch to the other view by the user.setShowRemoveButton
(Boolean showRemoveButton) If set, a button will be shown for each clause allowing it to be removed.setShowSelectionCheckbox
(Boolean showSelectionCheckbox) If true, causes a CheckboxItem to appear to the left of each clause in "inline"appearance
.setShowSubClauseButton
(Boolean showSubClauseButton) Whether to show a button that allows the user to add subclauses.setSortFields
(Boolean sortFields) Should theFieldPicker
items be sorted alphabetically in the drop down list.setSpecialValuesCSS
(String specialValuesCSS) CSS text to be added to the styling for Related Field and Aggregate selections in the field name picker.setSubClauseButtonPrompt
(String subClauseButtonPrompt) The hover prompt text for the subClauseButton.setSubClauseButtonTitle
(String subClauseButtonTitle) The title of the subClauseButtonsetTopOperator
(LogicalOperator topOperator) Default logical operator for all top-level clauses in the FilterBuilder.setTopOperatorAppearance
(TopOperatorAppearance topOperatorAppearance) How to display and edit thetop-level operator
for this FilterBuilder.setTopOperatorItemWidth
(int topOperatorItemWidth) Width for thetopOperatorItem
autoChild.setTopOperatorItemWidth
(String topOperatorItemWidth) Width for thetopOperatorItem
autoChild.setTopOperatorOptions
(OperatorId... topOperatorOptions) Logical operators to allow forTopOperatorAppearance
s of "radio" and "bracket".setTopOperatorTitle
(String topOperatorTitle) The title for the left-aligned Operator selectItem in thetopOperatorForm
.setValidateOnChange
(Boolean validateOnChange) If true (the default), validates each entered value when it changes, to make sure it is a a valid value of its type (valid string, number, and so on).setValueItemWidth
(Integer valueItemWidth) Width for the value-chooser formItem displayed in clauses within this FilterBuilder.setValueItemWidth
(String valueItemWidth) Width for the value-chooser formItem displayed in clauses within this FilterBuilder.setValueQueryAggregateButtonPrompt
(String valueQueryAggregateButtonPrompt) The hover prompt text for the dynamic value button.setValueQueryAggregatePrefix
(String valueQueryAggregatePrefix) The prefix to be displayed before a aggregate valueQuery value in the clause.setValueQueryRelatedFieldButtonPrompt
(String valueQueryRelatedFieldButtonPrompt) The hover prompt text for the dynamic value button.setValueQueryRelatedFieldPrefix
(String valueQueryRelatedFieldPrefix) The prefix to be displayed before a related field valueQuery value in the clause.setValueQueryWindowTitle
(String valueQueryWindowTitle) The title for the window that opens when a value query is selected.validate()
Validate the clauses of this FilterBuilder.Methods inherited from class com.smartgwt.client.widgets.layout.Layout
addMember, addMember, addMember, addMember, addMemberPostCreate, addMemberPostCreate, addMemberPreCreate, addMemberPreCreate, addMembers, addMembers, addMembersChangedHandler, getAnimateMembers, getAnimateMemberTime, getCanDropComponents, getChildTabPosition, getDefaultResizeBars, getDropComponent, getDropLine, getDropLineThickness, getDropPosition, getEditProxyConstructor, getEnforcePolicy, getHPolicy, getLayoutBottomMargin, getLayoutEndMargin, getLayoutLeftMargin, getLayoutMargin, getLayoutRightMargin, getLayoutStartMargin, getLayoutTopMargin, getLeaveScrollbarGap, getLocateMembersBy, getLocateMembersType, getManagePercentBreadth, getMember, getMember, getMemberDefaultBreadth, getMemberNumber, getMemberNumber, getMemberOverlap, getMembersLength, getMembersMargin, getMinMemberLength, getMinMemberSize, getOverflow, getPaddingAsLayoutMargin, getResizeBar, getResizeBarClass, getResizeBarSize, getReverseOrder, getShowDragPlaceHolder, getShowDropLines, getStackZIndex, getVertical, getVPolicy, hasMember, hideDropLine, hideMember, hideMember, layoutIsDirty, onInit_Layout, reflow, reflow, reflowNow, removeMember, removeMembers, removeMembers, reorderMember, reorderMembers, replaceMember, revealChild, revealChild, setAlign, setAlign, setAnimateMembers, setAnimateMemberTime, setCanDropComponents, setDefaultLayoutAlign, setDefaultLayoutAlign, setDefaultProperties, setDefaultResizeBars, setDropLineProperties, setDropLineThickness, setEditProxyConstructor, setEnforcePolicy, setHPolicy, setLayoutBottomMargin, setLayoutEndMargin, setLayoutLeftMargin, setLayoutMargin, setLayoutRightMargin, setLayoutStartMargin, setLayoutTopMargin, setLeaveScrollbarGap, setLocateMembersBy, setLocateMembersType, setLogicalStructure, setManagePercentBreadth, setMemberOverlap, setMembers, setMembersMargin, setMinBreadthMember, setMinBreadthMember, setMinBreadthMember, setMinMemberLength, setMinMemberSize, setOverflow, setPaddingAsLayoutMargin, setPlaceHolderDefaults, setPlaceHolderProperties, setResizeBarClass, setResizeBarSize, setReverseOrder, setShowDragPlaceHolder, setShowDropLines, setStackZIndex, setVertical, setVisibleMember, setVPolicy, showMember, showMember
Methods inherited from class com.smartgwt.client.widgets.Canvas
addChild, addChild, addChild, addChild, addChild, addClearHandler, addClickHandler, addDoubleClickHandler, addDragMoveHandler, addDragRepositionMoveHandler, addDragRepositionStartHandler, addDragRepositionStopHandler, addDragResizeMoveHandler, addDragResizeStartHandler, addDragResizeStopHandler, addDragStartHandler, addDragStopHandler, addDropHandler, addDropMoveHandler, addDropOutHandler, addDropOverHandler, addFocusChangedHandler, addHoverHandler, addHoverHiddenHandler, addKeyDownHandler, addKeyPressHandler, addMouseDownHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseStillDownHandler, addMouseUpHandler, addMouseWheelHandler, addMovedHandler, addParentMovedHandler, addPeer, addPeer, addPeer, addPeer, addResizedHandler, addRightMouseDownHandler, addRuleContextChangedHandler, addScrolledHandler, addShowContextMenuHandler, addSnapAlignCandidate, addStyleName, addVisibilityChangedHandler, adjustForContent, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateFade, animateHide, animateHide, animateHide, animateHide, animateHide, animateHide, animateHide, animateMove, animateMove, animateMove, animateMove, animateRect, animateRect, animateRect, animateRect, animateResize, animateResize, animateResize, animateResize, animateScroll, animateScroll, animateScroll, animateScroll, animateScroll, animateScroll, animateShow, animateShow, animateShow, animateShow, animateShow, animateShow, animateShow, asSGWTComponent, blur, bringToFront, clear, clearExplicitTabIndex, clickMaskUp, clickMaskUp, contains, contains, containsEvent, containsEventTarget, containsFocus, containsPoint, containsPoint, dataContextChanged, deparent, depeer, disable, doVoiceCommand, enable, encloses, focus, focusAfterGroup, focusAtEnd, focusInNextTabElement, focusInPreviousTabElement, getAbsoluteLeft, getAbsoluteTop, getAccessKey, getAdaptiveHeightPriority, getAdaptiveWidthPriority, getAlwaysManageFocusNavigation, getAlwaysShowScrollbars, getAnimateAcceleration, getAnimateFadeTime, getAnimateHideAcceleration, getAnimateHideEffect, getAnimateHideTime, getAnimateMoveAcceleration, getAnimateMoveTime, getAnimateRectAcceleration, getAnimateRectTime, getAnimateResizeAcceleration, getAnimateResizeLayoutMode, getAnimateResizeTime, getAnimateScrollAcceleration, getAnimateScrollTime, getAnimateShowAcceleration, getAnimateShowEffect, getAnimateShowTime, getAnimateTime, getAppImgDir, getAriaHandleID, getAriaRole, getAriaStateDefaults, getAutoMaskComponents, getAutoParent, getAutoPopulateData, getAutoShowParent, getBackgroundColor, getBackgroundImage, getBackgroundPosition, getBackgroundRepeat, getBorder, getBorderRadius, getBottom, getById, getByJSObject, getByLocalId, getCanAcceptDrop, getCanAdaptHeight, getCanAdaptWidth, getCanDrag, getCanDragReposition, getCanDragResize, getCanDragScroll, getCanDrop, getCanDropBefore, getCanFocus, getCanHover, getCanSelectText, getCanvasAutoChild, getCanvasItem, getChildren, getChildrenResizeSnapAlign, getChildrenSnapAlign, getChildrenSnapCenterAlign, getChildrenSnapEdgeAlign, getChildrenSnapResizeToGrid, getChildrenSnapToGrid, getClassName, getComponentMask, getComponentMaskDefaults, getContentElement, getContents, getContextMenu, getCorrectZoomOverflow, getCursor, getDataContext, getDataPath, getDefaultHeight, getDefaultWidth, getDefiningProperty, getDefiningPropertyName, getDefiningPropertyNameOptions, getDestroyed, getDestroying, getDisabled, getDisabledCursor, getDisableTouchScrollingForDrag, getDoubleClickDelay, getDragAppearance, getDragIntersectStyle, getDragMaskType, getDragMaxHeight, getDragMaxWidth, getDragMinHeight, getDragMinWidth, getDragOpacity, getDragRepositionAppearance, getDragRepositionCursor, getDragResizeAppearance, getDragScrollDelay, getDragStartDistance, getDragTarget, getDragTargetAsString, getDragType, getDropTarget, getDropTargetAsString, getDropTypes, getDropTypesAsString, getDynamicContents, getEdgeBackgroundColor, getEdgeCenterBackgroundColor, getEdgeImage, getEdgeMarginSize, getEdgeOffset, getEdgeOpacity, getEdgeShowCenter, getEdgeSize, getEditNode, getEditProxy, getElement, getElement, getEnableWhen, getEndLine, getEventEdge, getEventEdge, getExtraSpace, getFacetId, getFloatingScrollbars, getFormItemAutoChild, getForwardSVGeventsToObject, getFullDataPath, getGroupBorderCSS, getGroupLabelBackgroundColor, getGroupLabelStyleName, getGroupPadding, getGroupTitle, getHeight, getHeightAsString, getHideUsingDisplayNone, getHoverAlign, getHoverAutoDestroy, getHoverAutoFitMaxWidth, getHoverAutoFitMaxWidthAsString, getHoverAutoFitWidth, getHoverComponent, getHoverDelay, getHoverFocusKey, getHoverHeight, getHoverHTML, getHoverMoveWithMouse, getHoverOpacity, getHoverPersist, getHoverScreen, getHoverStyle, getHoverVAlign, getHoverWidth, getHoverWrap, getHSnapPosition, getHSnapPosition, getHtmlElement, getHtmlElementAsString, getHtmlPosition, getImage, getImgURL, getImgURL, getInnerContentHeight, getInnerContentWidth, getInnerHeight, getInnerWidth, getIsGroup, getIsPrinting, getIsRuleScope, getIsSnapAlignCandidate, getKeepInParentRect, getLayoutAlign, getLeaveGroupLabelSpace, getLeavePageSpace, getLeft, getLeftAsString, getLocalId, getLocateByIDOnly, getLocateChildrenBy, getLocateChildrenType, getLocatePeersBy, getLocatePeersType, getLocatorName, getMargin, getMasterCanvas, getMasterElement, getMatchElement, getMatchElementHeight, getMatchElementWidth, getMaxHeight, getMaxWidth, getMaxZoomOverflowError, getMenuConstructor, getMinHeight, getMinNonEdgeSize, getMinWidth, getMomentumScrollMinSpeed, getMouseStillDownDelay, getMouseStillDownInitialDelay, getName, getNativeAutoHideScrollbars, getNextZIndex, getNoDoubleClicks, getNoDropCursor, getOffsetHeight, getOffsetWidth, getOffsetX, getOffsetY, getOpacity, getOuterElement, getPadding, getPageBottom, getPageLeft, getPageRect, getPageRight, getPageTop, getPaletteDefaults, getPanelContainer, getParentCanvas, getParentElement, getPeers, getPendingMarkerStyle, getPendingMarkerVisible, getPercentBox, getPercentSource, getPersistentMatchElement, getPointerSettings, getPointerTarget, getPointerTargetAsString, getPosition, getPrefix, getPrintChildrenAbsolutelyPositioned, getPrintHTML, getPrintHTML, getPrintStyleName, getPrompt, getProportionalResizeModifiers, getProportionalResizing, getReceiveScrollbarEvents, getRect, getRedrawOnResize, getResizeBarTarget, getResizeFrom, getRight, getRuleContext, getRuleContext, getRuleScope, getScrollbarSize, getScrollBottom, getScrollHeight, getScrollLeft, getScrollRight, getScrollTop, getScrollWidth, getShadowColor, getShadowDepth, getShadowHOffset, getShadowImage, getShadowOffset, getShadowSoftness, getShadowSpread, getShadowVOffset, getShouldPrint, getShowCustomScrollbars, getShowDragShadow, getShowEdges, getShowHover, getShowHoverComponents, getShowPointer, getShowResizeBar, getShowShadow, getShowSnapGrid, getShrinkElementOnHide, getSizeMayChangeOnRedraw, getSkinImgDir, getSnapAlignCandidates, getSnapAlignCenterLineStyle, getSnapAlignEdgeLineStyle, getSnapAxis, getSnapEdge, getSnapGridLineProperties, getSnapGridStyle, getSnapHDirection, getSnapHGap, getSnapOffsetLeft, getSnapOffsetTop, getSnapOnDrop, getSnapPosition, getSnapPosition, getSnapResizeToAlign, getSnapResizeToGrid, getSnapTo, getSnapToAlign, getSnapToCenterAlign, getSnapToEdgeAlign, getSnapToGrid, getSnapVDirection, getSnapVGap, getStartLine, getStyleName, getTabIndex, getTestDataContext, getTestInstance, getTitle, getTooltip, getTop, getTopAsString, getTopElement, getUISummary, getUpdateTabPositionOnDraw, getUpdateTabPositionOnReparent, getUseBackMask, getUseCSSShadow, getUseDragMask, getUseImageForSVG, getUseNativeDrag, getUseOpacityFilter, getUseTouchScrolling, getValuesManager, getValuesManagerAsString, getViewportHeight, getViewportWidth, getVisibility, getVisibleHeight, getVisibleWhen, getVisibleWidth, getVSnapPosition, getVSnapPosition, getWidth, getWidthAsString, getWorkflows, getZIndex, getZIndex, handleHover, hide, hideClickMask, hideClickMask, hideComponentMask, hideComponentMask, hideContextMenu, imgHTML, imgHTML, imgHTML, initComplete, intersects, isDirty, isDisabled, isFocused, isVisible, keyUp, layoutChildren, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, linkHTML, markForDestroy, markForRedraw, markForRedraw, moveAbove, moveBelow, moveBy, moveTo, onAttach, onDetach, pageScrollDown, pageScrollUp, parentResized, placeNear, placeNear, placeNear, print, print, print, print, printComponents, provideRuleContext, provideRuleContext, redraw, redraw, registerFontScaledPaddingStyles, removeChild, removeChild, removePeer, removePeer, removeRuleContext, removeSnapAlignCandidate, resizeAutoChildAttributes, resizeBy, resizeControls, resizeControlsTo, resizeFonts, resizeFonts, resizeFonts, resizeFontsTo, resizeIcons, resizePadding, resizePadding, resizeTo, resizeTo, scrollBy, scrollByPercent, scrollTo, scrollTo, scrollTo, scrollTo, scrollTo, scrollToBottom, scrollToLeft, scrollToPercent, scrollToRight, scrollToTop, sendToBack, setAccessKey, setAdaptHeightByCustomizer, setAdaptiveHeightPriority, setAdaptiveWidthPriority, setAdaptWidthByCustomizer, setAllowExternalFilters, setAlwaysManageFocusNavigation, setAlwaysShowScrollbars, setAnimateAcceleration, setAnimateFadeTime, setAnimateHideAcceleration, setAnimateHideEffect, setAnimateHideTime, setAnimateMoveAcceleration, setAnimateMoveTime, setAnimateRectAcceleration, setAnimateRectTime, setAnimateResizeAcceleration, setAnimateResizeLayoutMode, setAnimateResizeTime, setAnimateScrollAcceleration, setAnimateScrollTime, setAnimateShowAcceleration, setAnimateShowEffect, setAnimateShowTime, setAnimateTime, setAppImgDir, setAriaRole, setAriaState, setAutoChildConstructor, setAutoChildProperties, setAutoChildProperties, setAutoChildProperties, setAutoChildProperties, setAutoChildVisibility, setAutoHeight, setAutoMaskComponents, setAutoParent, setAutoPopulateData, setAutoResizeAutoChildAttributes, setAutoResizeIcons, setAutoShowParent, setAutoWidth, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorder, setBorderRadius, setBottom, setCanAcceptDrop, setCanAdaptHeight, setCanAdaptWidth, setCanDrag, setCanDragReposition, setCanDragResize, setCanDragScroll, setCanDrop, setCanDropBefore, setCanFocus, setCanHover, setCanSelectText, setChildren, setChildrenResizeSnapAlign, setChildrenSnapAlign, setChildrenSnapCenterAlign, setChildrenSnapEdgeAlign, setChildrenSnapResizeToGrid, setChildrenSnapToGrid, setComponentMaskDefaults, setContents, setContextMenu, setCorrectZoomOverflow, setCursor, setDataContext, setDataPath, setDefaultHeight, setDefaultPageSpace, setDefaultProperties, setDefaultShowCustomScrollbars, setDefaultWidth, setDefiningProperty, setDefiningPropertyNameOptions, setDisabled, setDisabledCursor, setDisableTouchScrollingForDrag, setDoubleClickDelay, setDragAppearance, setDragIntersectStyle, setDragMaskType, setDragMaxHeight, setDragMaxWidth, setDragMinHeight, setDragMinWidth, setDragOpacity, setDragRepositionAppearance, setDragRepositionCursor, setDragResizeAppearance, setDragScrollDelay, setDragStartDistance, setDragTarget, setDragTarget, setDragType, setDropTarget, setDropTarget, setDropTypes, setDropTypes, setDynamicContents, setEdgeBackgroundColor, setEdgeCenterBackgroundColor, setEdgeImage, setEdgeMarginSize, setEdgeOffset, setEdgeOpacity, setEdgeShowCenter, setEdgeSize, setEditMode, setEditMode, setEditMode, setElement, setEnableWhen, setEndLine, setExtraSpace, setFacetId, setFloatingScrollbars, setForwardSVGeventsToObject, setGroupBorderCSS, setGroupLabelBackgroundColor, setGroupLabelStyleName, setGroupPadding, setGroupTitle, setHeight, setHeight, setHeight, setHeight100, setHideUsingDisplayNone, setHoverAlign, setHoverAutoDestroy, setHoverAutoFitMaxWidth, setHoverAutoFitMaxWidth, setHoverAutoFitWidth, setHoverDelay, setHoverFocusKey, setHoverHeight, setHoverMoveWithMouse, setHoverOpacity, setHoverPersist, setHoverScreen, setHoverStyle, setHoverVAlign, setHoverWidth, setHoverWrap, setHtmlElement, setHtmlElement, setHtmlPosition, setImage, setImage, setInitHandler, setIsGroup, setIsRuleScope, setIsSnapAlignCandidate, setKeepInParentRect, setKeepInParentRect, setKeepInParentRect, setLayoutAlign, setLayoutAlign, setLeaveGroupLabelSpace, setLeavePageSpace, setLeft, setLeft, setLocateByIDOnly, setLocateChildrenBy, setLocateChildrenType, setLocatePeersBy, setLocatePeersType, setLocatorName, setLocatorParent, setLocatorParent, setLogicalStructure, setMargin, setMatchElement, setMatchElementHeight, setMatchElementWidth, setMaxHeight, setMaxWidth, setMaxZoomOverflowError, setMenuConstructor, setMinHeight, setMinNonEdgeSize, setMinWidth, setMomentumScrollMinSpeed, setMouseStillDownDelay, setMouseStillDownInitialDelay, setName, setNativeAutoHideScrollbars, setNeverUseFilters, setNoDoubleClicks, setNoDropCursor, setOpacity, setPadding, setPageLeft, setPageTop, setPanelContainer, setParentCanvas, setParentElement, setPeers, setPendingMarkerStyle, setPendingMarkerVisible, setPercentBox, setPercentSource, setPersistentMatchElement, setPointerSettings, setPointerTarget, setPosition, setPrefix, setPrintChildrenAbsolutelyPositioned, setPrintStyleName, setPrompt, setProportionalResizeModifiers, setProportionalResizing, setReceiveScrollbarEvents, setRect, setRect, setRedrawOnResize, setRelativeTabPosition, setResizeBarTarget, setResizeFrom, setResizeFrom, setRight, setRuleScope, setScrollbarConstructor, setScrollbarSize, setShadowColor, setShadowDepth, setShadowHOffset, setShadowImage, setShadowOffset, setShadowSoftness, setShadowSpread, setShadowVOffset, setShouldPrint, setShowCustomScrollbars, setShowDragShadow, setShowEdges, setShowHover, setShowHoverComponents, setShowPointer, setShowResizeBar, setShowShadow, setShowSnapGrid, setShrinkElementOnHide, setSizeMayChangeOnRedraw, setSkinImgDir, setSmoothFade, setSnapAlignCandidates, setSnapAlignCenterLineStyle, setSnapAlignEdgeLineStyle, setSnapAxis, setSnapEdge, setSnapGridLineProperties, setSnapGridStyle, setSnapHDirection, setSnapHGap, setSnapOffsetLeft, setSnapOffsetTop, setSnapOnDrop, setSnapResizeToAlign, setSnapResizeToGrid, setSnapTo, setSnapToAlign, setSnapToCenterAlign, setSnapToEdgeAlign, setSnapToGrid, setSnapVDirection, setSnapVGap, setStartLine, setStyleName, setTabIndex, setTestDataContext, setTitle, setTooltip, setTop, setTop, setUpdateTabPositionOnDraw, setUpdateTabPositionOnReparent, setUseBackMask, setUseCSSShadow, setUseDragMask, setUseImageForSVG, setUseNativeDrag, setUseOpacityFilter, setUseTouchScrolling, setValuesManager, setValuesManager, setVisibility, setVisible, setVisibleWhen, setWidth, setWidth, setWidth, setWidth100, setWorkflows, setZIndex, shouldDragScroll, show, showClickMask, showComponentMask, showComponentMask, showNextTo, showNextTo, showNextTo, showNextTo, showPendingMarker, showPrintPreview, showPrintPreview, showPrintPreview, showPrintPreview, showRecursively, startDebuggingOverflow, stopDebuggingOverflow, supportsVoiceCommands, updateChildTabPosition, updateChildTabPositions, updateEditNode, updateHover, updateHover, updateShadow, updateTabPositionForDraw, visibleAtPoint, willAcceptDrop
Methods inherited from class com.smartgwt.client.widgets.BaseWidget
addDrawHandler, addDynamicProperty, addDynamicProperty, addDynamicProperty, addDynamicProperty, applyFactoryProperties, clearDynamicProperty, completeCreation, destroy, doAddHandler, doInit, doOnRender, draw, equals, error, errorIfNotCreated, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDateArray, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsFloatArray, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getConfig, getDOM, getHandlerCount, getID, getInnerHTML, getJsObj, getOrCreateJsObj, getRef, getScClassName, hasAutoAssignedID, hasDynamicProperty, hashCode, initNativeObject, internalSetID, internalSetID, isConfigOnly, isCreated, isDrawn, isFactoryCreated, onBind, onDestroy, onDraw, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, setDefaultProperties, setDragTracker, setFactoryCreated, setID, setJavaScriptObject, setLogicalStructure, setLogicalStructure, setNullProperty, setPosition, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setScClassName, toString
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent
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 Details
-
FilterBuilder
public FilterBuilder() -
FilterBuilder
-
-
Method Details
-
getOrCreateRef
-
changeAutoChildDefaults
Changes the defaults for Canvas AutoChildren namedautoChildName
.- Parameters:
autoChildName
- name of an AutoChild to customize the defaults for.defaults
- Canvas defaults to apply. These defaults override any existing properties without destroying or wiping out non-overridden properties. For usage tips on this param, seeSGWTProperties
.- See Also:
-
changeAutoChildDefaults
Changes the defaults for FormItem AutoChildren namedautoChildName
.- Parameters:
autoChildName
- name of an AutoChild to customize the defaults for.defaults
- FormItem defaults to apply. These defaults override any existing properties without destroying or wiping out non-overridden properties. For usage tips on this param, seeSGWTProperties
.- See Also:
-
create
-
getAddButton
An ImgButton that allows new clauses to be added ifshowAddButton
is set.This component is an AutoChild named "addButton". For an overview of how to use and configure AutoChildren, see
Using AutoChildren
.- Returns:
- Current addButton value. Default value is null
- Throws:
IllegalStateException
- if this widget has not yet been rendered.
-
setAddButtonPrompt
The hover prompt text for the add button.- Parameters:
addButtonPrompt
- New addButtonPrompt value. Default value is "Add"- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getAddButtonPrompt
The hover prompt text for the add button.- Returns:
- Current addButtonPrompt value. Default value is "Add"
-
setAggregationDataSources
public FilterBuilder setAggregationDataSources(DataSource... aggregationDataSources) throws IllegalStateException List ofDataSources
to choose from when constructing a field or value sub-query ifallowAggregates
is enabled. If not specified, thefilter DataSource
plus all related DataSources are used.- Parameters:
aggregationDataSources
- New aggregationDataSources value. Default value is null- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getAggregationDataSources
List ofDataSources
to choose from when constructing a field or value sub-query ifallowAggregates
is enabled. If not specified, thefilter DataSource
plus all related DataSources are used.- Returns:
- Current aggregationDataSources value. Default value is null
-
setAllowAggregates
Should aggregates be allowed as either the field or value?This feature is available with Power or better licenses only. See smartclient.com/product for details.
- Parameters:
allowAggregates
- New allowAggregates value. Default value is null- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created- See Also:
-
getAllowAggregates
Should aggregates be allowed as either the field or value?This feature is available with Power or better licenses only. See smartclient.com/product for details.
- Returns:
- Current allowAggregates value. Default value is null
- See Also:
-
setAllowedFields
List of explicit fields for user field selection. If not specified, the list of fields is derived from thedataSource
.Note: this property is not a security feature as it only controls the UI. To consistently limit searchability for certain fields use
canFilter
.- Parameters:
allowedFields
- New allowedFields value. Default value is null- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created- See Also:
-
getAllowedFields
List of explicit fields for user field selection. If not specified, the list of fields is derived from thedataSource
.Note: this property is not a security feature as it only controls the UI. To consistently limit searchability for certain fields use
canFilter
.- Returns:
- Current allowedFields value. Default value is null
- See Also:
-
setAllowEmpty
If set to false, the last clause cannot be removed.- Parameters:
allowEmpty
- New allowEmpty value. Default value is false- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getAllowEmpty
If set to false, the last clause cannot be removed.- Returns:
- Current allowEmpty value. Default value is false
-
setAllowRelatedRecordCriteria
public FilterBuilder setAllowRelatedRecordCriteria(Boolean allowRelatedRecordCriteria) throws IllegalStateException Should related record criteria be allowed as either the field or value?This option is automatically enabled if
allowAggregates
istrue
unless explicitly set tofalse
.This feature is available with Power or better licenses only. See smartclient.com/product for details.
- Parameters:
allowRelatedRecordCriteria
- New allowRelatedRecordCriteria value. Default value is null- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getAllowRelatedRecordCriteria
Should related record criteria be allowed as either the field or value?This option is automatically enabled if
allowAggregates
istrue
unless explicitly set tofalse
.This feature is available with Power or better licenses only. See smartclient.com/product for details.
- Returns:
- Current allowRelatedRecordCriteria value. Default value is null
-
getBracket
Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. SeeUsing AutoChildren
for details.Widget used as a "bracket" to hint to the user that a subclause groups several field-by-field filter criteria under one logical operator.
By default, a simple CSS-style Canvas with borders on three sides. A vertical StretchImg could provide a more elaborate appearance.
- Returns:
- null
-
getClauseStack
VStack of all clauses that are part of this FilterBuilderThis component is an AutoChild named "clauseStack". For an overview of how to use and configure AutoChildren, see
Using AutoChildren
.- Returns:
- Current clauseStack value. Default value is null
- Throws:
IllegalStateException
- if this widget has not yet been rendered.
-
setCriteria
Initial criteria.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
Criterion.fieldName
only will generate an expression with the operator not chosen yet, and aCriterion
with a logical operator ("and" or "or") but notsubcriteria
defined will generate an empty subclause.
If this method is called after the component has been drawn/initialized: 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.
- Parameters:
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- Returns:
FilterBuilder
instance, for chaining setter calls
-
getCriteria
Initial criteria.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
Criterion.fieldName
only will generate an expression with the operator not chosen yet, and aCriterion
with a logical operator ("and" or "or") but notsubcriteria
defined will generate an empty subclause.- Returns:
- Get the criteria entered by the user. Default value is null
-
getDataSource
DataSource this filter should use for field definitions and availableOperator
s.- Returns:
- Current dataSource value. Default value is null
-
getDataSourceAsString
DataSource this filter should use for field definitions and availableOperator
s.- Returns:
- Current dataSource value. Default value is null
-
setFieldDataSource
If specified, the FilterBuilder will dynamically fetch DataSourceField definitions from this DataSource rather than usingdataSource
. TheFieldPicker
will default to being aComboBoxItem
rather than aSelectItem
so that the user will have type-ahead auto-completion.The records returned from the
fieldDataSource
must have properties corresponding to aDataSourceField
definition, at a minimum,"name"
and"type"
. Any property legal on a DataSourceField is legal on the returned records, includingvalueMap
.Even when a
fieldDataSource
is specified,dataSource
may still be specified in order to control the list ofvalid operators
for each field.- Parameters:
fieldDataSource
- New fieldDataSource value. Default value is null- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getFieldDataSource
If specified, the FilterBuilder will dynamically fetch DataSourceField definitions from this DataSource rather than usingdataSource
. TheFieldPicker
will default to being aComboBoxItem
rather than aSelectItem
so that the user will have type-ahead auto-completion.The records returned from the
fieldDataSource
must have properties corresponding to aDataSourceField
definition, at a minimum,"name"
and"type"
. Any property legal on a DataSourceField is legal on the returned records, includingvalueMap
.Even when a
fieldDataSource
is specified,dataSource
may still be specified in order to control the list ofvalid operators
for each field.- Returns:
- Current fieldDataSource value. Default value is null
-
setFieldPickerProperties
public FilterBuilder setFieldPickerProperties(FormItem fieldPickerProperties) throws IllegalStateException Properties to combine with theFieldPicker
autoChild FormItem.- Parameters:
fieldPickerProperties
- New fieldPickerProperties value. Default value is null- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getFieldPickerProperties
Properties to combine with theFieldPicker
autoChild FormItem.- Returns:
- Current fieldPickerProperties value. Default value is null
-
setFieldPickerTitle
The title for thefield-picker
select-item.- Parameters:
fieldPickerTitle
- New fieldPickerTitle value. Default value is "Field Name"- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getFieldPickerTitle
The title for thefield-picker
select-item.- Returns:
- Current fieldPickerTitle value. Default value is "Field Name"
-
setFieldPickerWidth
Width for the field picker formItem displayed in clauses within this FilterBuilder.- Parameters:
fieldPickerWidth
- New fieldPickerWidth value. Default value is "*"- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getFieldPickerWidth
Width for the field picker formItem displayed in clauses within this FilterBuilder.- Returns:
- Current fieldPickerWidth value. Default value is "*"
-
setFieldPickerWidth
Width for the field picker formItem displayed in clauses within this FilterBuilder.- Parameters:
fieldPickerWidth
- New fieldPickerWidth value. Default value is "*"- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getFieldPickerWidthAsString
Width for the field picker formItem displayed in clauses within this FilterBuilder.- Returns:
- Current fieldPickerWidth value. Default value is "*"
-
setFieldQueryWindowTitle
public FilterBuilder setFieldQueryWindowTitle(String fieldQueryWindowTitle) throws IllegalStateException The title for the window that opens when a field query is selected.- Parameters:
fieldQueryWindowTitle
- New fieldQueryWindowTitle value. Default value is "Define field query"- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created- See Also:
-
getFieldQueryWindowTitle
The title for the window that opens when a field query is selected.- Returns:
- Current fieldQueryWindowTitle value. Default value is "Define field query"
- See Also:
-
setIconBaseStyle
- Parameters:
iconBaseStyle
- New iconBaseStyle value. Default value is null- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created- See Also:
-
getIconBaseStyle
- Returns:
- Current iconBaseStyle value. Default value is null
- See Also:
-
setIconSize
- Parameters:
iconSize
- New iconSize value. Default value is null- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getIconSize
- Returns:
- Current iconSize value. Default value is null
-
setInlineAndNotTitle
Title for the "And Not" operator (only applicable to the "inline" appearance)- Parameters:
inlineAndNotTitle
- New inlineAndNotTitle value. Default value is "and not"- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getInlineAndNotTitle
Title for the "And Not" operator (only applicable to the "inline" appearance)- Returns:
- Current inlineAndNotTitle value. Default value is "and not"
-
setInlineAndTitle
Title for the "And" operator (only applicable to the "inline" appearance)- Parameters:
inlineAndTitle
- New inlineAndTitle value. Default value is "and"- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getInlineAndTitle
Title for the "And" operator (only applicable to the "inline" appearance)- Returns:
- Current inlineAndTitle value. Default value is "and"
-
setInlineOrTitle
Title for the "Or" operator (only applicable to the "inline" appearance)- Parameters:
inlineOrTitle
- New inlineOrTitle value. Default value is "or"- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getInlineOrTitle
Title for the "Or" operator (only applicable to the "inline" appearance)- Returns:
- Current inlineOrTitle value. Default value is "or"
-
setLastClausePrompt
The hover prompt text for the remove button in the last remaining clause, whenallowEmpty
is false.- Parameters:
lastClausePrompt
- New lastClausePrompt value. Default value is "The last clause cannot be removed"- Returns:
FilterBuilder
instance, for chaining setter calls
-
getLastClausePrompt
The hover prompt text for the remove button in the last remaining clause, whenallowEmpty
is false.- Returns:
- Current lastClausePrompt value. Default value is "The last clause cannot be removed"
-
setMatchAllTitle
Title for the "Match All" (and) operator when usingtopOperatorAppearance
:"radio".- Parameters:
matchAllTitle
- New matchAllTitle value. Default value is "Match All"- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getMatchAllTitle
Title for the "Match All" (and) operator when usingtopOperatorAppearance
:"radio".- Returns:
- Current matchAllTitle value. Default value is "Match All"
-
setMatchAnyTitle
Title for the "Match Any" (or) operator when usingtopOperatorAppearance
:"radio".- Parameters:
matchAnyTitle
- New matchAnyTitle value. Default value is "Match Any"- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getMatchAnyTitle
Title for the "Match Any" (or) operator when usingtopOperatorAppearance
:"radio".- Returns:
- Current matchAnyTitle value. Default value is "Match Any"
-
setMatchNoneTitle
Title for the "Match None" (not) operator when usingtopOperatorAppearance
:"radio".- Parameters:
matchNoneTitle
- New matchNoneTitle value. Default value is "Match None"- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getMatchNoneTitle
Title for the "Match None" (not) operator when usingtopOperatorAppearance
:"radio".- Returns:
- Current matchNoneTitle value. Default value is "Match None"
-
setMissingFieldPrompt
The message to display next to fieldNames that do not exist in the available dataSource.- Parameters:
missingFieldPrompt
- New missingFieldPrompt value. Default value is "[missing field definition]"- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getMissingFieldPrompt
The message to display next to fieldNames that do not exist in the available dataSource.- Returns:
- Current missingFieldPrompt value. Default value is "[missing field definition]"
-
getModeSwitcher
Label to change between simple and advanced mode. When clicked the filter mode is switched to the other mode. This label is only shown ifshowModeSwitcher
is true.Shows either
modeSwitcherSimpleMessage
ormodeSwitcherAdvancedMessage
depending on the current state of the filter.This component is an AutoChild named "modeSwitcher". For an overview of how to use and configure AutoChildren, see
Using AutoChildren
.- Returns:
- Current modeSwitcher value. Default value is null
- Throws:
IllegalStateException
- if this widget has not yet been rendered.
-
setModeSwitcherAdvancedMessage
public FilterBuilder setModeSwitcherAdvancedMessage(String modeSwitcherAdvancedMessage) throws IllegalStateException Title for the "Advanced.." mode switcher label (only applicable to the "radio" appearance).- Parameters:
modeSwitcherAdvancedMessage
- New modeSwitcherAdvancedMessage value. Default value is "Advanced.."- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getModeSwitcherAdvancedMessage
Title for the "Advanced.." mode switcher label (only applicable to the "radio" appearance).- Returns:
- Current modeSwitcherAdvancedMessage value. Default value is "Advanced.."
-
setModeSwitcherFlattenWarningMessage
public FilterBuilder setModeSwitcherFlattenWarningMessage(String modeSwitcherFlattenWarningMessage) throws IllegalStateException Message displayed when switching to "radio" mode if the criteria will be logically changed.- Parameters:
modeSwitcherFlattenWarningMessage
- New modeSwitcherFlattenWarningMessage value. Default value is "Criteria will be modified to fit in simpler editing interface"- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getModeSwitcherFlattenWarningMessage
Message displayed when switching to "radio" mode if the criteria will be logically changed.- Returns:
- Current modeSwitcherFlattenWarningMessage value. Default value is "Criteria will be modified to fit in simpler editing interface"
-
setModeSwitcherSimpleMessage
public FilterBuilder setModeSwitcherSimpleMessage(String modeSwitcherSimpleMessage) throws IllegalStateException Title for the "Simple Mode.." mode switcher label (only applicable to the "bracket" appearance).- Parameters:
modeSwitcherSimpleMessage
- New modeSwitcherSimpleMessage value. Default value is "Simple Mode.."- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getModeSwitcherSimpleMessage
Title for the "Simple Mode.." mode switcher label (only applicable to the "bracket" appearance).- Returns:
- Current modeSwitcherSimpleMessage value. Default value is "Simple Mode.."
-
getOperatorPicker
Note : This API is non-functional (always returns null) and exists only to make you aware that this MultiAutoChild exists. SeeUsing AutoChildren
for details.AutoChild for the
FormItem
that allows a user to select the operator when creating filter clauses. Each clause will create an operatorPicker automatically. To customize this item, useoperatorPickerProperties
- Returns:
- null
-
setOperatorPickerProperties
public FilterBuilder setOperatorPickerProperties(FormItem operatorPickerProperties) throws IllegalStateException Properties to combine with theoperatorPicker
autoChild FormItem.- Parameters:
operatorPickerProperties
- New operatorPickerProperties value. Default value is null- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getOperatorPickerProperties
Properties to combine with theoperatorPicker
autoChild FormItem.- Returns:
- Current operatorPickerProperties value. Default value is null
-
setOperatorPickerTitle
public FilterBuilder setOperatorPickerTitle(String operatorPickerTitle) throws IllegalStateException The title for the operator-picker select-item.- Parameters:
operatorPickerTitle
- New operatorPickerTitle value. Default value is "Operator"- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getOperatorPickerTitle
The title for the operator-picker select-item.- Returns:
- Current operatorPickerTitle value. Default value is "Operator"
-
setOperatorPickerWidth
public FilterBuilder setOperatorPickerWidth(Integer operatorPickerWidth) throws IllegalStateException Width for the operator picker formItem displayed in clauses within this FilterBuilder.- Parameters:
operatorPickerWidth
- New operatorPickerWidth value. Default value is 150- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getOperatorPickerWidth
Width for the operator picker formItem displayed in clauses within this FilterBuilder.- Returns:
- Current operatorPickerWidth value. Default value is 150
-
setOperatorPickerWidth
public FilterBuilder setOperatorPickerWidth(String operatorPickerWidth) throws IllegalStateException Width for the operator picker formItem displayed in clauses within this FilterBuilder.- Parameters:
operatorPickerWidth
- New operatorPickerWidth value. Default value is 150- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getOperatorPickerWidthAsString
Width for the operator picker formItem displayed in clauses within this FilterBuilder.- Returns:
- Current operatorPickerWidth value. Default value is 150
-
getRadioOperatorForm
WithTopOperatorAppearance
:"radio", form that appears above the stack of clauses and allows picking theLogicalOperator
for the overall FilterBuilder.By default, consists of a simple RadioGroupItem.
This component is an AutoChild named "radioOperatorForm". For an overview of how to use and configure AutoChildren, see
Using AutoChildren
.- Returns:
- Current radioOperatorForm value. Default value is null
- Throws:
IllegalStateException
- if this widget has not yet been rendered.
-
getRadioOperatorLayout
HLayout of radioOperationForm and optional modeSwitcher.This component is an AutoChild named "radioOperatorLayout". For an overview of how to use and configure AutoChildren, see
Using AutoChildren
.- Returns:
- Current radioOperatorLayout value. Default value is null
- Throws:
IllegalStateException
- if this widget has not yet been rendered.
-
setRadioOperatorTitle
The title for the Operator RadioGroupItem displayed in theradioOperatorForm
.- Parameters:
radioOperatorTitle
- New radioOperatorTitle value. Default value is "Overall Operator"- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getRadioOperatorTitle
The title for the Operator RadioGroupItem displayed in theradioOperatorForm
.- Returns:
- Current radioOperatorTitle value. Default value is "Overall Operator"
-
setRangeSeparator
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.- Parameters:
rangeSeparator
- New rangeSeparator value. Default value is "and"- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
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.- Returns:
- Current rangeSeparator value. Default value is "and"
-
getRemoveButton
The removal ImgButton that appears before each clause ifshowRemoveButton
is set.This component is an AutoChild named "removeButton". For an overview of how to use and configure AutoChildren, see
Using AutoChildren
.- Returns:
- Current removeButton value. Default value is null
- Throws:
IllegalStateException
- if this widget has not yet been rendered.
-
setRemoveButtonPrompt
The hover prompt text for the remove button.- Parameters:
removeButtonPrompt
- New removeButtonPrompt value. Default value is "Remove"- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getRemoveButtonPrompt
The hover prompt text for the remove button.- Returns:
- Current removeButtonPrompt value. Default value is "Remove"
-
setRetainValuesAcrossFields
Dictates whether values entered by a user should be retained in the value fields when a different field is selected. Default value is true.Note that, when switching between fields that have an optionDataSource or valueMap, this property is ignored and the values are never retained.
- Parameters:
retainValuesAcrossFields
- New retainValuesAcrossFields value. Default value is true- Returns:
FilterBuilder
instance, for chaining setter calls
-
getRetainValuesAcrossFields
Dictates whether values entered by a user should be retained in the value fields when a different field is selected. Default value is true.Note that, when switching between fields that have an optionDataSource or valueMap, this property is ignored and the values are never retained.
- Returns:
- Current retainValuesAcrossFields value. Default value is true
-
setSaveOnEnter
If true, when the user hits the Enter key while focused in a text-item in this FilterBuilder, we automatically invoke the user-suppliedFilterBuilder.search()
method.- Parameters:
saveOnEnter
- New saveOnEnter value. Default value is null- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getSaveOnEnter
If true, when the user hits the Enter key while focused in a text-item in this FilterBuilder, we automatically invoke the user-suppliedFilterBuilder.search()
method.- Returns:
- Current saveOnEnter value. Default value is null
-
setShowAddButton
If set, a button will be shown underneath all current clauses allowing a new clause to be added.- Parameters:
showAddButton
- New showAddButton value. Default value is true- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getShowAddButton
If set, a button will be shown underneath all current clauses allowing a new clause to be added.- Returns:
- Current showAddButton value. Default value is true
-
setShowFieldTitles
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.- Parameters:
showFieldTitles
- New showFieldTitles value. Default value is true- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
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.- Returns:
- Current showFieldTitles value. Default value is true
-
setShowHiddenFields
By default only non-hidden fields are shown for selection. To include hidden fields for selection set this property totrue
.- Parameters:
showHiddenFields
- New showHiddenFields value. Default value is null- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getShowHiddenFields
By default only non-hidden fields are shown for selection. To include hidden fields for selection set this property totrue
.- Returns:
- Current showHiddenFields value. Default value is null
-
setShowLastRemoveButton
public FilterBuilder setShowLastRemoveButton(Boolean showLastRemoveButton) throws IllegalStateException If set to false and showing clauseremove buttons
andthe last clause cannot be removed
the remove clause button will be hidden.- Parameters:
showLastRemoveButton
- New showLastRemoveButton value. Default value is null- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getShowLastRemoveButton
If set to false and showing clauseremove buttons
andthe last clause cannot be removed
the remove clause button will be hidden.- Returns:
- Current showLastRemoveButton value. Default value is null
-
setShowModeSwitcher
When enabled allows FilterBuilder intopOperatorAppearance:"radio"
ortopOperatorAppearance:"bracket"
mode to be switch to the other view by the user. "radio" mode is considered simple where "bracket" mode is advanced mode.Note that when switching from "bracket" to "radio" mode any entered criteria will be flattened by calling
DataSource.flattenCriteria()
. If the criteria cannot be flattened without losing symantics (seeDataSource.canFlattenCriteria()
) the user is prompted to confirm.If showModeSwitcher is set and topOperatorAppearance is unset:
- when first drawn, the
filterBuilder will choose which mode to use based on the provided
criteria
if any: advanced mode ("bracket") will be used if AdvancedCriteria are provided which cannot be flattened without loss of data (seeDataSource.canFlattenCriteria()
), otherwise simple mode ("radio") will be used. - for any calls to
setCriteria()
after draw, the FilterBuilder will switch to advanced mode if the criteria cannot be shown in simple mode without losing information, but will never automatically switch to simple mode, but an explicit callsetTopOperatorAppearance("radio")
can be used to do so.
- Parameters:
showModeSwitcher
- New showModeSwitcher value. Default value is null- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created- See Also:
- when first drawn, the
filterBuilder will choose which mode to use based on the provided
-
getShowModeSwitcher
When enabled allows FilterBuilder intopOperatorAppearance:"radio"
ortopOperatorAppearance:"bracket"
mode to be switch to the other view by the user. "radio" mode is considered simple where "bracket" mode is advanced mode.Note that when switching from "bracket" to "radio" mode any entered criteria will be flattened by calling
DataSource.flattenCriteria()
. If the criteria cannot be flattened without losing symantics (seeDataSource.canFlattenCriteria()
) the user is prompted to confirm.If showModeSwitcher is set and topOperatorAppearance is unset:
- when first drawn, the
filterBuilder will choose which mode to use based on the provided
criteria
if any: advanced mode ("bracket") will be used if AdvancedCriteria are provided which cannot be flattened without loss of data (seeDataSource.canFlattenCriteria()
), otherwise simple mode ("radio") will be used. - for any calls to
setCriteria()
after draw, the FilterBuilder will switch to advanced mode if the criteria cannot be shown in simple mode without losing information, but will never automatically switch to simple mode, but an explicit callsetTopOperatorAppearance("radio")
can be used to do so.
- Returns:
- Current showModeSwitcher value. Default value is null
- See Also:
- when first drawn, the
filterBuilder will choose which mode to use based on the provided
-
setShowRemoveButton
If set, a button will be shown for each clause allowing it to be removed.- Parameters:
showRemoveButton
- New showRemoveButton value. Default value is true- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getShowRemoveButton
If set, a button will be shown for each clause allowing it to be removed.- Returns:
- Current showRemoveButton value. Default value is true
-
setShowSelectionCheckbox
public FilterBuilder setShowSelectionCheckbox(Boolean showSelectionCheckbox) throws IllegalStateException If true, causes a CheckboxItem to appear to the left of each clause in "inline"appearance
. This checkbox allows the user to select individual clauses so that, for example, clauses can be removed from the filterBuilder by application code. This property is ignored for appearances other than "inline".- Parameters:
showSelectionCheckbox
- New showSelectionCheckbox value. Default value is false- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getShowSelectionCheckbox
If true, causes a CheckboxItem to appear to the left of each clause in "inline"appearance
. This checkbox allows the user to select individual clauses so that, for example, clauses can be removed from the filterBuilder by application code. This property is ignored for appearances other than "inline".- Returns:
- Current showSelectionCheckbox value. Default value is false
-
setShowSubClauseButton
public FilterBuilder setShowSubClauseButton(Boolean showSubClauseButton) throws IllegalStateException Whether to show a button that allows the user to add subclauses. Defaults to false if theTopOperatorAppearance
is "radio" or "inline", true in all other cases.- Parameters:
showSubClauseButton
- New showSubClauseButton value. Default value is See Description- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getShowSubClauseButton
Whether to show a button that allows the user to add subclauses. Defaults to false if theTopOperatorAppearance
is "radio" or "inline", true in all other cases.- Returns:
- Current showSubClauseButton value. Default value is See Description
-
setSortFields
Should theFieldPicker
items be sorted alphabetically in the drop down list.- Parameters:
sortFields
- New sortFields value. Default value is true- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getSortFields
Should theFieldPicker
items be sorted alphabetically in the drop down list.- Returns:
- Current sortFields value. Default value is true
-
setSpecialValuesCSS
CSS text to be added to the styling for Related Field and Aggregate selections in the field name picker. By default, the choices are italicized.- Parameters:
specialValuesCSS
- New specialValuesCSS value. Default value is "font-style: italic"- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getSpecialValuesCSS
CSS text to be added to the styling for Related Field and Aggregate selections in the field name picker. By default, the choices are italicized.- Returns:
- Current specialValuesCSS value. Default value is "font-style: italic"
-
getSubClauseButton
Button allowing the user to add subclauses grouped by aLogicalOperator
.This component is an AutoChild named "subClauseButton". For an overview of how to use and configure AutoChildren, see
Using AutoChildren
.- Returns:
- Current subClauseButton value. Default value is null
- Throws:
IllegalStateException
- if this widget has not yet been rendered.
-
setSubClauseButtonPrompt
public FilterBuilder setSubClauseButtonPrompt(String subClauseButtonPrompt) throws IllegalStateException The hover prompt text for the subClauseButton.- Parameters:
subClauseButtonPrompt
- New subClauseButtonPrompt value. Default value is "Add Subclause"- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getSubClauseButtonPrompt
The hover prompt text for the subClauseButton.- Returns:
- Current subClauseButtonPrompt value. Default value is "Add Subclause"
-
setSubClauseButtonTitle
public FilterBuilder setSubClauseButtonTitle(String subClauseButtonTitle) throws IllegalStateException The title of the subClauseButton- Parameters:
subClauseButtonTitle
- New subClauseButtonTitle value. Default value is "+()"- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getSubClauseButtonTitle
The title of the subClauseButton- Returns:
- Current subClauseButtonTitle value. Default value is "+()"
-
setTopOperator
Default logical operator for all top-level clauses in the FilterBuilder.May be able to be changed by the user via the UI, according to
TopOperatorAppearance
.
If this method is called after the component has been drawn/initialized: Programmatically change thetopOperator
for this FilterBuilder.- Parameters:
topOperator
- new top-level operator. Default value is "and"- Returns:
FilterBuilder
instance, for chaining setter calls
-
getTopOperator
Default logical operator for all top-level clauses in the FilterBuilder.May be able to be changed by the user via the UI, according to
TopOperatorAppearance
.- Returns:
- Current topOperator value. Default value is "and"
-
setTopOperatorAppearance
How to display and edit thetop-level operator
for this FilterBuilder.See
TopOperatorAppearance
for a list of options.
If this method is called after the component has been drawn/initialized: ModifyTopOperatorAppearance
at runtime.Note that when changing from "bracket" to "radio" mode the criteria will be flattened by calling
DataSource.flattenCriteria()
which could result in a logical change to the criteria.- Parameters:
topOperatorAppearance
- new topOperatorAppearance. Default value is "bracket"- Returns:
FilterBuilder
instance, for chaining setter calls
-
getTopOperatorAppearance
How to display and edit thetop-level operator
for this FilterBuilder.See
TopOperatorAppearance
for a list of options.- Returns:
- Current topOperatorAppearance value. Default value is "bracket"
-
getTopOperatorForm
WithTopOperatorAppearance
"bracket" and "inline", a form that appears to the left of the stack of clauses and allows picking theLogicalOperator
for the overall FilterBuilder (or for that specific FilterClause, in the case of "inline")By default, consists of a CheckboxItem if
showSelectionCheckbox
is true, and a simple SelectItem containing the available logical operators.If this FilterBuilder shows nested sub-clauses, the same defaults will be applied to the top-operator item for each sub-clause.
This component is an AutoChild named "topOperatorForm". For an overview of how to use and configure AutoChildren, see
Using AutoChildren
.- Returns:
- Current topOperatorForm value. Default value is null
- Throws:
IllegalStateException
- if this widget has not yet been rendered.
-
getTopOperatorItem
Automatically generated SelectItem autoChild shown in thetopOperatorForm
. Developers may customize this item using the standard autoChild pattern (by modifyingtopOperatorItemDefaults
andtopOperatorItemProperties
).If this FilterBuilder shows nested sub-clauses, the same defaults will be applied to the top-operator item for each sub-clause.
This component is an AutoChild named "topOperatorItem". For an overview of how to use and configure AutoChildren, see
Using AutoChildren
.- Returns:
- Current topOperatorItem value. Default value is null
- Throws:
IllegalStateException
- if this widget has not yet been rendered.
-
setTopOperatorItemWidth
Width for thetopOperatorItem
autoChild.- Parameters:
topOperatorItemWidth
- New topOperatorItemWidth value. Default value is "*"- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getTopOperatorItemWidth
public int getTopOperatorItemWidth()Width for thetopOperatorItem
autoChild.- Returns:
- Current topOperatorItemWidth value. Default value is "*"
-
setTopOperatorItemWidth
public FilterBuilder setTopOperatorItemWidth(String topOperatorItemWidth) throws IllegalStateException Width for thetopOperatorItem
autoChild.- Parameters:
topOperatorItemWidth
- New topOperatorItemWidth value. Default value is "*"- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getTopOperatorItemWidthAsString
Width for thetopOperatorItem
autoChild.- Returns:
- Current topOperatorItemWidth value. Default value is "*"
-
setTopOperatorOptions
public FilterBuilder setTopOperatorOptions(OperatorId... topOperatorOptions) throws IllegalStateException Logical operators to allow forTopOperatorAppearance
s of "radio" and "bracket".Note that this list may be further limited according to the
available operators
returned by theDataSource
.- Parameters:
topOperatorOptions
- New topOperatorOptions value. Default value is ["and", "or", "not"]- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getTopOperatorOptions
Logical operators to allow forTopOperatorAppearance
s of "radio" and "bracket".Note that this list may be further limited according to the
available operators
returned by theDataSource
.- Returns:
- Current topOperatorOptions value. Default value is ["and", "or", "not"]
-
setTopOperatorTitle
The title for the left-aligned Operator selectItem in thetopOperatorForm
.- Parameters:
topOperatorTitle
- New topOperatorTitle value. Default value is "Clause Operator"- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getTopOperatorTitle
The title for the left-aligned Operator selectItem in thetopOperatorForm
.- Returns:
- Current topOperatorTitle value. Default value is "Clause Operator"
-
setValidateOnChange
If true (the default), validates each entered value when it changes, to make sure it is a a valid value of its type (valid string, number, and so on). No other validation is carried out. If you switch this property off, it is still possible to validate theFilterBuilder
by callingvalidate()
from your own code.- Parameters:
validateOnChange
- New validateOnChange value. Default value is true- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getValidateOnChange
If true (the default), validates each entered value when it changes, to make sure it is a a valid value of its type (valid string, number, and so on). No other validation is carried out. If you switch this property off, it is still possible to validate theFilterBuilder
by callingvalidate()
from your own code.- Returns:
- Current validateOnChange value. Default value is true
-
setValueItemWidth
Width for the value-chooser formItem displayed in clauses within this FilterBuilder. Note that depending on the selected operator type, this item may not be displayed, or may have different characteristics. SeegetValueFieldProperties()
for information on customizing the value item.- Parameters:
valueItemWidth
- New valueItemWidth value. Default value is 150- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getValueItemWidth
Width for the value-chooser formItem displayed in clauses within this FilterBuilder. Note that depending on the selected operator type, this item may not be displayed, or may have different characteristics. SeegetValueFieldProperties()
for information on customizing the value item.- Returns:
- Current valueItemWidth value. Default value is 150
-
setValueItemWidth
Width for the value-chooser formItem displayed in clauses within this FilterBuilder. Note that depending on the selected operator type, this item may not be displayed, or may have different characteristics. SeegetValueFieldProperties()
for information on customizing the value item.- Parameters:
valueItemWidth
- New valueItemWidth value. Default value is 150- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getValueItemWidthAsString
Width for the value-chooser formItem displayed in clauses within this FilterBuilder. Note that depending on the selected operator type, this item may not be displayed, or may have different characteristics. SeegetValueFieldProperties()
for information on customizing the value item.- Returns:
- Current valueItemWidth value. Default value is 150
-
setValueQueryAggregateButtonPrompt
public FilterBuilder setValueQueryAggregateButtonPrompt(String valueQueryAggregateButtonPrompt) throws IllegalStateException The hover prompt text for the dynamic value button.- Parameters:
valueQueryAggregateButtonPrompt
- New valueQueryAggregateButtonPrompt value. Default value is "Define aggregate value query"- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getValueQueryAggregateButtonPrompt
The hover prompt text for the dynamic value button.- Returns:
- Current valueQueryAggregateButtonPrompt value. Default value is "Define aggregate value query"
-
setValueQueryAggregatePrefix
public FilterBuilder setValueQueryAggregatePrefix(String valueQueryAggregatePrefix) throws IllegalStateException The prefix to be displayed before a aggregate valueQuery value in the clause.- Parameters:
valueQueryAggregatePrefix
- New valueQueryAggregatePrefix value. Default value is "Aggregation:"- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getValueQueryAggregatePrefix
The prefix to be displayed before a aggregate valueQuery value in the clause.- Returns:
- Current valueQueryAggregatePrefix value. Default value is "Aggregation:"
-
setValueQueryRelatedFieldButtonPrompt
public FilterBuilder setValueQueryRelatedFieldButtonPrompt(String valueQueryRelatedFieldButtonPrompt) throws IllegalStateException The hover prompt text for the dynamic value button.- Parameters:
valueQueryRelatedFieldButtonPrompt
- New valueQueryRelatedFieldButtonPrompt value. Default value is "Define related field value query"- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getValueQueryRelatedFieldButtonPrompt
The hover prompt text for the dynamic value button.- Returns:
- Current valueQueryRelatedFieldButtonPrompt value. Default value is "Define related field value query"
-
setValueQueryRelatedFieldPrefix
public FilterBuilder setValueQueryRelatedFieldPrefix(String valueQueryRelatedFieldPrefix) throws IllegalStateException The prefix to be displayed before a related field valueQuery value in the clause.- Parameters:
valueQueryRelatedFieldPrefix
- New valueQueryRelatedFieldPrefix value. Default value is "Related field:"- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
getValueQueryRelatedFieldPrefix
The prefix to be displayed before a related field valueQuery value in the clause.- Returns:
- Current valueQueryRelatedFieldPrefix value. Default value is "Related field:"
-
setValueQueryWindowTitle
public FilterBuilder setValueQueryWindowTitle(String valueQueryWindowTitle) throws IllegalStateException The title for the window that opens when a value query is selected.This is a dynamic string - text within
${...}
are dynamic variables and will be evaluated as JS code when the message is displayed.Only one dynamic variable, fieldTitle, is available.
- Parameters:
valueQueryWindowTitle
- New valueQueryWindowTitle value. Default value is "Define value query for field ${fieldTitle}"- Returns:
FilterBuilder
instance, for chaining setter calls- Throws:
IllegalStateException
- this property cannot be changed after the component has been created- See Also:
-
getValueQueryWindowTitle
The title for the window that opens when a value query is selected.This is a dynamic string - text within
${...}
are dynamic variables and will be evaluated as JS code when the message is displayed.Only one dynamic variable, fieldTitle, is available.
- Returns:
- Current valueQueryWindowTitle value. Default value is "Define value query for field ${fieldTitle}"
- See Also:
-
addClause
Add a newFilterClause
to this FilterBuilder.This API is intended for the rare use case of adding a highly customized FilterClause component that does not include the standard field/operator/value picking interface, instead providing a custom interface and returning a criterion via
FilterClause.getCriterion()
.If you just want to programmatically add a new FilterClause showing a specific Criterion use
addCriterion()
.If you want to use the standard field/operator/value interface but provide a custom control for editing the value, see
DataSource.addSearchOperator()
andOperator.editorType
.- Parameters:
filterClause
- AFilterClause
instance
-
addCriterion
Add a new criterion, including recursively adding sub-criteria for a criterion that contains other criteria.- Parameters:
criterion
- new criterion to be added
-
clearCriteria
public void clearCriteria()Clear all current criteria. -
addFilterChangedHandler
Add a filterChanged handler.Handler fired when there is a change() event fired on any FormItem within the filterBuilder.
- Specified by:
addFilterChangedHandler
in interfaceHasFilterChangedHandlers
- Parameters:
handler
- the filterChanged handler- Returns:
HandlerRegistration
used to remove this handler
-
getEditorType
Returns the type of editor to use for the field.Default behavior is to use the
Operator.editorType
for a custom operator, otherwise, useRelativeDateItem
for before/after/between operators on date fields, otherwise, use the same editor as would be chosen by aSearchForm
.- Parameters:
field
- DataSourceField definitionoperatorId
-OperatorId
for the chosen operator- Returns:
- Smart GWT class to use (must be subclass of FormItem).
See
SCClassName
-
getSelectedClauses
Returns the list of this FilterBuilder's FilterClauses that are currently selected. A clause is "selected" if the user has checked the checkbox next to it; therefore, this method always returns an empty list unless theshowSelectionCheckbox
property is set. This method is only applicable whereTopOperatorAppearance
is "inline" (because that is the only appearance that supportsshowSelectionCheckbox
)- Returns:
- The list of selected clauses
-
addSearchHandler
Add a search handler.A StringMethod that is automatically invoked if
FilterBuilder.saveOnEnter
is set and the user presses Enter whilst in a text-item in any clause or subclause.- Specified by:
addSearchHandler
in interfaceHasSearchHandlers
- Parameters:
handler
- the search handler- Returns:
HandlerRegistration
used to remove this handler
-
validate
Validate the clauses of this FilterBuilder.- Returns:
- true if all clauses are valid, false otherwise
-
setDefaultProperties
Class level method to set the default properties of this class. If set, then all existing and subsequently created instances of this class will automatically have default properties corresponding to the properties set on the SmartGWT class instance passed to this function before its underlying SmartClient JS object was created. This is a powerful feature that eliminates the need for users to create a separate hierarchy of subclasses that only alter the default properties of this class. Can also be used for skinning / styling purposes.Note: This method is intended for setting default attributes only and will affect all instances of the underlying class (including those automatically generated in JavaScript). This method should not be used to apply standard EventHandlers or override methods for a class - use a custom subclass instead. Calling this method after instances have been created can result in undefined behavior, since it bypasses any setters and a class instance may have already examined a particular property and not be expecting any changes through this route.
- Parameters:
filterBuilderProperties
- properties that should be used as new defaults when instances of this class are created- See Also:
-
onInit
public void onInit() -
onInit_FilterBuilder
protected void onInit_FilterBuilder() -
setShowFieldTitles
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.- Parameters:
showFieldTitles
- showFieldTitles default is true- Throws:
IllegalStateException
- this property cannot be changed after the component has been created
-
setDataSource
DataSource this filter should use for field definitions and availableOperator
s.- Parameters:
dataSource
- dataSource Default value is null
-
getCriteria
Initial criteria.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
Criterion.fieldName
only will generate an expression with the operator not chosen yet, and aCriterion
with a logical operator ("and" or "or") but notsubcriteria
defined will generate an empty subclause.- Parameters:
By
- default if a user has selected a field and operator type, but has failed to enter a value for the field it will be skipped. This optional parameter allows you to retrieve all criteria, including those with an empty value attribute.- Returns:
- Get the criteria entered by the user. Default value is null
-
removeClause
Remove a clause this FilterBuilder is currently showing.- Parameters:
clause
- clause as retrieved from filterBuilder.clauses
-
getMembers
Description copied from class:Layout
An array of canvases that will be contained within this layout. You can set the following properties on these canvases (in addition to the standard component properties):layoutAlign
-- specifies the member's alignment along the breadth axis; valid values are "top", "center" and "bottom" for a horizontal layout and "left", "center" and "right" for a vertical layout (seedefaultLayoutAlign
for default implementation.)showResizeBar
-- set to true to show a resize bar (default is false)
layout policy
.Note that it is valid to have null slots in the provided
members
Array, and the Layout will ignore those slots. This can be useful to keep code compact, for example, when constructing themembers
Array, you might use an expression that either returns a component or null depending on whether the component should be present. If the expression returns null, the null slot will be ignored by the Layout.- Overrides:
getMembers
in classLayout
- Returns:
- Get the Array of members. Default value is null
-
getValueFieldProperties
public FormItem getValueFieldProperties(FieldType type, String fieldName, OperatorId operatorId, ValueItemType itemType, String fieldType) Override to return properties for the FormItem(s) used for the "value" field displayed within clauses within this filterBuilder.Note that the valueType impacts when this method is called. For operators with valueType
"fieldType"
or"custom"
, a single value field is displayed. For operators with valueType"valueRange"
two value-field items are displayed (one for the start and one for the end position). ThevalueItemType
parameter may be used to determine which form item is being generated.Note : This is an override point
- Parameters:
type
- type of the DataSource field for this filter row. Note that forDataSourceSimpleTypeField
SimpleType based DataSource fields this attribute will be nullfieldName
- name of the DataSource field for this filter rowoperatorId
-OperatorId
for the chosen operatoritemType
- What valueItem is being generated.fieldType
- type of the DataSource field for this filter row. Typically one would use the parameter but this value is useful when theFieldType
is a custom SimpleType in which case the type will beFieldType.CUSTOM
and this parameter is the name of the SimpleType- Returns:
- properties for the value field
-
setFieldOperatorCustomizer
This method installs a customizer that returns the set of OperatorIds applicable to the passed fieldName- Parameters:
customizer
- the customizer to execute.
-
setLogicalStructure
Setter implementing theLogicalStructure
interface, which supports Eclipse's logical structure debugging facility. -
getLogicalStructure
Getter implementing theLogicalStructure
interface, which supports Eclipse's logical structure debugging facility.- Specified by:
getLogicalStructure
in interfaceLogicalStructure
- Overrides:
getLogicalStructure
in classLayout
-