public class AttributeChip extends AbstractChip implements Comparable
setEditor(AbstractAttributeEditorChip) or can be generated by
this class if the editor type is given in the constructor.| Modifier and Type | Field and Description |
|---|---|
static String |
EMPTY_ATTRIBUTE_NAME
use this string to mark attribute names as being deliberately empty
|
static String |
KEEP_ALIVE
Event string for reading the select state.
|
static String |
SET_SELECTED
Event string for setting the select state.
|
CHIP_KEY, FALSE, FRAME_KEY, SHOW_JSP_COMMENTS, TRUE, USE_SOCKET_NAMINGDISPLAY_EVENT, FILTERED_PREFIX| Constructor and Description |
|---|
AttributeChip(DisplayState displayState,
Chip parent,
String attributeName,
Type valueType)
Constructor for creating a new attribute chip for input of inheritable values.
|
AttributeChip(DisplayState displayState,
Chip parent,
String attributeName,
Type valueType,
String editorType,
Class editorClass) |
AttributeChip(DisplayState displayState,
Chip parent,
String attributeName,
Type valueType,
String editorType,
Class editorClass,
Object initialValue)
Constructor for creating a new attribute chip for input of inheritable values.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkValid()
Gives the chip the possibility to check if its objects are still valid.
|
void |
clearError() |
int |
compareTo(Object obj)
Compares AttributeChips by comparing their labels.
|
protected AbstractAttributeEditorChip |
createEditor() |
static AbstractAttributeEditorChip |
createEditor(DisplayState displayState,
Chip parent,
Type attributeType) |
static AbstractAttributeEditorChip |
createEditor(DisplayState displayState,
Chip parent,
Type attributeType,
String editorType,
Class customEditorClass,
boolean isPartOf) |
AttributeDescriptor |
getAttributeDescriptor()
Gets the AttributeDescriptor Note: This is a hack.
|
String |
getAttributeQualifier() |
Type |
getAttributeType() |
static String |
getDefaultEditorType(Type type,
JaloSession jaloSession) |
static String |
getDefaultEditorType(Type type,
JaloSession jaloSession,
AttributeDescriptor descriptor) |
String |
getDescription() |
String |
getDescriptionAttribute() |
String |
getDescriptionAttributeValue()
If an additional attribute was given (via xml configuration), this method returns the string representation of the
attribute (if it is found in the enclosing item).
|
AbstractAttributeEditorChip |
getEditor() |
Class |
getEditorClass() |
String |
getEditorType() |
Exception |
getError() |
String |
getErrorText() |
Object |
getInitialValue() |
protected Item |
getItem()
Returns the item of the enclosing ItemChip (if there is one).
|
String |
getJSPURI()
Returns the URI of the JSP that this chip wants to use.
|
String |
getLabel() |
int |
getLabelWidth() |
protected String |
getProposedUniqueName() |
String |
getToolTip() |
Object |
getValue() |
boolean |
hasError() |
boolean |
hasErrorText() |
protected void |
initializeEditor() |
boolean |
isChanged()
Returns true if the value of this chip's editor has changed, i.e.
|
boolean |
isEditable() |
boolean |
isEncrypted() |
boolean |
isHideLabel() |
boolean |
isOptional() |
boolean |
isPartOf() |
boolean |
isRequired() |
boolean |
isSelected() |
void |
processEvents(Map<String,List<String>> events)
Handles all incoming requests for this chip.
|
void |
saveAttribute(AbstractAttributeEditorChip editorChip) |
void |
setDescription(String description)
Sets a description as hint for inputing a value like 'Enter a string'.
|
void |
setDescriptionAttribute(String attributeName) |
void |
setEditable(boolean editable) |
void |
setEditor(AbstractAttributeEditorChip editor)
Sets the editor which manages the input of the attribute value.
|
void |
setEditorClass(Class editorClass) |
void |
setEditorType(String editorType) |
void |
setEncrypted(boolean encrypted) |
void |
setError(Exception exception) |
void |
setErrorText(String txt) |
void |
setHideLabel(boolean hideLabel) |
void |
setInitialValue(Object initialValue) |
void |
setLabelWidth(int labelWidth) |
void |
setMaxLength(int maxLength) |
void |
setSelected(boolean staySelected)
Sets the selection state.
|
void |
setValue(Object value) |
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, translateFormFieldToEventValuepublic static final String KEEP_ALIVE
public static final String SET_SELECTED
public static final String EMPTY_ATTRIBUTE_NAME
public AttributeChip(DisplayState displayState, Chip parent, String attributeName, Type valueType, String editorType, Class editorClass, Object initialValue)
isEditable() = true
getDescription() = ''
displayState - The current displaystate this chip belongs to.parent - The parent chip.attributeName - The name of the attribute. For output this will be used as key for a localized string.valueType - The type of the attribute, needed to initialize generic editors.editorType - The type identifier of the value-editor.editorClass - The class of the value-editor, which should be used.initialValue - The initial value of the editor.NullPointerException - If one of the parameters displayState, parent, attributeName, attributeType or inheritanceState is
NULL.public AttributeChip(DisplayState displayState, Chip parent, String attributeName, Type valueType, String editorType, Class editorClass)
public AttributeChip(DisplayState displayState, Chip parent, String attributeName, Type valueType)
setEditor(AbstractAttributeEditorChip). The following default values
will be set:
isEditable() = true
getDescription() = ''
displayState - The current displaystate this chip belongs to.parent - The parent chip.attributeName - The name of the attribute. For output this will be used as key for a localized string.NullPointerException - If one of the parameters displayState, parent, attributeName, attributeType or inheritanceState is
NULL.public boolean isEncrypted()
public void setEncrypted(boolean encrypted)
public void setEditor(AbstractAttributeEditorChip editor)
public AbstractAttributeEditorChip getEditor()
RuntimeException - If the editor is not set.protected final AbstractAttributeEditorChip createEditor()
protected void initializeEditor()
public static final AbstractAttributeEditorChip createEditor(DisplayState displayState, Chip parent, Type attributeType)
public static final AbstractAttributeEditorChip createEditor(DisplayState displayState, Chip parent, Type attributeType, String editorType, Class customEditorClass, boolean isPartOf)
public Object getValue()
AbstractAttributeEditorChip.public Object getInitialValue()
AbstractAttributeEditorChip.public void setValue(Object value)
public boolean isChanged()
AbstractAttributeEditorChip.isChanged() method returns true.AbstractAttributeEditorChip.isChanged() method returns true.public boolean isSelected()
public void setSelected(boolean staySelected)
public void setEditable(boolean editable)
public boolean isEditable()
TRUE.public void setDescription(String description)
description - The key for a localized string resource acting as hint. NULL is a legal value and means
that no description will be shown.public String getDescription()
public String getLabel()
public String getAttributeQualifier()
public AttributeDescriptor getAttributeDescriptor()
public boolean isRequired()
public boolean isOptional()
public boolean isPartOf()
public void processEvents(Map<String,List<String>> events)
ChipprocessEvents in interface Chippublic int compareTo(Object obj)
compareTo in interface Comparablepublic String getJSPURI()
Chippublic void checkValid()
AbstractChipcheckValid in interface ChipcheckValid in class AbstractChippublic static String getDefaultEditorType(Type type, JaloSession jaloSession)
public static String getDefaultEditorType(Type type, JaloSession jaloSession, AttributeDescriptor descriptor)
public String getToolTip()
protected String getProposedUniqueName()
getProposedUniqueName in class AbstractChippublic void setError(Exception exception)
public boolean hasErrorText()
public String getErrorText()
public void setErrorText(String txt)
public void clearError()
public Exception getError()
public boolean hasError()
public void setInitialValue(Object initialValue)
public Class getEditorClass()
public void setEditorClass(Class editorClass)
editorClass - The editorClass to set.public void setEditorType(String editorType)
editorType - The editorType to set.public Type getAttributeType()
public String getEditorType()
public String getDescriptionAttributeValue()
public void setDescriptionAttribute(String attributeName)
public String getDescriptionAttribute()
public void setLabelWidth(int labelWidth)
public void setMaxLength(int maxLength)
public int getLabelWidth()
public boolean isHideLabel()
public void setHideLabel(boolean hideLabel)
protected Item getItem()
public void saveAttribute(AbstractAttributeEditorChip editorChip)
Copyright © 2017 SAP SE. All Rights Reserved.