Class DetailViewerEditProxy

All Implemented Interfaces:
HasHandlers

public class DetailViewerEditProxy extends CanvasEditProxy
EditProxy that handles DetailViewer components when editMode is enabled.
See Also:
  • Constructor Details

    • DetailViewerEditProxy

      public DetailViewerEditProxy()
    • DetailViewerEditProxy

      public DetailViewerEditProxy(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static DetailViewerEditProxy getOrCreateRef(JavaScriptObject jsObj)
    • create

      public JavaScriptObject create()
      Overrides:
      create in class CanvasEditProxy
    • setDataDisplaySeparatorChar

      public DetailViewerEditProxy setDataDisplaySeparatorChar(String dataDisplaySeparatorChar) throws IllegalStateException
      If inline editing for this viewer edits the DetailViewer.data, character that should be used as a separator for entering com.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:Resolved
        
      Would 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, Resolved
        
      The resulting data would be:
          {
             "Fixed" : "Reported Fixed",
             "WontFix" : "Won't Fix",
             "Resolved" : null
          }
        

      The dataEscapeChar can be used to enter literal colon characters.

      Set dataDisplaySeparatorChar to 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:
      DetailViewerEditProxy instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getDataDisplaySeparatorChar

      public String getDataDisplaySeparatorChar()
      If inline editing for this viewer edits the DetailViewer.data, character that should be used as a separator for entering com.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:Resolved
        
      Would 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, Resolved
        
      The resulting data would be:
          {
             "Fixed" : "Reported Fixed",
             "WontFix" : "Won't Fix",
             "Resolved" : null
          }
        

      The dataEscapeChar can be used to enter literal colon characters.

      Set dataDisplaySeparatorChar to 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

      public DetailViewerEditProxy setDataEscapeChar(String dataEscapeChar) throws IllegalStateException
      If inline editing for this viewer edits the DetailViewer.data, character that can be used to enter literal separator chars (such as the dataSeparatorChar) 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:
      DetailViewerEditProxy instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getDataEscapeChar

      public String getDataEscapeChar()
      If inline editing for this viewer edits the DetailViewer.data, character that can be used to enter literal separator chars (such as the dataSeparatorChar) 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
      If inline editing for this viewer edits the DetailViewer.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 a com.smartgwt.client.types.ValueMap using the dataDisplaySeparatorChar.

      If EditProxy.inlineEditMultiline is enabled, newlines will be used as value separators and the dataSeparatorChar

      The dataEscapeChar can be used to enter the separator char as part of a field name or value.

      Parameters:
      dataSeparatorChar - New dataSeparatorChar value. Default value is ","
      Returns:
      DetailViewerEditProxy instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the underlying component has been created
    • getDataSeparatorChar

      public String getDataSeparatorChar()
      If inline editing for this viewer edits the DetailViewer.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 a com.smartgwt.client.types.ValueMap using the dataDisplaySeparatorChar.

      If EditProxy.inlineEditMultiline is enabled, newlines will be used as value separators and the dataSeparatorChar

      The dataEscapeChar can 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 the EditProxy.inlineEditForm to obtain the starting edit value.

      Returns the component's data one-field-per-line as specified in dataDisplaySeparatorChar.

      Overrides:
      getInlineEditText in class EditProxy
    • setInlineEditText

      public void setInlineEditText(String newValue)
      Save the new value into the component's state. Called by the EditProxy.inlineEditForm to commit the change.

      Updates the component's data and fields.

      Overrides:
      setInlineEditText in class EditProxy
      Parameters:
      newValue - the new component data