public abstract class AbstractAttributeEditorChip extends AbstractChip
isEditable() which will be
redirected to the surrounding AttributeChip if there is one, or default
values will be returned.| Modifier and Type | Field and Description |
|---|---|
static String |
CUSTOM
String constant for custom editor type.
|
static int |
DEFAULT_HEIGHT |
CHIP_KEY, FALSE, FRAME_KEY, SHOW_JSP_COMMENTS, TRUE, USE_SOCKET_NAMINGDISPLAY_EVENT, FILTERED_PREFIX| Constructor and Description |
|---|
AbstractAttributeEditorChip(DisplayState displayState,
Chip parent) |
AbstractAttributeEditorChip(DisplayState displayState,
Chip parent,
Object value) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttributeValueChangeListener(AttributeValueChangeListener listener)
Adds a
AttributeValueChangeListener to this chip which will be notified if the value contained in this
chip is changed. |
void |
checkValid()
Gives the chip the possibility to check if its objects are still valid.
|
protected void |
clearError() |
boolean |
containsValidValue() |
void |
convertAndSetValue(Object value)
Use this method to set this editor's value if any conversion or checking has to be done.
|
protected Object |
convertValue(Object value)
Override this method to convert the input value (e.g.
|
protected AttributeChip |
getAttributeChip() |
AttributeDescriptor |
getAttributeDescriptor() |
Set<AttributeValueChangeListener> |
getAttributeValueChangeListeners() |
static String |
getEditorType()
Implement this method in subclasses!!!
|
String |
getFieldID()
Returns the field id.
|
int |
getHeight()
Returns the (desired) height of this chip.
|
Object |
getInitialValue() |
Object |
getLastInvalidValue() |
int |
getMaxLength() |
Map<String,String> |
getParameters()
Returns the parameters which where provided by the xml configuration.
|
protected AbstractAttributeEditorChip |
getParentEditorChip() |
protected String |
getProposedUniqueName() |
Object |
getValue() |
int |
getWidth() |
boolean |
isAjaxUpdatable()
Returns true if this editor chip is ajax updatable.
|
boolean |
isChanged()
Returns true if this editor is editable and the value of this editor has been changed.
|
boolean |
isEditable() |
boolean |
isInitialized() |
boolean |
isOptional() |
protected void |
notifyAttributeValueChangeListeners(AttributeValueChangeEvent event)
Notifies all
AttributeValueChangeListener which have been registered with this editor chip. |
void |
removeAttributeValueChangeListener(AttributeValueChangeListener listener) |
void |
setAttributeDescriptor(AttributeDescriptor attributeDescriptor) |
void |
setEditable(boolean value) |
protected void |
setError(Exception exception,
Object wrongValue) |
void |
setFieldID(String id)
The field id is useful in editable tables.
|
void |
setHeight(int newHeight)
Sets the (desired) height of this chip.
|
void |
setInitialValue(Object initialValue) |
void |
setMaxLength(int maxLength) |
void |
setOptional(boolean value) |
void |
setParameters(Map<String,String> map)
Sets the parameters which where provided by the xml configuration.
|
protected void |
setValidValue(boolean valid) |
void |
setValue(Object value) |
void |
setWidth(int width) |
protected boolean |
valuesAreDifferent(Object value1,
Object value2) |
addEventListener, clearInfoMessages, clone, containsDisplayEvent, createMenuEntriesForJS, dispose, errorQueueEmpty, getClipboard, getCommandID, getDisplayParameters, getDisplayState, getEventID, getEventURL, getEventValue, getFrame, getID, getInfoMessages, getJaloSession, getLocalizedString, getLocalizedString, getLogger, getMenuEntries, getNameSpace, getNameSpaceFor, getParent, getProposedUniqueNameFor, getRequestFocus, getSessionIdentifier, getStringValue, getUniqueName, getWindow, goFullScreen, hasVisibleContextMenuEntries, isButtonPushed, isButtonPushed, isErrorQueueEmpty, isValid, leaveFullScreen, notifyEventListeners, notifyEventListeners, postErrorMessage, postInfoMessage, postWindowEvent, refresh, refreshChild, registerUniqueName, removeEventListener, removeInfoMessage, render, render, setClipboard, setParent, setRequestFocus, setValid, setWindowStatus, translateFormFieldToEventName, translateFormFieldToEventValueequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetJSPURI, processEventspublic static final String CUSTOM
public static final int DEFAULT_HEIGHT
public AbstractAttributeEditorChip(DisplayState displayState, Chip parent)
public AbstractAttributeEditorChip(DisplayState displayState, Chip parent, Object value)
public void setFieldID(String id)
public String getFieldID()
setFieldID(String) for details.public void setWidth(int width)
public int getWidth()
public Object getValue()
public void convertAndSetValue(Object value)
convertValue(Object) which is called within this method to implement the actual conversion logic.
If an error is raised during conversion the error message is posted, the editor marked as invalid and the value
saved so that it may be used later via getLastInvalidValue(). The next successful setValue() operation
will clear the error status and remove the invalid value.
value - protected void clearError()
public void setValue(Object value)
public Set<AttributeValueChangeListener> getAttributeValueChangeListeners()
public void addAttributeValueChangeListener(AttributeValueChangeListener listener)
AttributeValueChangeListener to this chip which will be notified if the value contained in this
chip is changed. More precisely it will always be notified when setValue(Object) is called with a
different value than the previous value.public void removeAttributeValueChangeListener(AttributeValueChangeListener listener)
protected void notifyAttributeValueChangeListeners(AttributeValueChangeEvent event)
AttributeValueChangeListener which have been registered with this editor chip. This method
will implicitly be called if setValue(Object) is called with a different value than the previous value.
So usually you will not need to call this method yourself!protected Object convertValue(Object value) throws Exception
As default this method just passes the given value unchecked.
value - the unconverted valueException - on any conversion errorgetLastInvalidValue()public final Object getLastInvalidValue()
public boolean containsValidValue()
protected void setValidValue(boolean valid)
public boolean isChanged()
protected boolean valuesAreDifferent(Object value1, Object value2)
public boolean isEditable()
AttributeChip.isEditable() or explicitely set value, if
getAttributeChip() is NULL.public void setEditable(boolean value)
protected AttributeChip getAttributeChip()
AttributeChip as owner of this chip if its exists or
NULL if not.protected AbstractAttributeEditorChip getParentEditorChip()
AbstractAttributeEditorChip as owner of this chip if its
exists or NULL if not.public void setOptional(boolean value)
public boolean isOptional()
protected String getProposedUniqueName()
getProposedUniqueName in class AbstractChippublic void checkValid()
AbstractChipcheckValid in interface ChipcheckValid in class AbstractChippublic Object getInitialValue()
public void setInitialValue(Object initialValue)
public boolean isInitialized()
public static String getEditorType()
public Map<String,String> getParameters()
public void setParameters(Map<String,String> map)
map - the parameters which where provided by the xml configuration.public int getHeight()
public void setHeight(int newHeight)
newHeight - public int getMaxLength()
public void setMaxLength(int maxLength)
public AttributeDescriptor getAttributeDescriptor()
public void setAttributeDescriptor(AttributeDescriptor attributeDescriptor)
attributeDescriptor - the attributeDescriptor to setpublic boolean isAjaxUpdatable()
LocalizableAttributeChip to indicate
that the editorchip's jsp only uses the usual form input elements and no other special functionality to update its
values (like the wysiwyg editor which uses the 'onsubmit' handler to update its value).Copyright © 2017 SAP SE. All Rights Reserved.