Package com.ptc.core.components.forms
Class AttributePropertyProcessorHelper.MultiValuedAttribute
java.lang.Object
com.ptc.core.components.forms.AttributePropertyProcessorHelper.MultiValuedAttribute
- Enclosing class:
AttributePropertyProcessorHelper
Inner class grouping APIs that work for multi valued attribute
Supported API: true
Supported API: true
-
Method Summary
Modifier and TypeMethodDescriptionstatic AttributeIdentifier[]getAttributeIdentifiers(String component_id, Object datum, ModelContext mc) Provide the identifiers of the attribute in context
Supported API: truestatic StringgetColumnNameForMultiValuedAttribute(String component_id, Object datum, ModelContext mc, AttributeIdentifier ai) Provide the column name to be set on the GUI component (to be used in Multi valued attribute column)
Supported API: truestatic AbstractGuiComponentgetMultiValuedDisplayComponent(String component_id, ArrayList<AttributeGuiComponent> guiComponents) Provide multi value display GUI component for the given list of GUI components
Supported API: truestatic MultiValuedInputComponentgetMultiValuedInputComponent(String component_id, ArrayList<AttributeInputComponent> guiComponents, int visibleElementsSize) Provide multi value input GUI component for the given list of GUI components
Supported API: truestatic StringInputComponentgetStringInputComponent(String component_id, Object datum, ModelContext mc, Object value, AttributeIdentifier ai, AttributeTypeSummary ats) Provide a GUI component for text(value) input
Supported API: truestatic TextDisplayComponentgetTextDisplayComponent(String component_id, String value) Provide a GUI component for text(value) display
Supported API: truestatic voidpopulateAdditionalStringInputComponentsForNewValues(ArrayList<AttributeInputComponent> guiComponents, String component_id, Object datum, ModelContext mc) Populate additional GUI component/components to support '+'.
-
Method Details
-
getTextDisplayComponent
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 builtvalue- : 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 builtdatum- The object to extract model data frommc- The context in which the component model data is being extractedai- particular attribute instanceats- 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 builtdatum- The object to extract model data frommc- 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 builtguiComponents- 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 builtguiComponents- : 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 builtdatum- The object to extract model data frommc- The context in which the component model data is being extractedai- 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 builtdatum- The object to extract model data frommc- The context in which the component model data is being extracted- Returns:
- AttributeIdentifier[]
- Throws:
WTException
-