Home > Class Reference > ENSLIB namespace > %ZEN.Portal.selector
Private  Storage   

%ZEN.Portal.selector


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.

Inventory


Parameters Properties Methods Queries Indices ForeignKeys Triggers
1 5 17


Summary


Properties
%condition %import %includeFiles %page
%resource align aux clientType
composite containerStyle context controlClass
controlStyle dataBinding disabled dragEnabled
dropEnabled enclosingClass enclosingStyle error
height hidden hint hintClass
hintStyle id index invalid
invalidMessage label labelClass labelDisabledClass
labelStyle multiSelect name onafterdrag
onbeforedrag onblur onchange onclick
ondblclick ondrag ondrop onfocus
onhide onkeydown onkeypress onkeyup
onmousedown onmouseout onmouseover onmouseup
onrefresh onshow onsubmit ontouchend
ontouchmove ontouchstart onupdate onvalidate
originalValue parent readOnly required
requiredMessage separator showLabel size
slice tabIndex title tuple
valign value visible width
window

Methods
%AddToSaveSet %Attr %BindExport %ClassIsLatestVersion
%ClassName %ConstructClone %DispatchClassMethod %DispatchGetModified
%DispatchGetProperty %DispatchMethod %DispatchSetModified %DispatchSetMultidimProperty
%DispatchSetProperty %DrawComponentHTML %DrawHTML %DrawJSStrings
%EnclosingDivId %Eval %EvalC %Extends
%ForceClientRender %GetEventHandlers %GetForm %GetParameter
%GetXMLName %IsA %IsModified %MakeId
%Name %New %NormalizeObject %ObjectModified
%OnAddToPageAfter %OnAddToPageBefore %OnDrawEnclosingDiv %OnDrawObjectProperties
%OnObjectSynch %OnZENDeserialize %OriginalNamespace %PackageName
%QuoteValue %QuoteValueL10N %RemoveFromSaveSet %RenderDropdown
%Self %SerializeObject %SetDefaultValues %SetModified
%ValidateObject RenderDropdownContent XMLDTD XMLExport
XMLExportToStream XMLExportToString XMLNew XMLSchema
XMLSchemaNamespace XMLSchemaType adjustDropdownPosition adjustSize
dragFinishHandler dragHandler dragNotifyHandler dragStartHandler
dropHandler dropStartHandler exposeComponent findElement
fireOnUpdateEvent focus formatValue getDisabled
getDragData getEnclosingDiv getForm getHidden
getHintElement getInvalidReason getLabelElement getModalDiv
getProperty getReadOnly getSettings getType
getValue invokeSuper isModified isOfType
isValid makeId normalizeValue onCreate
onDelete onDisplayHandler onEndModalHandler onPopupAction
onRefreshContents onSerialize onStartModalHandler onchangeHandler
onkeyupHandler onloadHandler onresizeHandler onunloadHandler
onupdateHandler refreshContents render renderContents
renderSVG select selectItem setDisabled
setHidden setOverlayMode setProperty setReadOnly
setValue showSelector startProgressBar stopProgressBar
sysName toggleIconDisplay unformatValue validationHandler


Parameters


• parameter DEFAULTCONTROLCLASS = "selectorInput";
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 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 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 separator as %ZEN.Datatype.string [ InitialExpression = "," ];
Define what delimiter to use for list properties when multiSelect is true.
• property size as %ZEN.Datatype.integer(MINVAL=0);
Size of the input area for this text control.

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.
• method adjustDropdownPosition() [ Language = javascript ]
• method adjustSize() [ Language = javascript ]
Adjust size of control.
• method getModalDiv() [ Language = javascript ]
Find the div element used to display modal popups.
• method onDisplayHandler() [ Language = javascript ]
This client event, if present, is fired when the containing group is made visible.
• method onEndModalHandler(zindex) [ Language = javascript ]
Notification that this component is about to stop being modal.
• method onStartModalHandler(zindex) [ Language = javascript ]
Notification that this component is about to become modal.
• method 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.
• method onloadHandler() [ Language = javascript ]
This client event, if present, is fired when the page is loaded.
• method 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.
• method selectItem(value) [ Language = javascript ]
User has selected an item in the dropdown list.
• method setProperty(property, value, value2) [ Language = javascript ]
Set the value of a named property.
• method showSelector() [ Language = javascript ]
User has pressed the selector button.
• method toggleIconDisplay(hide) [ Language = javascript ]