Class DetailViewerEditProxy
- All Implemented Interfaces:
HasHandlers
EditProxy that handles DetailViewer
components when editMode is enabled.- See Also:
-
Field Summary
Fields inherited from class com.smartgwt.client.core.BaseClass
config, configOnly, factoryCreated, factoryProperties, id, scClassName -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate()Ifinline editingfor this viewer edits theDetailViewer.data, character that should be used as a separator for enteringcom.smartgwt.client.types.ValueMap-style entries that map from a field name to a value.Ifinline editingfor this viewer edits theDetailViewer.data, character that can be used to enter literal separator chars (such as thedataSeparatorChar) or literal leading or trailing whitespace.Ifinline editingfor this viewer edits theDetailViewer.data, character that should be used as a separator between values, or between pairs of field name vs values if the user is entering such acom.smartgwt.client.types.ValueMapusing thedataDisplaySeparatorChar.voidReturns the text based on the current component state to be edited inline.static DetailViewerEditProxygetOrCreateRef(JavaScriptObject jsObj) setDataDisplaySeparatorChar(String dataDisplaySeparatorChar) Ifinline editingfor this viewer edits theDetailViewer.data, character that should be used as a separator for enteringcom.smartgwt.client.types.ValueMap-style entries that map from a field name to a value.setDataEscapeChar(String dataEscapeChar) Ifinline editingfor this viewer edits theDetailViewer.data, character that can be used to enter literal separator chars (such as thedataSeparatorChar) or literal leading or trailing whitespace.setDataSeparatorChar(String dataSeparatorChar) Ifinline editingfor this viewer edits theDetailViewer.data, character that should be used as a separator between values, or between pairs of field name vs values if the user is entering such acom.smartgwt.client.types.ValueMapusing thedataDisplaySeparatorChar.voidsetInlineEditText(String newValue) Save the new value into the component's state.Methods inherited from class com.smartgwt.client.tools.EditProxy
getAllowNestedDrops, getAutoMaskChildren, getBringToFrontOnSelect, getCanSelect, getCanSelectChildren, getChildrenSnapResizeToGrid, getChildrenSnapToGrid, getEditMask, getHoopSelector, getInlineEditEvent, getInlineEditForm, getInlineEditInstructionLabel, getInlineEditInstructions, getInlineEditMultiline, getInlineEditOnDrop, getJsObj, getOrCreateJsObj, getPersistCoordinates, getSelectedAppearance, getSelectedBorder, getSelectedLabelBackgroundColor, getSelectedTintColor, getSelectedTintOpacity, getShowDragHandle, getSupportsInlineEdit, getUseCopyPasteShortcuts, getUseEditMask, isCreated, setAllowNestedDrops, setAutoMaskChildren, setBringToFrontOnSelect, setCanSelect, setCanSelectChildren, setChildrenSnapResizeToGrid, setChildrenSnapToGrid, setInlineEditEvent, setInlineEditInstructions, setInlineEditMultiline, setInlineEditOnDrop, setJavaScriptObject, setPersistCoordinates, setSelectedAppearance, setSelectedBorder, setSelectedLabelBackgroundColor, setSelectedTintColor, setSelectedTintOpacity, setShowDragHandle, setSupportsInlineEdit, setUseCopyPasteShortcuts, setUseEditMask, showSelectedAppearance, startInlineEditing, startInlineEditingMethods inherited from class com.smartgwt.client.core.BaseClass
addDynamicProperty, addDynamicProperty, addDynamicProperty, addDynamicProperty, applyFactoryProperties, asSGWTComponent, clearDynamicProperty, createJsObj, destroy, doAddHandler, doInit, error, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getClassName, getConfig, getHandlerCount, getID, getRef, getRuleScope, getScClassName, getTestInstance, hasAutoAssignedID, hasDynamicProperty, internalSetID, internalSetID, isConfigOnly, isFactoryCreated, onBind, onInit, registerID, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, setFactoryCreated, setID, setProperty, setProperty, setProperty, setProperty, setRuleScope, setScClassName
-
Constructor Details
-
DetailViewerEditProxy
public DetailViewerEditProxy() -
DetailViewerEditProxy
-
-
Method Details
-
getOrCreateRef
-
create
- Overrides:
createin classCanvasEditProxy
-
setDataDisplaySeparatorChar
public DetailViewerEditProxy setDataDisplaySeparatorChar(String dataDisplaySeparatorChar) throws IllegalStateException Ifinline editingfor this viewer edits theDetailViewer.data, character that should be used as a separator for enteringcom.smartgwt.client.types.ValueMap-style entries that map from a field name to a value.With the default of ":", the following input:
1:Fixed, 2:Won't Fix, 3:ResolvedWould be assumed to be a mapping like this (expressed in JSON):{ "1" : "Fixed", "2" : "Won't Fix", "3" : "Resolved" }Any entry without a separator char has an implied value of
null. For example, for this input:Fixed:Reported Fixed, WontFix:Won't Fix, ResolvedThe resultingdatawould be:{ "Fixed" : "Reported Fixed", "WontFix" : "Won't Fix", "Resolved" : null }The
dataEscapeCharcan be used to enter literal colon characters.Set
dataDisplaySeparatorCharto null to prevent entry of values - user input will always be treated as just a list of legal field names.- Parameters:
dataDisplaySeparatorChar- New dataDisplaySeparatorChar value. Default value is ":"- Returns:
DetailViewerEditProxyinstance, for chaining setter calls- Throws:
IllegalStateException- this property cannot be changed after the underlying component has been created
-
getDataDisplaySeparatorChar
Ifinline editingfor this viewer edits theDetailViewer.data, character that should be used as a separator for enteringcom.smartgwt.client.types.ValueMap-style entries that map from a field name to a value.With the default of ":", the following input:
1:Fixed, 2:Won't Fix, 3:ResolvedWould be assumed to be a mapping like this (expressed in JSON):{ "1" : "Fixed", "2" : "Won't Fix", "3" : "Resolved" }Any entry without a separator char has an implied value of
null. For example, for this input:Fixed:Reported Fixed, WontFix:Won't Fix, ResolvedThe resultingdatawould be:{ "Fixed" : "Reported Fixed", "WontFix" : "Won't Fix", "Resolved" : null }The
dataEscapeCharcan be used to enter literal colon characters.Set
dataDisplaySeparatorCharto null to prevent entry of values - user input will always be treated as just a list of legal field names.- Returns:
- Current dataDisplaySeparatorChar value. Default value is ":"
-
setDataEscapeChar
Ifinline editingfor this viewer edits theDetailViewer.data, character that can be used to enter literal separator chars (such as thedataSeparatorChar) or literal leading or trailing whitespace.Repeat this character twice to enter it literally. For example, with the default of "\", inputting "\\" would result in a literal backslash in the value.
- Parameters:
dataEscapeChar- New dataEscapeChar value. Default value is "\"- Returns:
DetailViewerEditProxyinstance, for chaining setter calls- Throws:
IllegalStateException- this property cannot be changed after the underlying component has been created
-
getDataEscapeChar
Ifinline editingfor this viewer edits theDetailViewer.data, character that can be used to enter literal separator chars (such as thedataSeparatorChar) or literal leading or trailing whitespace.Repeat this character twice to enter it literally. For example, with the default of "\", inputting "\\" would result in a literal backslash in the value.
- Returns:
- Current dataEscapeChar value. Default value is "\"
-
setDataSeparatorChar
public DetailViewerEditProxy setDataSeparatorChar(String dataSeparatorChar) throws IllegalStateException Ifinline editingfor this viewer edits theDetailViewer.data, character that should be used as a separator between values, or between pairs of field name vs values if the user is entering such acom.smartgwt.client.types.ValueMapusing thedataDisplaySeparatorChar.If
EditProxy.inlineEditMultilineis enabled, newlines will be used as value separators and thedataSeparatorCharThe
dataEscapeCharcan be used to enter the separator char as part of a field name or value.- Parameters:
dataSeparatorChar- New dataSeparatorChar value. Default value is ","- Returns:
DetailViewerEditProxyinstance, for chaining setter calls- Throws:
IllegalStateException- this property cannot be changed after the underlying component has been created
-
getDataSeparatorChar
Ifinline editingfor this viewer edits theDetailViewer.data, character that should be used as a separator between values, or between pairs of field name vs values if the user is entering such acom.smartgwt.client.types.ValueMapusing thedataDisplaySeparatorChar.If
EditProxy.inlineEditMultilineis enabled, newlines will be used as value separators and thedataSeparatorCharThe
dataEscapeCharcan be used to enter the separator char as part of a field name or value.- Returns:
- Current dataSeparatorChar value. Default value is ","
-
getInlineEditText
public void getInlineEditText()Returns the text based on the current component state to be edited inline. Called by theEditProxy.inlineEditFormto obtain the starting edit value.Returns the component's data one-field-per-line as specified in
dataDisplaySeparatorChar.- Overrides:
getInlineEditTextin classEditProxy
-
setInlineEditText
Save the new value into the component's state. Called by theEditProxy.inlineEditFormto commit the change.Updates the component's
dataandfields.- Overrides:
setInlineEditTextin classEditProxy- Parameters:
newValue- the new component data
-