Interface RowModalFormAction<A extends RowModalFormAction<A>>
- All Superinterfaces:
Action<A>
,Comparable<A>
,ConditionalAction<A>
,Copyable<A>
,FormAction<A>
,ModalFormAction<A>
,Serializable
- All Known Implementing Classes:
DefaultRowModalFormAction
A generic
ModalFormAction
for row-level actions within a grid. This action is primarily
useful in scenarios when interacting with an ad-hoc submission API that does not follow typical
CRUD conventions.- Author:
- Nick Crum (ncrum)
-
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 TypeMethodDescriptionRetrieve theRowModalFormAction.EndpointTypes.SUBMIT
endpoint.default Endpoint<?>
Retrieve theRowModalFormAction.EndpointTypes.SUBMIT
endpoint.default A
The color of the icon to use for the row action.default A
The name of the icon to use for the row action.default A
mapInitialValues
(Mapping<?>... mappingsToAdd) Configure mappings from the row or context to the form's initial state.default A
mapInitialValues
(Collection<Mapping<?>> mappingsToAdd) Configure mappings from the row or context to the create form's state.default A
Indicate this action should not trigger a refresh of the parentFetchGrid
after a successful submission.default A
Indicate this action should trigger a refresh of the parentFetchGrid
after a successful submission.default A
submitEndpoint
(Endpoint<?> endpoint) Configure theRowModalFormAction.EndpointTypes.SUBMIT
endpoint.default A
submitEndpoint
(UnaryOperator<Endpoint<?>> fn) Configure theRowModalFormAction.EndpointTypes.SUBMIT
endpoint.default A
submitScope
(String scope) Configure theRowModalFormAction.EndpointTypes.SUBMIT
endpoint scope.default A
Configure theRowModalFormAction.EndpointTypes.SUBMIT
endpoint URL.default A
Configure theRowModalFormAction.EndpointTypes.SUBMIT
endpoint URL and scope.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
-
iconName
The name of the icon to use for the row action. If none provided, the label will be rendered. It is recommended to supply an icon name for better usability.See http://www.zondicons.com/icons.html for a list of icon names available.
- Parameters:
iconName
- the name of the icon.- Returns:
- this
-
iconColor
The color of the icon to use for the row action.- Parameters:
iconColor
- the color of the icon.- Returns:
- this
-
mapInitialValues
Configure mappings from the row or context to the form's initial state. This is used in order to ensure the submission of form data inherits certain values from the row or context, for example:// maps the row's "id" to the "productId" field in the create form action.mapInitialValues(Mappings.mapValue("row.id", "productId");
- Parameters:
mappingsToAdd
- the mappings to add- Returns:
- the action
-
mapInitialValues
Configure mappings from the row or context to the create form's state. This is used in order to ensure the submission of form data inherits certain values from the row or context.- Parameters:
mappingsToAdd
- the mappings to add- Returns:
- the action
- See Also:
-
refreshOnMount
Indicate this action should trigger a refresh of the parentFetchGrid
after a successful submission.- Returns:
- this
-
notRefreshOnMount
Indicate this action should not trigger a refresh of the parentFetchGrid
after a successful submission.- Returns:
- this
-
unsetRefreshOnMount
Undo a previous call torefreshOnMount()
ornotRefreshOnMount()
.- Returns:
- this
- Since:
- 2.x.x
-
submitEndpoint
Configure theRowModalFormAction.EndpointTypes.SUBMIT
endpoint.- Parameters:
endpoint
- the endpoint- Returns:
- this
-
submitEndpoint
Configure theRowModalFormAction.EndpointTypes.SUBMIT
endpoint.- Parameters:
fn
- the function to configure the endpoint- Returns:
- this
-
submitUrl
Configure theRowModalFormAction.EndpointTypes.SUBMIT
endpoint URL.- Parameters:
url
- the endpoint url- Returns:
- this
-
submitScope
Configure theRowModalFormAction.EndpointTypes.SUBMIT
endpoint scope.- Parameters:
scope
- the endpoint scope- Returns:
- this
-
submitUrl
Configure theRowModalFormAction.EndpointTypes.SUBMIT
endpoint URL and scope.- Parameters:
url
- the endpoint urlscope
- the endpoint scope- Returns:
- this
-
getSubmitEndpoint
Retrieve theRowModalFormAction.EndpointTypes.SUBMIT
endpoint.- Returns:
- the endpoint
-
findSubmitEndpoint
Retrieve theRowModalFormAction.EndpointTypes.SUBMIT
endpoint.- Returns:
- an optional with the endpoint
-