Interface EntityModalFormAction<A extends EntityModalFormAction<A>>
- All Superinterfaces:
Action<A>,Comparable<A>,ConditionalAction<A>,Copyable<A>,FormAction<A>,ModalFormAction<A>,Serializable
- All Known Implementing Classes:
DefaultEntityModalFormAction
public interface EntityModalFormAction<A extends EntityModalFormAction<A>>
extends ModalFormAction<A>
A variation of the basic
ModalFormAction that allows specifying an endpoint to submit the
form to.- Since:
- 2.x.x
- Author:
- Nathan Moore (nathandmoore)
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classstatic final classNested classes/interfaces inherited from interface com.broadleafcommerce.metadata.dsl.core.extension.actions.FormAction
FormAction.Keys -
Method Summary
Modifier and TypeMethodDescriptiondefault AaddSubmitEndpoint(Endpoint<?> endpoint) Adds theEntityModalFormAction.EndpointTypes.SUBMIT_FORMendpoint for the component.Finds theEntityModalFormAction.EndpointTypes.SUBMIT_FORMendpoint for this component.default Endpoint<?>Retrieves theEntityModalFormAction.EndpointTypes.SUBMIT_FORMendpoint for this component.default AIndicate this action should not trigger a refresh of the parentEntityViewafter a successful submission.default AIndicate this action should trigger a refresh of the parentEntityViewafter a successful submission.default AsubmitEndpoint(UnaryOperator<Endpoint<?>> fn) Configures theEntityModalFormAction.EndpointTypes.SUBMIT_FORMendpoint for the component.default AsubmitScope(String scope) Configures theEntityModalFormAction.EndpointTypes.SUBMIT_FORMendpoint with the given scope.default AConfigures theEntityModalFormAction.EndpointTypes.SUBMIT_FORMendpoint with the given url.default AConfigures theEntityModalFormAction.EndpointTypes.SUBMIT_FORMendpoint with the given url and scope.default AConfigure a set ofMappingto transform the d entity.default Atransform(UnaryOperator<List<Mapping<?>>> fn) Configure a set ofMappingto transform the form state.default AConfigure a set ofMappingto transform the form state.default AUndo a previous call torefreshOnMount()ornotRefreshOnMount().Methods inherited from interface com.broadleafcommerce.metadata.dsl.core.Action
addComponent, addComponents, addEndpoint, addEndpoint, apply, attribute, clearEndpoints, findAttribute, findComponent, findComponent, findComponents, findEndpoint, findEndpoint, findEndpoints, get, get, getAttribute, getAttribute, getAttributes, getComponent, getComponent, getComponents, getComponentsList, getEndpoint, getEndpoint, getEndpoints, getEndpointsList, getId, getLabel, getOperationType, getOrder, getPlacement, getScope, getType, hasAttribute, hasComponent, hasEndpoint, id, label, label, operationType, order, placement, removeAttribute, removeComponent, removeEndpoint, scope, self, setAttributes, setComponents, setEndpoints, setId, setLabel, setOperationType, setOrder, setPlacement, setScope, setType, typeMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.broadleafcommerce.metadata.dsl.core.extension.actions.ConditionalAction
conditional, conditionalMethods inherited from interface com.broadleafcommerce.metadata.dsl.core.extension.actions.FormAction
addExternal, addExternal, addField, addField, addField, addFormComponents, addGroup, addGroup, external, field, findExternal, findField, findGroup, getExternal, getField, getGroup, group, removeExternal, removeField, removeGroupMethods inherited from interface com.broadleafcommerce.metadata.dsl.core.extension.actions.ModalFormAction
modalSize, submitLabel, submitLabel
-
Method Details
-
addSubmitEndpoint
Adds theEntityModalFormAction.EndpointTypes.SUBMIT_FORMendpoint for the component.- Parameters:
endpoint- the endpoint- Returns:
- this
-
submitEndpoint
Configures theEntityModalFormAction.EndpointTypes.SUBMIT_FORMendpoint for the component.- Parameters:
fn- the function to configure the endpoint- Returns:
- this
-
submitUrl
Configures theEntityModalFormAction.EndpointTypes.SUBMIT_FORMendpoint with the given url.- Parameters:
url- the url- Returns:
- this
-
submitScope
Configures theEntityModalFormAction.EndpointTypes.SUBMIT_FORMendpoint with the given scope.- Parameters:
scope- the scope- Returns:
- this
-
submitUrl
Configures theEntityModalFormAction.EndpointTypes.SUBMIT_FORMendpoint with the given url and scope.- Parameters:
url- the urlscope- the scope- Returns:
- this
-
getSubmitEndpoint
Retrieves theEntityModalFormAction.EndpointTypes.SUBMIT_FORMendpoint for this component.- Returns:
- the endpoint if it exists
- See Also:
-
findSubmitEndpoint
Finds theEntityModalFormAction.EndpointTypes.SUBMIT_FORMendpoint for this component.- Returns:
- an optional with the endpoint, or empty
-
transform
Configure a set ofMappingto transform the d entity.A common use case is to transform the name of an entity, for example:
Action.transform(Mappings.templateTransform("name", " of ${name}"));- Returns:
- this
-
transform
Configure a set ofMappingto transform the form state.A common use case is to transform the name of an entity, for example:
Action.transform(Arrays.asList(Mappings.templateTransform("name", " of ${name}")));- Returns:
- this
-
transform
Configure a set ofMappingto transform the form state.A common use case is to transform the name of an entity, for example:
Action.transform( mappings -> mappings.add(Mappings.templateTransform("name", " of ${name}")));- Returns:
- this
-
refreshOnMount
Indicate this action should trigger a refresh of the parentEntityViewafter a successful submission.- Returns:
- this
-
notRefreshOnMount
Indicate this action should not trigger a refresh of the parentEntityViewafter a successful submission.- Returns:
- this
-
unsetRefreshOnMount
Undo a previous call torefreshOnMount()ornotRefreshOnMount().- Returns:
- this
-