public class LocalizableAttributeChip extends AttributeChip implements ComposedChip, AjaxRequestHandler
setEditors(Map)
or can be generated by this class if the editor type is given in the constructor.| Modifier and Type | Field and Description |
|---|---|
static String |
COLLAPSE_LOCALIZE
Command string for collapsing the input fields, so that only the field for the default language is displayed.
|
static String |
EXPAND_LOCALIZE
Command string for expanding the input fields for localized input.
|
static String |
TOGGLE |
EMPTY_ATTRIBUTE_NAME, KEEP_ALIVE, SET_SELECTEDCHIP_KEY, FALSE, FRAME_KEY, SHOW_JSP_COMMENTS, TRUE, USE_SOCKET_NAMINGDISPLAY_EVENT, FILTERED_PREFIX| Constructor and Description |
|---|
LocalizableAttributeChip(DisplayState displayState,
Chip parent,
String attributeName,
Type attributeValueType) |
LocalizableAttributeChip(DisplayState displayState,
Chip parent,
String attributeName,
Type attributeValueType,
String editorType,
Class customEditorClass) |
LocalizableAttributeChip(DisplayState displayState,
Chip parent,
String attributeName,
Type attributeValueType,
String editorType,
Class customEditorClass,
Map initialValues) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkValid()
Checks if all language references and all value editors still valid.
|
void |
clearError() |
List<AbstractAttributeEditorChip> |
getChildren() |
Language |
getCurrentLanguage() |
AbstractAttributeEditorChip |
getEditor() |
AbstractAttributeEditorChip |
getEditor(Language language)
Returns the editor for the given session language.
|
Map<Language,AbstractAttributeEditorChip> |
getEditors() |
protected Map<Language,AbstractAttributeEditorChip> |
getEditorsInternal() |
Object |
getInitialValue() |
Map<Language,Object> |
getInitialValues()
Returns a
Map containing the initial localized values of this attribute. |
String |
getJSPURI()
Returns the URI of the JSP that this chip wants to use.
|
Language |
getLanguage(AbstractAttributeEditorChip editor)
Some editors need to know which language they are using.
|
Set<Language> |
getReadableLanguages() |
Object |
getValue() |
Map<Language,Object> |
getValues()
Returns a
Map containing the localized values of this attribute. |
Set<Language> |
getWritableLanguages() |
protected void |
initializeEditor() |
boolean |
isAjaxUpdatable()
Returns true if the contained editor chips are all "AjaxUpdatable".
|
boolean |
isChanged()
Returns true if the value of this chip's editor has changed, i.e.
|
boolean |
isExpandable() |
boolean |
isExpanded() |
void |
processAjaxEvents(HttpServletRequest request,
HttpServletResponse response,
PrintWriter out,
Map requestParameters) |
void |
processEvents(Map events)
Handles all incoming requests for this chip.
|
void |
refreshEditors() |
void |
saveAttribute(AbstractAttributeEditorChip editorChip) |
void |
setEditable(boolean editable) |
void |
setEditor(AbstractAttributeEditorChip editor)
throws exception!
|
protected void |
setEditors(Map<Language,AbstractAttributeEditorChip> newEditors) |
protected void |
setExpanded(boolean expanded) |
void |
setInitialValue(Object value) |
void |
setInitialValues(Map<Language,Object> values) |
void |
setMaxLength(int maxLength) |
void |
setValue(Object value) |
void |
setValues(Map values) |
compareTo, createEditor, createEditor, createEditor, getAttributeDescriptor, getAttributeQualifier, getAttributeType, getDefaultEditorType, getDefaultEditorType, getDescription, getDescriptionAttribute, getDescriptionAttributeValue, getEditorClass, getEditorType, getError, getErrorText, getItem, getLabel, getLabelWidth, getProposedUniqueName, getToolTip, hasError, hasErrorText, isEditable, isEncrypted, isHideLabel, isOptional, isPartOf, isRequired, isSelected, setDescription, setDescriptionAttribute, setEditorClass, setEditorType, setEncrypted, setError, setErrorText, setHideLabel, setLabelWidth, setSelectedaddEventListener, 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, waitaddEventListener, dispose, getCommandID, getDisplayParameters, getDisplayState, getEventID, getEventURL, getEventValue, getID, getJaloSession, getMenuEntries, getParent, getUniqueName, goFullScreen, isValid, leaveFullScreen, registerUniqueName, removeEventListener, render, translateFormFieldToEventName, translateFormFieldToEventValuepublic static final String EXPAND_LOCALIZE
public static final String COLLAPSE_LOCALIZE
public static final String TOGGLE
public LocalizableAttributeChip(DisplayState displayState, Chip parent, String attributeName, Type attributeValueType, String editorType, Class customEditorClass, Map initialValues)
public LocalizableAttributeChip(DisplayState displayState, Chip parent, String attributeName, Type attributeValueType, String editorType, Class customEditorClass)
public LocalizableAttributeChip(DisplayState displayState, Chip parent, String attributeName, Type attributeValueType)
protected void initializeEditor()
initializeEditor in class AttributeChippublic void setEditor(AbstractAttributeEditorChip editor)
setEditor in class AttributeChippublic AbstractAttributeEditorChip getEditor()
getEditor in class AttributeChippublic AbstractAttributeEditorChip getEditor(Language language)
language - the Language for which to return the appropriate editorprotected void setEditors(Map<Language,AbstractAttributeEditorChip> newEditors)
newEditors - Map of Language to AbstractAttributeEditorChip.protected Map<Language,AbstractAttributeEditorChip> getEditorsInternal()
Language to AbstractAttributeEditorChip.public Map<Language,AbstractAttributeEditorChip> getEditors()
Language to AbstractAttributeEditorChip.public void setInitialValue(Object value)
setInitialValue in class AttributeChipprotected void setExpanded(boolean expanded)
expanded - If the editor is in the enhanced view mode (TRUE) displaying the values in all languages or in
simple mode (FALSE).public boolean isExpanded()
TRUE) displaying the values in all languages or in simple
mode (FALSE).public boolean isExpandable()
public Language getCurrentLanguage()
public void processEvents(Map events)
ChipprocessEvents in interface ChipprocessEvents in class AttributeChippublic Object getValue()
getValue in class AttributeChipAbstractAttributeEditorChip.public Object getInitialValue()
getInitialValue in class AttributeChipAbstractAttributeEditorChip.public void setValues(Map values)
public void setValue(Object value)
setValue in class AttributeChippublic String getJSPURI()
ChipgetJSPURI in interface ChipgetJSPURI in class AttributeChippublic void refreshEditors()
public void checkValid()
checkValid in interface ChipcheckValid in class AttributeChippublic Language getLanguage(AbstractAttributeEditorChip editor)
public List<AbstractAttributeEditorChip> getChildren()
getChildren in interface ComposedChippublic boolean isChanged()
AttributeChipAbstractAttributeEditorChip.isChanged() method returns true.isChanged in class AttributeChipAbstractAttributeEditorChip.isChanged() method returns true.public Set<Language> getReadableLanguages()
public Set<Language> getWritableLanguages()
public void setEditable(boolean editable)
setEditable in class AttributeChippublic void setMaxLength(int maxLength)
setMaxLength in class AttributeChippublic void clearError()
clearError in class AttributeChippublic void saveAttribute(AbstractAttributeEditorChip editorChip)
saveAttribute in class AttributeChippublic void processAjaxEvents(HttpServletRequest request,
HttpServletResponse response,
PrintWriter out,
Map requestParameters)
processAjaxEvents in interface AjaxRequestHandlerpublic boolean isAjaxUpdatable()
Copyright © 2017 SAP SE. All Rights Reserved.