public abstract class AbstractTextBasedEditorRenderer<T> extends AbstractCockpitEditorRenderer<T>
| Modifier and Type | Field and Description |
|---|---|
static String |
SETTING_INPUT_INSTANT |
HEADER_LABEL_TOOLTIP, ON_ADD_EVENT, ON_DELETE_EVENTINITIAL_EDIT_STRING| Constructor and Description |
|---|
AbstractTextBasedEditorRenderer() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
clearInvalidInputAndNotify(EditorListener<T> listener,
org.zkoss.zul.impl.InputElement editorView) |
protected abstract T |
coerceFromString(org.zkoss.zul.impl.InputElement editorView,
String text)
Converts string value to a real value.
|
protected abstract T |
getRawValue(org.zkoss.zul.impl.InputElement editorView)
Extracts value of the given editor component.
|
protected void |
handleChangeEvent(EditorListener<T> listener,
org.zkoss.zul.impl.InputElement editorView) |
protected void |
handleChangeEvent(EditorListener<T> listener,
T value) |
protected void |
handleChangingEvent(EditorListener<T> listener,
org.zkoss.zul.impl.InputElement editorView,
String stringValue) |
protected void |
handleReadOnly(EditorContext<T> context,
org.zkoss.zul.impl.InputElement editorView)
Utility method that assures proper handling of
readonly/disabled attributes across
different browsers. |
protected boolean |
hasInvalidInput(org.zkoss.zul.impl.InputElement editorView) |
protected void |
initViewComponent(org.zkoss.zul.impl.InputElement editorView,
EditorContext<T> context,
EditorListener<T> listener)
Adds event listeners to this editor component, parses the parameter for initial value etc.
|
boolean |
isPrimitive() |
protected void |
onCancelEvent(EditorListener<T> listener,
org.zkoss.zul.impl.InputElement editorView,
T initialValue)
Method called when the user cancelled his input.
|
protected void |
onChangeEvent(EditorListener<T> listener,
org.zkoss.zul.impl.InputElement editorView)
Method called when the editor value is changed and the editor is not focused anymore.
|
protected void |
onChangingEvent(EditorListener<T> listener,
org.zkoss.zul.impl.InputElement editorView,
org.zkoss.zk.ui.event.InputEvent event)
Method called when something changed in the editor, for example every 1 sec while typing something
|
protected void |
onFocusEvent(org.zkoss.zul.impl.InputElement editorView,
String initialEditText)
Method called when the user focuses the Editor.
|
protected void |
onOkEvent(EditorListener<T> listener,
org.zkoss.zul.impl.InputElement editorView)
Method called when the editor value is set
|
protected abstract void |
setRawValue(org.zkoss.zul.impl.InputElement editorView,
T rawValue)
Sets the value to the given editor component.
|
extractEmbeddedEditor, extractEmbeddedType, findAncestorEditor, findEmbeddedEditors, getInitialEditString, getL10nDecoratorclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrenderpublic static final String SETTING_INPUT_INSTANT
protected void initViewComponent(org.zkoss.zul.impl.InputElement editorView,
EditorContext<T> context,
EditorListener<T> listener)
editorView - the editor component previously created in overridden method
CockpitEditorRenderer.render(org.zkoss.zk.ui.Component, com.hybris.cockpitng.editors.EditorContext, com.hybris.cockpitng.editors.EditorListener)context - the editor contextprotected void onChangingEvent(EditorListener<T> listener, org.zkoss.zul.impl.InputElement editorView, org.zkoss.zk.ui.event.InputEvent event)
editorView - the Editorevent - protected void onChangeEvent(EditorListener<T> listener, org.zkoss.zul.impl.InputElement editorView)
listener - editorView - the Editorprotected void onOkEvent(EditorListener<T> listener, org.zkoss.zul.impl.InputElement editorView)
listener - editorView - the Editorprotected void onCancelEvent(EditorListener<T> listener, org.zkoss.zul.impl.InputElement editorView, T initialValue)
listener - editorView - the Editorprotected void onFocusEvent(org.zkoss.zul.impl.InputElement editorView,
String initialEditText)
editorView - the EditorinitialEditText - protected void handleChangeEvent(EditorListener<T> listener, org.zkoss.zul.impl.InputElement editorView)
protected void handleChangeEvent(EditorListener<T> listener, T value)
protected void handleChangingEvent(EditorListener<T> listener, org.zkoss.zul.impl.InputElement editorView, String stringValue)
protected void clearInvalidInputAndNotify(EditorListener<T> listener, org.zkoss.zul.impl.InputElement editorView)
protected boolean hasInvalidInput(org.zkoss.zul.impl.InputElement editorView)
protected void handleReadOnly(EditorContext<T> context, org.zkoss.zul.impl.InputElement editorView)
readonly/disabled attributes across
different browsers.context - editor contexteditorView - the view of the editorprotected abstract void setRawValue(org.zkoss.zul.impl.InputElement editorView,
T rawValue)
editorView - the underlying editor componentrawValue - the valueprotected abstract T getRawValue(org.zkoss.zul.impl.InputElement editorView)
editorView - the underlying editor componentprotected abstract T coerceFromString(org.zkoss.zul.impl.InputElement editorView, String text)
editorView - the underlying editor componenttext - the string valepublic boolean isPrimitive()
Copyright © 2018. All rights reserved.