public class Editor extends AbstractCockpitComponent implements org.zkoss.zk.ui.ext.AfterCompose, org.zkoss.zk.ui.IdSpace
EditorRegistry to look up
the editor for the specified type. If the property attribute is specified it connects the editor with
the widget model's property of that name and loads an stores the value automatically.EditorRegistry,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
protected class |
Editor.CockpitEditorRendererFactory |
| Modifier and Type | Field and Description |
|---|---|
protected static String |
COCKPIT_EDITOR_CLASS_INSTANCE_PARAM |
protected static String |
CURRENT_OBJECT |
static String |
DATA_TYPE |
static String |
DEFAULT_FOCUS_COMPONENT_ID |
static String |
EDITOR_INSTANCE_REFERENCE |
static String |
EDITOR_PROPERTY |
static String |
MODEL_PREFIX |
static String |
ON_EDITOR_EVENT |
static String |
ON_VALUE_CHANGED |
static String |
PARENT_OBJECT |
static String |
VALIDATION_RESULT_KEY |
static String |
VALUE_EDITOR |
static String |
WIDGET_INSTANCE_MANAGER |
protected static String |
YW_LOCEDITOR_CAPTION_SPACER |
COCKPIT_COMPONENTS_ATTIBUTE, initialized, modelObserver, widgetInstanceManagerAFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED| Constructor and Description |
|---|
Editor() |
Editor(EditorContext<?> editorContext) |
getComponentDefinitionService, initializeComponentWidgetAdapter, isInitialized, setComponentDefinitionService, setWidgetInstanceManager, unregisterObserver, unregisterWidgetStubInstanceclone, getContext, getCtrlKeys, getPopup, getPropertyAccess, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributesgetAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZindex, getZIndex, service, setAction, setClass, setDraggable, setDroppable, setFocus, setHeight, setHeight0, setHeightDirectly, setHflex, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectlyaddAnnotation, addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, enableBindingAnnotation, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getCallback, getChildren, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, insertBefore, invalidate, isChildable, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerializefinalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final String DATA_TYPE
public static final String MODEL_PREFIX
public static final String EDITOR_PROPERTY
public static final String ON_VALUE_CHANGED
public static final String ON_EDITOR_EVENT
public static final String DEFAULT_FOCUS_COMPONENT_ID
public static final String VALUE_EDITOR
public static final String WIDGET_INSTANCE_MANAGER
public static final String EDITOR_INSTANCE_REFERENCE
public static final String VALIDATION_RESULT_KEY
public static final String PARENT_OBJECT
protected static final String YW_LOCEDITOR_CAPTION_SPACER
protected static final String COCKPIT_EDITOR_CLASS_INSTANCE_PARAM
protected static final String CURRENT_OBJECT
public Editor()
public Editor(EditorContext<?> editorContext)
public void reload()
public void afterCompose()
afterCompose in interface org.zkoss.zk.ui.ext.AfterComposepublic void initialize()
protected void verifyLocalizedEditor()
@Deprecated protected boolean containsLocalization(String code)
protected boolean handlesLocalization()
public CockpitEditorRenderer getEditorRenderer()
protected CockpitEditorRenderer prepareEditorRenderer(EditorDefinition definition, String tag)
protected EditorDefinition getEditorDefinition()
protected void buildEditor(CockpitEditorRenderer<Object> editorRenderer, EditorDefinition editorDefinition, EditorContext<Object> editorContext)
protected ModelObserver getModelObserver()
protected boolean shouldReloadEditorOnCurrentObjectChange(String property)
protected void renderEditor(CockpitEditorRenderer<Object> editorRenderer, EditorDefinition editorDefinition, EditorContext<Object> editorContext)
public WidgetInstanceManager getWidgetInstanceManager()
getWidgetInstanceManager in class AbstractCockpitComponentprotected void applyCssStyleForEditor(org.zkoss.zk.ui.Component viewComponent)
protected EditorListener<Object> createEditorListener(EditorContext<Object> ctx)
protected void notifyChange(Object changedValue)
public String getProperty()
getProperty() would return null, but getRelatedProperty() would still return name of a
property which subvalue is being manipulated by this editor.null if editor is not bound to any
property or manipulates a subvalue of propertygetRelatedProperty()public void setProperty(String property)
public String getRelatedProperty()
getProperty() would return null, but getRelatedProperty() would still return name of a
property which subvalue is being manipulated by this editor.null
if editor is not bound to any propertygetProperty()public String getDefaultEditor()
public void setDefaultEditor(String defaultEditor)
public boolean isReadOnly()
public void setReadOnly(boolean readOnly)
public boolean isNestedObjectCreationDisabled()
public void setNestedObjectCreationDisabled(boolean nestedObjectCreationDisabled)
public String getSuccessNotificationId()
public void setSuccessNotificationId(String successNotificationId)
public boolean isOptional()
public void setOptional(boolean optional)
optional - value of editor's corresponding attributepublic String getType()
public void setType(String type)
public Object getValue()
public void setValue(Object value)
public void setInitialValue(Object value)
setValue(Object) is that if editor has property set
getProperty() the value will be used as initial value and property accessor won't be called to obtain
it during initialization.public void clearInitialValue()
getProperty() the initial value will be
obtained using property accessor during initialization.public String getEditorLabel()
public void setEditorLabel(String editorLabel)
public void focus()
focus in class org.zkoss.zk.ui.HtmlBasedComponentpublic org.zkoss.zk.ui.Component getDefaultFocusComponent()
public LabelService getLabelService()
public Map<String,Object> getParametersParsed()
getParameters(). If a parameter is an editor setting defined in definition.xml, then
it tries to parse it into the appropriate setting type, if possible.public void removeParameter(String key)
public ComponentWidgetAdapter getComponentWidgetAdapter()
getComponentWidgetAdapter in class AbstractCockpitComponentpublic String getComponentID()
getComponentID in class AbstractCockpitComponentpublic List<ComponentWidgetAdapterAware> getWidgetAdaptersAwareIfPresent()
getWidgetAdaptersAwareIfPresent in class AbstractCockpitComponent@Deprecated public boolean isLocalized()
@Deprecated public void setLocalized(boolean localized)
localized - the localized to setpublic boolean isOrdered()
public void setOrdered(boolean ordered)
public boolean isPartOf()
public void setPartOf(boolean partOf)
public boolean isPrimitive()
public void setPrimitive(boolean primitive)
public void initValidation(ValidatableContainer validatableContainer, ValidationHandler handler)
public void editorValidationChanged()
public void setValidatableContainer(ValidatableContainer validatableContainer)
public void destroy()
destroy in class AbstractCockpitComponentpublic boolean isAtomic()
public void setAtomic(boolean atomic)
Copyright © 2018. All rights reserved.