Interface Dependent<D extends Dependent<D>>
- All Superinterfaces:
Comparable<D>,Component<D>,Copyable<D>,FormComponent<D>,Serializable
- All Known Subinterfaces:
ExportHistoryGridExternal<E>,GridExternal<E>,LookupField<F>
- All Known Implementing Classes:
DefaultExportHistoryGridExternal,DefaultGridExternal,DefaultLookupField
FormComponent that has dependencies on its parent form's state.
Generally, this is used by form components like GridExternal or LookupField in
order to indicate which of the parent's properties they need to retrieve data. Additionally, if a
dependent field is specified, it is expected the dependent component will refresh it's data upon
detecting a change in the dependency.
- Author:
- Nick Crum (ncrum)
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classstatic classA copyable list of dependent field names. -
Method Summary
Modifier and TypeMethodDescriptiondefault DClears any dependent fields.default DdependentField(String... dependentFieldsToAdd) Adds a dependency on the provided field name(s).default DdependentFields(Collection<String> dependentFieldsToAdd) Adds a dependency on the provided field name(s).default DparentIdField(String parentIdField) Define the property on the parent specifying it's unique identifier.Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.broadleafcommerce.metadata.dsl.core.Component
addAction, addAction, addComponent, addEndpoint, addEndpoint, apply, attribute, augmentationKey, classifier, clearConditionals, clearEndpoints, conditional, conditionals, description, description, findAction, findAction, findActions, findAttribute, findComponent, findComponent, findComponents, findEndpoint, findEndpoint, findEndpoints, get, get, getAction, getAction, getActions, getActionsList, getAttribute, getAttribute, getAttributes, getAugmentationKey, getClassifier, getComponent, getComponent, getComponents, getComponentsList, getConditionals, getDescription, getEndpoint, getEndpoint, getEndpoints, getEndpointsList, getId, getLabel, getOrder, getScope, getType, hasAction, hasAttribute, hasComponent, hasEndpoint, id, isAugmentable, isTranslatable, label, label, notTranslatable, order, removeAction, removeAttribute, removeComponent, removeEndpoint, scope, self, setActions, setAttributes, setAugmentationKey, setClassifier, setComponents, setConditionals, setDescription, setEndpoints, setId, setLabel, setOrder, setScope, setTranslatable, setType, translatable, translatable, typeMethods inherited from interface com.broadleafcommerce.metadata.dsl.core.FormComponent
getHelpText, getHint, getTooltip, helpText, helpText, hidden, hidden, hint, hint, isHidden, notHidden, setHelpText, setHidden, setHint, setTooltip, tooltip, tooltip
-
Method Details
-
dependentField
Adds a dependency on the provided field name(s).Specifying a field as a dependency makes it available as a context parameter for the endpoint URL. Only fields targeted as a dependency can be referenced using the `${parent.
}` syntax. Additionally, changes to dependencies will cause the refresh of the data for a dependent.
- Parameters:
dependentFieldsToAdd- the fields to add- Returns:
- the component
-
dependentFields
Adds a dependency on the provided field name(s).Specifying a field as a dependency makes it available as a context parameter for the endpoint URL. Only fields targeted as a dependency can be referenced using the `${parent.
}` syntax. Additionally, changes to dependencies will cause the refresh of the data for a dependent.
- Parameters:
dependentFieldsToAdd- the fields to add- Returns:
- the component
-
clearDependentFields
Clears any dependent fields.- Returns:
- the component
-
parentIdField
Define the property on the parent specifying it's unique identifier.This defaults to "id" in the client and is always included as a dependency.
- Parameters:
parentIdField- the parent id field- Returns:
- the component
-