public class ClassificationAttributeChip extends CustomChip implements SpecialEditor, SpecialValidatingChip, ChangeIndicatorChip
AttributeChip (and LocalizableAttributeChip) and should look nearly the same. Main difference is, of
course, the handling of classification attributes instead of the normal item attributes, including the retrieving and
saving of such attributes.| Modifier and Type | Field and Description |
|---|---|
static String |
ATTRIBUTE_LABELWIDTH |
static String |
ATTRIBUTE_NAME |
static String |
COLLAPSE |
static String |
EXPAND |
static String |
OPEN_ATTRIBUTE_EXTERNAL |
static String |
OPEN_ATTRIBUTE_INTERNAL |
CHIP_KEY, FALSE, FRAME_KEY, SHOW_JSP_COMMENTS, TRUE, USE_SOCKET_NAMINGDISPLAY_EVENT, FILTERED_PREFIX| Constructor and Description |
|---|
ClassificationAttributeChip(Chip parent,
ClassAttributeAssignment assignment)
Creates a new ClassificationAttributeChip
|
ClassificationAttributeChip(DisplayState displayState,
Chip parent,
Map attributes,
String jspURI)
Creates a new ClassificationAttributeChip
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsValidValue() |
protected ClassAttributeAssignment |
getAssignment() |
List |
getAttributeNames() |
protected ClassAttributeAssignment |
getClassAttributeAssignment(Chip parent,
Map<String,String> attributes)
From the given attribute map this method takes the "name" attribute and tries to interpret the given path to
return a ClassAttributeAssignment.
|
protected ClassificationAttribute |
getClassificationAttribute() |
protected String[] |
getClassificationAttributePath(Map<String,String> attributes)
Splits name attribute into [ systemName, systemVersion, class , attribute ].
|
AbstractClassificationAttributeEditorChip |
getEditorChip()
If this classification attribute is not localizable the single editor for this attribute will be returned.
|
Map<Language,AbstractClassificationAttributeEditorChip> |
getEditorChips() |
String |
getErrorMessage() |
FeatureContainer |
getFeatureContainer() |
String |
getJSPURI()
Returns the URI of the JSP that this chip wants to use.
|
String |
getLabel() |
int |
getLabelWidth() |
protected static int |
getLabelWidth(Map<String,String> attributes) |
List |
getMenuEntries()
Here you can specify what Actions you are able to perform at the moment.
|
protected Product |
getProduct() |
protected Set<Language> |
getReadableLanguages() |
String |
getTooltip() |
protected Set<Language> |
getWritableLanguages() |
protected Map<String,String> |
getXMLAttributes() |
boolean |
hasError()
Returns true if this attribute chip has an error.
|
protected void |
initialize() |
boolean |
isChanged()
Returns true if any of the editors contained in this chip has been changed.
|
boolean |
isEditable() |
boolean |
isExpanded()
If the classification attribute in this chip is localizable this method returns true if the editor list is
expanded.
|
boolean |
isLocalized() |
boolean |
isMandatory() |
protected void |
openEditor(boolean external) |
void |
processEvents(Map events)
Handles all incoming requests for this chip.
|
void |
reload()
Reloads the editor(s) contained in this chip.
|
void |
save()
Saves the current value of the editor to the appropriate product feature.
|
void |
setError(boolean error) |
void |
setErrorMessage(String errorMessage) |
protected void |
setExpanded(boolean expanded) |
protected void |
setFeatureContainer(FeatureContainer container) |
protected void |
setLabelWidth(int width) |
void |
setMainAttributeName(String name) |
void |
setParameter(String parameter)
Does nothing.
|
void |
validate(DisplayState state,
ActionResult result)
Validates current input and raises an error in case this classification attribute cannot be saved.
|
getAttributes, getDefaultJSPURI, getParameter, getParametersaddEventListener, checkValid, clearInfoMessages, clone, containsDisplayEvent, createMenuEntriesForJS, dispose, errorQueueEmpty, getClipboard, getCommandID, getDisplayParameters, getDisplayState, getEventID, getEventURL, getEventValue, getFrame, getID, getInfoMessages, getJaloSession, getLocalizedString, getLocalizedString, getLogger, getNameSpace, getNameSpaceFor, getParent, getProposedUniqueName, 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, waitaddEventListener, checkValid, dispose, getCommandID, getDisplayParameters, getDisplayState, getEventID, getEventURL, getEventValue, getID, getJaloSession, getParent, getUniqueName, goFullScreen, isValid, leaveFullScreen, registerUniqueName, removeEventListener, render, translateFormFieldToEventName, translateFormFieldToEventValuepublic static final String EXPAND
public static final String COLLAPSE
public static final String ATTRIBUTE_NAME
public static final String ATTRIBUTE_LABELWIDTH
public static final String OPEN_ATTRIBUTE_INTERNAL
public static final String OPEN_ATTRIBUTE_EXTERNAL
public ClassificationAttributeChip(DisplayState displayState, Chip parent, Map attributes, String jspURI)
public ClassificationAttributeChip(Chip parent, ClassAttributeAssignment assignment)
protected void initialize()
protected ClassAttributeAssignment getClassAttributeAssignment(Chip parent, Map<String,String> attributes)
protected String[] getClassificationAttributePath(Map<String,String> attributes)
public void validate(DisplayState state, ActionResult result)
validate in interface SpecialValidatingChippublic void save()
SpecialEditor
interface.save in interface SpecialSaveChipSpecialSaveChip.save()public void reload()
SpecialEditor interface.reload in interface SpecialReloadChipSpecialReloadChip.reload()protected ClassificationAttribute getClassificationAttribute()
public AbstractClassificationAttributeEditorChip getEditorChip()
public boolean isLocalized()
public boolean isMandatory()
public String getJSPURI()
ChipgetJSPURI in interface ChipgetJSPURI in class CustomChippublic String getLabel()
public String getTooltip()
public boolean isEditable()
public boolean containsValidValue()
public void processEvents(Map events)
ChipprocessEvents in interface ChipprocessEvents in class CustomChipChip.processEvents(java.util.Map)protected void openEditor(boolean external)
public boolean isChanged()
isChanged in interface ChangeIndicatorChipChangeIndicatorChip.isChanged()protected Product getProduct()
public List getAttributeNames()
getAttributeNames in interface SpecialEditorSpecialEditor.getAttributeNames()public Map<Language,AbstractClassificationAttributeEditorChip> getEditorChips()
public List getMenuEntries()
AbstractChipgetMenuEntries in interface ChipgetMenuEntries in class AbstractChippublic int getLabelWidth()
protected void setLabelWidth(int width)
protected void setExpanded(boolean expanded)
public boolean isExpanded()
protected ClassAttributeAssignment getAssignment()
public boolean hasError()
public void setError(boolean error)
public FeatureContainer getFeatureContainer()
protected void setFeatureContainer(FeatureContainer container)
public String getErrorMessage()
public void setErrorMessage(String errorMessage)
public void setMainAttributeName(String name)
setMainAttributeName in interface SpecialEditorSpecialEditor.setMainAttributeName(java.lang.String)public void setParameter(String parameter)
CustomChip.getParameter(String) and
CustomChip.getParameters(). Implements SpecialEditor interface.setParameter in interface SpecialEditorSpecialEditor.setParameter(java.lang.String)Copyright © 2017 SAP SE. All Rights Reserved.