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 class
static final class
Nested classes/interfaces inherited from interface com.broadleafcommerce.metadata.dsl.core.extension.actions.FormAction
FormAction.Keys
-
Method Summary
Modifier and TypeMethodDescriptiondefault A
addSubmitEndpoint
(Endpoint<?> endpoint) Adds theEntityModalFormAction.EndpointTypes.SUBMIT_FORM
endpoint for the component.Finds theEntityModalFormAction.EndpointTypes.SUBMIT_FORM
endpoint for this component.default Endpoint<?>
Retrieves theEntityModalFormAction.EndpointTypes.SUBMIT_FORM
endpoint for this component.default A
Indicate this action should not trigger a refresh of the parentEntityView
after a successful submission.default A
Indicate this action should trigger a refresh of the parentEntityView
after a successful submission.default A
submitEndpoint
(UnaryOperator<Endpoint<?>> fn) Configures theEntityModalFormAction.EndpointTypes.SUBMIT_FORM
endpoint for the component.default A
submitScope
(String scope) Configures theEntityModalFormAction.EndpointTypes.SUBMIT_FORM
endpoint with the given scope.default A
Configures theEntityModalFormAction.EndpointTypes.SUBMIT_FORM
endpoint with the given url.default A
Configures theEntityModalFormAction.EndpointTypes.SUBMIT_FORM
endpoint with the given url and scope.default A
Configure a set ofMapping
to transform the d entity.default A
transform
(UnaryOperator<List<Mapping<?>>> fn) Configure a set ofMapping
to transform the form state.default A
Configure a set ofMapping
to transform the form state.default A
Undo 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, type
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.broadleafcommerce.metadata.dsl.core.extension.actions.ConditionalAction
conditional, conditional
Methods 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, removeGroup
Methods inherited from interface com.broadleafcommerce.metadata.dsl.core.extension.actions.ModalFormAction
modalSize, submitLabel, submitLabel
-
Method Details
-
addSubmitEndpoint
Adds theEntityModalFormAction.EndpointTypes.SUBMIT_FORM
endpoint for the component.- Parameters:
endpoint
- the endpoint- Returns:
- this
-
submitEndpoint
Configures theEntityModalFormAction.EndpointTypes.SUBMIT_FORM
endpoint for the component.- Parameters:
fn
- the function to configure the endpoint- Returns:
- this
-
submitUrl
Configures theEntityModalFormAction.EndpointTypes.SUBMIT_FORM
endpoint with the given url.- Parameters:
url
- the url- Returns:
- this
-
submitScope
Configures theEntityModalFormAction.EndpointTypes.SUBMIT_FORM
endpoint with the given scope.- Parameters:
scope
- the scope- Returns:
- this
-
submitUrl
Configures theEntityModalFormAction.EndpointTypes.SUBMIT_FORM
endpoint with the given url and scope.- Parameters:
url
- the urlscope
- the scope- Returns:
- this
-
getSubmitEndpoint
Retrieves theEntityModalFormAction.EndpointTypes.SUBMIT_FORM
endpoint for this component.- Returns:
- the endpoint if it exists
- See Also:
-
findSubmitEndpoint
Finds theEntityModalFormAction.EndpointTypes.SUBMIT_FORM
endpoint for this component.- Returns:
- an optional with the endpoint, or empty
-
transform
Configure a set ofMapping
to 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 ofMapping
to 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 ofMapping
to 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 parentEntityView
after a successful submission.- Returns:
- this
-
notRefreshOnMount
Indicate this action should not trigger a refresh of the parentEntityView
after a successful submission.- Returns:
- this
-
unsetRefreshOnMount
Undo a previous call torefreshOnMount()
ornotRefreshOnMount()
.- Returns:
- this
-