- Copyright:
- ParaSQL LLC 2013-2022. All rights reserved.
- License:
Fires:
- parasql.Event#event:change
- parasql.Event#event:keypress
- parasql.Event#event:input
Extends
Methods
addEventListener(type, listener)
Adds an event listener to this widget. This can also be done via the Events... option on the tool bar.
Parameters:
Name | Type | Description |
---|---|---|
type |
string | A valid event type. |
listener |
string | A string containing either the name of a JavaScript function to call, an inline function to be called, or code that resolves to an object which implements a handleEvent(event) method. |
- Inherited From:
- See:
Examples
// add an inline function as an event listener
parasql.app.getWidgetById('ID1007').addEventListener('render','function (event) { event.target.getContentDiv().innerHTML = "Inline Hello World"; }');
// add a function call as an event listener
parasql.app.getWidgetById('ID1008').addEventListener('render','renderHelloWidget');
// add an object as an event listener; the object must implement handleEvent(event)
document.myClass = new MyClass();
parasql.app.getWidgetById('ID1009').addEventListener('render','document.myClass');
displayDataValue()
Writes our DataValue to our display element, applying any formatting.
Overridden by various subclasses.
- Inherited From:
focus()
Give focus to the input element of this field.
- Inherited From:
getDataValue() → (nullable) {parasql.schema.DataValue}
- Inherited From:
Returns:
The current DataValue for this field, or null if there is no current DataValue.
getInputElement() → {HTMLInputElement}
Returns:
The input element currently in use by this TextFieldWidget.
- Type
- HTMLInputElement
getIsRequired() → {boolean}
- Inherited From:
Returns:
- Type
- boolean
getIsVirtual() → {boolean}
- Inherited From:
Returns:
- Type
- boolean
getReadOnly() → {boolean}
- Inherited From:
Returns:
Returns true if this field will render as a read-only field.
- Type
- boolean
getWidgetId() → (non-null) {string}
- Inherited From:
Returns:
Returns an immutable string that uniquely identifies this widget.
- Type
- string
isDisabled() → {boolean}
- Since:
- v110
- Inherited From:
Returns:
- Type
- boolean
printWidget()
Causes this widget to print itself.
- Inherited From:
redisplay()
Redisplays this widget.
- Inherited From:
setDataValue(newValue)
Setting a field's value with this method makes it behave as if it were set by the user (with the exception of validation).
The value is copied from the specified newValue, the value is rendered in the UI including any formatting,
any dependent fields are recalculated, any Data Links are performed, and finally a "change" event is fired to all listeners.
Parameters:
Name | Type | Description |
---|---|---|
newValue |
parasql.schema.DataValue | This field's data value is taken from the specified newValue |
- Inherited From:
Fires:
- parasql.Event#event:change When a field's value is changed by the user.
setDataValueNull()
Convenience method to set a field value to NULL.
- Inherited From:
setDisabled(flag)
WARNING: Subclasses overriding this method must not trigger a redisplay (causes an infinite loop).
Parameters:
Name | Type | Description |
---|---|---|
flag |
boolean | If true, this widget will be rendered as disabled. |
- Since:
- v110
- Inherited From:
setIsRequired(flag)
Sets whether or not this field will be rendered as a required field.
Parameters:
Name | Type | Description |
---|---|---|
flag |
boolean |
- Inherited From:
setReadOnly(flag)
Sets whether or not this field will be rendered as a read-only field.
Parameters:
Name | Type | Description |
---|---|---|
flag |
boolean |
- Inherited From: