Skip to main content

%ZEN.Portal.selector

deprecated class %ZEN.Portal.selector extends %ZEN.Component.control

Selector component for Portal applications. This is a specialized form of text control that allows for free form text entry or context-aware selection from a list.

Property Inventory

Method Inventory

Parameters

parameter DEFAULTCONTROLCLASS = selectorInput;
Inherited description: The default css class used for the main element within this control. This is overridden by subclasses.

Properties

property context as %ZEN.Datatype.uri;
Context string used to determine the selection list for this component.
A context string take the form of a URL:
SearchClass/SearchName?parm1=value&parm2=value
SearchClass is the name of a %ZEN.Portal.ContextSearch search class that contains the search to perform.
SearchName is the name of the search method to invoke within the search class.
Property methods: contextDisplayToLogical(), contextGet(), contextIsValid(), contextLogicalToDisplay(), contextLogicalToOdbc(), contextNormalize(), contextSet()
property multiSelect as %ZEN.Datatype.boolean [ InitialExpression = 0 ];
Flag to indicate whether multiSelect mode should be used when displaying the dropdown menu. If this value is true, then the contents of the control are treated as a delimited list using separator as the delimiter. The dropdown will then present the user with a list of checkboxes with the previously entered values checked. Checking and unchecking values will toggle whether the property is included in the list.
NOTE: MultiSelect mode should not be used in conjunction with context-based lookups, as the behaviour which could come from this approach would not be intuitive or easy to use.
Property methods: multiSelectDisplayToLogical(), multiSelectGet(), multiSelectIsValid(), multiSelectLogicalToDisplay(), multiSelectLogicalToOdbc(), multiSelectLogicalToXSD(), multiSelectNormalize(), multiSelectSet(), multiSelectXSDToLogical()
property onkeyup as %ZEN.Datatype.eventHandler (HANDLER = """_$select((..onkeyup'=""""): ""return zenFireEvent('""_..index_""','""_$ZCVT($S(..onkeydown'[""#("":..onkeydown,1:..%Eval(..onkeydown,""JS"")),""O"",""JS"")_""','onkeydown',event);"", 1: ""zenPage.getComponent(""_..index_"").onkeyupHandler(event,""_..index_"");"")_""");
onkeyup event handler: This event is fired when a key is released when this control has focus. The HANDLER parameter is used to trigger the default onkeyup handler defined in onkeyupHandler()(). If onkeyup is specified in the component, then that specific code will be invoked rather than that in the default event handler, and it is then the responsibility of the developer to call the onkeyupHandler()() function defined in this class.
Property methods: onkeyupDisplayToLogical(), onkeyupGet(), onkeyupIsValid(), onkeyupLogicalToDisplay(), onkeyupLogicalToOdbc(), onkeyupNormalize(), onkeyupSet()
property separator as %ZEN.Datatype.string [ InitialExpression = "," ];
Define what delimiter to use for list properties when multiSelect is true.
Property methods: separatorDisplayToLogical(), separatorGet(), separatorIsValid(), separatorLogicalToDisplay(), separatorLogicalToOdbc(), separatorNormalize(), separatorSet()
property size as %ZEN.Datatype.integer (MINVAL = 0);
Size of the input area for this text control.
Property methods: sizeDisplayToLogical(), sizeGet(), sizeIsValid(), sizeLogicalToDisplay(), sizeLogicalToOdbc(), sizeNormalize(), sizeSet()

Methods

method %DrawHTML()
Draw content of control.
classmethod %RenderDropdown(pIndex As %Integer, pContext As %String, pSearchKey As %String, pMultiSelect As %Boolean, pSeparator As %String = ",") as %Status
Render the HTML contents of the dropdown area for the selector.
pContext is the (resolved) context string for the control.
pSearchKey is the current contents of the control.
pMultiSelect is a flag to indicate whether a multiSelect dropdown should be displayed.
pSeparator indicates which separator character should be used if pMultiSelect is true.
classmethod RenderDropdownContent(pIndex As %Integer, pContext As %String, pSearchKey As %String, pMultiSelect As %Boolean, pSeparator As %String = ",") as %Boolean [ ZenMethod ]
Get the HTML contents of the dropdown area for the selector.
pContext is the (resolved) context string for the control.
pSearchKey is the current contents of the control.
pMultiSelect is a flag to indicate whether a multiSelect dropdown should be displayed.
pSeparator indicates which separator character should be used if pMultiSelect is true.
clientmethod adjustDropdownPosition() [ Language = javascript ]
clientmethod adjustSize() [ Language = javascript ]
Adjust size of control.
clientmethod getModalDiv() [ Language = javascript ]
Find the div element used to display modal popups.
clientmethod onDisplayHandler() [ Language = javascript ]
This client event, if present, is fired when the containing group is made visible.
clientmethod onEndModalHandler(zindex) [ Language = javascript ]
Notification that this component is about to stop being modal.
clientmethod onStartModalHandler(zindex) [ Language = javascript ]
Notification that this component is about to become modal.
clientmethod onkeyupHandler(event, index) [ Language = javascript ]
Default onkeyup handler to allow drop-down to be displayed (by pressing DOWN) or hidden (by pressing ESCAPE). This method is only invoked if no onkeyup event is defined for the selector using the standard onkeyup attribute. Should a developer make use of the onkeyup callback, it is his/her responsibility to determine whether this function should be invoked.
clientmethod onloadHandler() [ Language = javascript ]
This client event, if present, is fired when the page is loaded.
clientmethod onresizeHandler() [ Language = javascript ]
This client event is fired when the page is resized and the dropdown is visible. Resizing the window while the dropdown is open can cause the base component and its dropdown to become detached, this method traps such occurences and allows the dropdown to be repositioned.
clientmethod selectItem(value) [ Language = javascript ]
User has selected an item in the dropdown list.
clientmethod setProperty(property, value, value2) [ Language = javascript ]
Set the value of a named property.
clientmethod showSelector() [ Language = javascript ]
User has pressed the selector button.
clientmethod toggleIconDisplay(hide) [ Language = javascript ]

Inherited Members

Inherited Properties

Inherited Methods

Subclasses

FeedbackOpens in a new tab