Class JsonStringField<T extends IStringField>
java.lang.Object
org.eclipse.scout.rt.ui.html.json.AbstractJsonAdapter<T>
org.eclipse.scout.rt.ui.html.json.AbstractJsonPropertyObserver<T>
org.eclipse.scout.rt.ui.html.json.AbstractJsonWidget<FORM_FIELD>
org.eclipse.scout.rt.ui.html.json.form.fields.JsonFormField<VALUE_FIELD>
org.eclipse.scout.rt.ui.html.json.form.fields.JsonValueField<T>
org.eclipse.scout.rt.ui.html.json.form.fields.JsonBasicField<T>
org.eclipse.scout.rt.ui.html.json.form.fields.stringfield.JsonStringField<T>
- All Implemented Interfaces:
IJsonAdapter<T>
,IJsonObject
,IJsonContextMenuOwner
,IBinaryResourceConsumer
,IUploadable
public class JsonStringField<T extends IStringField>
extends JsonBasicField<T>
implements IBinaryResourceConsumer
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.scout.rt.ui.html.json.AbstractJsonWidget
AbstractJsonWidget.P_WidgetListener
Nested classes/interfaces inherited from class org.eclipse.scout.rt.ui.html.json.AbstractJsonPropertyObserver
AbstractJsonPropertyObserver.P_PropertyChangeListener
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
Characters to use for obfuscated display textFields inherited from class org.eclipse.scout.rt.ui.html.json.form.fields.JsonValueField
EVENT_ACCEPT_INPUT
Fields inherited from class org.eclipse.scout.rt.ui.html.json.AbstractJsonWidget
EVENT_REVEAL, EVENT_SCROLL_TO_TOP
Fields inherited from interface org.eclipse.scout.rt.ui.html.json.menu.IJsonContextMenuOwner
PROP_CURRENT_MENU_TYPES, PROP_MENUS, PROP_MENUS_VISIBLE
-
Constructor Summary
ConstructorDescriptionJsonStringField
(T model, IUiSession uiSession, String id, IJsonAdapter<?> parent) -
Method Summary
Modifier and TypeMethodDescriptionvoid
consumeBinaryResource
(List<org.eclipse.scout.rt.platform.resource.BinaryResource> binaryResources, Map<String, String> uploadProperties) long
Returns a string used to identify the object-type in the JSON output (JSON attribute 'objectType').protected void
protected void
handleModelPropertyChange
(String propertyName, Object oldValue, Object newValue) This method is called, when a PropertyChangeEvent from the model occurs and no JsonProperty is registered for the given propertyName.protected void
handleUiAcceptInputAfterTyping
(String displayText) Called by the UI when the displayText has changed and the editing action has finished (whileTyping = false
).protected void
handleUiAcceptInputWhileTyping
(String displayText) Called by the UI when the displayText has changed but the editing action has not yet finished (whileTyping = true
).protected void
void
handleUiEvent
(JsonEvent event) protected void
handleUiSelectionChange
(JsonEvent event) protected void
initJsonProperties
(T model) protected boolean
toJson()
Methods inherited from class org.eclipse.scout.rt.ui.html.json.form.fields.JsonValueField
handleUiAcceptInput, handleUiDisplayTextChange, handleUiErrorStatusChange, handleUiValueChange, jsonToValue, setDisplayTextFromUI, setErrorStatusFromUI, setValueFromUI
Methods inherited from class org.eclipse.scout.rt.ui.html.json.form.fields.JsonFormField
attachChildAdapters, attachModel, detachModel, disposeChildAdapters, handleModelContextMenuChanged, handleModelContextMenuCurrentMenuTypesChanged, handleModelContextMenuVisibleChanged, menuTypesToJson
Methods inherited from class org.eclipse.scout.rt.ui.html.json.AbstractJsonWidget
handleModelReveal, handleModelScrollTopTop, handleModelWidgetEvent, scrollOptionsToJson
Methods inherited from class org.eclipse.scout.rt.ui.html.json.AbstractJsonPropertyObserver
addCustomJsonProperty, addPropertyChangeEvent, addPropertyChangeEvent, addPropertyEventFilterCondition, addPropertyEventFilterCondition, cleanUpEventFilters, filterPropertyChangeEvent, getCustomJsonProperties, getJsonProperty, handleLazyJsonProperties, init, putJsonProperty, removeCustomJsonProperty, removeJsonProperty, responseAlreadyContainsPropertyChangeEvent
Methods inherited from class org.eclipse.scout.rt.ui.html.json.AbstractJsonAdapter
addActionEvent, addActionEvent, addActionEvent, addPropertyChangeEvent, attachAdapter, attachAdapter, attachAdapters, attachAdapters, attachGlobalAdapter, attachGlobalAdapter, attachGlobalAdapters, attachGlobalAdapters, dispose, getAdapter, getAdapter, getAdapters, getAdapters, getGlobalAdapter, getGlobalAdapter, getId, getModel, getObjectTypeVariant, getParent, getUiSession, handleUiPropertyChange, handleUiPropertyChange, hasAncestor, isDisposed, isInitialized, processBufferedEvents, putAdapterIdProperty, putAdapterIdProperty, putAdapterIdsProperty, putAdapterIdsProperty, putProperty, registerAsBufferedEventsAdapter, replaceActionEvent, toString, unregisterAsBufferedEventsAdapter
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.scout.rt.ui.html.res.IUploadable
getAcceptedUploadFileExtensions
-
Field Details
-
EVENT_ACTION
- See Also:
-
EVENT_SELECTION_CHANGE
- See Also:
-
OBFUSCATED_DISPLAY_TEXT
Characters to use for obfuscated display text- See Also:
-
-
Constructor Details
-
JsonStringField
-
-
Method Details
-
getObjectType
Description copied from interface:IJsonAdapter
Returns a string used to identify the object-type in the JSON output (JSON attribute 'objectType').- Specified by:
getObjectType
in interfaceIJsonAdapter<T extends IStringField>
- Overrides:
getObjectType
in classJsonValueField<T extends IStringField>
-
initJsonProperties
- Overrides:
initJsonProperties
in classJsonBasicField<T extends IStringField>
-
handleUiEvent
- Specified by:
handleUiEvent
in interfaceIJsonAdapter<T extends IStringField>
- Overrides:
handleUiEvent
in classJsonValueField<T extends IStringField>
-
handleUiAction
protected void handleUiAction() -
handleUiSelectionChange
-
handleUiAcceptInputWhileTyping
Description copied from class:JsonValueField
Called by the UI when the displayText has changed but the editing action has not yet finished (whileTyping = true
). The model field does not yet change its value. This method is usually only called when theIBasicField.PROP_UPDATE_DISPLAY_TEXT_ON_MODIFY
flag is set.- Overrides:
handleUiAcceptInputWhileTyping
in classJsonValueField<T extends IStringField>
-
handleUiAcceptInputAfterTyping
Description copied from class:JsonValueField
Called by the UI when the displayText has changed and the editing action has finished (whileTyping = false
). The model field parses the displayText and updates its value.- Overrides:
handleUiAcceptInputAfterTyping
in classJsonValueField<T extends IStringField>
-
consumeBinaryResource
public void consumeBinaryResource(List<org.eclipse.scout.rt.platform.resource.BinaryResource> binaryResources, Map<String, String> uploadProperties) - Specified by:
consumeBinaryResource
in interfaceIBinaryResourceConsumer
-
getMaximumUploadSize
public long getMaximumUploadSize()- Specified by:
getMaximumUploadSize
in interfaceIUploadable
- Returns:
- maximum upload size in bytes
-
toJson
- Specified by:
toJson
in interfaceIJsonAdapter<T extends IStringField>
- Specified by:
toJson
in interfaceIJsonObject
- Overrides:
toJson
in classJsonFormField<T extends IStringField>
-
handleModelPropertyChange
Description copied from class:AbstractJsonPropertyObserver
This method is called, when a PropertyChangeEvent from the model occurs and no JsonProperty is registered for the given propertyName. Note that you must check if the property-change-event has been filtered by using theAbstractJsonPropertyObserver.filterPropertyChangeEvent(PropertyChangeEvent)
method before you add an event to the JSON response. The default implementation does nothing.- Overrides:
handleModelPropertyChange
in classAbstractJsonPropertyObserver<T extends IStringField>
-
handleModelPropertyChange
- Overrides:
handleModelPropertyChange
in classJsonFormField<T extends IStringField>
-
isObfuscateDisplayTextRequired
protected boolean isObfuscateDisplayTextRequired()
-