public class NativeField
extends java.lang.Object
| Constructor and Description |
|---|
NativeField() |
| Modifier and Type | Method and Description |
|---|---|
com.google.gwt.user.client.Element |
getElement()
Gets the element of the field for operations on it.
|
java.lang.String |
getErrorMessage()
Get the error message.
|
java.lang.String |
getID()
Get the field's id.
|
java.lang.String |
getName()
Get the name.
|
java.lang.String |
getUI()
Get the ui type.
|
java.lang.String |
getValidator()
Get the validator.
|
java.lang.String |
getValue()
Get the value of the field, can't get RDB values.
|
boolean |
isHierarchical()
Is hierarchical field?
|
boolean |
isInvalid()
Is the field's value valid?
|
boolean |
isReadOnly()
Is the field read only?
|
boolean |
isVisible()
Is the field visible?
|
static void |
javascriptConstructor(jb.gwt_main_modules.base_widgets.client.panels.xmpfieldedit.XmpEditField theDelegateField)
The field wrapper constructor.
|
void |
resetField()
Set back to default state
|
void |
setCSVAction(java.lang.String theXMPEditAction)
Change the value of the CSV field's associated action.
|
void |
setCSVDefaultAction(java.lang.String theXMPEditAction)
Change the value of the CSV field's associated myDefaultAction variable.
|
void |
setCustomButton(java.lang.String theIconName,
java.lang.String theButtonText,
java.lang.String theJavascriptCommand)
Add custom button next to field with passed in javascript
Example to add button that looks like a person icon, has hover text, and adds the current user's username on click to the associated field.
|
void |
setEnabled(boolean theEnabled)
Set the field disabled or enabled.
|
void |
setHelpMessage(java.lang.String theMessage)
Create a help button w/hover, tippy text attached
|
void |
setInvalid(boolean theIsInvalid,
java.lang.String theErrorMessage)
Set the validity of the field's value.
|
void |
setLabel(java.lang.String theLabel)
Set the field label.
|
void |
setMaxLength(int theMaxLength)
Set max length accepted by the field
|
void |
setMessage(java.lang.String theMessage)
Set a message for the field
|
void |
setNotEmpty(boolean theIsNotEmpty)
Set the field as being not empty (or removing not empty if added via API before).
|
void |
setPlaceholderText(java.lang.String thePlaceholderText)
Text to display in the textbox if no text has been entered.
|
void |
setReadOnly(boolean theReadOnly,
boolean theRefreshParent)
Set the field read only.
|
static void |
setupAPI()
Setup the field wrapper constructor and functions.
|
void |
setValue(java.lang.String theNewValue)
Set the field's value and mark it dirty.
|
java.lang.String |
setValueTransformer(java.lang.String theValueTransformationScript)
Example to append 2 to the end of a returned value: "return theValue + '2'"
|
void |
setVisible(boolean theVisible)
Set the field visible or hidden.
|
public static void setupAPI()
public static void javascriptConstructor(jb.gwt_main_modules.base_widgets.client.panels.xmpfieldedit.XmpEditField theDelegateField)
theDelegateField - The field to wrap.public java.lang.String setValueTransformer(java.lang.String theValueTransformationScript)
theValueTransformationScript - public java.lang.String getName()
public void setMaxLength(int theMaxLength)
theMaxLength - the max length integer, -1 will unset any value appliedpublic void setNotEmpty(boolean theIsNotEmpty)
theIsNotEmpty - Should we say the field value is mandatory or not [true|false]?public java.lang.String getUI()
public java.lang.String getValidator()
public boolean isHierarchical()
true if field is hierarchical, false otherwisepublic java.lang.String getID()
public java.lang.String getValue()
public void setCSVDefaultAction(java.lang.String theXMPEditAction)
theXMPEditAction - the default action to be used when a field is clicked. Single value fields are by
default XMPEditAction.replace_selected, while multi-value fields are by default XMPEditAction.add.public com.google.gwt.user.client.Element getElement()
public void setCSVAction(java.lang.String theXMPEditAction)
theXMPEditAction - the action to be used when a field's form is submitted. Single value fields are by
default XMPEditAction.replace_selected, while multi-value fields are by default XMPEditAction.add.public void setValue(java.lang.String theNewValue)
theNewValue - The value to set the field to.public void resetField()
public boolean isVisible()
public void setVisible(boolean theVisible)
theVisible - Should the field be visible or hidden?public void setEnabled(boolean theEnabled)
theEnabled - Should the field be visible or hidden?public void setInvalid(boolean theIsInvalid,
java.lang.String theErrorMessage)
theIsInvalid - Is this field's value invalid?theErrorMessage - The error message to display in tooltip when hovering over the invalid field.public void setMessage(java.lang.String theMessage)
theMessage - the message to setpublic void setHelpMessage(java.lang.String theMessage)
theMessage - the message to display when hovering over help buttonpublic void setCustomButton(java.lang.String theIconName,
java.lang.String theButtonText,
java.lang.String theJavascriptCommand)
theCurrentField.setCustomButton("person", "AutoFill User Name", "theCurrentField.setValue(parent.MBAPI.getUserName());");theIconName - the material icon nametheJavascriptCommand - javascript code to execute. Will pass in the metaform and field as with other APIs (`theCurrentM3TAForm` and `theCurrentField`)public void setPlaceholderText(java.lang.String thePlaceholderText)
thePlaceholderText - the text to displaypublic boolean isInvalid()
public java.lang.String getErrorMessage()
public boolean isReadOnly()
public void setReadOnly(boolean theReadOnly,
boolean theRefreshParent)
theReadOnly - Should the field be read onlytheRefreshParent - Should we redraw the entire form after setting? Optional parameter. Default is true.public void setLabel(java.lang.String theLabel)
theLabel - The field label.Copyright © 2026 MediaBeacon, Inc. All Rights Reserved.