Skip to main content

%DeepSee.Component.searchBox

Class %DeepSee.Component.searchBox Extends %ZEN.Component.abstractComboBox [ System = 3 ]

Specialized searchBox control for DeepSee searches. This is designed for use within DeepSee components and not as a stand-alone control.

Parameters

JSINCLUDES

Parameter JSINCLUDES = "zenCSLM.js,zenESVG.js,DeepSee.js";

NAMESPACE

Parameter NAMESPACE = "http://www.intersystems.com/deepsee";

ICONAPPLY

Parameter ICONAPPLY = "deepsee/ds2_checkmark_16.png";

ICONCANCEL

Parameter ICONCANCEL = "deepsee/ds2_circlex_22.png";

ICONSEARCH

Parameter ICONSEARCH = "deepsee/ds2_magnify_18.png";

DOMAIN

Parameter DOMAIN = "%DeepSee";

Localization domain

Properties

loadingMessage

Property loadingMessage As %ZEN.Datatype.caption [ InitialExpression = {$$$Text("Loading...","%ZEN")} ];

Localized "loading" message displayed by control.
This message is temporarily displayed while a server-side query is running.

dataSourceName

Property dataSourceName As %ZEN.Datatype.string;

Name of the DeepSee dataSource driving this dropdown.

filterName

Property filterName As %ZEN.Datatype.string;

Logical name of the filter supplying the values.

maxRows

Property maxRows As %ZEN.Datatype.integer [ InitialExpression = 500 ];

Maximum number of items to show.

listOfValues

Property listOfValues As list Of %ZEN.Datatype.string(XMLPROJECTION = "none");

List of current selected item values.

listOfText

Property listOfText As list Of %ZEN.Datatype.string(XMLPROJECTION = "none");

List of current selected item text values.

priorText

Property priorText As list Of %ZEN.Datatype.string(XMLPROJECTION = "none");

List of item text values from prior searches.

priorValues

Property priorValues As list Of %ZEN.Datatype.string(XMLPROJECTION = "none");

List of item values from prior searches.

relatedFilterSpecs

Property relatedFilterSpecs As list Of %ZEN.Datatype.string(XMLPROJECTION = "none");

List of filter specs from other filter controls. This is used to restrict the set of members displayed by this searchBox.

relatedFilterKeys

Property relatedFilterKeys As list Of %ZEN.Datatype.string(XMLPROJECTION = "none");

List of filter key values from other filter controls. This is used to restrict the set of members displayed by this searchBox.

selectMode

Property selectMode As %ZEN.Datatype.string(XMLPROJECTION = "none");

Selection mode: "","not" or "range"

multiSelect

Property multiSelect As %ZEN.Datatype.boolean [ InitialExpression = 1 ];

If true, allow selection of multiple items.

valueRequired

Property valueRequired As %ZEN.Datatype.boolean [ InitialExpression = 0 ];

If true, require at least one selected item.

selectType

Property selectType As %ZEN.Datatype.string;

The type of level that provides data for this control.

calendar

Property calendar As %ZEN.Datatype.string;

The calendar being used for a time level.

descriptionProperty

Property descriptionProperty As %ZEN.Datatype.string(XMLPROJECTION = "none");

If defined, name of description property for a level.

displayMode

Property displayMode As %ZEN.Datatype.string(VALUELIST = "list,calendar,custom,measure", XMLPROJECTION = "none") [ InitialExpression = "list" ];

Display mode. Controls what is displayed in the drop down area.

useSearch

Property useSearch As %ZEN.Datatype.boolean(XMLPROJECTION = "none") [ InitialExpression = 0, Internal ];

If true, use typed in text as a search key. This is set internally.

appendPivotVariables

Property appendPivotVariables As %ZEN.Datatype.boolean(XMLPROJECTION = "none") [ InitialExpression = 0, Internal ];

If true, add any pivot variables associated with the data source. This is ignored if the data source is itself a pivot variable.

onshowdropdown

Property onshowdropdown As %ZEN.Datatype.eventHandler;

onshowdropdown event handler: This event is fired just as the dropdown is about to be rendered.

listOfCMbrValues

Property listOfCMbrValues As list Of %ZEN.Datatype.string(XMLPROJECTION = "none") [ Internal ];

List of calculated member values (used for calendar dropdown).

listOfCMbrText

Property listOfCMbrText As list Of %ZEN.Datatype.string(XMLPROJECTION = "none") [ Internal ];

List of calculated member captions (used for calendar dropdown).

searchText

Property searchText As %ZEN.Datatype.string(XMLPROJECTION = "none") [ Internal ];

Value in search box. This is set internally.

previewMode

Property previewMode As %ZEN.Datatype.boolean [ InitialExpression = 0 ];

If true, then render in preview mode.

iconApply

Property iconApply As %ZEN.Datatype.string [ InitialExpression = {..#ICONAPPLY} ];

Apply icon.

iconCancel

Property iconCancel As %ZEN.Datatype.string [ InitialExpression = {..#ICONCANCEL} ];

Cancel icon.

iconSearch

Property iconSearch As %ZEN.Datatype.string [ InitialExpression = {..#ICONSEARCH} ];

Search icon.

dateFormat

Property dateFormat As %ZEN.Datatype.string [ InitialExpression = "mmm d, y" ];

Optional date format to apply (using DeepSee date format).

firstDayOfWeek

Property firstDayOfWeek As %ZEN.Datatype.integer;

Number indicating the first day of the week in the displayed calendar. 0 = Sunday, 6 = Saturday.

valueList

Property valueList As %ZEN.Datatype.csv;

Optional csv-list of values to use for dropdown

displayList

Property displayList As %ZEN.Datatype.csv;

Optional csv-list of captions to use for dropdown

XDatas

Style

XData Style

defines style sheet used by this component

Methods

%DrawHTML

Method %DrawHTML()

Draw contents of search box.

renderDropdown

ClientMethod renderDropdown() [ Internal, Language = javascript ]

Internal method.
Create contents of drop down box using DHTML. If loadOnly is defined and true, then load the contents into the cached div, but do not show.

loadDropdown

ClientMethod loadDropdown(value, show) [ Internal, Language = javascript ]

Internal method.
Create contents of drop down box using DHTML. value is used as search filter. If show is false, then load the contents into the cached div, but do not show.

LoadDropDownContents

Method LoadDropDownContents(searchParm As %String, cached As %Boolean = 0) [ Internal, ZenMethod ]

Internal method.
Server-side method to load contents of the drop down box by executing query associated with this control. If cached, load contents into cache div

%DrawDropDownContents

Method %DrawDropDownContents(searchParm As %String, Output pCount As %Integer) As %Status [ Internal ]

Server-side method to provide contents of the list box. This is called from the client.

%DrawCustomDropDownContents

Method %DrawCustomDropDownContents(searchParm As %String, Output pCount As %Integer) As %Status [ Internal ]

Draw contents of drop down in "custom" mode.

%DrawMeasureDropDownContents

Method %DrawMeasureDropDownContents(searchParm As %String, Output pCount As %Integer) As %Status [ Internal ]

Draw contents of drop down in "measure" mode.

%ParseMeasureExpression

Method %ParseMeasureExpression(pDataSourceName As %String, pValue As %String, Output pOp As %Integer, Output pParm As %String) As %Status [ Internal ]

Parse a measure expression:
E.g, %SEARCH.&[[Measures].[Units Sold]>1]

notClick

ClientMethod notClick(iscb) [ Language = javascript ]

User click on NOT (exclude members) option within dropdown.

rangeChange

ClientMethod rangeChange(which) [ Language = javascript ]

Change of range combo.

rangeClick

ClientMethod rangeClick(iscb) [ Language = javascript ]

User click on Range option within dropdown.

msrAllClick

ClientMethod msrAllClick(evt, iscb) [ Language = javascript ]

User click on all checkbox within measure dropdown. iscb is true if this is a click from the checkbox.

msrChange

ClientMethod msrChange() [ Language = javascript ]

User change value within measure expression dropdown.

msrKeyPress

ClientMethod msrKeyPress(evt) [ Language = javascript ]

User key press in measure value control.

itemClick

ClientMethod itemClick(evt, idx, iscb) [ Language = javascript ]

User click on item within dropdown. iscb is true if this is a click from the checkbox.

removeItem

ClientMethod removeItem(idx) [ Language = javascript ]

resetItems

ClientMethod resetItems(skip) [ Language = javascript ]

Unselect all options in the dropdown list. If skip is provided, do not reset it.

isAnyItemSelected

ClientMethod isAnyItemSelected() [ Language = javascript ]

Test if any checkbox is selected in the dropdown list.

updateInput

ClientMethod updateInput() [ Language = javascript ]

Display new values in input control.

applyChange

ClientMethod applyChange() [ Language = javascript ]

User click on ok icon.

applyCalendar

ClientMethod applyCalendar() [ Language = javascript ]

User click on ok icon in calendar mode.

applyMeasure

ClientMethod applyMeasure() [ Language = javascript ]

User click on ok icon in measure mode.

cancelChanges

ClientMethod cancelChanges(close) [ Language = javascript ]

Cancel user changes.

rememberValues

ClientMethod rememberValues() [ Language = javascript ]

Remember current values.

findDisplayValue

ClientMethod findDisplayValue(value) [ Language = javascript ]

Convert value to a display value.

selectCustomItem

ClientMethod selectCustomItem(text, val) [ Language = javascript ]

User selected a value in the custom drop down.

onEndModalHandler

ClientMethod onEndModalHandler(zindex) [ Language = javascript ]

Notification that this component is about to stop being modal.

dateChange

ClientMethod dateChange(ctrl, clear) [ Language = javascript ]

User selected a new date in the calendar.

dateToHorolog

ClientMethod dateToHorolog(val) [ Language = javascript ]

Convert a yyyy-mm-dd date to $h.

resolveNowOffset

ClientMethod resolveNowOffset(offset, type) [ Language = javascript ]

Convert NOW-offset to a readable date value given the type. If an unsupported type is entered, the function will return a localized 'NOW'+offset.
Supported types: day, month, year

dateFromHorolog

ClientMethod dateFromHorolog(val, nowInfo) [ Language = javascript ]

Convert a $H to yyyy-mm-dd date.

cbNowClick

ClientMethod cbNowClick(isCB, which) [ Language = javascript ]

User click on NOW checkbox.

offsetNowChange

ClientMethod offsetNowChange(which) [ Language = javascript ]

User change on NOW offset input

dateRangeChange

ClientMethod dateRangeChange(which) [ Language = javascript ]

User selected a new date range in the calendar(s).

updateTooltip

ClientMethod updateTooltip() [ Language = javascript ]

Change the tooltip for the input control.

inputKeyHandler

ClientMethod inputKeyHandler(evt) [ Language = javascript ]

Intercept default behavior. Keydown within input control.

%GetDisplayValue

Method %GetDisplayValue(pValue As %String, pType As %String = "") As %String

Lookup up the display value for the combobox given a logical value.

adjustDropdownPosition

ClientMethod adjustDropdownPosition() [ Language = javascript ]

Adjust the placement and size of the dropdown box based on current screen geometry and scrolling conditions.

searchKeyPress

ClientMethod searchKeyPress(evt) [ Language = javascript ]

Keypress in search box control.

doSearch

ClientMethod doSearch() [ Language = javascript ]

Perform search on drop down contents.

setTextValue

ClientMethod setTextValue(text) [ Internal, Language = javascript ]

Explicitly set text value of this control.

adjustDropDownWidth

ClientMethod adjustDropDownWidth() [ Internal, Language = javascript ]

Adjust the width of the dropdown.