Class AttributePropertyProcessorHelper.MultiValuedAttribute

java.lang.Object
com.ptc.core.components.forms.AttributePropertyProcessorHelper.MultiValuedAttribute
Enclosing class:
AttributePropertyProcessorHelper

public static class AttributePropertyProcessorHelper.MultiValuedAttribute extends Object
Inner class grouping APIs that work for multi valued attribute

Supported API: true
  • Method Details

    • getTextDisplayComponent

      public static TextDisplayComponent getTextDisplayComponent(String component_id, String value)
      Provide a GUI component for text(value) display

      Supported API: true
      Parameters:
      component_id - The id of the component for which the GUI component is to be built
      value - : string value which needs to be set to gui component
      Returns:
      TextDisplayComponent
      Throws:
      WTException
    • getStringInputComponent

      public static StringInputComponent getStringInputComponent(String component_id, Object datum, ModelContext mc, Object value, AttributeIdentifier ai, AttributeTypeSummary ats) throws WTException
      Provide a GUI component for text(value) input

      Supported API: true
      Parameters:
      component_id - The id of the component for which the GUI component is to be built
      datum - The object to extract model data from
      mc - The context in which the component model data is being extracted
      ai - particular attribute instance
      ats - AttributeTypeSummary
      Returns:
      StringInputComponent
      Throws:
      WTException
    • populateAdditionalStringInputComponentsForNewValues

      public static void populateAdditionalStringInputComponentsForNewValues(ArrayList<AttributeInputComponent> guiComponents, String component_id, Object datum, ModelContext mc) throws WTException
      Populate additional GUI component/components to support '+'. At least one hidden component should be there to use as a template for the new component to be created for the '+' action. In case of multiple default values defined, the first value is set in the GUI component.

      Supported API: true
      Parameters:
      guiComponents -
      component_id - The id of the component for which the GUI component is to be built
      datum - The object to extract model data from
      mc - The context in which the component model data is being extracted
      Throws:
      WTException
    • getMultiValuedDisplayComponent

      public static AbstractGuiComponent getMultiValuedDisplayComponent(String component_id, ArrayList<AttributeGuiComponent> guiComponents)
      Provide multi value display GUI component for the given list of GUI components

      Supported API: true
      Parameters:
      component_id - The id of the component for which the GUI component is to be built
      guiComponents - List of AttributeGuiComponent (for each value)
      Returns:
      AbstractGuiComponent
      Throws:
      WTException
    • getMultiValuedInputComponent

      public static MultiValuedInputComponent getMultiValuedInputComponent(String component_id, ArrayList<AttributeInputComponent> guiComponents, int visibleElementsSize) throws WTException
      Provide multi value input GUI component for the given list of GUI components

      Supported API: true
      Parameters:
      component_id - The id of the component for which the GUI component is to be built
      guiComponents - : List of AttributeInputComponent (for each possible value)
      visibleElementsSize - : count of visible elements from gui component
      Returns:
      MultiValuedInputComponent
      Throws:
      WTException
    • getColumnNameForMultiValuedAttribute

      public static String getColumnNameForMultiValuedAttribute(String component_id, Object datum, ModelContext mc, AttributeIdentifier ai) throws WTException
      Provide the column name to be set on the GUI component (to be used in Multi valued attribute column)

      Supported API: true
      Parameters:
      component_id - The id of the component for which the GUI component is to be built
      datum - The object to extract model data from
      mc - The context in which the component model data is being extracted
      ai - particular attribute instance
      Returns:
      name of column
      Throws:
      WTException
    • getAttributeIdentifiers

      public static AttributeIdentifier[] getAttributeIdentifiers(String component_id, Object datum, ModelContext mc) throws WTException
      Provide the identifiers of the attribute in context

      Supported API: true
      Parameters:
      component_id - The id of the component for which the GUI component is to be built
      datum - The object to extract model data from
      mc - The context in which the component model data is being extracted
      Returns:
      AttributeIdentifier[]
      Throws:
      WTException