DocBook|Search
Class Reference
%ZEN.Component.listBox
   
Server:basexml
Instance:SOAXML
User:UnknownUser
 
-
  [BASEXML] >  [%ZEN] >  [Component] >  [listBox]
Private  Storage  

class %ZEN.Component.listBox extends abstractListBox

This is a listBox control implemented using HTML primitives.
It offers some features not provided by the HTML select control. In addition it solves many of the problems found in the Internet Explorer version of the select control (such as problems interoperating with CSS).
The contents displayed by the combobox dropdown list are defined using a set of %ZEN.Auxiliary.option objects.
For example:

<listBox>
<option value="1" text="Apple" />
<option value="2" text="Banana"/>
</listBox>
The listBox control will support both drag and drop. If dragEnabled is true, then the user can drag values from the list box and drop them on other drop-enabled components.
If dropEnabled is true, then values can be dropped onto the list. They will be appended to the end of the list. If both drag and drop are enabled, then it is also possible to move items within this listBox using the mouse.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
1 14


Summary

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

Methods
%%OIDGet %AddToSaveSet %Attr %BindExport
%ClassIsLatestVersion %ClassName %ConstructClone %DispatchClassMethod
%DispatchGetModified %DispatchGetProperty %DispatchMethod %DispatchSetModified
%DispatchSetMultidimProperty %DispatchSetProperty %DrawComponentHTML %DrawHTML
%DrawJSStrings %DrawListContents %EnclosingDivId %Eval
%Extends %ForceClientRender %GetDisplayValue %GetEventHandlers
%GetForm %GetParameter %GetXMLName %IsA
%IsModified %MakeId %Name %New
%NormalizeObject %ObjectModified %OnAddToPageAfter %OnAddToPageBefore
%OnDrawEnclosingDiv %OnDrawObjectProperties %OnObjectSynch %OnZENDeserialize
%OriginalNamespace %PackageName %QuoteValue %QuoteValueL10N
%RemoveFromSaveSet %Self %SerializeObject %SetDefaultValues
%SetModified %ValidateObject XMLDTD XMLExport
XMLExportToStream XMLExportToString XMLNew XMLSchema
XMLSchemaNamespace XMLSchemaType appendOption clickItem
dblClickItem dragFinishHandler dragHandler dragNotifyHandler
dragStartHandler dropHandler dropStartHandler exposeComponent
findElement fireOnUpdateEvent focus formatValue
getDisabled getDragData getEnclosingDiv getForm
getHidden getHintElement getInvalidReason getItemEl
getLabelElement getOptionCount getOptionText getOptionValue
getProperty getReadOnly getSettings getType
getValue insertOption invokeSuper isModified
isOfType isValid lbKeyBlur lbKeyDownHandler
lbKeyFocus lbKeyPressHandler makeId moveOption
moveToItem normalizeValue onCreate onDelete
onDisplayHandler onEndModalHandler onPopupAction onSerialize
onStartModalHandler onchangeHandler onloadHandler onunloadHandler
onupdateHandler refreshContents removeOption render
renderContents renderSVG resetOptions select
selectItem setDisabled setHidden setOption
setOverlayMode setProperty setReadOnly setValue
startProgressBar stopProgressBar sysName unformatValue
validationHandler


Properties

• property options as list of %ZEN.Auxiliary.option(XMLELEMENTREF=1,XMLPROJECTION="ELEMENT",XMLREF=1,XMLTYPECONSTRAINT="CHOICE",ZENSETTING=0);
Set of options displayed within the combobox.

Methods

• method %SetDefaultValues()
This method fills in reasonable default values for this control. Used by tools (such as Control Tester) to dynamically create controls.
• method appendOption(value, text, style) [ Language = javascript ]
Create a new option and append it to this listBox. If text is omitted, then value is used as the display value.
• method dropStartHandler(dragData) [ Language = javascript ]
Default drop handler for listBox components.
• method getOptionCount() [ Language = javascript ]
Return number of items in list.
This must be overridden in subclasses.
• method getOptionText(idx) [ Language = javascript ]
Return the display text for the given item (0-based) in the dropdown list.
• method getOptionValue(idx) [ Language = javascript ]
Return the logical value of the given item (0-based) in the dropdown list.
• method insertOption(index, value, text, style) [ Language = javascript ]
Create a new option and insert it into the set of listBox options. The new option is inserted immediately before the option with index index. If text is omitted, then value is used as the display value.
• method moveOption(index, newIndex) [ Language = javascript ]
Move the option at position index to position newIndex (0-based). Slide other options if need be.
• method onloadHandler() [ Language = javascript ]
This client event, if present, is fired when the page is loaded.
• method removeOption(index) [ Language = javascript ]
Remove an option from this listBox.
index is the index number (0-based) of the option.
• method resetOptions() [ Language = javascript ]
Remove all options from this listBox.
Clears the current value of the listBox.
If there is a value for valueList it is cleared as well.
• method setOption(index, value, text, style) [ Language = javascript ]
Set the properties of an option within this listBox.
index is the index number (0-based) of the option.
If text is omitted, then value is used as the display value.