Skip to content
Reference > Classes

FormDateTimeField

Definition

FormDateTimeField var = .... ;

Extends

Extended By

None

Description

Date-time field

Method Summary

Owner Name Return Type Description
FormField exportConfig() Map Exports this field's configuration to a map.
FormField focus() Boolean Requests user input be focused on this field, will make panel visible if necessary. Returns false if this field can not be focused. Note that the focus is not immediate, meaning a call to isFocused() directly after calling focus may still return false
DashboardResource getCallback(callbackName) Callback Returns a callback by name
DashboardResource getCallbacks() Map Returns a map of all callback definitions.
DashboardResource getChildren() List Returns a list of the child dashboard resources.
Object getClassName() String Returns the string name of this object's class type.
FormField getCssClass() String Returns the CSS class.
DashboardResource getDRI() String Returns the Dashboard Resource Indicator (DRI) as a string. DRI is the unique identifier of this resources within the entire dashboard.
DashboardResource getDashboardResourceType() String Returns the Dashboard Resource Type as a string
FormDateTimeField getDay() Number Returns a Number that is the day of the current value.
FormDateTimeField getDay(timeZoneId) Number Returns a Number that is the day of the current value in a specific timezone using the timeZoneId.
FormField getDisabled() Boolean Returns true if field is disabled, false otherwise.
FormField getDisplayMode() String DEPRECATED, use isVisible instead. Returns display type of field. Will return "ABSOLUTE" if field is displayed using absolute positioning. Will return "HTML" if field is displayed using form HTML.
FormField getFieldValue(varName) Object Returns the value of the field with the associated varName for the form that owns this field.
DashboardResource getFormula(formulaName) Formula Returns a Formula given the formula name.
DashboardResource getFormulaNames() Set Returns a set of the names of all formulas for this object.
DashboardResource getFormulas() Map Returns a map of all available formulas for this object. The key is the formula name.
FormDateTimeField getHour() Number Returns a Number that is the hour (1-12) of the current value.
FormDateTimeField getHour(timeZoneId) Number Returns a Number that is the hour (1-12) of the current value in a specific timezone using the timeZoneId.
FormDateTimeField getHourOfDay() Number Returns a Number that is the hour (0-23) of the current value.
FormDateTimeField getHourOfDay(timeZoneId) Number Returns a Number that is the hour (0-23) of the current value in a specific timezone using the timeZoneId.
FormDateTimeField getIsPm() Boolean Returns true if the hour is in PM
FormDateTimeField getIsPm(timeZoneId) Boolean Returns true if the hour is in PM in a specific timezone using the timeZoneId.
DashboardResource getLRI() String Returns the Localized Resource Indicator (LRI) as a string. LRI is the unique identifier of this resource with the parent element.
FormField getLabel() String Returns the label associated with this field.
FormField getLabelTooltip() String Returns the tooltip associated with this field's label.
FormDateTimeField getMillis() Number Returns a Number that is the millisecond of the current value.
FormDateTimeField getMillis(timeZoneId) Number Returns a Number that is the millisecond of the current value in a specific timezone using the timeZoneId.
FormDateTimeField getMinute() Number Returns a Number that is the minute of the current value.
FormDateTimeField getMinute(timeZoneId) Number Returns a Number that is the minute of the current value in a specific timezone using the timeZoneId.
FormDateTimeField getMonth() Number Returns a Number that is the month of the current value.
FormDateTimeField getMonth(timeZoneId) Number Returns a Number that is the month of the current value in a specific timezone using the timeZoneId.
DashboardResource getOwner() DashboardResource Returns the DashboardResource that owns this object.
FormField getPanel() FormPanel Returns the panel that contains this field.
FormField getPosition() Rectangle Returns a Rectangle object representing the field's position as (x,y,w,h).
FormDateTimeField getSecond() Number Returns a Number that is the second of the current value.
FormDateTimeField getSecond(timeZoneId) Number Returns a Number that is the second of the current value in a specific timezone using the timeZoneId.
FormField getStyleSet() StyleSet Returns the StyleSet for this form field.
FormField getValue() Object Returns the value associated with this field.
FormField getVariableName() String Returns the variable name associated with this field.
FormDateTimeField getYear() Number Returns a Number that is the year of the current value.
FormDateTimeField getYear(timeZoneId) Number Returns a Number that is the year of the current value in a specific timezone using the timeZoneId.
DashboardResource invokeCallback(callbackName, args) Object Executes the specified callback definition and returns the result from the callback.
FormField isAtDefaultPosition() Boolean Returns whether field is at the default position specified in field editor.
FormField isFocused() Boolean Returns true if this field has focus, false otherwise.
FormField isTransient() Boolean Returns whether a field is transient.
FormField isVisible() Boolean Returns true if this field is visible, false otherwise.
FormField resetCssClass() Boolean Resets CSS class to default (as configured in AMI editor).
FormField resetDisabled() Boolean Resets the disabled flag to default (as configured in AMI editor).
FormField resetPosition() Boolean Resets field position to default position specified in field editor.
FormField setCssClass(cssStyle) Boolean Sets CSS class. Returns empty string for no css.
FormField setDisabled(disabled) Boolean Set the disabled status of the field (true for disabling, false for enabling).
FormField setDisplayMode(mode) Boolean DEPRECATED, use setVisible instead. Sets display mode of field. Setting to "ABSOLUTE" will display field using absolute positioning. Setting to "HTML" will allow field to be displayed using the form HTML. Any other input will throw an exception.
FormField setFieldValue(key, value) Boolean Sets the key value pair to this portlet's attributes and returns true if successful. For key, put in the field's variable name, then set the value.
FormField setLabelTooltip(tooltip) Boolean Sets the label tooltip.
FormField setPosition(x, y, w, h) Boolean Sets the field position. Specify (x,y) position, width, and height in pixels. Passing null to an argument is equivalent to not setting a value for that specific argument.
FormField setPosition(rect) Boolean Sets the position, if the position is null then resets the overrides
FormField setValue(value) Boolean Set this field's value. This is a generic set method that is available for every field in AMI. For FormRangeSlider and FormImage field, it is advisable to use their own setValue() method.
FormField setVisible(visible) Boolean Sets the visibility of this field. Returns false iff the argument is null, true otherwise.
Object toJson() String Returns a json representation of this object.

Method Definitions


exportConfig()

Map FormField::exportConfig()

Description

Exports this field's configuration to a map.


focus()

Boolean FormField::focus()

Description

Requests user input be focused on this field, will make panel visible if necessary. Returns false if this field can not be focused. Note that the focus is not immediate, meaning a call to isFocused() directly after calling focus may still return false


getCallback(callbackName)

Callback DashboardResource::getCallback(String callbackName)

Description

Returns a callback by name

Parameter Definition

Name Type Description
callbackName String  method name of callback

getCallbacks()

Map DashboardResource::getCallbacks()

Description

Returns a map of all callback definitions.


getChildren()

List DashboardResource::getChildren()

Description

Returns a list of the child dashboard resources.


getClassName()

String Object::getClassName()

Description

Returns the string name of this object's class type.


getCssClass()

String FormField::getCssClass()

Description

Returns the CSS class.


getDRI()

String DashboardResource::getDRI()

Description

Returns the Dashboard Resource Indicator (DRI) as a string. DRI is the unique identifier of this resources within the entire dashboard.


getDashboardResourceType()

String DashboardResource::getDashboardResourceType()

Description

Returns the Dashboard Resource Type as a string


getDay()

Number FormDateTimeField::getDay()

Description

Returns a Number that is the day of the current value.


getDay(timeZoneId)

Number FormDateTimeField::getDay(String timeZoneId)

Description

Returns a Number that is the day of the current value in a specific timezone using the timeZoneId.

Parameter Definition

Name Type Description
timeZoneId String 

getDisabled()

Boolean FormField::getDisabled()

Description

Returns true if field is disabled, false otherwise.


getDisplayMode()

String FormField::getDisplayMode()

Description

DEPRECATED, use isVisible instead. Returns display type of field. Will return "ABSOLUTE" if field is displayed using absolute positioning. Will return "HTML" if field is displayed using form HTML.


getFieldValue(varName)

Object FormField::getFieldValue(String varName)

Description

Returns the value of the field with the associated varName for the form that owns this field.

Parameter Definition

Name Type Description
varName String  fieldVarName

getFormula(formulaName)

Formula DashboardResource::getFormula(String formulaName)

Description

Returns a Formula given the formula name.

Parameter Definition

Name Type Description
formulaName String  name of the formula to return

getFormulaNames()

Set DashboardResource::getFormulaNames()

Description

Returns a set of the names of all formulas for this object.


getFormulas()

Map DashboardResource::getFormulas()

Description

Returns a map of all available formulas for this object. The key is the formula name.


getHour()

Number FormDateTimeField::getHour()

Description

Returns a Number that is the hour (1-12) of the current value.


getHour(timeZoneId)

Number FormDateTimeField::getHour(String timeZoneId)

Description

Returns a Number that is the hour (1-12) of the current value in a specific timezone using the timeZoneId.

Parameter Definition

Name Type Description
timeZoneId String 

getHourOfDay()

Number FormDateTimeField::getHourOfDay()

Description

Returns a Number that is the hour (0-23) of the current value.


getHourOfDay(timeZoneId)

Number FormDateTimeField::getHourOfDay(String timeZoneId)

Description

Returns a Number that is the hour (0-23) of the current value in a specific timezone using the timeZoneId.

Parameter Definition

Name Type Description
timeZoneId String 

getIsPm()

Boolean FormDateTimeField::getIsPm()

Description

Returns true if the hour is in PM


getIsPm(timeZoneId)

Boolean FormDateTimeField::getIsPm(String timeZoneId)

Description

Returns true if the hour is in PM in a specific timezone using the timeZoneId.

Parameter Definition

Name Type Description
timeZoneId String 

getLRI()

String DashboardResource::getLRI()

Description

Returns the Localized Resource Indicator (LRI) as a string. LRI is the unique identifier of this resource with the parent element.


getLabel()

String FormField::getLabel()

Description

Returns the label associated with this field.


getLabelTooltip()

String FormField::getLabelTooltip()

Description

Returns the tooltip associated with this field's label.


getMillis()

Number FormDateTimeField::getMillis()

Description

Returns a Number that is the millisecond of the current value.


getMillis(timeZoneId)

Number FormDateTimeField::getMillis(String timeZoneId)

Description

Returns a Number that is the millisecond of the current value in a specific timezone using the timeZoneId.

Parameter Definition

Name Type Description
timeZoneId String 

getMinute()

Number FormDateTimeField::getMinute()

Description

Returns a Number that is the minute of the current value.


getMinute(timeZoneId)

Number FormDateTimeField::getMinute(String timeZoneId)

Description

Returns a Number that is the minute of the current value in a specific timezone using the timeZoneId.

Parameter Definition

Name Type Description
timeZoneId String 

getMonth()

Number FormDateTimeField::getMonth()

Description

Returns a Number that is the month of the current value.


getMonth(timeZoneId)

Number FormDateTimeField::getMonth(String timeZoneId)

Description

Returns a Number that is the month of the current value in a specific timezone using the timeZoneId.

Parameter Definition

Name Type Description
timeZoneId String 

getOwner()

DashboardResource DashboardResource::getOwner()

Description

Returns the DashboardResource that owns this object.


getPanel()

FormPanel FormField::getPanel()

Description

Returns the panel that contains this field.


getPosition()

Rectangle FormField::getPosition()

Description

Returns a Rectangle object representing the field's position as (x,y,w,h).


getSecond()

Number FormDateTimeField::getSecond()

Description

Returns a Number that is the second of the current value.


getSecond(timeZoneId)

Number FormDateTimeField::getSecond(String timeZoneId)

Description

Returns a Number that is the second of the current value in a specific timezone using the timeZoneId.

Parameter Definition

Name Type Description
timeZoneId String 

getStyleSet()

StyleSet FormField::getStyleSet()

Description

Returns the StyleSet for this form field.


getValue()

Object FormField::getValue()

Description

Returns the value associated with this field.


getVariableName()

String FormField::getVariableName()

Description

Returns the variable name associated with this field.


getYear()

Number FormDateTimeField::getYear()

Description

Returns a Number that is the year of the current value.


getYear(timeZoneId)

Number FormDateTimeField::getYear(String timeZoneId)

Description

Returns a Number that is the year of the current value in a specific timezone using the timeZoneId.

Parameter Definition

Name Type Description
timeZoneId String 

invokeCallback(callbackName,args)

Object DashboardResource::invokeCallback(String callbackName, Object ... args)

Description

Executes the specified callback definition and returns the result from the callback.

Parameter Definition

Name Type Description
callbackName String  method name of callback
args Object ...  arguments

isAtDefaultPosition()

Boolean FormField::isAtDefaultPosition()

Description

Returns whether field is at the default position specified in field editor.


isFocused()

Boolean FormField::isFocused()

Description

Returns true if this field has focus, false otherwise.


isTransient()

Boolean FormField::isTransient()

Description

Returns whether a field is transient.


isVisible()

Boolean FormField::isVisible()

Description

Returns true if this field is visible, false otherwise.


resetCssClass()

Boolean FormField::resetCssClass()

Description

Resets CSS class to default (as configured in AMI editor).


resetDisabled()

Boolean FormField::resetDisabled()

Description

Resets the disabled flag to default (as configured in AMI editor).


resetPosition()

Boolean FormField::resetPosition()

Description

Resets field position to default position specified in field editor.


setCssClass(cssStyle)

Boolean FormField::setCssClass(String cssStyle)

Description

Sets CSS class. Returns empty string for no css.

Parameter Definition

Name Type Description
cssStyle String 

setDisabled(disabled)

Boolean FormField::setDisabled(Boolean disabled)

Description

Set the disabled status of the field (true for disabling, false for enabling).

Parameter Definition

Name Type Description
disabled Boolean  true to disable, false to enable

setDisplayMode(mode)

Boolean FormField::setDisplayMode(String mode)

Description

DEPRECATED, use setVisible instead. Sets display mode of field. Setting to "ABSOLUTE" will display field using absolute positioning. Setting to "HTML" will allow field to be displayed using the form HTML. Any other input will throw an exception.

Parameter Definition

Name Type Description
mode String  Display mode

setFieldValue(key,value)

Boolean FormField::setFieldValue(String key, Object value)

Description

Sets the key value pair to this portlet's attributes and returns true if successful. For key, put in the field's variable name, then set the value.

Parameter Definition

Name Type Description
key String 
value Object 

setLabelTooltip(tooltip)

Boolean FormField::setLabelTooltip(String tooltip)

Description

Sets the label tooltip.

Parameter Definition

Name Type Description
tooltip String 

setPosition(x,y,w,h)

Boolean FormField::setPosition(Integer x, Integer y, Integer w, Integer h)

Description

Sets the field position. Specify (x,y) position, width, and height in pixels. Passing null to an argument is equivalent to not setting a value for that specific argument.

Parameter Definition

Name Type Description
x Integer  x-coordinate
y Integer  y-coordinate
w Integer  Width
h Integer  Height

setPosition(rect)

Boolean FormField::setPosition(Rectangle rect)

Description

Sets the position, if the position is null then resets the overrides

Parameter Definition

Name Type Description
rect Rectangle  rectangle

setValue(value)

Boolean FormField::setValue(Object value)

Description

Set this field's value. This is a generic set method that is available for every field in AMI. For FormRangeSlider and FormImage field, it is advisable to use their own setValue() method.

Parameter Definition

Name Type Description
value Object  value

setVisible(visible)

Boolean FormField::setVisible(Boolean visible)

Description

Sets the visibility of this field. Returns false iff the argument is null, true otherwise.

Parameter Definition

Name Type Description
visible Boolean  true for visible, false for hidden.

toJson()

String Object::toJson()

Description

Returns a json representation of this object.