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
public interface Dependent<D extends Dependent<D>> extends FormComponent<D>
Represents metadata for aFormComponent
that has dependencies on its parent form's state.Generally, this is used by form components like
GridExternal
orLookupField
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 Classes Modifier and Type Interface Description static class
Dependent.Attributes
static class
Dependent.DependentFieldsList
A copyable list of dependent field names.
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default D
clearDependentFields()
Clears any dependent fields.default D
dependentField(String... dependentFieldsToAdd)
Adds a dependency on the provided field name(s).default D
dependentFields(Collection<String> dependentFieldsToAdd)
Adds a dependency on the provided field name(s).default D
parentIdField(String parentIdField)
Define the property on the parent specifying it's unique identifier.-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods 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, type
-
Methods 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 Detail
-
dependentField
default D dependentField(String... dependentFieldsToAdd)
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
default D dependentFields(Collection<String> dependentFieldsToAdd)
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
default D clearDependentFields()
Clears any dependent fields.- Returns:
- the component
-
-