OverviewSingleDeprecatedPropertiesEventsXSL Parameters

jsx3.gui

class NativeSelect

Object
->jsx3.lang.Object
  ->jsx3.app.Model
    ->jsx3.gui.Painted
      ->jsx3.gui.Block
        ->jsx3.gui.NativeSelect

All Implemented Interfaces:

jsx3.gui.Form, jsx3.gui.Interactive, jsx3.util.EventDispatcher, jsx3.xml.CDF, jsx3.xml.Cacheable

class NativeSelect
extends jsx3.gui.Block
The JSX version of a standard GUI select box. XML drives the available options of the select box.

This class requires a CDF data source. The supported CDF attributes are:

Since:

3.9

Constructor Summary
void
init(strName : String, vntLeft : int | String, vntTop : int | String, vntWidth : int | String, vntHeight : int | String, strSelectedValue : String)
The instance initializer.
Method Summary
int
Returns STATEVALID if this select box is not required or if it is required and its value is not empty.
int
Returns whether this controls allows multiple selection.
int
Returns the number of options to show.
String | Array<String>
Returns the value of this select box.
String
Returns the DHTML representation of this select box.
void
redrawRecord(strRecordId : ?, intAction : ?)
A compliant but inefficient implementation.
void
setMultiple(bMultiple : int)
Sets whether this controls allows multiple selection.
void
setSize(intSize : int)
Sets the the number of options to show.
void
setValue(strValue : String | Array<String>)
Sets the value of this select box.
Methods Inherited From jsx3.gui.Form
doKeyBinding, doReset, getDisabledBackgroundColor, getDisabledColor, getEnabled, getKeyBinding, getRequired, getValidationState, setDisabledBackgroundColor, setDisabledColor, setEnabled, setKeyBinding, setRequired, setValidationState
Methods Inherited From jsx3.xml.Cacheable
clearXmlData, getNodeSet, getShareResources, getXML, getXMLId, getXMLString, getXMLTransformers, getXMLURL, getXSL, getXSLId, getXSLParams, getXSLString, getXSLURL, getXmlAsync, getXmlBind, onXmlBinding, removeXSLParam, removeXSLParams, resetCacheData, resetData, resetXmlCacheData, resetXslCacheData, setNodeSet, setShareResources, setSourceXML, setXMLId, setXMLString, setXMLTransformers, setXMLURL, setXSLId, setXSLParam, setXSLString, setXSLURL, setXmlAsync, setXmlBind
Methods Inherited From jsx3.xml.CDF
adoptRecord, adoptRecordBefore, convertProperties, deleteRecord, deleteRecordProperty, getRecord, getRecordIds, getRecordNode, getSchema, insertRecord, insertRecordBefore, insertRecordNode, insertRecordProperty, reloadFromSource, setSchema
Methods Inherited From jsx3.gui.Block
getBackground, getBackgroundColor, getBorder, getCDFAttribute, getCDFId, getCSSOverride, getClassName, getColor, getCursor, getDimensions, getDisplay, getFontName, getFontSize, getFontWeight, getHeight, getIndex, getLeft, getMargin, getOverflow, getPadding, getRelativePosition, getTagName, getText, getTextAlign, getTip, getTop, getVisibility, getWidth, getZIndex, hideMask, setBackground, setBackgroundColor, setBorder, setCDFAttribute, setCDFId, setCSSOverride, setClassName, setColor, setCursor, setDimensions, setDisplay, setFontName, setFontSize, setFontWeight, setHeight, setIndex, setLeft, setMargin, setOverflow, setPadding, setRelativePosition, setTagName, setText, setTextAlign, setTip, setTop, setVisibility, setWidth, setZIndex, showMask
Methods Inherited From jsx3.gui.Interactive
doEvent, getCanDrag, getCanDrop, getCanMove, getCanSpy, getEvent, getEvents, getMenu, hasEvent, registerHotKey, removeEvent, removeEvents, setCanDrag, setCanDrop, setCanMove, setCanSpy, setEvent, setMenu, setSpyStyles, showSpy
Methods Inherited From jsx3.gui.Painted
focus, getAbsolutePosition, getAttribute, getAttributes, getRendered, insertHTML, onAfterPaint, onAfterRestoreView, paintChild, paintChildren, recalcBox, removeAttribute, removeAttributes, repaint, setAttribute
Methods Inherited From jsx3.app.Model
adoptChild, assembleFromXML, doClone, findAncestor, findDescendants, getAncestorOfName, getAncestorOfType, getChild, getChildIndex, getChildren, getDescendantOfName, getDescendantsOfType, getDynamicProperty, getFirstChild, getFirstChildOfType, getHelpId, getId, getLastChild, getLoadType, getMetaValue, getNS, getName, getNextSibling, getParent, getPersistence, getPreviousSibling, getServer, getUriResolver, insertBefore, load, loadAndCache, loadXML, onAfterAssemble, onAfterAttach, onBeforeAssemble, onChangeServer, onChildAdded, onDestroy, onRemoveChild, onSetChild, onSetParent, removeChild, removeChildren, selectDescendants, setChild, setDynamicProperty, setHelpId, setLoadType, setMetaValue, setName, setPersistence, toString, toXML, toXMLDoc, toXMLElm
Methods Inherited From jsx3.util.EventDispatcher
publish, subscribe, unsubscribe, unsubscribeAll
Methods Inherited From jsx3.lang.Object
clone, equals, eval, getClass, getInstanceOf, getInstanceOfClass, getInstanceOfPackage, instanceOf, isInstanceOf, isSubclassOf, jsxmix, jsxsuper, jsxsupermix, setInstanceOf
Constructor Detail

init

void init(strName : String, vntLeft : int | String, vntTop : int | String, vntWidth : int | String, vntHeight : int | String, strSelectedValue : String)
The instance initializer.

Parameters:

strNameunique name distinguishing this object from all other JSX GUI objects in the JSX application
vntLefteither a number (i.e, 12, 30, etc) or a number and a unit value (i.e., "25%", "36pt", etc); if a number is passed, pixels will be the assumed unit when painted to screen
vntTopeither a number (i.e, 12, 30, etc) or a number and a unit value (i.e., "25%", "36pt", etc); if a number is passed, pixels will be the assumed unit when painted to screen
vntWidtheither a number (i.e, 12, 30, etc) or a number and a unit value (i.e., "25%", "36pt", etc); if a number is passed, pixels will be the assumed unit when painted to screen
vntHeighteither a number (i.e, 12, 30, etc) or a number and a unit value (i.e., "25%", "36pt", etc); if a number is passed, pixels will be the assumed unit when painted to screen
strSelectedValuethis value should correspond to the XML value for the node whose text should be preloaded in the select box when it is painted
Method Detail

doValidate

int doValidate()
Returns STATEVALID if this select box is not required or if it is required and its value is not empty. If this select is of type combo then any value other than an empty string is valid, otherwise only values corresponding to an actual CDF record of this select are valid.

Returns:

jsx3.gui.Form.STATEVALID or jsx3.gui.Form.STATEINVALID.  

Overrides:

doValidate in jsx3.gui.Form

getMultiple

int getMultiple()
Returns whether this controls allows multiple selection.

Returns:

1 (true) or 0 (false).  

getSize

int getSize()
Returns the number of options to show. The default is 1, which shows a drop down menu. Any number great than one will show a scrolling list.

Returns:

 

getValue

String | Array<String> getValue()
Returns the value of this select box. If this is a multi-select then the return value is an array.

Returns:

 

Overrides:

getValue in jsx3.gui.Form

paint

String paint()
Returns the DHTML representation of this select box.

Returns:

DHTML  

Overrides:

paint in jsx3.gui.Block

redrawRecord

void redrawRecord(strRecordId : ?, intAction : ?)
A compliant but inefficient implementation. Don't call this in a loop.

Parameters:

strRecordId
intAction

Overrides:

redrawRecord in jsx3.xml.CDF

setMultiple

void setMultiple(bMultiple : int)
Sets whether this controls allows multiple selection.

Parameters:

bMultiple

setSize

void setSize(intSize : int)
Sets the the number of options to show.

Parameters:

intSize

setValue

void setValue(strValue : String | Array<String>)
Sets the value of this select box. If this is a multi-select then strValue may be an array.

Parameters:

strValue

Overrides:

setValue in jsx3.gui.Form